/* Noria marketing site — Deep Stream palette (matches dashboard tokens) */

:root {
  --bg: #f4f7f9;
  --bg-accent: #e7eef2;
  --surface: #ffffff;
  --ink: #0e2a3b;
  --muted: #5a7180;
  --stream: #2f7d97;
  --stream-bright: #5fb2c9;
  --hairline: rgba(14, 42, 59, 0.12);
  --card-border: rgba(14, 42, 59, 0.10);
  --shadow: 0 1px 2px rgba(14, 42, 59, 0.04), 0 12px 32px -16px rgba(14, 42, 59, 0.18);
  --pos: #1b7a45;
  --pos-bg: rgba(27, 122, 69, 0.10);
  --neg: #b23a3a;
  --neg-bg: rgba(178, 58, 58, 0.10);
  --warn-bg: #fdf3e2;
  --warn-border: #e3b968;
  --warn-ink: #6b4a12;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --maxw: 68rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #081820;
    --bg-accent: #0d2531;
    --surface: #0d232d;
    --ink: #eaf3f6;
    --muted: #8fa8b4;
    --stream: #5fb2c9;
    --stream-bright: #8fd4e6;
    --hairline: rgba(234, 243, 246, 0.12);
    --card-border: rgba(234, 243, 246, 0.10);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 20px 40px -20px rgba(0, 0, 0, 0.55);
    --pos: #4fce8b;
    --pos-bg: rgba(79, 206, 139, 0.14);
    --neg: #e3776f;
    --neg-bg: rgba(227, 119, 111, 0.14);
    --warn-bg: #2a2010;
    --warn-border: #8a6a2a;
    --warn-ink: #f0d190;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--stream); }
a:hover { color: var(--stream-bright); }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.site-header .wordmark {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: 0.01em;
  margin: 0;
  background: linear-gradient(100deg, var(--stream), var(--stream-bright));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-decoration: none;
}

.site-nav {
  display: none;
  gap: 1.75rem;
  font-size: 0.9rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.site-nav a:hover { color: var(--ink); }

@media (min-width: 720px) {
  .site-nav { display: flex; align-items: center; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.65rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(100deg, var(--stream), var(--stream-bright));
  color: #f4fbfd;
  box-shadow: 0 8px 20px -8px rgba(47, 125, 151, 0.55);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -10px rgba(47, 125, 151, 0.65); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-ghost {
  background: transparent;
  border-color: var(--hairline);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--stream); color: var(--stream); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: clamp(3.5rem, 9vw, 7rem) 1.5rem clamp(3rem, 7vw, 5rem);
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 30rem;
  background: radial-gradient(60% 60% at 50% 0%, var(--bg-accent), transparent 70%);
  z-index: -1;
}

.hero .kicker {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--stream);
  margin-bottom: 1.25rem;
  animation: fade-up 0.6s ease both;
}

.hero .wordmark {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  font-size: clamp(3rem, 11vw, 5.5rem);
  letter-spacing: 0.01em;
  line-height: 1;
  margin: 0 0 1.25rem;
  background: linear-gradient(100deg, var(--stream), var(--stream-bright));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: fade-up 0.6s ease 0.05s both;
}

.hero .tagline {
  max-width: 40rem;
  margin: 0 auto 2.25rem;
  font-size: clamp(1.1rem, 2.6vw, 1.4rem);
  color: var(--muted);
  animation: fade-up 0.6s ease 0.1s both;
}

.hero .cta-row {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fade-up 0.6s ease 0.15s both;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.wave-divider {
  line-height: 0;
  color: var(--bg-accent);
  margin-top: -1px;
}
.wave-divider svg { display: block; width: 100%; height: auto; }

/* ---------- section shell ---------- */

section { padding: clamp(3rem, 7vw, 5.5rem) 0; }

.section-head {
  max-width: 40rem;
  margin: 0 auto 2.75rem;
  text-align: center;
}

.section-head .eyebrow {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--stream);
  margin-bottom: 0.6rem;
}

.section-head h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  margin: 0 0 0.75rem;
}

.section-head p { color: var(--muted); margin: 0; }

/* ---------- how it works ---------- */

#how-it-works { background: var(--bg-accent); }

.cards-3 {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 760px) {
  .cards-3 { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-3px); }

.card .icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(140deg, var(--stream), var(--stream-bright));
  color: #f4fbfd;
  margin-bottom: 1.1rem;
}
.card .icon svg { width: 1.35rem; height: 1.35rem; }

