:root {
  --paper: #f8f7f4;
  --paper-soft: #f1ebe4;
  --ink: #171514;
  --muted: #68615c;
  --line: #ded4cb;
  --accent: #c9a98f;
  --white: #fffefc;
  --shadow: 0 18px 50px rgba(74, 58, 45, 0.08);
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Trebuchet MS", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(248, 247, 244, 0.65) 44%, rgba(255, 255, 255, 0.94)),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.shell {
  width: min(1120px, calc(100% - 120px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 254, 252, 0.9);
  border-bottom: 1px solid rgba(222, 212, 203, 0.4);
  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: 68px;
  display: grid;
  grid-template-columns: 190px 1fr 132px;
  align-items: center;
  gap: 28px;
}

.logo {
  display: inline-grid;
  gap: 0;
  width: fit-content;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.logo span {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 0.9;
  letter-spacing: 0.18em;
}

.logo small {
  margin-top: 7px;
  font-size: 10px;
  letter-spacing: 0.26em;
}

.main-nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: clamp(26px, 4vw, 54px);
  font-size: 11px;
}

.main-nav a {
  position: relative;
  padding-block: 18px;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 260ms ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  transform: scaleX(1);
}

.header-cta,
.dark-button {
  border: 0;
  background: #11100f;
  color: var(--white);
  min-height: 42px;
  padding: 0 28px;
  cursor: pointer;
  border-radius: 2px;
  box-shadow: 0 14px 26px rgba(17, 16, 15, 0.15);
  transition:
    transform 220ms ease,
    background 220ms ease,
    box-shadow 220ms ease;
}

.header-cta:hover,
.dark-button:hover {
  transform: translateY(-1px);
  background: #292522;
  box-shadow: 0 16px 28px rgba(17, 16, 15, 0.18);
}

.header-cta:active,
.dark-button:active {
  transform: translateY(1px) scale(0.99);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 4px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 1px;
  margin: 6px auto;
  background: var(--ink);
}

.hero {
  min-height: 440px;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(310px, 0.93fr) minmax(430px, 1.2fr);
  gap: 36px;
  align-items: center;
  min-height: 420px;
}

.hero-copy {
  padding-top: 18px;
  z-index: 2;
}

.hero-copy h1 {
  max-width: 490px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(44px, 5vw, 66px);
  font-weight: 400;
  line-height: 0.96;
  text-transform: uppercase;
}

.hero-copy h1 span {
  display: block;
  margin-top: 8px;
  font-size: clamp(27px, 3.1vw, 40px);
  line-height: 1.12;
}

.hairline {
  width: 50px;
  height: 1px;
  margin: 33px 0 24px;
  background: var(--accent);
}

.hero-copy p {
  max-width: 330px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 13px;
}

.hero-media {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  align-self: stretch;
  min-height: 420px;
  overflow: visible;
}

.hero-media img {
  position: relative;
  right: auto;
  bottom: auto;
  width: min(520px, 98%);
  height: 420px;
  object-fit: cover;
  object-position: right center;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%),
    linear-gradient(to bottom, #000 0%, #000 80%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%),
    linear-gradient(to bottom, #000 0%, #000 80%, transparent 100%);
  mask-composite: intersect;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(222, 212, 203, 0.35);
  border-bottom: 1px solid rgba(222, 212, 203, 0.35);
  margin-top: 0;
}

.features article {
  min-height: 110px;
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 14px;
  align-items: center;
  padding: 24px 34px 22px 24px;
  border-right: 1px solid var(--line);
}

.features article:last-child {
  border-right: 0;
}

.feature-mark {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  color: #c8a88e;
  line-height: 1;
}

.feature-mark img {
  width: 76px;
  height: 76px;
  object-fit: contain;
}

.features h2,
.procedure-card h3,
.specialist-card h3,
.package-card span {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.15;
  text-transform: uppercase;
}

.features p {
  max-width: 240px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.section {
  padding-top: 34px;
}

.section-title {
  margin: 0 0 14px;
  text-align: center;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
}

.procedure-grid {
  display: grid;
  grid-template-columns: repeat(4, 200px);
  justify-content: space-between;
  gap: 12px;
}

.procedure-card {
  min-width: 0;
  border: 1px solid var(--line);
  background: rgba(255, 254, 252, 0.74);
  border-radius: 4px;
  overflow: hidden;
  transition:
    transform 260ms ease,
    box-shadow 260ms ease;
}

.procedure-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.procedure-card img {
  width: 100%;
  max-width: none;
  margin: 0;
  aspect-ratio: 184 / 118;
  object-fit: cover;
  object-position: center 28%;
}

.procedure-card div {
  padding: 14px 15px 17px;
}

.procedure-card h3 {
  font-size: 15px;
}

.procedure-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.specialist-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.specialist-card {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 20px;
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(255, 254, 252, 0.76);
  border-radius: 4px;
  padding: 10px;
}

.specialist-card img {
  width: 105px;
  aspect-ratio: 108 / 111;
  object-fit: cover;
  object-position: center top;
}

.specialist-card h3 {
  margin-bottom: 12px;
  font-size: 18px;
  text-transform: none;
}

.specialist-card p,
.specialist-card span {
  display: block;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.link-button,
.center-link {
  position: relative;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 10px 36px 10px 0;
  color: var(--ink);
  font-size: 11px;
}

.link-button::after,
.center-link::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 24px;
  height: 1px;
  background: var(--accent);
  transition: width 220ms ease;
}

.link-button:hover::after,
.center-link:hover::after {
  width: 31px;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-content: space-between;
  gap: 34px;
}

.work-card {
  position: relative;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

.work-card img {
  width: 100%;
  max-width: none;
  margin-inline: auto;
  aspect-ratio: 240 / 103;
  object-fit: cover;
}

.work-card span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: 0 7px 20px rgba(34, 31, 28, 0.15);
  transform: translate(-50%, -50%);
}

.work-card span::before,
.price-more i::before,
.package-card i::before {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-top: 1px solid var(--ink);
  border-right: 1px solid var(--ink);
  transform: rotate(45deg);
}

.work-card span::before {
  top: 10px;
  left: 8px;
}

.center-link {
  display: block;
  margin: 13px auto 0;
  padding-left: 0;
}

.price-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.price-grid article,
.price-more {
  height: 72px;
  display: grid;
  grid-template-rows: 18px 32px;
  align-content: center;
  justify-items: center;
  gap: 4px;
  text-align: center;
  border: 1px solid var(--line);
  background: rgba(255, 254, 252, 0.74);
  border-radius: 4px;
  padding: 14px 10px;
}

.price-grid span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  color: #302b27;
  font-size: 12px;
  line-height: 1.15;
}

.price-grid strong {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 32px;
  margin-top: 0;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  font-variant-numeric: lining-nums tabular-nums;
}

.price-more {
  position: relative;
  border-color: var(--line);
  cursor: pointer;
  color: var(--ink);
}

.price-more i {
  position: relative;
  display: block;
  width: 50px;
  height: 12px;
  margin-top: 2px;
}

.price-more i::after,
.package-card i::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  width: 48px;
  height: 1px;
  background: var(--ink);
}

.price-more i::before {
  top: 2px;
  right: 0;
}

.signup {
  position: relative;
  display: grid;
  grid-template-columns: 240px minmax(430px, 1fr);
  align-items: center;
  gap: 28px;
  min-height: 142px;
  margin-top: 18px;
  padding: 24px min(390px, 32vw) 24px 32px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(237, 229, 219, 0.98), rgba(250, 247, 243, 0.96) 54%, rgba(248, 243, 236, 0.78)),
    var(--paper-soft);
}

