/* Weave family sites. One stylesheet, three faces.
   Palette resolved from the mark Jason picked on 2026-09-09 (ballot r6, option V5 "Ember"):
   ink #15171A, family gold #C8A872, bone #F2F2F2. Every pair below is measured, not eyeballed:
   scripts/contrast.py prints the ratios. Dark is the default because that is the ground the
   mark was drawn for and the ground this category is read on. */

:root {
  --ink: #15171A;
  --surface: #1C1F24;
  --surface-2: #23272E;
  --line: #2E333B;
  --text: #F2F2F2;
  --muted: #9BA3AD;
  --gold: #C8A872;
  --accent-text: #C8A872;   /* 7.95:1 on ink */
  --on-accent: #15171A;     /* 7.95:1 on gold */
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.35);
  --radius: 16px;
  --measure: 66ch;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --ink: #FBF7EE;
    --surface: #F3EEE2;
    --surface-2: #EDE7D8;
    --line: #DED6C4;
    --text: #15171A;
    --muted: #55585E;
    --accent-text: #7A5D22; /* 5.75:1 on paper. Family gold is a FILL here, never text. */
    --shadow: 0 1px 2px rgba(21,23,26,.08), 0 12px 32px rgba(21,23,26,.10);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

a { color: inherit; }
img, svg, canvas { max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(2.35rem, 4.6vw, 3.5rem); text-wrap: balance; }
/* Each half of the headline is one phrase and must read as one line: sized to the hero
   column's real width so it never breaks mid-phrase. */
.hero h1 { max-width: 15ch; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.12rem; font-family: var(--sans); font-weight: 650; letter-spacing: 0; }
p { margin: 0 0 1rem; max-width: var(--measure); }

.wrap { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; border-top: 1px solid var(--line); }
section:first-of-type { border-top: 0; }
.eyebrow {
  font: 600 .74rem/1 var(--sans); letter-spacing: .13em; text-transform: uppercase;
  color: var(--accent-text); margin: 0 0 1rem;
}
.lede { font-size: 1.16rem; color: var(--muted); max-width: 62ch; }

/* ---- nav ------------------------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ink) 86%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-in { display: flex; align-items: center; gap: 1.5rem; height: 60px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font-weight: 650; letter-spacing: -.01em; }
.brand svg, .brand img { width: 26px; height: 26px; border-radius: 6px; }
.nav-links { display: flex; gap: 1.4rem; margin-left: auto; align-items: center; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: .93rem; }
.nav-links a:hover { color: var(--text); }
.nav-links .btn { color: var(--on-accent); }
@media (max-width: 860px) { .nav-links a:not(.btn) { display: none; } }

/* ---- buttons --------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: var(--gold); color: var(--on-accent);
  font: 650 .98rem/1 var(--sans);
  padding: .82rem 1.35rem; border-radius: 999px; text-decoration: none; border: 0;
  transition: transform .12s ease, filter .12s ease;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(1px); }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--line); padding: .78rem 1.25rem;
}
.btn-ghost:hover { border-color: var(--muted); filter: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1.8rem; }
.btn-note { color: var(--muted); font-size: .9rem; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

/* ---- hero ------------------------------------------------------------------------------ */
.hero { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 5rem); }
.hero-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 span { display: block; }
.hero h1 .b { color: var(--accent-text); }
.hero .lede { margin-top: 1.4rem; font-size: 1.22rem; }
.hero-art { position: relative; aspect-ratio: 1 / 1; }
.hero-art canvas { width: 100%; height: 100%; display: block; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 340px; margin-inline: auto; }
}

/* ---- proof strip ----------------------------------------------------------------------- */
.proof { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.proof > div { background: var(--ink); padding: 1.4rem 1.3rem; }
.proof h3 { color: var(--accent-text); font-size: .95rem; margin-bottom: .4rem; }
.proof p { color: var(--muted); font-size: .93rem; margin: 0; }
@media (max-width: 880px) { .proof { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .proof { grid-template-columns: 1fr; } }

/* ---- generic cards --------------------------------------------------------------------- */
.cards { display: grid; gap: 1rem; margin-top: 2.4rem; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem 1.4rem; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--muted); font-size: .96rem; margin: 0; }
.card .n { font: 650 .8rem/1 var(--sans); color: var(--accent-text); letter-spacing: .1em; display: block; margin-bottom: .8rem; }
@media (max-width: 980px) { .cols-3, .cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } }

/* ---- problem --------------------------------------------------------------------------- */
.problem ul { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .9rem; max-width: 78ch; }
.problem li { position: relative; padding-left: 1.7rem; color: var(--muted); font-size: 1.06rem; }
.problem li::before {
  content: ""; position: absolute; left: 0; top: .62em; width: 10px; height: 2px; background: var(--gold);
}

