/* ============================================================
   SOVJANI FAMILY OFFICE — Component styles
   Hand-translated from the Claude Design prototype (Sovjani.dc.html).
   Design-tool syntax (style-hover, {{ }} bindings, data-dc-*) has been
   converted to real CSS/HTML/JS. Inline styles were extracted here.
   ============================================================ */

/* Shared values, named after the design system's tokens. */
:root {
  --ease-sov: cubic-bezier(.22, .61, .27, 1);      /* the brand easing */
  --ease-curtain: cubic-bezier(.65, 0, .2, 1);     /* the intro curtain's lift */
  --line-faint: rgba(231, 220, 204, 0.10);         /* section and header hairlines */
  --line-soft: rgba(231, 220, 204, 0.12);          /* card edges */
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--sov-charcoal-900);
  color: var(--sov-ivory);
  font-family: var(--font-body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(250, 192, 145, 0.28); color: var(--sov-ivory); }

img, svg, video { display: block; }

a { color: inherit; }

/* Keyboard focus: the design system's 2px apricot ring, offset 3px.
   (Form fields show focus by warming their own border instead.) */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--sov-apricot);
  outline-offset: 3px;
}

/* ============================================================
   CROSS-DOCUMENT PAGE TRANSITIONS  (View Transitions API)
   Smooth cross-fade on same-origin nav (index <-> inquiries), with the
   header and the primary CTA pill morphing across the page change.
   Unsupported browsers simply do an instant nav. Disabled under
   reduced motion (see the reduced-motion block at the foot of this file).
   ============================================================ */
@view-transition { navigation: auto; }

@keyframes vt-leave { to   { opacity: 0; transform: translateY(-18px); } }
@keyframes vt-enter { from { opacity: 0; transform: translateY(26px); } }

::view-transition-old(root) { animation: vt-leave 0.3s var(--ease-sov) both; }
::view-transition-new(root) { animation: vt-enter 0.55s var(--ease-sov) 0.12s both; }

/* Shared elements that persist/morph across the navigation. Each name must
   be unique per page — there is exactly one header and one CTA pill each. */
.site-header,
.form-header { view-transition-name: site-nav; }
.inq-card .btn--apricot,
.form-next { view-transition-name: cta-pill; }

::view-transition-group(site-nav) { animation-duration: 0.45s; animation-timing-function: var(--ease-sov); }
::view-transition-group(cta-pill) { animation-duration: 0.55s; animation-timing-function: var(--ease-sov); }

/* ============================================================
   KEYFRAMES  (from the prototype <helmet> block)
   ============================================================ */
@keyframes sovRise   { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes sovScroll { 0%, 100% { transform: scaleY(0.4); opacity: 0.35; transform-origin: top; } 50% { transform: scaleY(1); opacity: 0.9; transform-origin: top; } }
@keyframes sovZoom   { from { transform: scale(1); } to { transform: scale(1.08); } }
@keyframes monoIn    { from { opacity: 0; transform: scale(0.84); filter: blur(7px); } to { opacity: 0.85; transform: scale(1); filter: blur(0); } }
@keyframes wordIn    { from { opacity: 0; letter-spacing: 0.7em; transform: translateY(6px); } to { opacity: 1; letter-spacing: 0.26em; transform: none; } }
@keyframes lineDraw  { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes subIn     { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes curtainLift { 0% { transform: translateY(0); } 18% { transform: translateY(0); } 100% { transform: translateY(-101%); } }
@keyframes introSettle { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-12px); opacity: 0; } }
@keyframes formRise  { from { opacity: 0; transform: translateY(44px); } to { opacity: 1; transform: none; } }
@keyframes qRise     { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* ============================================================
   INTRO CURTAIN  (every load; pure CSS — main.js only removes it
   afterwards and lets a click skip it)
   ============================================================ */
.intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  /* dark brand base — matches the page beneath so there is no light flash */
  background: var(--sov-charcoal-900);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  animation: curtainLift 1.6s var(--ease-curtain) 2.7s forwards;
}
.intro-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: introSettle .9s var(--ease-curtain) 2.75s both;
}
.intro-mark {
  width: 82px;
  height: 82px;
  object-fit: contain;
  /* show the icon in its natural apricot line-work on the dark base */
  filter: opacity(0.9);
  animation: monoIn 1.1s var(--ease-sov) .2s both;
}
.intro-word {
  margin-top: 26px;
  font-family: var(--font-brand);
  font-weight: 500;
  text-transform: uppercase;
  color: var(--sov-ivory);
  font-size: clamp(22px, 4vw, 28px);
  animation: wordIn 1.3s var(--ease-sov) .85s both;
}
.intro-rule {
  margin-top: 24px;
  width: 64px;
  height: 1px;
  background: var(--sov-apricot-700);
  transform-origin: center;
  animation: lineDraw .9s var(--ease-sov) 1.65s both;
}
.intro-sub {
  margin-top: 20px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  color: var(--sov-stone);
  font-size: 18px;
  animation: subIn .9s var(--ease-sov) 2.05s both;
}