.signup-copy {
  position: relative;
  z-index: 2;
}

.signup h2 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 400;
  line-height: 0.95;
  text-transform: uppercase;
}

.signup p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.inline-form {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr 140px;
  gap: 12px;
  align-items: start;
}

.inline-form label span,
.modal-form label span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
}

.inline-form label:not(.policy) span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.inline-form input,
.modal-form input,
.modal-form select,
.modal-form textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(222, 212, 203, 0.95);
  border-radius: 2px;
  background: var(--white);
  color: var(--ink);
  outline: 0;
  padding: 0 16px;
  transition:
    border 180ms ease,
    box-shadow 180ms ease;
}

.modal-form textarea {
  min-height: 108px;
  padding-top: 12px;
  resize: vertical;
}

.inline-form input:focus,
.modal-form input:focus,
.modal-form select:focus,
.modal-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201, 169, 143, 0.16);
}

.inline-form .dark-button {
  min-height: 40px;
}

.policy {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.policy input {
  width: 15px;
  height: 15px;
  min-height: 0;
  flex: 0 0 auto;
  accent-color: #11100f;
}

.form-status {
  grid-column: 1 / -1;
  min-height: 16px;
  color: #4d6a4f;
  font-size: 11px;
}

.signup > img {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: 1;
  width: min(390px, 34%);
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.94;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.22) 16%, #000 42%, #000 100%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.22) 16%, #000 42%, #000 100%);
}

