/* ==========================================================================
   Ivan Alexandrovich, Attorney at Law: Design System
   Direction: Warm archival. Parchment grounds, deep ink, aged brass.
   The subject is permanence: deeds, seals, documents that outlive people.
   ========================================================================== */

/* --- Tokens --------------------------------------------------------------- */

:root {
  /* Ground: warm paper, not white. Aged stock, slightly uneven. */
  --paper:      #F5F0E7;
  --paper-2:    #EDE5D6;   /* alternating bands, deeper stock */
  --surface:    #FFFDF8;   /* raised cards, fresh sheet */
  --ink:        #1A1815;   /* warm near-black, never #000 */
  --ink-2:      #4B463D;   /* secondary text, 7.3:1 on paper */
  --ink-3:      #6B6457;   /* tertiary, large text only */

  /* Brass: the single accent. Aged, not gold. */
  --brass:      #9C7A45;   /* 3.4:1, large text, rules, icons ONLY */
  --brass-deep: #6F5530;   /* 5.6:1, safe for body links */
  --brass-wash: #EFE4CE;   /* tinted fills */

  /* Seal: oxblood. Reserved for warnings: form errors and ★ launch notes. */
  --seal:       #6E2B2B;
  --seal-wash:  #F2E4E0;

  --rule:       #D8CEBC;
  --rule-soft:  #E6DDCC;

  /* Type */
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body:    "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Scale, 1.25 minor third, clamped fluid */
  --t-xs:  0.78rem;
  --t-sm:  0.9rem;
  --t-base: 1.0625rem;
  --t-md:  clamp(1.13rem, 0.4vw + 1.02rem, 1.28rem);
  --t-lg:  clamp(1.4rem,  0.9vw + 1.18rem, 1.75rem);
  --t-xl:  clamp(1.85rem, 1.7vw + 1.4rem,  2.6rem);
  --t-2xl: clamp(2.3rem,  3.2vw + 1.5rem,  4rem);
  --t-3xl: clamp(2.5rem,  3.6vw + 1.3rem,  4.5rem);

  /* Space, 8pt base */
  --s-1: 0.5rem;  --s-2: 0.75rem; --s-3: 1rem;   --s-4: 1.5rem;
  --s-5: 2rem;    --s-6: 3rem;    --s-7: 4.5rem; --s-8: 7rem;

  --measure: 68ch;
  --shell: 1180px;
  --shell-narrow: 760px;

  --r-sm: 2px;
  --r-md: 3px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 260ms;

  /* Z-scale */
  --z-base: 1; --z-raised: 10; --z-nav: 30; --z-drawer: 40; --z-skip: 50;
}

/* --- Reset ---------------------------------------------------------------- */

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

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--t-base);
  line-height: 1.65;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }

/* Paper grain. One tiny inline SVG, fixed, never repaints. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.42;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.28'/%3E%3C/svg%3E");
}
main, header, footer { position: relative; z-index: var(--z-base); }

/* --- Typography ----------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.018em;
  /* Fraunces variable axes: soft terminals, slight wonk. This is the warmth. */
  font-variation-settings: "SOFT" 30, "WONK" 1, "opsz" 40;
  text-wrap: balance;
}

h1 { font-size: var(--t-3xl); }
h2 { font-size: var(--t-2xl); }
h3 { font-size: var(--t-lg); letter-spacing: -0.01em; }
h4 { font-size: var(--t-md); }

p { max-width: var(--measure); text-wrap: pretty; }

a { color: var(--brass-deep); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { color: var(--ink); }

strong { font-weight: 700; }

.lede {
  font-size: var(--t-md);
  line-height: 1.62;
  color: var(--ink-2);
  max-width: 58ch;
}

/* Eyebrow, only used where it encodes something real (section role) */
.eyebrow {
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass-deep);
  display: flex;
  align-items: center;
  gap: var(--s-2);
}
.eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
  max-width: 5rem;
}

/* --- Layout --------------------------------------------------------------- */

.shell { width: min(100% - 2.5rem, var(--shell)); margin-inline: auto; }
.shell-narrow { width: min(100% - 2.5rem, var(--shell-narrow)); margin-inline: auto; }