/* ============================================================
   PERSISTENT HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: rgba(35, 36, 39, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-faint);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(20px, 4vw, 40px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
}
.brand-mark { width: 28px; height: 28px; object-fit: contain; }
.brand-word {
  font-family: var(--font-brand);
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--sov-apricot);
  font-size: 15px;
  padding-left: 0.24em;
}
.nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 34px);
}
.nav-link {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: opacity .25s ease;
}
.nav-link { color: var(--sov-ivory); }
/* Hover effects apply only where a pointer can hover; on phones a tap
   would leave them stuck on (e.g. when coming back to the page). */
@media (hover: hover) { .nav-link:hover { opacity: 0.55; } }
.nav-link--portal { color: var(--sov-apricot); }
@media (hover: hover) { .nav-link--portal:hover { opacity: 0.6; } }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  border-radius: var(--radius-pill);
}
.btn--apricot {
  padding: 16px 34px;
  border: none;
  background: var(--sov-apricot);
  color: var(--sov-charcoal-900);
  box-shadow: var(--shadow-apricot);
  transition: background .25s ease, box-shadow .25s ease;
}
@media (hover: hover) { .btn--apricot:hover { background: var(--sov-apricot-700); box-shadow: none; } }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 94vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px clamp(24px, 6vw, 80px) 120px;
  overflow: hidden;
  background: var(--sov-charcoal-900);
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
  filter: saturate(0.5) brightness(0.42) contrast(0.98);
  z-index: 0;
  animation: sovZoom 44s ease-in-out infinite alternate;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg,
    rgba(28, 29, 32, 0.56) 0%,
    rgba(28, 29, 32, 0.66) 55%,
    rgba(35, 36, 39, 0.88) 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
}
.hero-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(36px, 5.2vw, 76px);
  line-height: 1.1;
  letter-spacing: -0.008em;
  color: var(--sov-ivory);
  margin: 0;
  max-width: 17ch;
}
.accent { color: var(--sov-apricot); }
.scroll-cue {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.scroll-cue span {
  display: block;
  width: 1px;
  height: 52px;
  background: var(--sov-apricot);
  animation: sovScroll 2.8s ease-in-out infinite;
}

/* ============================================================
   REVEAL-ON-LOAD  (pure CSS)
   A gentle rise, staggered by each element's --delay. Timed from
   the first paint, like the intro curtain, so the two stay in step
   however late JS arrives; with JS timing, a slow load could show
   content and then hide it, or leave the hero empty after the
   curtain lifted. On the home page (.has-intro) the reveals wait
   for the curtain to lift.
   ============================================================ */
[data-reveal] {
  animation: sovRise 1.4s var(--ease-sov)
             calc(var(--reveal-offset, 0ms) + var(--delay, 0ms)) both;
}
.has-intro { --reveal-offset: 2900ms; }

/* ============================================================
   INQUIRIES SECTION
   ============================================================ */
.inquiries {
  border-top: 1px solid var(--line-faint);
  padding: clamp(96px, 16vh, 180px) clamp(24px, 6vw, 80px);
}
.inquiries-grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  /* min(): on phones narrower than 368px the 320px minimum would overflow */
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: clamp(48px, 6vw, 80px);
  align-items: center;
}
.section-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
  color: var(--sov-ivory);
  margin: 0 0 26px;
  max-width: 13ch;
}
.section-lead {
  max-width: 440px;
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.7;
  color: var(--sov-taupe);
  margin: 0 0 34px;
}
.field-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sov-taupe);   /* 7:1 on the page; small text needs 4.5:1 */
  margin-bottom: 10px;
}
.email-link {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 30px);
  color: var(--sov-ivory);
  text-decoration: none;
  border-bottom: 1px solid rgba(250, 192, 145, 0.4);
  padding-bottom: 3px;
  transition: color .25s ease, border-color .25s ease;
}
@media (hover: hover) { .email-link:hover { color: var(--sov-apricot); border-color: var(--sov-apricot); } }
.contact-block { margin-top: 28px; }