/* ---- compare --------------------------------------------------------------------------- */
.table-scroll { overflow-x: auto; margin-top: 2rem; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; min-width: 720px; font-size: .94rem; }
th, td { text-align: left; padding: .95rem 1.1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font: 650 .82rem/1.3 var(--sans); letter-spacing: .04em; color: var(--muted); background: var(--surface); }
thead th.us { color: var(--accent-text); }
tbody tr:last-child td { border-bottom: 0; }
td.us { color: var(--text); font-weight: 600; }
td:not(.us):not(:first-child) { color: var(--muted); }
.sources { margin-top: 1rem; font-size: .86rem; color: var(--muted); }
.sources a { color: var(--accent-text); }

/* ---- pricing --------------------------------------------------------------------------- */
.price-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  padding: clamp(2rem, 4vw, 3rem); box-shadow: var(--shadow); max-width: 620px; margin-top: 2.2rem;
}
.price-num { font-family: var(--serif); font-size: clamp(3rem, 7vw, 4.2rem); line-height: 1; }
.price-num small { font-family: var(--sans); font-size: 1rem; color: var(--muted); margin-left: .6rem; font-weight: 500; }
.price-list { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: .6rem; }
.price-list li { padding-left: 1.6rem; position: relative; color: var(--muted); font-size: .98rem; }
.price-list li::before { content: ""; position: absolute; left: 0; top: .58em; width: 10px; height: 2px; background: var(--gold); }

/* ---- faq ------------------------------------------------------------------------------- */
.faq { display: grid; gap: .6rem; margin-top: 2.2rem; max-width: 82ch; }
details {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 1.2rem;
}
summary { cursor: pointer; padding: 1.05rem 0; font-weight: 600; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; float: right; color: var(--accent-text); font-weight: 400; }
details[open] summary::after { content: "\2013"; }
details p { color: var(--muted); margin: 0 0 1.1rem; font-size: .97rem; }

/* ---- family ---------------------------------------------------------------------------- */
.family { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 2.2rem; }
.family a {
  display: block; text-decoration: none; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.6rem 1.5rem; transition: border-color .15s ease;
}
.family a:hover { border-color: var(--gold); }
.family strong { display: block; font-family: var(--serif); font-size: 1.35rem; margin-bottom: .35rem; }
.family span { color: var(--muted); font-size: .95rem; }
@media (max-width: 620px) { .family { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .family a { transition: none; } }

/* ---- closing + footer ------------------------------------------------------------------ */
.closing { text-align: center; }
.closing p { margin-inline: auto; }
.closing .btn-row { justify-content: center; }
footer { border-top: 1px solid var(--line); padding: 3rem 0 4rem; color: var(--muted); font-size: .9rem; }
.foot-grid { display: flex; flex-wrap: wrap; gap: 2rem 3rem; align-items: flex-start; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }
.foot-links { display: grid; gap: .45rem; }
.foot-note { margin-top: 2.2rem; max-width: 70ch; }

/* ---- reveal (guarded) ------------------------------------------------------------------ */
.js-reveal .reveal:not(.in) { opacity: 0; transform: translateY(14px); }
.js-reveal .reveal { transition: opacity .5s ease, transform .5s ease; }
@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal:not(.in) { opacity: 1; transform: none; }
  .js-reveal .reveal { transition: none; }
}

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; position: fixed; z-index: 100; background: var(--gold); color: var(--on-accent); padding: .7rem 1rem; border-radius: 8px; }

/* ---- dwell nudge ------------------------------------------------------------------------ */
.nudge {
  position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 60; width: min(340px, calc(100vw - 2.4rem));
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 1.3rem 1.3rem 1.2rem; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(12px); transition: opacity .35s ease, transform .35s ease;
}
.nudge.in { opacity: 1; transform: none; }
.nudge strong { display: block; font-family: var(--serif); font-size: 1.2rem; margin-bottom: .4rem; }
.nudge p { color: var(--muted); font-size: .93rem; margin: 0 0 1rem; }
.nudge .btn { padding: .68rem 1.1rem; font-size: .92rem; }
.nudge-x {
  position: absolute; top: .6rem; right: .7rem; background: none; border: 0; cursor: pointer;
  color: var(--muted); font-size: 1.3rem; line-height: 1; padding: .25rem .45rem; border-radius: 8px;
}
.nudge-x:hover { color: var(--text); }
@media (prefers-reduced-motion: reduce) { .nudge { transition: none; } }
@media (max-width: 520px) { .nudge { right: .8rem; left: .8rem; bottom: .8rem; width: auto; } }

/* The mark is rendered on the ground it was authored for, in both themes. */
.hero-art canvas { border-radius: 24px; background: #15171A; }
@media (prefers-color-scheme: light) { .hero-art canvas { border: 1px solid var(--line); } }