.package-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-content: space-between;
  gap: 18px;
}

.package-card {
  position: relative;
  min-height: 164px;
  overflow: hidden;
  border: 1px solid rgba(222, 212, 203, 0.62);
  background: var(--paper-soft);
  padding: 24px 26px;
  text-align: left;
  cursor: pointer;
  isolation: isolate;
  transition:
    transform 250ms ease,
    box-shadow 250ms ease;
}

.package-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.package-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.54;
  pointer-events: none;
  transform: scale(1.01);
  transition: transform 420ms ease;
}

.package-card:hover .package-bg {
  transform: scale(1.045);
}

.package-card:nth-child(1) .package-bg {
  object-position: 58% 42%;
}

.package-card:nth-child(2) .package-bg {
  object-position: 52% 44%;
}

.package-card:nth-child(3) .package-bg {
  object-position: 42% 48%;
}

.package-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(248, 247, 244, 0.98) 0%, rgba(248, 247, 244, 0.95) 38%, rgba(248, 247, 244, 0.76) 62%, rgba(248, 247, 244, 0.32) 100%),
    linear-gradient(180deg, rgba(255, 254, 252, 0.28), rgba(232, 221, 210, 0.24));
  z-index: 1;
  pointer-events: none;
}

.package-card span {
  position: relative;
  z-index: 2;
  display: block;
  max-width: 180px;
  font-size: 20px;
}

.package-card small,
.package-card em {
  position: relative;
  z-index: 2;
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.package-card strong {
  position: relative;
  z-index: 2;
  display: block;
  margin-top: 16px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
}

.package-card i {
  position: absolute;
  right: 28px;
  bottom: 26px;
  z-index: 2;
  width: 40px;
  height: 14px;
}

.package-card i::after {
  width: 38px;
}

.package-card i::before {
  top: 2px;
  right: 0;
}

.cert-section {
  padding-bottom: 28px;
}

.cert-row {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
}

.cert-track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 30px;
  align-items: center;
}

.cert-card {
  display: grid;
  place-items: center;
  min-height: 124px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: zoom-in;
}

.cert-card:focus-visible {
  outline: 2px solid rgba(201, 169, 143, 0.9);
  outline-offset: 8px;
}

.cert-card img {
  width: 100%;
  max-width: 176px;
  margin-inline: auto;
  opacity: 0.86;
  border: 1px solid rgba(222, 212, 203, 0.58);
  transition:
    opacity 220ms ease,
    transform 220ms ease,
    box-shadow 220ms ease;
}

.cert-card:hover img,
.cert-card:focus-visible img {
  opacity: 1;
  transform: translateY(-3px);
  box-shadow: 0 16px 44px rgba(74, 58, 45, 0.1);
}

.site-footer {
  border-top: 1px solid rgba(222, 212, 203, 0.72);
  padding: 20px 0 14px;
  background: rgba(255, 254, 252, 0.76);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.25fr;
  gap: 34px;
  align-items: start;
}

.footer-grid .logo span {
  font-size: 28px;
}

.footer-grid nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 36px;
  font-size: 11px;
}

.footer-grid address {
  display: grid;
  gap: 7px;
  justify-items: start;
  color: var(--ink);
  font-style: normal;
  font-size: 12px;
}

.socials {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 8px;
}

.socials a {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #171514;
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.socials a:hover {
  color: #4c4038;
  transform: translateY(-1px);
}

.socials svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: currentColor;
}