.inq-card {
  background: var(--sov-charcoal-800);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: clamp(32px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
}
.inq-card-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(24px, 2.6vw, 32px);
  color: var(--sov-ivory);
  line-height: 1.2;
}
.inq-card-note {
  font-size: 15px;
  color: var(--sov-taupe);
  line-height: 1.65;
  margin: 0;
}

/* ============================================================
   ERROR PAGES  (403 / 404 / 500)
   ============================================================ */
.error-page {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px clamp(24px, 6vw, 80px) 80px;
}
.error-code {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(72px, 14vw, 150px);
  line-height: 1;
  color: var(--sov-apricot);
  margin: 0;
}
.error-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(24px, 3vw, 36px);
  color: var(--sov-ivory);
  margin: 18px 0 14px;
}
.error-note {
  font-size: 16px;
  line-height: 1.65;
  color: var(--sov-taupe);
  max-width: 38ch;
  margin: 0 0 34px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--line-faint);
  padding: clamp(56px, 8vh, 84px) clamp(24px, 6vw, 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}
.footer-mark { width: 34px; height: 34px; object-fit: contain; opacity: 0.9; }
.footer-sig {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--sov-taupe);
}
.footer-portal {
  margin-top: 6px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--sov-apricot);
  text-decoration: none;
  transition: opacity .25s ease;
}
@media (hover: hover) { .footer-portal:hover { opacity: 0.6; } }

/* ============================================================
   INQUIRY FORM  (multi-step, on its own page: inquiries.html)
   Dark-only. Themed via --f-* custom properties.
   ============================================================ */
.form-scene {
  --f-bg: #232427;
  --f-surface: #2C2D31;
  --f-fg: #FAF6F0;
  --f-fg2: #B8AC9B;
  --f-line: rgba(231, 220, 204, 0.16);
  --f-accent: #FAC091;
  --f-accent-text: #232427;
  --f-accent-soft: rgba(250, 192, 145, 0.12);
  --f-input-bg: #2C2D31;
  --f-input-border: #44454A;
  --f-field-edge: #7C7E87;   /* stone: field edges at 3.8:1 (3:1 needed) */
  --f-error: #E2A18C;        /* the design system's danger-ink: 7.2:1 on the page */

  min-height: 100vh;
  background: var(--f-bg);
  color: var(--f-fg);
  display: flex;
  flex-direction: column;
  padding-top: 67px;
  animation: formRise .9s var(--ease-sov) both;
}

/* Form header — same height/look as the main .site-header so navigating
   index -> inquiries is seamless. The progress bar IS the bottom border
   (absolutely positioned), so it never adds height or nudges content. */
