/*
 * Shared styling for the QuantDesk site.
 *
 * Design intent: this sells financial software to people who will trust it with
 * a brokerage account. Gold-and-crimson "conquest" styling is exactly what a
 * scam looks like, so the Roman theme is read as MARBLE, ORDER AND DISCIPLINE
 * instead — which is also what the product actually is (rules, hard stops, no
 * profit share). Restraint here is a trust signal, not timidity.
 *
 * Imperial red is reserved for risk callouts only. It is semantic, never
 * decorative — if it is red, it is about losing money.
 */

:root {
  --ink: #14171a;
  --ink-soft: #2a2f35;
  --marble: #e9e7e1;
  --marble-deep: #dcd9d1;
  --paper: #f5f3ef;
  /* The accent. A bronze patina — aged metal, not polished gold. */
  --patina: #4a6357;
  --patina-bright: #7ba593;
  /* Neutral deliberately biased toward the accent rather than a dead grey. */
  --stone: #6b6e68;
  --stone-light: #9a9d96;
  /* Semantic only. */
  --risk: #8b2635;
  --risk-bright: #c76a76;

  --display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --measure: 66ch;
  --gap: clamp(1rem, 2.5vw, 2rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --marble: #14171a;
    --marble-deep: #0e1013;
    --paper: #1b1f23;
    --ink: #e9e7e1;
    --ink-soft: #c3c0b9;
    --stone: #9a9d96;
    --stone-light: #6b6e68;
    --patina: #7ba593;
    --patina-bright: #9dc4b3;
    --risk: #c76a76;
  }
}
:root[data-theme="dark"] {
  --marble: #14171a;
  --marble-deep: #0e1013;
  --paper: #1b1f23;
  --ink: #e9e7e1;
  --ink-soft: #c3c0b9;
  --stone: #9a9d96;
  --stone-light: #6b6e68;
  --patina: #7ba593;
  --patina-bright: #9dc4b3;
  --risk: #c76a76;
}
:root[data-theme="light"] {
  --marble: #e9e7e1;
  --marble-deep: #dcd9d1;
  --paper: #f5f3ef;
  --ink: #14171a;
  --ink-soft: #2a2f35;
  --stone: #6b6e68;
  --stone-light: #9a9d96;
  --patina: #4a6357;
  --patina-bright: #7ba593;
  --risk: #8b2635;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--marble);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--display); font-weight: 600; text-wrap: balance; line-height: 1.15; }
h1 { font-size: clamp(2.25rem, 1.6rem + 3.2vw, 4rem); letter-spacing: -0.015em; margin: 0; }
h2 { font-size: clamp(1.5rem, 1.25rem + 1.2vw, 2.125rem); margin: 0 0 0.75rem; }
h3 { font-size: 1.1875rem; margin: 0 0 0.375rem; }
p { max-width: var(--measure); }

a { color: var(--patina); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--patina);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap { width: min(100% - 2.5rem, 68rem); margin-inline: auto; }
.narrow { width: min(100% - 2.5rem, 46rem); margin-inline: auto; }

/* Inscriptional label — small caps with generous tracking, like a Roman tablet. */
.eyebrow {
  font-family: var(--body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
  margin: 0 0 0.75rem;
}

section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.rule { border: 0; border-top: 1px solid var(--marble-deep); margin: 0; }

/* ---- header ---------------------------------------------------------- */
.masthead {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: 1.25rem;
}
.mark { font-family: var(--display); font-size: 1.125rem; letter-spacing: 0.02em; text-decoration: none; color: var(--ink); }
.mark span { color: var(--patina); }
.masthead nav { display: flex; gap: 1.25rem; font-size: 0.9375rem; flex-wrap: wrap; }
.masthead nav a { color: var(--ink-soft); text-decoration: none; }
.masthead nav a:hover { color: var(--patina); text-decoration: underline; }

/* ---- hero ------------------------------------------------------------ */
.hero { position: relative; text-align: center; padding-block: clamp(3.5rem, 9vw, 7rem); overflow: hidden; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.5; pointer-events: none; }
.hero > .narrow { position: relative; }
.hero p.lede {
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  color: var(--ink-soft);
  margin-inline: auto;
  margin-block: 1.25rem 0;
  max-width: 42ch;
}

.cta-row { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }
.btn {
  display: inline-block; padding: 0.6875rem 1.375rem;
  font: 600 0.9375rem/1 var(--body); letter-spacing: 0.01em;
  border: 1px solid var(--patina); border-radius: 2px;
  text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s;
}
.btn-solid { background: var(--patina); color: var(--paper); }
.btn-solid:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-ghost { background: transparent; color: var(--patina); }
.btn-ghost:hover { background: var(--patina); color: var(--paper); }

/* ---- content blocks -------------------------------------------------- */
.cols { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }

.step { border-top: 2px solid var(--patina); padding-top: 0.875rem; }
.step .num {
  font: 600 0.75rem/1 var(--mono); color: var(--patina);
  letter-spacing: 0.1em; display: block; margin-bottom: 0.5rem;
}
.step p { color: var(--ink-soft); font-size: 0.9375rem; margin: 0; }

.claim { display: flex; gap: 0.875rem; align-items: flex-start; }
.claim svg { flex: none; width: 1.25rem; height: 1.25rem; margin-top: 0.2rem; color: var(--patina); }
.claim p { margin: 0; font-size: 0.9375rem; color: var(--ink-soft); }
.claim strong { color: var(--ink); font-weight: 600; }

/* ---- pricing --------------------------------------------------------- */
.price-card {
  background: var(--paper); border: 1px solid var(--marble-deep);
  padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: 3px;
}
.price-row { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.price { font: 600 clamp(2rem, 1.5rem + 2vw, 2.75rem)/1 var(--display); font-variant-numeric: tabular-nums; }
.price-note { color: var(--stone); font-size: 0.9375rem; }
.price-headline {
  margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--marble-deep);
  font-size: 1.0625rem;
}
.price-headline strong { color: var(--patina); }

/* ---- risk block — the only place red appears ------------------------- */
.risk-block {
  border-left: 3px solid var(--risk);
  background: color-mix(in srgb, var(--risk) 6%, transparent);
  padding: 1.25rem 1.5rem; border-radius: 0 3px 3px 0;
}
.risk-block h3 { color: var(--risk); }
.risk-block p { font-size: 0.9375rem; color: var(--ink-soft); margin: 0 0 0.625rem; }
.risk-block p:last-child { margin-bottom: 0; }

/* ---- ventures -------------------------------------------------------- */
.tiles { display: grid; gap: 0.875rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.tile {
  display: block; padding: 1.125rem 1.25rem; text-decoration: none;
  background: var(--paper); border: 1px solid var(--marble-deep); border-radius: 3px;
  transition: border-color .15s, transform .15s;
}
.tile:hover { border-color: var(--patina); transform: translateY(-2px); }
.tile b { display: block; color: var(--ink); font: 600 1rem/1.3 var(--display); margin-bottom: 0.25rem; }
.tile span { color: var(--stone); font-size: 0.875rem; }

/* ---- form ------------------------------------------------------------ */
form { display: grid; gap: 1rem; max-width: 34rem; }
label { display: grid; gap: 0.375rem; font-size: 0.875rem; font-weight: 600; }
input, textarea, select {
  font: inherit; font-size: 0.9375rem; padding: 0.625rem 0.75rem;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--marble-deep); border-radius: 2px;
}
textarea { min-height: 6rem; resize: vertical; }

/* ---- footer ---------------------------------------------------------- */
footer { background: var(--paper); border-top: 1px solid var(--marble-deep); padding-block: 2.5rem; }
footer .cols { gap: 2rem; }
footer a { color: var(--ink-soft); text-decoration: none; display: block; padding-block: 0.1875rem; font-size: 0.9375rem; }
footer a:hover { color: var(--patina); text-decoration: underline; }
footer small { color: var(--stone); font-size: 0.8125rem; display: block; }

/* ---- legal pages ----------------------------------------------------- */
.legal h2 { margin-top: 2.5rem; }
.legal h3 { margin-top: 1.75rem; }
.legal li { max-width: var(--measure); margin-bottom: 0.5rem; }
.legal .updated { color: var(--stone); font-size: 0.875rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---- founder ---------------------------------------------------------- */
.founder { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); margin-top: 1.75rem; align-items: start; }
.founder-gallery { display: grid; gap: 0.75rem; grid-template-columns: 1fr 1fr; }
.founder-gallery figure { margin: 0; }
.founder-gallery img {
  width: 100%; height: auto; display: block;
  border-radius: 3px; border: 1px solid var(--marble-deep);
}
.founder-gallery figcaption { font-size: 0.75rem; color: var(--stone); margin-top: 0.375rem; }
.note-quiet { color: var(--stone); font-size: 0.9375rem; }
.mt-lg { margin-top: 1.5rem; }

/* ---- screenshot placeholders ------------------------------------------
   Deliberately empty frames, not invented imagery. Fabricating screenshots
   of a broker's UI would be misleading, and would go stale the moment they
   redesign. These get filled with real captures taken during the first
   supervised onboarding. */
figure.shot {
  margin: 1rem 0 1.75rem;
  border: 1px dashed var(--stone-light);
  border-radius: 3px;
  background: repeating-linear-gradient(
    45deg, transparent, transparent 10px,
    color-mix(in srgb, var(--stone) 6%, transparent) 10px,
    color-mix(in srgb, var(--stone) 6%, transparent) 20px);
  min-height: 8rem;
  display: grid;
  place-items: center;
  padding: 1rem;
}
figure.shot figcaption { color: var(--stone); font-size: 0.8125rem; text-align: center; }
figure.shot img { width: 100%; height: auto; border-radius: 2px; display: block; }