.copyright {
  width: min(1120px, calc(100% - 120px));
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 10px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.modal.is-open {
  display: grid;
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 21, 20, 0.42);
  backdrop-filter: blur(10px);
}

.modal-card {
  position: relative;
  width: min(820px, calc(100vw - 40px));
  max-height: calc(100dvh - 40px);
  overflow: auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(17, 16, 15, 0.25);
  padding: 34px;
  transform: translateY(14px) scale(0.98);
  transition: transform 220ms ease;
}

.modal.is-open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  cursor: pointer;
}

.modal-close::before,
.modal-close::after {
  content: "";
  position: absolute;
  top: 16px;
  left: 9px;
  width: 14px;
  height: 1px;
  background: var(--ink);
}

.modal-close::before {
  transform: rotate(45deg);
}

.modal-close::after {
  transform: rotate(-45deg);
}

.modal-heading {
  max-width: 650px;
  margin-bottom: 24px;
}

.modal-heading span {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.modal-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 400;
  line-height: 1;
}

.modal-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.modal-form small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.modal-form .wide {
  grid-column: 1 / -1;
}

.gallery-card {
  width: min(1120px, calc(100vw - 40px));
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 184px));
  justify-content: center;
  gap: 12px;
}

.gallery-grid img {
  width: 100%;
  height: 96px;
  object-fit: cover;
  border: 1px solid rgba(222, 212, 203, 0.58);
}

.price-list {
  display: grid;
  gap: 0;
  margin-bottom: 22px;
  border-top: 1px solid var(--line);
}

.price-list p {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: end;
  margin: 0;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.price-list span {
  color: var(--muted);
}

.price-list strong {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
}

.certificate-modal-card {
  width: min(1180px, calc(100vw - 40px));
  padding: 28px;
}

.certificate-heading {
  margin-bottom: 16px;
}

.certificate-heading h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.certificate-full {
  width: 100%;
  max-height: calc(100dvh - 190px);
  object-fit: contain;
  border: 1px solid rgba(222, 212, 203, 0.72);
  background: var(--white);
}

.modal-specialists {
  display: grid;
  grid-template-columns: repeat(3, 180px);
  justify-content: center;
  gap: 14px;
}

.modal-specialists article {
  border: 1px solid var(--line);
  padding: 14px;
  background: rgba(248, 247, 244, 0.7);
}

.modal-specialists img {
  width: 105px;
  margin-inline: auto;
  aspect-ratio: 1 / 1.05;
  object-fit: cover;
  margin-bottom: 12px;
}

.modal-specialists h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
}

.modal-specialists p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1120px) {
  .shell,
  .copyright {
    width: min(100% - 56px, 980px);
  }

  .header-inner {
    grid-template-columns: 170px 1fr 120px;
  }

  .main-nav {
    gap: 24px;
  }

  .hero-grid {
    grid-template-columns: minmax(300px, 0.9fr) minmax(370px, 1fr);
  }

  .features article {
    padding-inline: 18px;
  }

  .procedure-grid {
    grid-template-columns: repeat(2, 200px);
    justify-content: center;
  }

  .procedure-card img {
    max-height: none;
  }

  .specialist-grid,
  .works-grid,
  .package-grid {
    gap: 14px;
  }

  .specialist-card {
    grid-template-columns: 94px 1fr;
    gap: 14px;
  }

  .specialist-card img {
    width: 90px;
  }

  .signup {
    grid-template-columns: 210px 1fr;
    padding-right: 300px;
  }

  .signup > img {
    display: block;
    width: 300px;
  }
}

