/* Miracle Smile — styles */

:root {
  --bg: #F7F4EF;
  --bg-2: #EFE9E0;
  --surface: #FFFFFF;
  --field: #FAF8F4;
  --ink: #10201F;
  --ink-2: #2A3B3A;
  --muted: #667170;
  --line: rgba(16, 32, 31, .12);
  --gold: #A9844F;
  --gold-soft: #D9C3A0;
  --deep: #0E1D1C;
  --cream: #F4EEE4;

  --serif: "Cormorant Garamond", "Iowan Old Style", "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 1180px;
  --radius: 22px;
  --arch: 50% 50% 28px 28px / 40% 40% 28px 28px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
p { margin: 0; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -.01em;
  line-height: 1.05;
}

h1 em, h2 em, .quote em { font-style: italic; color: var(--gold); }

::selection { background: var(--gold-soft); color: var(--ink); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.container { width: min(100% - 48px, var(--container)); margin-inline: auto; }

.skip-link {
  position: absolute; left: 16px; top: -64px; z-index: 100;
  padding: 10px 18px; border-radius: 999px;
  background: var(--ink); color: var(--cream); font-size: 14px; font-weight: 600;
  transition: top .2s;
}
.skip-link:focus { top: 16px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .7; }

.lead { font-size: clamp(17px, 1.35vw, 19px); color: var(--muted); max-width: 33em; }

.text-link {
  color: var(--ink); font-weight: 600;
  text-decoration: underline; text-decoration-color: var(--gold);
  text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.text-link:hover { color: var(--gold); }

/* ---------- Brand mark ---------- */

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.mark-spark { fill: var(--gold); }
.mark-smile { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }
.brand-name { font-family: var(--serif); font-size: 25px; font-weight: 600; line-height: 1; color: var(--ink); letter-spacing: .005em; }

.brand-light .brand-name { color: var(--cream); }
.brand-light .mark-smile { stroke: var(--cream); }
.brand-light .mark-spark { fill: var(--gold-soft); }

/* ---------- Buttons ---------- */

.btn {
  --h: 54px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--h); padding: 0 28px;
  border: 1px solid transparent; border-radius: 999px;
  font-size: 14.5px; font-weight: 600; letter-spacing: .02em; white-space: nowrap;
  transition: background .35s var(--ease), color .35s, border-color .35s, transform .35s var(--ease), box-shadow .35s var(--ease), opacity .3s;
}
.btn svg { width: 17px; height: 17px; transition: transform .35s var(--ease); }
.btn:hover svg { transform: translateX(4px); }

.btn-primary { background: var(--ink); color: var(--cream); box-shadow: 0 12px 30px -14px rgba(16, 32, 31, .55); }
.btn-primary:hover { background: #1E3634; transform: translateY(-1px); box-shadow: 0 18px 36px -16px rgba(16, 32, 31, .55); }

.btn-ghost { border-color: rgba(16, 32, 31, .22); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); background: rgba(255, 255, 255, .55); }

.btn-sm { --h: 42px; padding: 0 20px; font-size: 13.5px; }

/* ---------- Header ---------- */

.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background .4s var(--ease), box-shadow .4s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(247, 244, 239, .84);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  backdrop-filter: saturate(140%) blur(16px);
  box-shadow: 0 1px 0 var(--line);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: 88px; transition: height .4s var(--ease);
}
.is-scrolled .header-inner { height: 70px; }

.nav { display: flex; gap: 38px; }
.nav a { position: relative; padding: 6px 0; font-size: 14px; font-weight: 500; letter-spacing: .02em; color: var(--ink-2); transition: color .3s; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--gold); transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.header-actions { display: flex; align-items: center; gap: 14px; }

.lang-switch {
  display: inline-flex; padding: 3px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255, 255, 255, .45);
}
.lang-switch button {
  padding: 6px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .12em; line-height: 1.2;
  color: var(--muted); transition: background .3s, color .3s;
}
.lang-switch button:hover { color: var(--ink); }
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: var(--cream); }

/* ---------- Hero ---------- */

