/* TroyFinx landing page (D424). One stylesheet, no script, no web font: the app's own system
   stack. The colour tokens below are the app's (`frontend/src/styles/globals.css`), copied
   name for name and value for value: dark by default, light under `prefers-color-scheme`.
   `backend/tests/test_landing_page.py` holds every token both files declare equal. The two
   `--glow-*` tokens are this page's own (the app writes its body glow as literals). */

:root {
  color-scheme: dark;
  --bg: #07100e;
  --bg-elevated: #0a1412;
  --surface: #0d1a17;
  --surface-2: #11221e;
  --surface-3: #183029;
  --border: #223a34;
  --border-strong: #315248;
  --text: #f1f5ee;
  --text-soft: #a8b8b1;
  --text-faint: #758a82;
  --accent: #eeb96e;
  --accent-strong: #ffcf87;
  --accent-ink: #211307;
  --teal: #47d6b2;
  --teal-soft: rgba(71, 214, 178, 0.14);
  --paper: #c9a6ff;
  --paper-soft: rgba(201, 166, 255, 0.16);
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.32);
  /* D428: the app's radii (tests/test_landing_page.py holds every shared token equal). */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius: var(--radius-md);
  --radius-lg: 8px;
  --font:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --glow-accent: rgba(238, 185, 110, 0.1);
  --glow-teal: rgba(71, 214, 178, 0.08);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #edf1eb;
    --bg-elevated: #f7f9f5;
    --surface: #ffffff;
    --surface-2: #f1f5ef;
    --surface-3: #e4ece7;
    --border: #cfdbd3;
    --border-strong: #9eb4aa;
    --text: #12211d;
    --text-soft: #4f655d;
    --text-faint: #536960;
    --accent: #a96318;
    --accent-strong: #874a0d;
    --accent-ink: #fff8ed;
    --teal: #087d66;
    --teal-soft: rgba(8, 125, 102, 0.1);
    --paper: #6b3fd4;
    --paper-soft: rgba(107, 63, 212, 0.12);
    --shadow: 0 16px 45px rgba(24, 48, 39, 0.12);
    --glow-accent: rgba(169, 99, 24, 0.08);
    --glow-teal: rgba(8, 125, 102, 0.06);
  }
}

* {
  box-sizing: border-box;
}

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

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 86% -10%, var(--glow-accent), transparent 38rem),
    radial-gradient(circle at 4% 70%, var(--glow-teal), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent-strong);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 720px) {
  .wrap {
    padding: 0 32px;
  }
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-elevated) 82%, transparent);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
}

.brand-crest {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 68%, var(--border));
  border-radius: 50% 50% 45% 45%;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 18%, transparent), transparent);
  color: var(--accent-strong);
  font-family: Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  box-shadow: inset 0 0 0 3px var(--bg-elevated);
}

.brand-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
  transition:
    background 150ms ease,
    border-color 150ms ease,
    color 150ms ease;
}

.button.primary {
  border-color: color-mix(in srgb, var(--accent) 72%, transparent);
  background: var(--accent);
  color: var(--accent-ink);
}

.button.primary:hover {
  background: var(--accent-strong);
}

.button.secondary {
  border-color: var(--border);
  background: var(--surface-2);
  color: var(--text);
}

.button.secondary:hover {
  border-color: var(--border-strong);
}

.button.small {
  min-height: 38px;
  padding: 7px 14px;
  font-size: 14px;
}

/* Hero */

.hero {
  padding: 56px 0 40px;
}

@media (min-width: 720px) {
  .hero {
    padding: 96px 0 64px;
  }
}

.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  padding: 4px 11px;
  border: 1px solid color-mix(in srgb, var(--teal) 45%, var(--border));
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 {
  max-width: 18ch;
  font-size: clamp(2.1rem, 6vw, 3.6rem);
}

h1 em {
  color: var(--accent-strong);
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 700;
}

.lede {
  max-width: 62ch;
  margin: 20px 0 0;
  color: var(--text-soft);
  font-size: 1.125rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.not-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-faint);
  font-size: 14px;
}

