/* Trickwise marketing site — hand-built to match the Claude Design
   export (docs/branding/Trickwise Marketing (offline).html). Tokens
   and component styles are lifted from the export's design system. */

/* ─── Fonts (self-hosted, latin subsets, OFL) ─────────────────────── */
@font-face {
  font-family: "Spectral";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("/fonts/spectral-400.woff2") format("woff2");
}
@font-face {
  font-family: "Spectral";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("/fonts/spectral-600.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 100 700; /* variable font */
  font-style: normal;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-var.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-500.woff2") format("woff2");
}

/* ─── Tokens (from the design-system export) ──────────────────────── */
:root {
  --paper-0: #fcfaf4;
  --paper-1: #f5f0e4;
  --paper-2: #ece5d4;
  --paper-3: #e0d7c2;
  --paper-4: #cfc3a8;
  --ink-900: #191b21;
  --ink-800: #23262f;
  --ink-700: #333844;
  --ink-600: #4a505e;
  --ink-500: #646b7b;
  --ink-400: #8a909e;
  --pine-600: #1f5a4a;
  --pine-500: #2c7460;
  --pine-400: #4a9a82;
  --pine-100: #ddeae3;
  --ochre-600: #a9741f;
  --ochre-500: #c79433;
  --ochre-100: #f1e6ca;
  --clay-600: #9a4634;
  --clay-500: #bc5b45;
  --clay-100: #f1d9d0;
  --indigo-500: #47588c;
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --tracking-caps: 0.14em;
  --shadow-xs: 0 1px 2px rgba(35, 30, 18, 0.06);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 2px 8px rgba(35, 30, 18, 0.09);
  --shadow-lg: 0 4px 8px rgba(35, 30, 18, 0.07), 0 16px 36px rgba(35, 30, 18, 0.12);
  --shadow-inset: inset 0 1px 3px rgba(35, 30, 18, 0.1);
  --focus-ring: rgba(44, 116, 96, 0.45);
}

/* ─── Base ────────────────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  background: var(--paper-0);
  color: var(--ink-800);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--ink-900); }
h1 { font-size: clamp(2.6rem, 6vw, 3.875rem); line-height: 1.02; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.7rem, 4vw, 2.375rem); line-height: 1.1; letter-spacing: -0.02em; }
a { color: var(--pine-600); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--pine-500); outline-offset: 2px; }
section { scroll-margin-top: 84px; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.band { padding: 64px 0; }
.band--tint { background: var(--paper-1); }
.band--dark { background: var(--ink-900); }

.icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; line-height: 0; }
.icon svg { stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Section label: small caps + a hairline rule stretching right */
.seclabel {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--ink-500);
}
.seclabel::after { content: ""; flex: 1 1 0; height: 1px; background: var(--paper-3); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 3px 9px;
  border-radius: 3px;
  line-height: 1.4;
  white-space: nowrap;
  background: var(--ochre-100);
  color: var(--ochre-600);
}

.fine { font-size: 0.8125rem; color: var(--ink-500); }