.hero { position: relative; isolation: isolate; overflow: hidden; padding: 176px 0 128px; }
.hero::before {
  content: ""; position: absolute; z-index: -1;
  top: -18%; right: -12%; width: 72vw; height: 72vw; max-width: 940px; max-height: 940px;
  background: radial-gradient(closest-side, rgba(217, 195, 160, .5), rgba(217, 195, 160, 0));
}
.hero::after {
  content: ""; position: absolute; z-index: -1;
  bottom: -30%; left: -18%; width: 60vw; height: 60vw; max-width: 760px; max-height: 760px;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0));
}

.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 72px; align-items: center; }

.hero h1 { font-size: clamp(46px, 6.3vw, 88px); line-height: 1; margin: 26px 0 28px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }

.hero-points {
  display: flex; flex-wrap: wrap; gap: 10px 28px;
  margin: 46px 0 0; padding: 0; list-style: none;
  font-size: 12.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2);
}
.hero-points li { display: inline-flex; align-items: center; gap: 10px; }
.hero-points li::before { content: ""; width: 6px; height: 6px; background: var(--gold); transform: rotate(45deg); }

.hero-visual { position: relative; justify-self: end; width: 100%; max-width: 460px; }
.hero-visual::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border: 1px solid rgba(169, 132, 79, .45); border-radius: var(--arch);
  transform: translate(22px, 22px);
}

.arch {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 5; border-radius: var(--arch);
  background: linear-gradient(165deg, #F0E8DC 0%, #DDCDB3 46%, #BC9C6E 100%);
  box-shadow: 0 50px 90px -46px rgba(80, 58, 28, .55);
}
.arch::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 26% 14%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 52%);
}
.arch-art { position: absolute; inset: 0; width: 100%; height: 100%; }

.twinkle { animation: twinkle 4.8s ease-in-out infinite; }
.twinkle-2 { animation-delay: -2.4s; }
@keyframes twinkle { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

.hero-badge {
  position: absolute; left: -40px; bottom: 52px;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 24px 14px 14px; border-radius: 20px;
  background: rgba(255, 255, 255, .84);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 24px 50px -22px rgba(16, 32, 31, .35);
  animation: float 7s ease-in-out infinite;
}
.badge-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--ink); flex: none; }
.badge-icon svg { width: 26px; height: 26px; fill: var(--gold-soft); }
.badge-icon .badge-smile { fill: none; stroke: var(--cream); stroke-width: 2.4; stroke-linecap: round; }
.hero-badge strong { display: block; font-family: var(--serif); font-size: 20px; font-weight: 600; line-height: 1.15; color: var(--ink); }
.hero-badge small { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.4; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- Sections ---------- */

.section { padding: clamp(88px, 11vw, 144px) 0; }

.section h2 { font-size: clamp(38px, 4.6vw, 62px); margin: 22px 0; }

.section-head { margin-bottom: 64px; }
.section-head.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; }
.section-head.split h2 { margin-bottom: 0; }
.section-head.split > p { font-size: 17.5px; color: var(--muted); max-width: 30em; justify-self: end; padding-bottom: 8px; }

/* Services */

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

.card {
  position: relative;
  padding: 40px 36px 46px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .5s;
}
.card::after {
  content: ""; position: absolute; left: 36px; right: 36px; bottom: 0; height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease);
}
.js .card.reveal.is-visible:hover, .card:hover {
  transform: translateY(-6px);
  box-shadow: 0 34px 64px -34px rgba(16, 32, 31, .3);
  border-color: rgba(169, 132, 79, .3);
}
.card:hover::after { transform: scaleX(1); }

.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 52px; }
.card-icon {
  display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line);
}
.card-icon svg, .info-icon svg, .form-note svg, .dialog-close svg {
  fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.card-icon svg { width: 24px; height: 24px; }
.card-num { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--gold); }
.card h3 { font-size: 29px; line-height: 1.12; margin-bottom: 14px; }
.card p { color: var(--muted); font-size: 15.5px; }

/* Approach */

.approach { background: var(--bg-2); }
.approach-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 88px; }
.approach-intro { position: sticky; top: 130px; align-self: start; }
.approach-intro > p:last-child { font-size: 17.5px; color: var(--muted); max-width: 26em; }

