/* Marketing site — matches the app's real brand tokens (packages/webapp/frontend/src/styles.css),
   per the SudoTrials Website Style Guide v1 (July 2026): forest-green headings/labels, action-
   green primary CTAs, coral for secondary/"Next" actions, soft sage page background. See
   styles.css for the full rationale (kept in one place to avoid duplicating it here). */
:root {
  --color-primary: #1e6241;
  --color-success: #2fa163;
  --color-success-hover: #278552;
  --color-accent: #f07a67;
  --color-bg: #eef2ee;
  --color-surface: #ffffff;
  --color-surface-alt: #eaf3ee;
  --color-text-primary: #1e6241;
  --color-text-secondary: #666666;
  --color-text-placeholder: #99a0aa;
  --color-border: #ced4da;

  --bg: var(--color-bg);
  --card: var(--color-surface);
  --ink: var(--color-text-primary);
  --muted: var(--color-text-secondary);
  --brand: var(--color-success);
  --brand-ink: #ffffff;
  --accent: var(--color-accent);
  --good: #2e9e6b;
  --line: var(--color-border);
  --shadow: 0 4px 12px rgba(0, 0, 0, .05), 0 8px 24px rgba(0, 0, 0, .08);
  --radius: 20px;
  --label: #b3843f;      /* placeholder-label tint — warm, distinct from body copy */
}
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #16201a;
    --color-surface: #1f2b23;
    --color-surface-alt: #223129;
    --color-text-primary: #a8e0c0;
    --color-text-secondary: #9fb0a6;
    --color-border: #2e4137;
    --shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    --label: #e0b876;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Avenir", "Inter", "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 18px;
  line-height: 1.6;
}
a { color: var(--color-accent); }

.skip-link {
  position: absolute; left: -9999px; top: auto;
  background: var(--brand); color: var(--brand-ink); padding: 10px 16px; border-radius: 8px;
  z-index: 1000; text-decoration: none; font-weight: 600;
}
.skip-link:focus { left: 12px; top: 12px; }

header.site {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2rem; background: var(--card); border-bottom: 1px solid var(--line);
}
header.site .brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.25rem; color: var(--ink); text-decoration: none; }
header.site .brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--brand); display: inline-block; }
header.site .brand .brand-logo { width: 24px; height: 24px; display: inline-block; }
header.site nav { display: flex; align-items: center; }
header.site nav a { margin-left: 1.25rem; color: var(--muted); text-decoration: none; font-size: 0.95rem; }
header.site nav a:hover { color: var(--ink); }
header.site nav a.active { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* Mobile nav: hidden button/dropdown above 640px (desktop keeps the plain inline nav). Below
   that, the hamburger button appears and the nav becomes a hidden dropdown toggled by site.js -
   without this, "Pricing"/"FAQ"/"Log in" ran off the right edge of the screen on a phone with no
   way to reach them at all. */
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer; padding: 8px;
  font-size: 1.5rem; line-height: 1; color: var(--ink);
}
@media (max-width: 640px) {
  header.site { flex-wrap: wrap; }
  .nav-toggle { display: block; }
  header.site nav {
    display: none; flex-direction: column; align-items: flex-start; gap: 0.75rem;
    flex-basis: 100%; margin-top: 1rem;
  }
  header.site nav.open { display: flex; }
  header.site nav a { margin-left: 0; }
}

/* Primary Button (guide): action green, 10px radius, 14px/28px padding, 18px/600. .ghost stays
   neutral; a coral .accent variant exists for secondary/"Next" actions where used (pricing.html). */
.button {
  display: inline-block; background: var(--color-success); color: var(--brand-ink); padding: 14px 28px;
  border-radius: 10px; text-decoration: none; font-weight: 600; border: none; font-size: 18px;
  white-space: nowrap;
}
.button:hover { background: var(--color-success-hover); }
.button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.button.ghost:hover { background: var(--color-surface-alt); }
.button.accent { background: var(--color-accent); }
.button.accent:hover { filter: brightness(1.08); }

main { max-width: 700px; margin: 0 auto; padding: 3rem 2rem; }
main.narrow { max-width: 700px; }

.hero { text-align: left; margin-bottom: 2.5rem; }
.hero h1 { font-size: 48px; font-weight: 700; line-height: 1.2; margin: 0 0 0.75rem; color: var(--color-primary); }
.hero p.lead { font-size: 18px; color: var(--muted); max-width: 640px; }
.hero .actions { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

.features { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin: 2.5rem 0; }
@media (max-width: 640px) {
  .features, .plans { grid-template-columns: 1fr; }
  /* 48px wrapped a two-line desktop headline into 6 stacked lines on a phone, pushing the
     actual CTAs below the fold. */
  .hero h1 { font-size: 32px; }
}
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.feature h3 { margin: 0 0 0.4rem; }

h1 { font-size: 48px; font-weight: 700; line-height: 1.2; color: var(--color-primary); }
h2 { font-size: 36px; font-weight: 700; margin-top: 2.25rem; color: var(--ink); }
h3 { font-size: 24px; font-weight: 500; color: var(--ink); }
main p { color: var(--ink); }

/* §placeholder-labels: every lorem-ipsum block gets a small label right above it naming what it
   will become, so copy can be swapped in without re-deriving "which paragraph is this". */
.ph-label {
  display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--label); margin: 1.1rem 0 0.25rem;
}
.ph-label::before { content: "▸ "; }
p.lorem { margin-top: 0.15rem; }

.steps { counter-reset: step; list-style: none; margin: 1.5rem 0; padding: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 3rem; margin-bottom: 1.75rem; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 2.1rem; height: 2.1rem;
  border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.steps h3 { margin: 0 0 0.25rem; }

details.faq { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0.9rem 1.1rem; margin-bottom: 0.75rem; }
details.faq summary { font-weight: 600; cursor: pointer; }
details.faq[open] summary { margin-bottom: 0.5rem; }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin: 2rem 0; align-items: stretch; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.plan.featured { border-color: var(--brand); border-width: 2px; }
.plan h3 { margin: 0 0 0.25rem; }
.plan .price { font-size: 1.8rem; font-weight: 700; margin: 0.5rem 0; }
.plan .price small { font-size: 0.95rem; font-weight: 400; color: var(--muted); }
.plan ul { padding-left: 1.1rem; margin: 1rem 0; flex: 1; }
.plan .button { text-align: center; margin-top: auto; }
.pill { display: inline-block; background: var(--accent); color: #fff; font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; padding: 0.2rem 0.55rem; border-radius: 999px; margin-bottom: 0.5rem; }

footer.site { text-align: center; color: var(--muted); padding: 2rem; font-size: 0.9rem; border-top: 1px solid var(--line); margin-top: 2rem; }
footer.site a { color: var(--muted); margin: 0 0.5rem; }