.form-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: rgba(35, 36, 39, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.form-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(20px, 4vw, 40px);
}
.form-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--line-faint);
}
.form-progress-bar {
  height: 100%;
  width: 3%;
  background: var(--sov-apricot);
  transition: width .55s var(--ease-sov);
}
.form-counter {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sov-taupe);
  min-width: 54px;
  text-align: right;
}

.form-middle {
  flex: 1;
  display: flex;
  overflow-y: auto;
  padding: clamp(24px, 5vh, 48px) clamp(24px, 6vw, 40px);
}
.form-middle-inner {
  width: 100%;
  max-width: 640px;
  margin: auto;
}
/* Each step rises in; main.js re-adds the class on every render. */
.form-middle-inner.is-entering { animation: qRise .7s var(--ease-sov) both; }

.form-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--f-accent);
  margin-bottom: 22px;
}
.form-eyebrow--tight { letter-spacing: 0.16em; margin-bottom: 16px; }
.form-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(32px, 4.6vw, 56px);
  line-height: 1.12;
  color: var(--f-fg);
  margin: 0 0 24px;
}
.form-title--q {
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.18;
  margin: 0;
}
.form-lead {
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.65;
  color: var(--f-fg2);
  margin: 0;
  max-width: 30ch;
}
.form-helper {
  font-size: 15px;
  line-height: 1.6;
  color: var(--f-fg2);
  margin: 14px 0 0;
}
.form-control { margin-top: 30px; }

.form-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: clamp(18px, 2vw, 22px);
  color: var(--f-fg);
  background: transparent;
  border: none;
  border-bottom: 1.5px solid var(--f-field-edge);
  padding: 10px 2px;
  outline: none;
  transition: border-color .2s ease;
}
.form-input:focus { border-color: var(--f-accent); }
.form-textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.55;
  color: var(--f-fg);
  background: var(--f-surface);
  border: 1px solid var(--f-field-edge);
  border-radius: 14px;
  padding: 16px 18px;
  outline: none;
  resize: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form-textarea:focus {
  border-color: var(--f-accent);
  box-shadow: 0 0 0 3px var(--f-accent-soft);
}

.form-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.form-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 15px 18px;
  border-radius: 14px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--f-fg);
  background: var(--f-surface);
  border: 1px solid var(--f-line);
  transition: background .18s ease, border-color .18s ease;
}
.form-option.is-selected {
  background: var(--f-accent-soft);
  border-color: var(--f-accent);
}
.form-option-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  flex: 0 0 auto;
  background: var(--f-line);
  color: var(--f-fg2);
}
.form-option.is-selected .form-option-letter {
  background: var(--f-accent);
  color: var(--f-accent-text);
}
.form-option-label { flex: 1; }

.form-check {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  background: var(--f-surface);
  border: 1px solid var(--f-line);
  border-radius: 14px;
  padding: 18px;
  cursor: pointer;
  color: var(--f-fg);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
}

/* Turnstile mount on the review step */
.form-ts { margin-top: 26px; min-height: 65px; }
.form-check-box {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1.5px solid var(--f-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  background: transparent;
}
.form-check.is-checked .form-check-box { background: var(--f-accent); }
.form-check-box svg { display: none; }
.form-check.is-checked .form-check-box svg { display: block; }

.form-error {
  margin-top: 18px;
  font-size: 14px;
  color: var(--f-error);   /* terracotta (sov-danger) is only 3.3:1 as text */
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-error .mark { font-style: italic; font-family: var(--font-display); }

/* Review list */
.review-list { border-top: 1px solid var(--f-line); }
.review-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--f-line);
  padding: 15px 4px;
  cursor: pointer;
  color: var(--f-fg);
  font-family: var(--font-body);
  transition: background .15s ease;
}
@media (hover: hover) { .review-row:hover { background: var(--f-accent-soft); } }
.review-label { font-size: 13px; color: var(--f-fg2); flex: 0 0 42%; line-height: 1.4; }
.review-value { font-size: 15px; text-align: right; line-height: 1.4; flex: 1; }

