/* ============================================================
   MANSORI — Estate Register · marketing site
   Tesla-grade restraint. Tokens first. Light mode.
   ============================================================ */

/* ---- Tokens ------------------------------------------------ */
:root {
  /* surfaces */
  --canvas:        #F6F4EF;   /* warm gallery paper */
  --surface:       #FFFFFF;
  --surface-sunken:#EFEDE7;
  --hairline:      #E4E1DA;   /* decorative separators (non-text) */
  --border-strong: #8A7968;   /* interactive bounds, >=3:1 (non-text) */

  /* ink (all reading text clears 4.5:1 on canvas/surface) */
  --ink:           #0F172A;   /* midnight navy — headings, body, numerals */
  --ink-secondary: #565E57;   /* supporting copy */
  --ink-tertiary:  #636A63;   /* captions, meta */

  /* accents */
  --emerald:       #0D4C3C;   /* the in-order state, primary buttons */
  --emerald-tint:  #E7F0EB;   /* wash (non-text) */
  --brass:         #7A5310;   /* "needs you" text — calm, never alarm */
  --brass-tint:    #F6EBD3;   /* wash (non-text) */
  --gold:          #C69B3C;   /* ornament / hairline only — never text */
  --taupe:         #8A7968;   /* support / ornament (non-text) */

  /* type */
  --ui: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;

  /* rhythm */
  --gutter: 24px;
  --maxw: 1180px;
  --radius-card: 20px;
  --radius-control: 14px;
  --radius-pill: 999px;
}

/* ---- Reset / base ------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--emerald); outline-offset: 3px; border-radius: 4px; }

/* ---- Layout helpers ---------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 96px 0; }
.section--tint { background: var(--surface-sunken); }

.eyebrow {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  margin: 0 0 20px;
}

.serif { font-family: var(--display); font-weight: 600; }

h2.section-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.08;
  letter-spacing: 0.005em;
  color: var(--ink);
  max-width: 20ch;
}
.section-lead {
  font-size: clamp(18px, 2vw, 21px);
  color: var(--ink-secondary);
  max-width: 46ch;
  margin-top: 20px;
}

/* ---- Buttons ----------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ui);
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
  padding: 16px 26px;
  border-radius: var(--radius-control);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .18s ease-out, color .18s ease-out, border-color .18s ease-out;
}
.btn--primary { background: var(--emerald); color: #FFFFFF; }
.btn--primary:hover { background: #0a3d30; }
.btn--quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn--quiet:hover { background: var(--surface); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  backdrop-filter: saturate(120%) blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.nav__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand__mark { width: 30px; height: 30px; }
.brand__word {
  font-family: var(--display);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 0.30em;
  padding-left: 0.30em; /* balance the trailing tracking */
  line-height: 1;
}
.nav__links { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.nav__links a {
  text-decoration: none;
  color: var(--ink-secondary);
  font-size: 16px;
  font-weight: 500;
  transition: color .18s ease-out;
}
.nav__links a:hover { color: var(--ink); }
.nav__price { color: var(--ink-tertiary); font-variant-numeric: tabular-nums; }
.nav__cta { margin-left: 4px; }
.nav__toggle { display: none; }

@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__inner { gap: 12px; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; overflow: hidden; }
.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
  padding: 88px 0 96px;
}
.hero__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(40px, 6.2vw, 78px);
  line-height: 1.02;
  letter-spacing: 0.004em;
  color: var(--ink);
  max-width: 15ch;
}
.hero__sub {
  margin-top: 26px;
  font-size: clamp(18px, 2.1vw, 22px);
  line-height: 1.55;
  color: var(--ink-secondary);
  max-width: 42ch;
}
.hero__actions { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero__note { color: var(--ink-tertiary); font-size: 16px; font-variant-numeric: tabular-nums; }
.hero__art { position: relative; }
.hero__art svg { width: 100%; height: auto; }

@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; gap: 20px; padding: 56px 0 64px; }
  .hero__art { order: -1; max-width: 460px; margin: 0 auto; }
}

/* ============================================================
   THE SCORE
   ============================================================ */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 36px; } }