/* ─── Buttons ─────────────────────────────────────────────────────── */
.btn {
  font-family: var(--sans);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px solid transparent;
  background: var(--pine-500);
  color: var(--paper-0);
  border-radius: 5px;
  cursor: pointer;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: background 120ms, transform 120ms;
  height: 48px;
  padding: 0 24px;
  font-size: 1rem;
}
.btn:hover { background: var(--pine-600); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn-small { height: 32px; padding: 0 16px; font-size: 0.75rem; }
a.btn { color: var(--paper-0); }

/* ─── Forms ───────────────────────────────────────────────────────── */
.waitlist { margin-top: 30px; }
.field-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--ink-500);
  margin-bottom: 8px;
}
.field-row { display: flex; gap: 10px; align-items: stretch; max-width: 480px; }
.input {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper-0);
  border: 1.5px solid var(--paper-4);
  border-radius: 5px;
  padding: 0 12px;
  height: 48px;
  box-shadow: var(--shadow-inset);
  transition: border-color 120ms, box-shadow 120ms;
}
.input:focus-within { border-color: var(--pine-500); box-shadow: 0 0 0 3px var(--focus-ring); }
.input .icon { color: var(--ink-400); }
.input input {
  border: 0;
  outline: 0;
  background: transparent;
  flex: 1;
  min-width: 0;
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--ink-900);
}
.input input::placeholder { color: var(--ink-400); }
.waitlist .fine { margin-top: 12px; display: flex; align-items: center; gap: 7px; }
.waitlist .fine.is-error { color: var(--clay-600); }
.waitlist .fine.is-success { color: var(--pine-600); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ─── Nav ─────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(252, 250, 244, 0.92);
  backdrop-filter: blur(6px);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 32px;
  max-width: 1120px;
  margin: 0 auto;
}
.wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--ink-900);
}
.wordmark em { font-style: normal; color: var(--pine-600); }
.wordmark:hover { text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 0.875rem; font-weight: 500; }
.nav-links a:not(.btn) { color: var(--ink-600); }

/* ─── Hero ────────────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  padding: 56px 0 80px;
}
.hero h1 { margin-top: 16px; }
.lede { margin: 22px 0 0; font-size: 1.1875rem; line-height: 1.55; color: var(--ink-600); max-width: 460px; }

.hero-table { position: relative; padding: 10px 0 130px; }
.fan {
  position: relative;
  height: 200px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}
.card {
  position: absolute;
  bottom: 30px;
  width: 110px;
  height: 144px;
  background: var(--paper-0);
  border: 1px solid var(--paper-4);
  border-radius: 12px;
  box-shadow: var(--shadow-xs), 0 2px 6px rgba(35, 30, 18, 0.05);
  padding: 10px 12px;
  transform-origin: 50% 120%;
}
.card .rank { font-family: var(--serif); font-weight: 600; font-size: 1.5rem; display: block; line-height: 1; }
.card .suit { font-size: 1.05rem; display: block; line-height: 1.2; }
.card .ink { color: var(--ink-900); }
.card .clay { color: var(--clay-500); }
.card-1 { transform: translateX(-124px) rotate(-10deg); }
.card-2 { transform: translateX(-62px) rotate(-5deg) translateY(-4px); }
.card-3 { transform: rotate(0deg) translateY(-24px); border-color: var(--pine-600); box-shadow: 0 0 0 2px rgba(31, 90, 74, 0.25), var(--shadow-xs); }
.card-4 { transform: translateX(62px) rotate(5deg) translateY(-4px); }
.card-5 { transform: translateX(124px) rotate(10deg); }

.coach-note { position: absolute; left: 0; right: 0; bottom: 0; display: grid; }
.note {
  grid-area: 1 / 1;
  background: var(--paper-1);
  border: 1px solid var(--paper-3);
  border-left: 3px solid var(--pine-500);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  padding: 14px 18px;
  max-width: 440px;
  margin: 0 auto;
  font-size: 0.9rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease;
}
.note.is-active { opacity: 1; visibility: visible; }
.note-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--pine-600);
  margin-bottom: 4px;
}

/* ─── How it works (tinted band, unboxed columns, icon tiles) ─────── */
.band h2 { margin: 14px 0 20px; max-width: 640px; }
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin-top: 36px;
}
.feature .tile { margin-bottom: 16px; }
.tile {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pine-100);
  color: var(--pine-600);
}
.feature h3 { font-size: 1.3125rem; margin-bottom: 8px; }
.feature p { color: var(--ink-600); font-size: 0.875rem; line-height: 1.6; }