.steps { margin: 0; padding: 0; list-style: none; }
.step { display: grid; grid-template-columns: 96px 1fr; gap: 24px; padding: 42px 0; border-top: 1px solid var(--line); }
.step:last-child { border-bottom: 1px solid var(--line); }
.step-num { font-family: var(--serif); font-size: 60px; font-weight: 500; line-height: .85; color: var(--gold); }
.step h3 { font-size: 31px; margin-bottom: 10px; }
.step p { color: var(--muted); max-width: 32em; }

/* Statement */

.quote-band { position: relative; isolation: isolate; overflow: hidden; background: var(--deep); text-align: center; }
.quote-band::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 50%;
  width: 900px; height: 900px; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(169, 132, 79, .2), rgba(169, 132, 79, 0));
}
.quote-figure { margin: 0 auto; }
.quote-mark { width: 46px; height: 46px; margin: 0 auto 36px; }
.quote-band .mark-spark { fill: var(--gold-soft); }
.quote-band .mark-smile { stroke: var(--cream); stroke-width: 1.8; }
.quote {
  margin: 0 auto; max-width: 15em;
  font-family: var(--serif); font-size: clamp(36px, 5.2vw, 72px); font-weight: 500; line-height: 1.08;
  color: var(--cream); letter-spacing: -.01em;
}
.quote em { color: var(--gold-soft); }
.quote-by { margin-top: 34px; font-size: 12px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: rgba(244, 238, 228, .55); }

/* Contact */

.contact-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 88px; align-items: start; }

.info-list { display: grid; gap: 22px; margin: 48px 0 0; padding: 0; list-style: none; }
.info-item { display: grid; grid-template-columns: 50px 1fr; gap: 16px; align-items: center; }
.info-icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); }
.info-icon svg { width: 20px; height: 20px; }
.info-label { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.info-value { display: block; font-size: 15.5px; font-weight: 500; color: var(--ink); line-height: 1.5; }

.form-card {
  padding: clamp(28px, 4.4vw, 54px);
  background: var(--surface); border: 1px solid var(--line); border-radius: 30px;
  box-shadow: 0 50px 100px -60px rgba(16, 32, 31, .4);
}

.contact-form { display: grid; gap: 22px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }

.field label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--ink); letter-spacing: .01em; }
.optional { font-weight: 500; color: var(--muted); }

.field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px;
  font: inherit; font-size: 15.5px; color: var(--ink);
  background: var(--field); border: 1px solid var(--line); border-radius: 14px;
  -webkit-appearance: none; appearance: none;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.6; }
.field select {
  padding-right: 46px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A9844F' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 18px;
}
.field ::placeholder { color: #9AA3A1; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(16, 32, 31, .24); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; background: #fff; border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(169, 132, 79, .16);
}
.field input:user-invalid, .field textarea:user-invalid { border-color: #B4574B; }
.field input:user-invalid:focus, .field textarea:user-invalid:focus { box-shadow: 0 0 0 4px rgba(180, 87, 75, .14); }

.field-hint { margin-top: 8px; font-size: 12.5px; color: var(--muted); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.consent { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; font-size: 14px; line-height: 1.55; color: var(--muted); cursor: pointer; }
.consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); cursor: pointer; }