.section { padding-block: var(--s-8); }
.section--tight { padding-block: var(--s-7); }
.section--band { background: var(--paper-2); }
.section--ink { background: var(--ink); color: var(--paper); }
.section--ink h1, .section--ink h2, .section--ink h3 { color: var(--paper); }
.section--ink .lede { color: #C9C2B4; }
.section--ink .eyebrow { color: var(--brass); }
.section--ink .eyebrow::after { background: rgba(245,240,231,0.22); }

/* Hairline that draws itself in on reveal */
.rule {
  height: 1px;
  background: var(--rule);
  border: 0;
  transform-origin: left center;
}

.stack > * + * { margin-top: var(--s-3); }
.stack-lg > * + * { margin-top: var(--s-5); }

.grid { display: grid; gap: var(--s-5); }
@media (min-width: 720px)  { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 720px)  { .grid-split { grid-template-columns: 1fr 1fr; gap: var(--s-7); align-items: center; } }

/* --- Skip link ------------------------------------------------------------ */

.skip {
  position: absolute;
  left: var(--s-3); top: -100px;
  z-index: var(--z-skip);
  background: var(--ink); color: var(--paper);
  padding: var(--s-2) var(--s-4);
  transition: top 180ms var(--ease);
}
.skip:focus { top: var(--s-3); }

/* --- Focus ---------------------------------------------------------------- */

:focus-visible {
  outline: 2px solid var(--brass-deep);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* --- Nav ------------------------------------------------------------------ */

.nav {
  position: sticky; top: 0;
  z-index: var(--z-nav);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px) saturate(1.1);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav[data-scrolled="true"] {
  border-bottom-color: var(--rule);
  background: color-mix(in srgb, var(--paper) 96%, transparent);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-4);
  min-height: 5rem;
  min-width: 0;
}

/* Wordmark: stacked lockup, name over "Attorney at Law". */
.mark { display: flex; align-items: center; gap: var(--s-3); text-decoration: none; color: var(--ink); min-width: 0; }
.mark:hover { color: var(--ink); }

/* Coat of arms. Source art is 393x415, so every on-page size below is a
   downscale, sharp on retina at the 46px nav mark and the 200px plate. */
.mark__crest {
  width: auto; height: 46px; flex: none;
  display: block;
  image-rendering: -webkit-optimize-contrast;
}

/* On the dark footer the crest's black outlines and mantling disappear into
   the ground, so it sits on a parchment plate, a seal on a document. */
.mark__crest--plate {
  background: var(--paper);
  padding: 5px 7px;
  border-radius: var(--r-sm);
  height: 52px;
  box-shadow: 0 4px 14px -6px rgba(0,0,0,0.5);
}
.mark__text { display: flex; flex-direction: column; line-height: 1; min-width: 0; }
.mark__name {
  font-family: var(--display);
  font-variation-settings: "SOFT" 30, "WONK" 1, "opsz" 30;
  font-size: 1.02rem;
  letter-spacing: 0.005em;
  line-height: 1.14;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Below the desktop nav breakpoint the links are hidden, so the lockup has
   room to wrap. Wrapping beats the ellipsis, which reads as a bug in a name. */
@media (max-width: 1039px) {
  .mark__name {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
}
.mark__sub {
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brass-deep);
  margin-top: 0.32em;
  font-weight: 700;
}

.nav__links { display: none; gap: var(--s-5); align-items: center; }
@media (min-width: 1040px) { .nav__links { display: flex; } }

.nav__link {
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  padding: var(--s-1) 0;
  position: relative;
  cursor: pointer;
  transition: color var(--dur) var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--brass);
  transform: scaleX(0); transform-origin: right center;
  transition: transform var(--dur) var(--ease);
}
.nav__link:hover, .nav__link[aria-current="page"] { color: var(--ink); }
.nav__link:hover::after, .nav__link[aria-current="page"]::after {
  transform: scaleX(1); transform-origin: left center;
}

.nav__actions { display: flex; align-items: center; gap: var(--s-2); flex: none; }

/* Below tablet the nav CTA is redundant, the hero, the drawer, and the
   footer all carry it. Dropping it is what keeps the bar from overflowing. */
@media (max-width: 720px) {
  .nav__actions .btn { display: none; }
}
@media (max-width: 460px) {
  /* :not() keeps this from also shrinking the footer plate, which shares
     the .mark__crest class and would otherwise lose to this later rule. */
  .mark__crest:not(.mark__crest--plate) { height: 38px; }
  /* Wrap rather than ellipsis, a truncated firm name reads as a bug. */
  .mark__name {
    font-size: 0.82rem;
    white-space: normal;
    overflow: visible;
    line-height: 1.12;
  }
  .mark__sub { font-size: 0.55rem; letter-spacing: 0.18em; margin-top: 0.4em; }
  .nav__inner { min-height: 4.25rem; gap: var(--s-2); }
}

/* Services dropdown */
.nav__group { position: relative; }
.nav__panel {
  position: absolute; top: calc(100% + 0.75rem); left: 50%;
  transform: translateX(-50%) translateY(-6px);
  width: min(92vw, 640px);
  background: var(--surface);
  border: 1px solid var(--rule);
  box-shadow: 0 18px 50px -20px rgba(26,24,21,0.28);
  padding: var(--s-4);
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px var(--s-4);
  opacity: 0; visibility: hidden;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
}
.nav__group:hover .nav__panel,
.nav__group:focus-within .nav__panel {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.nav__panel a {
  display: block; padding: var(--s-2) var(--s-2);
  font-size: var(--t-sm); text-decoration: none; color: var(--ink-2);
  border-radius: var(--r-sm);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav__panel a:hover { background: var(--brass-wash); color: var(--ink); }
.nav__panel a small { display: block; font-size: 0.72rem; color: var(--ink-3); margin-top: 2px; }

/* Language toggle */
.lang {
  display: inline-flex;
  border: 1px solid var(--rule);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface);
}
.lang button {
  border: 0; background: transparent;
  padding: 0.42rem 0.72rem;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.09em;
  color: var(--ink-3); cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
  min-height: 34px;
}
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.lang button:hover:not([aria-pressed="true"]) { color: var(--ink); }

/* Mobile drawer */
.burger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px;
  background: transparent; border: 1px solid var(--rule);
  border-radius: var(--r-sm); cursor: pointer;
  transition: background var(--dur) var(--ease);
}
.burger:hover { background: var(--brass-wash); }
@media (min-width: 1040px) { .burger { display: none; } }
.burger span { display: block; width: 19px; height: 1.5px; background: var(--ink); position: relative; }
.burger span::before, .burger span::after {
  content: ""; position: absolute; left: 0; width: 19px; height: 1.5px; background: var(--ink);
  transition: transform var(--dur) var(--ease);
}
.burger span::before { top: -6px; }
.burger span::after  { top: 6px; }

.drawer {
  position: fixed; inset: 0;
  z-index: var(--z-drawer);
  background: var(--paper);
  padding: var(--s-5) 0;
  overflow-y: auto;
  opacity: 0; visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
}
.drawer[data-open="true"] { opacity: 1; visibility: visible; transform: translateY(0); }
.drawer__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s-5); }
.drawer__close {
  width: 46px; height: 46px; border: 1px solid var(--rule); background: transparent;
  cursor: pointer; border-radius: var(--r-sm); font-size: 1.3rem; line-height: 1;
}
.drawer nav { display: flex; flex-direction: column; }
.drawer nav a {
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--rule-soft);
  text-decoration: none; color: var(--ink);
  font-family: var(--display); font-size: var(--t-md);
  font-variation-settings: "SOFT" 30, "WONK" 1, "opsz" 30;
  min-height: 44px; display: flex; align-items: center;
}
.drawer nav a:hover { color: var(--brass-deep); }
.drawer__label {
  font-size: var(--t-xs); font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--brass-deep);
  margin-top: var(--s-5); padding-bottom: var(--s-2);
}

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  min-height: 48px;
  padding: 0.8rem 1.5rem;
  font-size: var(--t-sm); font-weight: 700;
  letter-spacing: 0.055em; text-transform: uppercase;
  border: 1px solid transparent; border-radius: var(--r-sm);
  text-decoration: none; cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--brass-deep); color: var(--paper); box-shadow: 0 10px 26px -12px rgba(111,85,48,0.7); }