.score-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 36px;
  max-width: 440px;
}
.score-card__label {
  font-size: 15px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-secondary); font-weight: 500;
}
.score-card__number {
  font-family: var(--display);
  font-weight: 600;
  font-size: 116px;
  line-height: 0.9;
  color: var(--emerald);
  font-variant-numeric: tabular-nums;
  margin: 12px 0 4px;
}
.score-card__state { font-size: 18px; color: var(--emerald); font-weight: 600; margin-bottom: 28px; }
.pillar { margin-bottom: 18px; }
.pillar__row { display: flex; justify-content: space-between; font-size: 16px; margin-bottom: 8px; }
.pillar__name { color: var(--ink); font-weight: 500; }
.pillar__val { color: var(--ink-secondary); font-variant-numeric: tabular-nums; }
.pillar__track { height: 8px; background: var(--surface-sunken); border-radius: var(--radius-pill); overflow: hidden; }
.pillar__fill { height: 100%; background: var(--emerald); border-radius: var(--radius-pill); }
.score-card__exposure {
  margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--hairline);
  font-size: 16px; color: var(--ink-secondary);
}
.score-card__exposure strong { color: var(--brass); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ============================================================
   FORWARD IT — the mechanism
   ============================================================ */
.forward__stage {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 28px;
  max-width: 480px;
}
.flow { list-style: none; margin: 0; padding: 0; }
.flow__step {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-control);
  background: var(--surface);
  margin-bottom: 12px;
  opacity: 0;
  transform: translateY(8px);
}
.flow__step:last-child { margin-bottom: 0; }
.flow__step--filed { border-color: var(--emerald); background: var(--emerald-tint); }
.flow__icon { flex: 0 0 auto; width: 24px; height: 24px; color: var(--ink-secondary); }
.flow__step--filed .flow__icon { color: var(--emerald); }
.flow__text { font-size: 17px; }
.flow__text b { font-weight: 600; }
.flow__text .muted { color: var(--ink-tertiary); }
.flow__amount { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.flow__tag { margin-left: auto; font-size: 15px; font-weight: 600; color: var(--emerald); letter-spacing: 0.02em; }

/* revealed by JS when in view; static when reduced-motion */
.flow.is-visible .flow__step {
  animation: flowIn .5s ease-out forwards;
}
.flow.is-visible .flow__step:nth-child(1) { animation-delay: .05s; }
.flow.is-visible .flow__step:nth-child(2) { animation-delay: .55s; }
.flow.is-visible .flow__step:nth-child(3) { animation-delay: 1.05s; }
.flow.is-visible .flow__step:nth-child(4) { animation-delay: 1.55s; }
@keyframes flowIn { to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  .flow__step { opacity: 1; transform: none; animation: none !important; }
}
/* fallback: if JS never runs, still show everything */
.no-js .flow__step { opacity: 1; transform: none; }

/* ============================================================
   CONTROL — three cards + line icons
   ============================================================ */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; gap: 16px; } }
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 30px;
}
.card__icon { width: 40px; height: 40px; color: var(--emerald); margin-bottom: 20px; }
.card__title { font-family: var(--display); font-weight: 600; font-size: 24px; line-height: 1.15; color: var(--ink); margin-bottom: 12px; }
.card__body { font-size: 17px; color: var(--ink-secondary); }

/* ============================================================
   THE PHONE — device mockup + ledger
   ============================================================ */