.form-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 20px; margin-top: 6px; }
.form-note { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.form-note svg { width: 15px; height: 15px; }

.btn-submit .spinner {
  display: none; width: 17px; height: 17px; border-radius: 50%;
  border: 2px solid rgba(244, 238, 228, .35); border-top-color: var(--cream);
  animation: spin .8s linear infinite;
}
.btn-submit[aria-busy="true"] { pointer-events: none; opacity: .8; }
.btn-submit[aria-busy="true"] svg { display: none; }
.btn-submit[aria-busy="true"] .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-status { border-radius: 14px; font-size: 14.5px; line-height: 1.55; }
.form-status:not(:empty) { margin-top: 22px; padding: 14px 18px; }
.form-status[data-tone="pending"] { background: var(--bg); color: var(--ink-2); }
.form-status[data-tone="success"] { background: rgba(47, 107, 88, .09); color: #24594A; }
.form-status[data-tone="error"] { background: rgba(164, 63, 52, .08); color: #8C3327; }
.form-status[data-tone="info"] { background: rgba(169, 132, 79, .13); color: #6A4E25; }

/* ---------- Footer ---------- */

.site-footer { background: var(--deep); color: rgba(244, 238, 228, .66); padding: 84px 0 36px; font-size: 14.5px; }

.footer-grid {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px;
  padding-bottom: 56px; border-bottom: 1px solid rgba(244, 238, 228, .12);
}
.footer-brand p { margin-top: 22px; max-width: 30em; }

.footer-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin: 0; }
.footer-meta dt { margin-bottom: 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-soft); }
.footer-meta dd { margin: 0; color: var(--cream); line-height: 1.6; }

.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding-top: 28px; font-size: 13px; }
.site-footer .text-link { color: rgba(244, 238, 228, .85); font-weight: 500; text-decoration-color: rgba(217, 195, 160, .5); }
.site-footer .text-link:hover { color: var(--gold-soft); }

/* ---------- Privacy dialog ---------- */

.privacy-dialog {
  width: min(640px, calc(100% - 32px)); max-height: calc(100dvh - 48px);
  padding: clamp(28px, 5vw, 50px); overflow: auto;
  border: 0; border-radius: 26px;
  background: var(--bg); color: var(--ink-2);
  box-shadow: 0 60px 120px -40px rgba(0, 0, 0, .5);
}
.privacy-dialog::backdrop { background: rgba(14, 29, 28, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.privacy-dialog[open] { animation: dialog-in .45s var(--ease); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(14px); } }

.privacy-dialog h2 { font-size: clamp(32px, 4vw, 46px); margin: 16px 0 24px; }
.privacy-body p { margin-bottom: 16px; font-size: 15px; }
.privacy-body strong { display: block; margin-bottom: 2px; font-weight: 600; color: var(--ink); }

.dialog-close {
  position: absolute; top: 18px; right: 18px;
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); transition: border-color .3s;
}
.dialog-close:hover { border-color: var(--gold); }
.dialog-close svg { width: 18px; height: 18px; stroke: var(--ink); stroke-width: 1.8; }

/* ---------- Reveal on scroll ---------- */

.js .reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity 1s var(--ease), transform 1s var(--ease), box-shadow .5s var(--ease), border-color .5s;
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .card.reveal.is-visible { transition-delay: 0s; }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .hero-grid { gap: 48px; }
  .approach-grid, .contact-grid { gap: 60px; }
  .hero-badge { left: -20px; }
}

@media (max-width: 960px) {
  .nav { display: none; }
  .hero { padding: 144px 0 96px; }
  .hero-grid { grid-template-columns: 1fr; gap: 64px; }
  .hero-visual { justify-self: center; max-width: 400px; }
  .section-head.split { grid-template-columns: 1fr; gap: 0; }
  .section-head.split > p { justify-self: start; margin-top: 22px; padding-bottom: 0; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .services-grid > :last-child { grid-column: 1 / -1; }
  .approach-grid, .contact-grid { grid-template-columns: 1fr; }
  .approach-intro { position: static; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .container { width: calc(100% - 32px); }
  .header-inner { height: 72px; }
  .is-scrolled .header-inner { height: 64px; }
  .header-cta { display: none; }
  .brand-name { font-size: 22px; }
  .brand-mark { width: 30px; height: 30px; }
  .hero { padding: 124px 0 80px; }
  .hero-visual::before { transform: translate(12px, 12px); }
  .hero-badge { left: 0; bottom: 28px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .services-grid { grid-template-columns: 1fr; }
  .card { padding: 32px 28px 36px; }
  .card-top { margin-bottom: 36px; }
  .step { grid-template-columns: 56px 1fr; gap: 16px; padding: 32px 0; }
  .step-num { font-size: 46px; }
  .step h3 { font-size: 27px; }
  .field-row { grid-template-columns: 1fr; }
  .form-footer .btn { width: 100%; }
  .form-card { border-radius: 24px; }
  .footer-meta { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero-badge, .twinkle { animation: none; }
  .privacy-dialog[open] { animation: none; }
}