.btn--ghost { border-color: var(--rule); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--brass); background: var(--brass-wash); color: var(--ink); }
.btn--light { background: var(--paper); color: var(--ink); }
.btn--light:hover { background: var(--brass-wash); color: var(--ink); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }

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

.hero { padding-block: var(--s-8) var(--s-7); position: relative; overflow: hidden; }
/* On phones the desktop top padding buries the intake below the fold. */
@media (max-width: 860px) {
  .hero { padding-block: var(--s-5) var(--s-6); }
}

/* Single-column hero: dissolve the left column so its two halves become
   grid items in their own right, then slot the intake between them. The
   pitch stays above the form; the CTA and bar line drop below it. */
@media (max-width: 939px) {
  .hero__col { display: contents; }
  .hero__copy  { order: 1; }
  .hero .booking { order: 2; }
  .hero__aside { order: 3; }
  .hero__inner { gap: var(--s-5); }
}
.hero__inner { display: grid; gap: var(--s-6); position: relative; z-index: 1; }
@media (min-width: 940px) {
  .hero__inner { grid-template-columns: 1.05fr 0.95fr; gap: var(--s-7); align-items: center; }
}

/* Booking card. The Calendly scheduler lives in the hero, above the fold, so
   a visitor can pick a time without ever contacting anyone. Fully self-serve. */