.phone-section .split { align-items: center; }
.phone {
  width: 320px;
  max-width: 100%;
  margin: 0 auto;
  background: var(--ink);
  border-radius: 44px;
  padding: 12px;
  box-shadow: 0 24px 60px rgba(15,23,42,0.18);
}
.phone__screen {
  background: var(--canvas);
  border-radius: 34px;
  overflow: hidden;
  padding: 22px 18px 26px;
}
.phone__notch {
  width: 120px; height: 26px; background: var(--ink);
  border-radius: 0 0 16px 16px; margin: -22px auto 14px;
}
.phone__eyebrow { font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-tertiary); font-weight: 500; }
.phone__title { font-family: var(--display); font-weight: 600; font-size: 30px; color: var(--ink); margin: 2px 0 18px; }
.ledger { list-style: none; margin: 0; padding: 0; }
.ledger__row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--hairline);
}
.ledger__row:first-child { border-top: none; }
.ledger__glyph { flex: 0 0 auto; width: 30px; height: 30px; color: var(--ink-secondary); }
.ledger__main { min-width: 0; }
.ledger__name { font-size: 16px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.ledger__meta { font-size: 14px; color: var(--ink-tertiary); }
.pill {
  margin-left: auto;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.pill--order { background: var(--emerald-tint); color: var(--emerald); }
.pill--needs { background: var(--brass-tint); color: var(--brass); }

/* ============================================================
   PRICING
   ============================================================ */
.pricing { text-align: center; }
.pricing__price {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(44px, 7vw, 84px);
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.pricing__line { font-size: clamp(19px, 2.4vw, 24px); color: var(--ink-secondary); margin-top: 18px; }
.pricing__meta {
  margin: 40px auto 0;
  max-width: 620px;
  display: grid;
  gap: 14px;
}
.pricing__note {
  font-size: 17px; color: var(--ink-secondary);
  padding: 18px 22px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-control);
  background: var(--surface);
}
.pricing__note b { color: var(--ink); font-weight: 600; }
.pricing__cta { margin-top: 36px; }

/* two plans as equals — R-19 discipline: serif numerals, gold hairline only,
   no badges, no strikethrough, no "most popular", no countdowns */
.pricing__head { max-width: 24ch; margin: 0 auto; }
.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 640px;
  margin: 44px auto 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: var(--surface);
  overflow: hidden;
}
.plan { padding: 40px 28px; text-align: center; }
.plan + .plan { border-left: 1px solid var(--gold); } /* the single gold hairline */
.plan__name {
  font-size: 15px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-secondary); font-weight: 600;
}
.plan__price {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(46px, 7vw, 68px); line-height: 1;
  color: var(--ink); font-variant-numeric: tabular-nums;
  margin-top: 16px; display: flex; align-items: baseline; justify-content: center; gap: 10px;
}
.plan__per { font-family: var(--ui); font-weight: 500; font-size: 17px; color: var(--ink-tertiary); }
.plan__aside { margin-top: 14px; font-size: 16px; color: var(--ink-secondary); }
@media (max-width: 560px) {
  .plans { grid-template-columns: 1fr; }
  .plan + .plan { border-left: none; border-top: 1px solid var(--gold); }
}

/* ============================================================
   FOUNDING — quiet scarcity (R-22), no counters
   ============================================================ */
.founding__inner { max-width: 780px; margin: 0 auto; text-align: center; }
.founding__seal { width: 72px; height: 72px; margin: 0 auto 26px; color: var(--ink); }
.founding .section-title { max-width: 26ch; margin: 0 auto 22px; }
.founding__body { font-size: clamp(18px, 2vw, 20px); color: var(--ink-secondary); max-width: 62ch; margin: 0 auto; line-height: 1.75; }

/* ============================================================
   FAQ — editorial, always visible (mirrors FAQPage schema)
   ============================================================ */
.faq__list { margin-top: 44px; max-width: 840px; }
.faq__item { padding: 30px 0; border-top: 1px solid var(--hairline); }
.faq__item:first-child { border-top: none; }
.faq__q {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(22px, 3vw, 28px); line-height: 1.15;
  color: var(--ink); margin-bottom: 10px;
}
.faq__a { font-size: 17px; color: var(--ink-secondary); max-width: 72ch; line-height: 1.7; }

/* ============================================================
   MEMBERSHIP APPLICATION
   ============================================================ */