/* Honeypot — a visually hidden field only bots fill in; a filled value
   is dropped quietly, both here and in the Worker. */
.form-honey {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Thank you */
.form-thanks { text-align: center; }
.form-thanks-mark { width: 54px; height: 54px; object-fit: contain; opacity: 0.92; margin: 0 auto; }
.form-thanks-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  color: var(--f-fg);
  margin: 24px 0 14px;
}
.form-thanks-note {
  font-size: 16px;
  line-height: 1.65;
  color: var(--f-fg2);
  margin: 0 auto 14px;
  max-width: 34ch;
}
.form-return {
  margin-top: 18px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 14px 30px;
  border-radius: 999px;
  border: 1px solid var(--f-input-border);
  background: transparent;
  color: var(--f-fg);
  cursor: pointer;
  transition: opacity .25s ease;
}
@media (hover: hover) { .form-return:hover { opacity: 0.6; } }

/* Form footer (back / next) */
.form-foot {
  flex: 0 0 auto;
  border-top: 1px solid var(--f-line);
  background: var(--f-bg);
  padding: 14px clamp(20px, 6vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.form-back {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--f-input-border);
  background: transparent;
  color: var(--f-fg2);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}
@media (hover: hover) { .form-back:hover { color: var(--f-fg); border-color: var(--f-fg2); } }
.form-next {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 13px 32px;
  border-radius: 999px;
  border: none;
  background: var(--f-accent);
  color: var(--f-accent-text);
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(224, 163, 107, 0.24);
  transition: filter .2s ease, transform .2s ease;
}
@media (hover: hover) { .form-next:hover { filter: brightness(1.05); } }
.form-next:active { transform: translateY(1px); }

/* Leave confirmation — a native <dialog> (focus stays inside, Escape
   closes it) styled as a brand card over the dimmed form. It lives in
   .form-scene so it shares the --f-* colours. */
@keyframes leaveFade { from { opacity: 0; } to { opacity: 1; } }
.leave-dialog {
  width: min(440px, calc(100vw - 48px));
  padding: clamp(28px, 5vw, 40px);
  background: var(--f-surface);
  color: var(--f-fg);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}
.leave-dialog[open] { animation: qRise .45s var(--ease-sov) both; }
.leave-dialog::backdrop {
  background: rgba(28, 29, 32, 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.leave-dialog[open]::backdrop { animation: leaveFade .3s ease both; }
.leave-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--f-accent);
  margin-bottom: 16px;
}
.leave-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(26px, 3.2vw, 34px);
  line-height: 1.18;
  margin: 0;
}
.leave-note {
  font-size: 15px;
  line-height: 1.6;
  color: var(--f-fg2);
  margin: 12px 0 28px;
}
.leave-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}
.leave-btn {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 13px 28px;
  border-radius: 999px;
  cursor: pointer;
}
/* "Leave": the quiet pill, like the form's Back button */
.leave-btn--quiet {
  border: 1px solid var(--f-input-border);
  background: transparent;
  color: var(--f-fg2);
  transition: color .2s ease, border-color .2s ease;
}
/* "Keep going": the one apricot pill, focused when the card opens */
.leave-btn--stay {
  border: none;
  background: var(--f-accent);
  color: var(--f-accent-text);
  box-shadow: 0 8px 22px rgba(224, 163, 107, 0.24);
  transition: filter .2s ease;
}
@media (hover: hover) {
  .leave-btn--quiet:hover { color: var(--f-fg); border-color: var(--f-fg2); }
  .leave-btn--stay:hover { filter: brightness(1.05); }
}

.is-hidden { display: none !important; }

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after { animation: none !important; }
  /* The curtain only lifts by animating; without that, don't show it at all. */
  .intro { display: none; }
  .leave-dialog::backdrop { animation: none; }
}