.booking {
  background: var(--surface);
  border: 1px solid var(--rule);
  box-shadow: 0 40px 90px -50px rgba(26,24,21,0.45);
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.booking__head h2 { font-size: var(--t-lg); margin-bottom: var(--s-2); }
.booking__head p { font-size: var(--t-sm); color: var(--ink-2); margin: 0; }

/* The Calendly iframe. Its own widget scrolls internally, so a fixed frame
   height keeps the page layout stable while the month view changes size. */
.booking__cal {
  border: 1px solid var(--rule-soft);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface);
}
.booking__cal iframe {
  display: block;
  width: 100%;
  height: 640px;
  border: 0;
}
@media (max-width: 480px) {
  .booking__cal iframe { height: 760px; }
}
.booking__fine {
  font-size: var(--t-xs);
  color: var(--ink-3);
  line-height: 1.5;
  margin: 0;
}

/* Contact page: the booking card carries the scheduler on its own, so give
   the iframe more room there than in the tighter hero column. */
#form .booking__cal iframe { height: 700px; }

/* Solo hero, no portrait. Text carries it, with the arms as a watermark.
   Constrain the TEXT, never the container: a ch-based cap on .hero__inner
   collapses the whole grid to a few hundred pixels. */
@media (min-width: 940px) {
  .hero--solo .hero__inner { grid-template-columns: 1fr; }
}
.hero--solo h1 { max-width: 15ch; }
.hero--solo .lede { max-width: 54ch; }
.hero--solo .hero__meta { max-width: 60ch; }

/* The arms, blown up and nearly transparent. At 6% opacity the upscaling
   artifacts of the small source are invisible, so it reads as embossing. */
.hero__watermark {
  position: absolute;
  right: -4%;
  top: 50%;
  transform: translateY(-50%);
  width: min(40vw, 480px);
  opacity: 0.09;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  filter: saturate(0.5);
}
@media (max-width: 860px) {
  .hero__watermark { right: -18%; width: 74vw; opacity: 0.07; }
}

/* With the intake card holding the right column, the arms move left so they
   sit behind the headline instead of hiding behind an opaque card. */
.hero--intake .hero__watermark {
  left: -7%;
  right: auto;
  width: min(38vw, 430px);
  opacity: 0.1;
}
@media (max-width: 939px) {
  /* Stacked layout: anchor to the headline block, not the whole (tall) hero,
     so the arms don't drift down behind the form. */
  .hero--intake .hero__watermark {
    left: auto;
    right: -22%;
    top: 20%;
    transform: none;
    width: 76vw;
    opacity: 0.075;
  }
}
.hero h1 { margin-block: var(--s-3) var(--s-4); }
.hero__accent { font-style: italic; color: var(--brass-deep); font-variation-settings: "SOFT" 60, "WONK" 1, "opsz" 144; }

.hero__meta {
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5);
  margin-top: var(--s-5); padding-top: var(--s-4);
  border-top: 1px solid var(--rule);
  font-size: var(--t-sm); color: var(--ink-2);
}
.hero__meta span { display: inline-flex; align-items: center; gap: 0.45em; }

/* Arms in an archival mat. Capped at the source art's native height so it
   never upscales into mush, the mat provides the presence, not the image. */
.crest-plate {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: var(--s-5) var(--s-4) var(--s-4);
  box-shadow: 0 30px 70px -35px rgba(26,24,21,0.42);
  display: flex; flex-direction: column; align-items: center; gap: var(--s-3);
  justify-self: center;
  max-width: 300px;
}
.crest-plate img { height: 200px; width: auto; }
.crest-plate__cap {
  margin: 0;
  font-size: var(--t-xs);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-top: 1px solid var(--rule);
  padding-top: var(--s-3);
  width: 100%;
  text-align: center;
}