/* ─── The games (2-up horizontal rows) ────────────────────────────── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 36px;
}
.game {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--paper-1);
  border: 1px solid var(--paper-3);
  border-radius: 12px;
  padding: 16px;
  text-align: left;
}
.game .tile { width: 52px; height: 52px; }
.tile--clay { background: var(--clay-100); color: var(--clay-600); }
.tile--ink { background: var(--paper-2); color: var(--ink-800); }
.tile--ochre { background: var(--ochre-100); color: var(--ochre-600); }
.game h3 { font-size: 1.375rem; line-height: 1.2; }
.game p { color: var(--ink-600); font-size: 0.875rem; }
.game .end {
  margin-left: auto;
  color: var(--ink-400);
  display: flex;
  align-items: center;
  font-size: 0.8125rem;
}

/* ─── Your progress (copy left, stat card right) ──────────────────── */
.progress-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.progress-grid .section-lede { margin: 0; color: var(--ink-600); max-width: 440px; }
.stat-card {
  background: var(--paper-1);
  border: 1px solid var(--paper-3);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  padding: 20px;
}
.score-row { display: flex; gap: 28px; margin: 16px 0 20px; }
.score { display: inline-flex; flex-direction: column; gap: 2px; }
.score-cap {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--ink-500);
}
.score-num-row { display: inline-flex; align-items: baseline; gap: 12px; }
.score-num {
  font-family: var(--mono);
  font-size: 2.25rem;
  font-weight: 500;
  line-height: 1;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.score-delta {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--pine-600);
}
.statbars { display: flex; flex-direction: column; gap: 14px; }
.statbar { display: flex; flex-direction: column; gap: 6px; }
.statbar-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.statbar-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--ink-500);
}
.statbar-val { font-family: var(--mono); font-size: 0.875rem; font-weight: 500; color: var(--ink-900); font-variant-numeric: tabular-nums; }
.statbar-track { height: 8px; border-radius: 999px; background: var(--paper-2); box-shadow: var(--shadow-inset); overflow: hidden; }
.statbar-fill { height: 100%; border-radius: 999px; }
.statbar-fill--pine { background: var(--pine-500); }
.statbar-fill--indigo { background: var(--indigo-500); }
.statbar-fill--clay { background: var(--clay-500); }

/* ─── CTA (dark band, light form card) ────────────────────────────── */
.cta-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.band--dark h2 { color: var(--paper-0); margin: 14px 0; }
.band--dark .section-lede { color: var(--paper-3); max-width: 420px; }
.form-card {
  background: var(--paper-1);
  border-radius: 12px;
  padding: 26px;
  box-shadow: var(--shadow-lg);
}
.form-card-title { font-family: var(--serif); font-size: 1.3125rem; font-weight: 600; color: var(--ink-900); letter-spacing: -0.01em; margin-bottom: 6px; }
.form-card-sub { font-size: 0.875rem; color: var(--ink-600); line-height: 1.5; margin-bottom: 18px; }
.form-card .waitlist { margin-top: 0; }

/* ─── Footer (dark) ───────────────────────────────────────────────── */
.footer { background: var(--ink-800); padding: 48px 0; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
}
.footer .wordmark { color: var(--paper-0); }
.footer .wordmark em { color: var(--pine-400); }
.footer .fine { color: var(--ink-400); font-size: 0.875rem; margin-top: 12px; max-width: 300px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; font-size: 0.875rem; }
.footer-links a { color: var(--paper-2); }

/* ─── Prose pages (privacy) ───────────────────────────────────────── */
.prose { max-width: 720px; }
.prose h2 { margin: 14px 0 20px; }
.prose h3 { margin-top: 2rem; font-size: 1.3125rem; }
.prose p { margin-top: 0.5rem; color: var(--ink-600); }

/* ─── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  .hero-table { max-width: 480px; margin: 0 auto; width: 100%; }
  .progress-grid { grid-template-columns: 1fr; }
  .cta-grid { grid-template-columns: 1fr; }
}
@media (max-width: 840px) {
  .cards-3 { grid-template-columns: 1fr; gap: 28px; }
  .games-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .container { padding: 0 20px; }
  .nav-inner { padding: 14px 20px; }
  .field-row { flex-direction: column; }
  .field-row .btn { width: 100%; }
  .footer-inner { flex-direction: column; }
}
@media (max-width: 640px) {
  .nav-links a:not(.btn) { display: none; }
  .fan { transform: scale(0.82); transform-origin: 50% 100%; }
}