@media (max-width: 900px) {
  .site-header {
    position: sticky;
  }

  .header-inner {
    grid-template-columns: 1fr auto auto;
    gap: 14px;
    min-height: 64px;
  }

  .menu-toggle {
    display: block;
    grid-column: 2;
  }

  .header-cta {
    grid-column: 3;
  }

  .main-nav {
    position: absolute;
    left: 28px;
    right: 28px;
    top: 64px;
    z-index: 25;
    display: grid;
    gap: 0;
    width: auto;
    justify-self: stretch;
    justify-items: start;
    padding: 12px 18px;
    border: 1px solid var(--line);
    background: var(--white);
    box-shadow: var(--shadow);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition:
      opacity 180ms ease,
      transform 180ms ease;
  }

  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .main-nav a {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid rgba(222, 212, 203, 0.5);
  }

  .main-nav a:last-child {
    border-bottom: 0;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 10px;
    padding-top: 28px;
  }

  .hero-media {
    min-height: clamp(320px, 58vw, 410px);
    order: -1;
    justify-content: center;
  }

  .hero-media img {
    width: min(590px, 100%);
    height: clamp(320px, 58vw, 410px);
    object-position: right top;
  }

  .hero-copy {
    padding-top: 0;
    padding-bottom: 28px;
  }

  .hero-copy h1 {
    max-width: 650px;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .features article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .features article:last-child {
    border-bottom: 0;
  }

  .specialist-grid,
  .works-grid,
  .price-grid,
  .package-grid {
    grid-template-columns: 1fr;
  }

  .works-grid {
    gap: 16px;
  }

  .work-card img {
    max-height: 190px;
  }

  .work-card,
  .package-card {
    width: 100%;
    max-width: 520px;
    justify-self: center;
  }

  .work-card {
    max-width: none;
  }

  .price-grid article,
  .price-more {
    min-height: 84px;
  }

  .signup {
    grid-template-columns: 1fr;
    padding: 26px;
  }

  .signup > img {
    display: none;
  }

  .inline-form {
    grid-template-columns: 1fr 1fr;
  }

  .inline-form .dark-button {
    grid-column: 1 / -1;
  }

  .cert-track {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid address {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .shell,
  .copyright {
    width: calc(100% - 32px);
  }

  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .logo span {
    font-size: 24px;
  }

  .logo small {
    font-size: 8px;
  }

  .header-cta {
    display: none;
  }

  .menu-toggle {
    grid-column: 2;
  }

  .main-nav {
    left: 0;
    right: 0;
  }

  .hero-copy h1 {
    font-size: clamp(37px, 14vw, 52px);
  }

  .hero-copy h1 span {
    font-size: clamp(24px, 8.5vw, 32px);
  }

  .hero-media {
    min-height: 315px;
  }

  .hero-media img {
    width: min(560px, 100%);
    height: 315px;
    object-position: right top;
  }

  .features article {
    grid-template-columns: 76px 1fr;
    padding: 18px 12px;
  }

  .feature-mark {
    width: 72px;
    height: 72px;
  }

  .feature-mark img {
    width: 72px;
    height: 72px;
  }

  .section {
    padding-top: 30px;
  }

  .section-title {
    font-size: 26px;
    margin-bottom: 13px;
  }

  .procedure-grid {
    grid-template-columns: minmax(0, 280px);
    justify-content: center;
  }

  .procedure-card img {
    max-height: none;
  }

  .specialist-card {
    grid-template-columns: 104px 1fr;
  }

  .specialist-card img {
    width: 96px;
  }

  .inline-form,
  .modal-form,
  .gallery-grid,
  .modal-specialists {
    grid-template-columns: 1fr;
  }

  .signup h2 {
    font-size: 26px;
  }

  .cert-row {
    grid-template-columns: 1fr;
  }

  .cert-track {
    grid-template-columns: repeat(2, 1fr);
  }

  .cert-card {
    min-height: 102px;
  }

  .certificate-modal-card {
    padding: 34px 12px 14px;
  }

  .certificate-full {
    max-height: calc(100dvh - 145px);
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid nav {
    max-width: 260px;
  }

  .modal {
    padding: 12px;
  }

  .modal-card {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
    padding: 28px 18px 22px;
  }

  .modal-close {
    top: 12px;
    right: 12px;
  }

  .modal-heading h2 {
    padding-right: 30px;
  }
}

@media (max-width: 360px) {
  .shell,
  .copyright {
    width: calc(100% - 24px);
  }

  .hero-copy h1 {
    font-size: 34px;
  }

  .hero-copy h1 span {
    font-size: 22px;
  }

  .hero-media {
    min-height: 285px;
  }

  .hero-media img {
    height: 285px;
  }

  .specialist-card {
    grid-template-columns: 88px 1fr;
  }

  .specialist-card img {
    width: 82px;
  }
}