/* --- Cards ---------------------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: var(--s-5);
  display: flex; flex-direction: column; gap: var(--s-2);
  text-decoration: none; color: inherit;
  position: relative;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              background var(--dur) var(--ease);
}
a.card { cursor: pointer; }
a.card:hover {
  border-color: var(--brass);
  box-shadow: 0 20px 44px -26px rgba(26,24,21,0.34);
  color: inherit;
}
.card__num {
  font-family: var(--display); font-size: var(--t-xs);
  color: var(--brass-deep); letter-spacing: 0.12em;
}
.card h3 { margin-bottom: 0.1em; }
.card p { font-size: var(--t-sm); color: var(--ink-2); margin: 0; }
.card__more {
  margin-top: auto; padding-top: var(--s-3);
  font-size: var(--t-xs); font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--brass-deep);
  display: inline-flex; align-items: center; gap: 0.5em;
}
.card__more svg { transition: transform var(--dur) var(--ease); }
a.card:hover .card__more svg { transform: translateX(4px); }

.icon { width: 26px; height: 26px; stroke: var(--brass-deep); fill: none; stroke-width: 1.25; }

/* --- Coming soon (IP) -----------------------------------------------------
   A future-practice teaser. Deliberately quiet and clearly not-yet-available:
   a dashed frame reads as "under construction / placeholder" rather than a
   live offering, and there is no booking CTA because the service cannot be
   sold before Ivan is registered with the USPTO. */

.coming {
  border: 1.5px dashed var(--rule);
  background:
    repeating-linear-gradient(135deg,
      transparent, transparent 14px,
      color-mix(in srgb, var(--brass-wash) 50%, transparent) 14px,
      color-mix(in srgb, var(--brass-wash) 50%, transparent) 15px);
  padding: var(--s-6);
  display: grid;
  gap: var(--s-4);
}
@media (min-width: 780px) {
  .coming { grid-template-columns: 0.8fr 1.2fr; gap: var(--s-7); align-items: start; }
}
.coming__head { display: flex; flex-direction: column; gap: var(--s-3); align-items: flex-start; }
.coming__body { max-width: 62ch; }
.coming__body h2 { margin-bottom: var(--s-3); }
.coming__body p { color: var(--ink-2); }
.coming__note {
  margin-top: var(--s-3);
  font-size: var(--t-sm);
  color: var(--ink-3);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-deep);
  background: var(--surface);
  border: 1px solid var(--brass);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
}
.badge::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--brass);
}

/* --- Process -------------------------------------------------------------- */
/* Numbered because these ARE sequential, order carries real information. */

.steps { counter-reset: step; display: grid; gap: 0; }
.step {
  counter-increment: step;
  display: grid; gap: var(--s-2) var(--s-4);
  grid-template-columns: auto 1fr;
  padding: var(--s-5) 0;
  border-bottom: 1px solid var(--rule);
}
.step:first-child { border-top: 1px solid var(--rule); }
.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--display);
  font-variation-settings: "SOFT" 20, "WONK" 0, "opsz" 60;
  font-size: var(--t-lg);
  color: var(--brass);
  line-height: 1;
  font-variant-numeric: lining-nums;
}
.step h3 { grid-column: 2; }
.step p { grid-column: 2; color: var(--ink-2); font-size: var(--t-sm); margin: 0; }

/* --- FAQ ------------------------------------------------------------------ */

.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  padding: var(--s-4) var(--s-5) var(--s-4) 0;
  cursor: pointer; list-style: none;
  font-family: var(--display); font-size: var(--t-md);
  font-variation-settings: "SOFT" 30, "WONK" 1, "opsz" 30;
  position: relative;
  min-height: 44px; display: flex; align-items: center;
  transition: color var(--dur) var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--brass-deep); }
.faq summary::after {
  content: ""; position: absolute; right: 0.4rem; top: 50%;
  width: 11px; height: 11px;
  border-right: 1.5px solid var(--brass-deep);
  border-bottom: 1.5px solid var(--brass-deep);
  transform: translateY(-60%) rotate(45deg);
  transition: transform var(--dur) var(--ease);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq__answer { padding: 0 var(--s-5) var(--s-5) 0; }
.faq__answer p { color: var(--ink-2); font-size: var(--t-sm); }
.faq details[open] .faq__answer { animation: unfold 380ms var(--ease-out); }
@keyframes unfold {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Forms ---------------------------------------------------------------- */

.form { display: grid; gap: var(--s-4); }
@media (min-width: 640px) { .form__pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); } }