.apply { background: var(--ink); color: #F6F4EF; }
.apply .eyebrow { color: #B9C1BB; }
.apply__title { font-family: var(--display); font-weight: 600; font-size: clamp(32px, 4.6vw, 50px); line-height: 1.06; color: #F6F4EF; max-width: 18ch; }
.apply__lead { color: #C9CEC8; font-size: clamp(18px, 2vw, 21px); margin-top: 18px; max-width: 44ch; }

.apply__grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; margin-top: 12px; align-items: start; }
@media (max-width: 860px) { .apply__grid { grid-template-columns: 1fr; gap: 32px; } }

.form { margin-top: 8px; }
.field { margin-bottom: 26px; }
.field__label {
  display: block;
  font-size: 15px; letter-spacing: 0.10em; text-transform: uppercase;
  color: #B9C1BB; font-weight: 600; margin-bottom: 12px;
}
.field__hint { font-size: 15px; color: #9AA39C; margin: -6px 0 12px; text-transform: none; letter-spacing: 0; font-weight: 400; }
.input {
  width: 100%;
  font-family: var(--ui);
  font-size: 17px;
  color: #F6F4EF;
  background: #182238;
  border: 1px solid #3A4560;
  border-radius: var(--radius-control);
  padding: 15px 16px;
}
.input::placeholder { color: #8891A6; }
.input:focus-visible { outline: 2px solid #6FD3AE; outline-offset: 2px; }

/* chips = real checkboxes / radios, styled */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; }
.chip input {
  position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer;
}
.chip span {
  display: inline-block;
  padding: 11px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid #3A4560;
  background: #182238;
  color: #E7EAE4;
  font-size: 16px;
  font-weight: 500;
  transition: background-color .16s ease-out, border-color .16s ease-out, color .16s ease-out;
}
.chip input:hover + span { border-color: #6FD3AE; }
.chip input:checked + span { background: var(--emerald); border-color: var(--emerald); color: #FFFFFF; }
.chip input:focus-visible + span { outline: 2px solid #6FD3AE; outline-offset: 2px; }

.form__actions { margin-top: 32px; }
.form__submit {
  background: #6FD3AE; color: #06120D; border: none;
  font-family: var(--ui); font-size: 17px; font-weight: 700;
  padding: 17px 30px; border-radius: var(--radius-control); cursor: pointer;
  transition: background-color .18s ease-out;
}
.form__submit:hover { background: #86e0bf; }
.hp { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }

.form__success {
  display: none;
  border: 1px solid #3A4560;
  border-radius: var(--radius-card);
  padding: 32px;
  background: #182238;
}
.form__success.is-shown { display: block; }
.form__success .seal { width: 64px; height: 64px; margin-bottom: 18px; color: #F6F4EF; }
.form__success h3 { font-family: var(--display); font-weight: 600; font-size: 28px; color: #F6F4EF; margin-bottom: 10px; }
.form__success p { color: #C9CEC8; font-size: 17px; }

/* the seal / membership panel on the left */
.velvet { position: sticky; top: 96px; }
.velvet__seal { width: 92px; height: 92px; color: #F6F4EF; margin-bottom: 24px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--canvas); border-top: 1px solid var(--hairline); padding: 56px 0; }
.footer__inner { display: flex; flex-wrap: wrap; gap: 24px 40px; align-items: center; }
.footer__brand { display: flex; align-items: center; gap: 12px; }
.footer__mark { width: 26px; height: 26px; }
.footer__name { font-size: 15px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-secondary); font-weight: 500; }
.footer__links { display: flex; gap: 24px; margin-left: auto; flex-wrap: wrap; }
.footer__links a { color: var(--ink-secondary); text-decoration: none; font-size: 16px; }
.footer__links a:hover { color: var(--ink); }
.footer__agreements {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  width: 100%; margin-top: 10px;
  padding-top: 18px; border-top: 1px solid var(--hairline);
}
.footer__group-label {
  font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-tertiary); font-weight: 600;
}
.footer__agreements a { color: var(--ink-secondary); text-decoration: none; font-size: 15px; }
.footer__agreements a:hover { color: var(--ink); }
.footer__copy { width: 100%; color: var(--ink-tertiary); font-size: 15px; margin-top: 8px; }

/* generic reveal-on-scroll (fades content in; disabled for reduced-motion) */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease-out, transform .6s ease-out; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
}
.no-js .reveal { opacity: 1; transform: none; }
