/* ─────────────────────────────────────────────────────────────────────────
   Advizel — public site stylesheet.

   Palette is lifted directly from styles/colors.ts (the app's settled warm
   system). Two hard rules carried over from CLAUDE.md and the product
   constitution:

     1. NO RED, EVER. Hard information is warm amber. There is no red hex in
        this file and none may be added — `colors.risk` is deliberately
        aliased to amber in the app and the same holds here.
     2. Warm ink / amber / serif. Background is warm off-white (paper, morning
        light) — never stark white, never pure black.

   Contrast, measured against the page background #F7F4ED:
     ink        #1C1B17  15.7:1   body text, headings, primary button fill
     ink-2      #5E5C57   6.1:1   secondary text (colors.textSecondary flattened)
     amber-text #8A5C2B   5.2:1   the ONLY amber allowed on small text
     amber      #B8804B   3.1:1   borders, fills, rules — never small text

   --amber-text is a web-only darkening of the app's colors.accentPressed
   (#94632F), identical hue (31 degrees), one step deeper. It has to be:
   #94632F measures 4.39:1 on the recessed band #F0EDE4, just under AA, and
   the 12.5px uppercase eyebrow that sits there is small text. #8A5C2B clears
   AA on all three surfaces this site uses (paper 5.2:1, card 5.8:1,
   recessed band 4.9:1, amber wash 4.7:1).
   On the dark ink surface (#1C1B17):
     paper      #F7F4ED  15.7:1
     paper-2    #C7C4BE   9.9:1
     amber-dark #D89A5C   7.1:1
   No self-contained font files: system stacks only, so there is nothing to
   download and no third-party origin is ever contacted.
   ───────────────────────────────────────────────────────────────────────── */

:root {
  --paper: #f7f4ed;
  --card: #ffffff;
  --card-alt: #f0ede4;
  --ink: #1c1b17;
  --ink-top: #2a2722;
  --ink-2: #5e5c57;
  --paper-2: #c7c4be;
  --amber: #b8804b;
  --amber-text: #8a5c2b;
  --amber-dark: #d89a5c;
  --amber-wash: #efe6da;
  --line: rgba(28, 27, 23, 0.1);
  --line-strong: rgba(28, 27, 23, 0.16);
  --line-on-dark: rgba(247, 244, 237, 0.14);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
    Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  --gutter: clamp(1.125rem, 4vw, 2.5rem);
  --wide: 68rem;
  --radius: 1.125rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--amber-text);
  text-underline-offset: 0.18em;
}
a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--amber-text);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Clipped rather than pushed off-canvas: a negative `left` can widen the
   scroll box on narrow viewports. */
.skip {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  background: var(--ink);
  color: var(--paper);
  z-index: 20;
}
.skip:focus {
  left: 0;
  top: 0;
  width: auto;
  height: auto;
  padding: 0.75rem 1.125rem;
  overflow: visible;
  clip-path: none;
  border-radius: 0 0 10px 0;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.012em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.125rem, 6.2vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 4.2vw, 2.35rem); }
h3 { font-size: clamp(1.14rem, 2.4vw, 1.35rem); }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.wrap {
  width: 100%;
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.narrow { max-width: 44rem; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-text);
  margin: 0 0 0.85rem;
}
.eyebrow.on-dark { color: var(--amber-dark); }

.lede {
  font-size: clamp(1.06rem, 2.1vw, 1.25rem);
  color: var(--ink-2);
  max-width: 40rem;
}

section { margin: 0; }

.band {
  padding-block: clamp(3rem, 8vw, 5.5rem);
}
.band + .band { border-top: 1px solid var(--line); }
.band--alt { background: var(--card-alt); }

/* ── Header ────────────────────────────────────────────────────────────── */

.site-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  padding: 1.125rem var(--gutter);
  max-width: var(--wide);
  margin-inline: auto;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
}
.wordmark img { width: 1.6rem; height: 1.6rem; }