.form label {
  display: block; font-size: var(--t-xs); font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-2); margin-bottom: var(--s-2);
}
.form input, .form select, .form textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--rule); border-radius: var(--r-sm);
  min-height: 48px;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.form textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none; border-color: var(--brass);
  box-shadow: 0 0 0 3px var(--brass-wash);
}
.form input:focus-visible, .form textarea:focus-visible, .form select:focus-visible {
  outline: 2px solid var(--brass-deep); outline-offset: 1px;
}
.form [aria-invalid="true"] { border-color: var(--seal); }
.err { color: var(--seal); font-size: var(--t-xs); margin-top: var(--s-1); min-height: 1.1em; }
.form__note { font-size: var(--t-xs); color: var(--ink-3); }

.status { padding: var(--s-3) var(--s-4); border-radius: var(--r-sm); font-size: var(--t-sm); }
.status[data-tone="ok"]  { background: var(--brass-wash); color: var(--brass-deep); }
.status[data-tone="err"] { background: var(--seal-wash);  color: var(--seal); }

/* --- Contact rail --------------------------------------------------------- */

.rail { display: grid; gap: var(--s-4); }
.rail__item { display: grid; grid-template-columns: auto 1fr; gap: var(--s-3); align-items: start; }
.rail__item svg { width: 20px; height: 20px; stroke: var(--brass); fill: none; stroke-width: 1.3; margin-top: 3px; }
.rail__item dt { font-size: var(--t-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.rail__item dd { margin: 0; font-size: var(--t-md); font-family: var(--display); }
.rail__item a { text-decoration: none; }
.rail__item a:hover { text-decoration: underline; }

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

.footer { background: var(--ink); color: #C9C2B4; padding-block: var(--s-7) var(--s-5); }
.footer a { color: var(--paper); text-decoration: none; }
.footer a:hover { color: var(--brass); text-decoration: underline; }
.footer__grid { display: grid; gap: var(--s-5); }
@media (min-width: 780px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; gap: var(--s-6); } }
.footer h3 {
  font-family: var(--body); font-size: var(--t-xs); font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass);
  margin-bottom: var(--s-3);
}
.footer ul { list-style: none; padding: 0; display: grid; gap: var(--s-2); font-size: var(--t-sm); }
.footer .mark__name, .footer .mark { color: var(--paper); }
.footer__legal {
  margin-top: var(--s-6); padding-top: var(--s-4);
  border-top: 1px solid rgba(245,240,231,0.15);
  font-size: var(--t-xs); line-height: 1.6; color: #9A9284;
  display: grid; gap: var(--s-3);
}
.footer__legal p { max-width: 90ch; }

/* --- Reveal animations ---------------------------------------------------- */
/* transform + opacity only. GPU-safe, 60fps on low-end phones. */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
  transition-delay: var(--delay, 0ms);
}
[data-reveal="is-in"] { opacity: 1; transform: none; }

[data-reveal-rule] { transform: scaleX(0); transition: transform 900ms var(--ease-out); transition-delay: var(--delay, 0ms); }
[data-reveal-rule="is-in"] { transform: scaleX(1); }

/* Hero load sequence, staggered, runs once, no observer needed */
.hero [data-load] {
  opacity: 0;
  transform: translateY(22px);
  animation: rise 900ms var(--ease-out) forwards;
  animation-delay: var(--delay, 0ms);
}
@keyframes rise { to { opacity: 1; transform: none; } }

/* The arms settle in once, on load. The one flourish in the header. */
.nav .mark__crest {
  opacity: 0;
  animation: settle 900ms var(--ease-out) 120ms forwards;
}
@keyframes settle {
  from { opacity: 0; transform: translateY(-5px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}

/* --- Reduced motion: kill everything, show final state -------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal], .hero [data-load] { opacity: 1 !important; transform: none !important; }
  [data-reveal-rule] { transform: scaleX(1) !important; }
  .nav .mark__crest { opacity: 1 !important; transform: none !important; }
}

/* --- Print ---------------------------------------------------------------- */

@media print {
  .nav, .drawer, .burger, .lang, .btn { display: none !important; }
  body::before { display: none; }
  body { background: #fff; color: #000; }
}