.card h3 { margin: 0 0 0.5rem; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.card.critical-rule {
  border-color: var(--warn-border);
  background: linear-gradient(180deg, var(--warn-bg), var(--surface) 55%);
}
.card.critical-rule .icon { background: linear-gradient(140deg, var(--warn-border), #c98f2e); }
.card.critical-rule h3 { color: var(--warn-ink); }

/* ---------- disclaimer ---------- */

.disclaimer {
  max-width: 44rem;
  margin: 0 auto 2.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--warn-border);
  background: var(--warn-bg);
  color: var(--warn-ink);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  line-height: 1.55;
}

footer .disclaimer { margin: 1.5rem auto; }

/* ---------- track record ---------- */

.tr-tiles {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin-bottom: 2.5rem;
}
@media (min-width: 620px) {
  .tr-tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
  .tr-tiles { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
}

.tile {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow);
}

.tile h3 {
  margin: 0 0 0.9rem;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tile h3::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: linear-gradient(140deg, var(--stream), var(--stream-bright));
}

.tile dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem 0.75rem;
  margin: 0;
  font-size: 0.88rem;
}
.tile dt { color: var(--muted); }
.tile dd { margin: 0; font-weight: 600; text-align: right; }

.metric-caption {
  max-width: 42rem;
  margin: -1rem auto 2rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
}

.table-caption {
  max-width: 42rem;
  margin: -1.5rem auto 1rem;
  text-align: center;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--muted);
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  margin-bottom: 2.5rem;
  background: var(--surface);
}

table.tr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 40rem;
}

table.tr-table th,
table.tr-table td {
  padding: 0.65rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
}

table.tr-table th {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  background: var(--bg-accent);
}

table.tr-table tbody tr:last-child td { border-bottom: none; }
table.tr-table tbody tr:hover { background: var(--bg-accent); }

.pct { font-weight: 700; font-variant-numeric: tabular-nums; }
.pct.pos { color: var(--pos); }
.pct.neg { color: var(--neg); }
.win-pill, .loss-pill {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}
.win-pill { background: var(--pos-bg); color: var(--pos); }
.loss-pill { background: var(--neg-bg); color: var(--neg); }

.cycles-note { color: var(--muted); font-size: 0.82em; }

.monthly-panel {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
}
.monthly-panel h3 { margin: 0 0 1rem; font-size: 1rem; }

.monthly-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.monthly-row {
  display: grid;
  grid-template-columns: 6rem 1fr auto;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
}
.monthly-row .month { color: var(--muted); font-variant-numeric: tabular-nums; }
.monthly-row .bar-track {
  height: 0.4rem;
  border-radius: 999px;
  background: var(--bg-accent);
  overflow: hidden;
}
.monthly-row .bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--stream), var(--stream-bright));
}
.monthly-row .count { font-variant-numeric: tabular-nums; white-space: nowrap; }

.tr-generated {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  margin: 0;
}

.tr-empty {
  text-align: center;
  color: var(--muted);
  padding: 2.5rem 1.5rem;
  border: 1px dashed var(--card-border);
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
}

/* ---------- waitlist ---------- */

#waitlist { background: var(--bg-accent); }

.waitlist-card {
  max-width: 34rem;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: clamp(1.75rem, 4vw, 2.5rem);
}

.field { margin-bottom: 1.4rem; }
.field label.field-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.field input[type="email"] {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline);
  background: var(--bg);
  color: var(--ink);
  font-size: 0.95rem;
}
.field input[type="email"]:focus {
  outline: 2px solid var(--stream-bright);
  outline-offset: 1px;
}

.option-grid {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: 1fr 1fr;
}
@media (min-width: 480px) {
  .option-grid.price-band { grid-template-columns: repeat(4, 1fr); }
}

.option-pill {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.5rem;
  font-size: 0.85rem;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.option-pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.option-pill:has(input:checked) {
  border-color: var(--stream);
  background: color-mix(in srgb, var(--stream) 12%, transparent);
  font-weight: 600;
}
.option-pill:has(input:focus-visible) { outline: 2px solid var(--stream-bright); outline-offset: 2px; }

.strategies-grid { grid-template-columns: 1fr 1fr; }
.option-pill.checkbox { justify-content: flex-start; text-align: left; gap: 0.5rem; }

.waitlist-submit { width: 100%; margin-top: 0.5rem; }

.form-msg {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  text-align: center;
  min-height: 1.2em;
}
.form-msg.error { color: var(--neg); }
.form-msg.ok { color: var(--pos); }

.thankyou {
  text-align: center;
  padding: 1rem 0;
}
.thankyou h3 { margin: 0 0 0.5rem; }
.thankyou p { color: var(--muted); margin: 0; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 2.5rem 0 3rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}
.site-footer .wordmark {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

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