.site-head nav {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  font-size: 0.97rem;
}
.site-head nav a {
  color: var(--ink-2);
  text-decoration: none;
}
.site-head nav a:hover { color: var(--ink); text-decoration: underline; }

/* ── Buttons and the Download CTA ──────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3rem;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  border: 1px solid transparent;
  max-width: 100%;
}

/* Primary = INK, per the app (the amber is for attention, not for buttons). */
.btn--primary {
  background: var(--ink);
  color: var(--paper);
}
.btn--primary:hover { background: #000; color: var(--paper); }

.btn--on-dark {
  background: var(--paper);
  color: var(--ink);
}
.btn--on-dark:hover { background: #fff; color: var(--ink); }

.btn--quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--quiet:hover { background: var(--card); color: var(--ink); }

.btn--quiet-on-dark {
  color: var(--paper);
  border-color: rgba(247, 244, 237, 0.3);
}
.btn--quiet-on-dark:hover {
  background: rgba(247, 244, 237, 0.1);
  color: var(--paper);
}

/* The pre-launch state of the Download button. It is a <span>, not a link:
   there is nothing to go to yet, and a dead link is worse than a plain
   statement. See the LISTING_LIVE flag at the top of index.html. */
.btn--pending {
  background: var(--card);
  color: var(--ink);
  border: 1px dashed var(--amber);
  cursor: default;
  font-weight: 600;
}
.on-dark-block .btn--pending {
  background: transparent;
  color: var(--paper);
  border-color: var(--amber-dark);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  margin-top: 1.6rem;
}

.trust-line {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--ink-2);
}
.on-dark-block .trust-line { color: var(--paper-2); }

.also-line {
  margin-top: 0.35rem;
  font-size: 0.9rem;
  color: var(--ink-2);
}
.on-dark-block .also-line { color: var(--paper-2); }

/* ── Hero ──────────────────────────────────────────────────────────────── */

.hero {
  background: linear-gradient(160deg, var(--ink-top), var(--ink));
  color: var(--paper);
  border-radius: var(--radius);
  width: calc(100% - 2 * var(--gutter));
  max-width: var(--wide);
  margin: 0 auto clamp(2rem, 6vw, 4rem);
  padding: clamp(2.25rem, 6vw, 4.25rem) clamp(1.25rem, 4vw, 3.5rem);
}

.hero h1 { color: var(--paper); }
.hero .lede { color: var(--paper-2); }

.hero-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}
@media (min-width: 56rem) {
  .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
}

/* ── Phone frame (CSS only — the screenshots themselves are untouched) ──── */

.phone {
  --phone-w: 15.5rem;
  width: min(var(--phone-w), 100%);
  margin-inline: auto;
  border-radius: 1.85rem;
  padding: 0.5rem;
  background: linear-gradient(155deg, #3a3128, var(--ink));
  box-shadow: 0 1.5rem 3rem rgba(28, 27, 23, 0.22);
}
.phone img {
  display: block;
  width: 100%;
  border-radius: 1.4rem;
  background: var(--paper);
}

figure {
  margin: 0;
}
figcaption {
  margin-top: 0.85rem;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--ink-2);
  text-align: center;
  max-width: 22rem;
  margin-inline: auto;
}
.on-dark-block figcaption { color: var(--paper-2); }

/* ── Generic content grids ─────────────────────────────────────────────── */

.grid {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
  margin-top: clamp(1.75rem, 4vw, 2.75rem);
}
@media (min-width: 46rem) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.split {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}
@media (min-width: 56rem) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .split--flip > figure { order: 2; }
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 1.75rem);
}
.card h3 { margin-bottom: 0.4rem; }
.card p { color: var(--ink-2); }

.split--steps { margin-top: clamp(1.25rem, 3vw, 1.75rem); }

.steps {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
}