.not-list li::before {
  content: "\2014";
  margin-right: 8px;
  color: var(--border-strong);
}

/* Sections */

section {
  padding: 48px 0;
}

@media (min-width: 720px) {
  section {
    padding: 72px 0;
  }
}

.section-head {
  max-width: 62ch;
  margin-bottom: 28px;
}

.section-head h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}

.section-head p {
  margin: 12px 0 0;
  color: var(--text-soft);
}

.kicker {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

.card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card h3 {
  margin-top: 14px;
  font-size: 1.1rem;
}

.card p {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 15px;
}

.icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--accent);
}

.icon svg {
  width: 22px;
  height: 22px;
}

/* The principle */

.principle {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.principle blockquote {
  max-width: 30ch;
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
}

.principle blockquote span {
  color: var(--accent-strong);
}

.principle .section-head {
  margin-bottom: 24px;
}

.checklist {
  display: grid;
  gap: 10px 28px;
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .checklist {
    grid-template-columns: repeat(2, 1fr);
  }
}

.checklist li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  color: var(--text-soft);
}

.checklist li strong {
  color: var(--text);
}

.checklist li::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--teal);
  transform: translateY(-2px);
}

/* Automation on paper */

.paper-panel {
  padding: 24px;
  border: 1px solid color-mix(in srgb, var(--paper) 45%, var(--border));
  border-radius: var(--radius-lg);
  background: var(--paper-soft);
}

@media (min-width: 720px) {
  .paper-panel {
    padding: 36px;
  }
}

.paper-badge {
  display: inline-block;
  margin-bottom: 14px;
  padding: 3px 10px;
  border: 1px solid var(--paper);
  border-radius: 999px;
  color: var(--paper);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.paper-panel h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.paper-panel > p {
  max-width: 64ch;
  margin: 12px 0 24px;
  color: var(--text-soft);
}

.rules {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: rule;
}

@media (min-width: 720px) {
  .rules {
    grid-template-columns: repeat(2, 1fr);
  }
}

.rules li {
  position: relative;
  padding: 12px 14px 12px 48px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-soft);
  font-size: 15px;
  counter-increment: rule;
}

.rules li::before {
  content: counter(rule);
  position: absolute;
  left: 14px;
  top: 13px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--paper);
  color: var(--bg);
  font-size: 12px;
  font-weight: 700;
}

.fine {
  margin: 18px 0 0;
  color: var(--text-faint);
  font-size: 14px;
}

/* Plans */

.plan-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.plan-row li {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 650;
}

.plans p {
  max-width: 66ch;
  margin: 0 0 12px;
  color: var(--text-soft);
}

/* The beta */

.beta {
  padding-top: 0;
}

.beta-card {
  display: grid;
  gap: 20px;
  align-items: center;
  padding: 24px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

@media (min-width: 720px) {
  .beta-card {
    grid-template-columns: 1fr auto;
    padding: 36px;
  }
}

.beta-card h2 {
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
}

.beta-card p {
  margin: 10px 0 0;
  color: var(--text-soft);
}

/* Footer */

.site-footer {
  padding: 32px 0 40px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 14px;
}

.site-footer .wrap {
  display: grid;
  gap: 14px;
}

.site-footer p {
  max-width: 80ch;
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: var(--text-soft);
}

/* Light theme contrast (WCAG AA, 4.5:1 for this small text; review round 1, S2). The light
   `--accent` behind `--accent-ink` is 4.44:1 and on `--bg` 4.10:1, and light `--teal` on its
   tint is under 4.5:1, so in light the primary button and the kicker take `--accent-strong`
   (6.6:1 and 6.1:1) and the eyebrow's words take `--text`. The token VALUES stay the app's.
   `backend/tests/test_landing_page.py` computes each ratio. */
@media (prefers-color-scheme: light) {
  .button.primary {
    border-color: var(--accent-strong);
    background: var(--accent-strong);
  }

  .button.primary:hover {
    border-color: var(--text);
    background: var(--text);
  }

  .kicker {
    color: var(--accent-strong);
  }

  .eyebrow {
    color: var(--text);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