.step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.step-n {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  min-height: 2.1rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: var(--amber-wash);
  color: var(--amber-text);
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
}
.step-body { flex: 1 1 auto; min-width: 0; }
.step-body h3 { margin-bottom: 0.3rem; }
.step-body p { color: var(--ink-2); margin-bottom: 0; }

/* Spacing helpers, so the markup carries no layout-bearing inline styles. */
.sub { margin-top: 2rem; }
.after-facts { margin-top: 1.4rem; }

/* A label -> value fact row, mirroring the app's FactRow idiom.
   These are TEXT-valued rows, not money-valued, so the app's rule inverts:
   the label holds its size and the VALUE grows/shrinks with a min-width floor,
   dropping to its own full-width line rather than being crushed. The value is
   also the last child, so a wrap moves meaning into more room and never
   exiles trailing chrome. (CLAUDE.md, "Fluid layouts only".) */
.facts {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.facts li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1rem;
  justify-content: space-between;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}
.facts .k { flex: 0 0 auto; color: var(--ink-2); }
.facts .v {
  flex: 1 1 auto;
  min-width: 55%;
  text-align: right;
  font-weight: 600;
  overflow-wrap: break-word;
}

.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: clamp(2rem, 5vw, 3rem) 0;
}

/* ── Pricing ───────────────────────────────────────────────────────────── */

.price-card {
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  max-width: 34rem;
}
.price {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 6vw, 2.9rem);
  line-height: 1.1;
  margin: 0 0 0.35rem;
}
.price small {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-2);
}

/* ── FAQ ───────────────────────────────────────────────────────────────── */

.faq {
  margin-top: clamp(1.5rem, 4vw, 2.25rem);
  border-top: 1px solid var(--line);
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 2.25rem 1.1rem 0;
  font-weight: 600;
  font-size: 1.05rem;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  line-height: 1;
  color: var(--amber-text);
}
.faq details[open] summary::after { content: "\2013"; }
.faq .answer {
  padding: 0 0 1.25rem;
  color: var(--ink-2);
  max-width: 48rem;
}

/* ── Footer ────────────────────────────────────────────────────────────── */

.site-foot {
  border-top: 1px solid var(--line);
  padding: clamp(2rem, 5vw, 3rem) var(--gutter);
  max-width: var(--wide);
  margin-inline: auto;
  font-size: 0.94rem;
  color: var(--ink-2);
}
.site-foot a { color: var(--ink-2); }
.site-foot a:hover { color: var(--ink); }
.site-foot .fine {
  margin-top: 0.75rem;
  font-size: 0.86rem;
  max-width: 46rem;
}

/* ── Legal document pages ──────────────────────────────────────────────── */

.doc-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  padding: 1.125rem var(--gutter);
  max-width: 48rem;
  margin-inline: auto;
  border-bottom: 1px solid var(--line);
}
.doc-head nav { margin-left: auto; font-size: 0.97rem; }
.doc-head nav a { color: var(--ink-2); text-decoration: none; }
.doc-head nav a:hover { color: var(--ink); text-decoration: underline; }

.prose {
  max-width: 48rem;
  margin-inline: auto;
  padding: clamp(2rem, 6vw, 3.5rem) var(--gutter);
}
.prose h1 { font-size: clamp(2rem, 5.5vw, 2.9rem); }
.prose h2 { font-size: clamp(1.3rem, 3.4vw, 1.65rem); margin-top: 2.25rem; }
.prose .meta {
  color: var(--ink-2);
  font-size: 0.95rem;
  margin-bottom: 1.75rem;
}
.prose ul { padding-left: 1.15rem; margin: 0 0 1rem; }
.prose li { margin-bottom: 0.5rem; }
.prose section { margin-bottom: 0.5rem; }

/* ── Print ─────────────────────────────────────────────────────────────── */

@media print {
  .skip, .site-head nav, .doc-head nav { display: none; }
  body { background: #fff; }
}
