/* BGTutor public landing page — hand-crafted, zero JS.
   Token values below are COPIED from the app theme — keep in sync with
   frontend/src/styles/tokens.css (a static page can't import the app's CSS
   pipeline; one page, acceptable duplication). */

:root {
  color-scheme: dark;

  /* neutrals — warm espresso ramp (the club room) */
  --bg: #0b0806;
  --bg-deep: #14100c;
  --surface: #171210;
  --surface-2: #1d1712;
  --surface-3: #261e17;
  --border: rgba(255, 243, 224, 0.08);
  --text: #f2eae0;
  --text-dim: #b3a48d;

  /* brass accent (the single actionable hue) */
  --accent: #d97706;
  --accent-hover: #f59e0b;
  --accent-soft: rgba(217, 119, 6, 0.16);
  --on-accent: #1a1006;
  --amber: #f0b35c;

  /* type — serif display voice matches the app; body is the system sans stack */
  --font-display: "Source Serif 4", Georgia, serif;
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius: 10px;
  --radius-lg: 16px;
  --shadow-2: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-3: 0 14px 36px rgba(0, 0, 0, 0.45);
}

/* Source Serif 4 — self-hosted, same file the app bundles via @fontsource.
   License: SIL Open Font License 1.1 (Adobe Fonts / source-serif) — OK to self-host. */
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/source-serif-4-latin-600-normal.woff2") format("woff2");
}

/* ---------- base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 520px at 50% -120px, rgba(217, 119, 6, 0.09), transparent 70%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg) 520px);
  background-repeat: no-repeat;
  -webkit-text-size-adjust: 100%;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

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

:focus-visible {
  outline: 3px solid var(--accent-hover);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

/* ---------- masthead ---------- */

.masthead {
  padding-block: 22px 0;
}

.masthead-row {
  display: flex;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.01em;
}

/* brand doubles as a home link on inner pages (privacy) — keep it looking
   like the masthead wordmark, not a body link */
a.brand {
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  border-radius: 7px;
  box-shadow: 0 0 0 1px var(--border);
}

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

.hero {
  padding-block: clamp(40px, 8vw, 88px) 0;
  text-align: center;
}

.hero h1 {
  font-size: clamp(34px, 5.4vw, 58px);
  max-width: 22ch;
  margin-inline: auto;
}

.hero-sub {
  color: var(--text-dim);
  font-size: clamp(17px, 1.6vw, 20px);
  max-width: 50rem;
  margin: 20px auto 0;
  text-wrap: balance;
}

.cta-row {
  margin-top: 32px;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 30px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
}

.cta:hover {
  background: var(--accent-hover);
}

/* the only animations on the page: hover lift, transform/opacity, <=200ms */
@media (prefers-reduced-motion: no-preference) {
  .cta {
    transition: transform 160ms ease-out;
  }

  .cta:hover {
    transform: translateY(-2px);
  }

  .cta:active {
    transform: translateY(0);
  }
}

/* pure-CSS browser frame around the hero shot */
.browser-frame {
  margin: clamp(40px, 6vw, 64px) auto 0;
  max-width: 1040px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3);
  overflow: hidden;
}

.frame-bar {
  display: flex;
  gap: 7px;
  padding: 12px 16px;
  background: var(--surface-3);
  border-bottom: 1px solid var(--border);
}

.frame-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 243, 224, 0.16);
}

/* ---------- pillars ---------- */

.pillars {
  padding-block: clamp(72px, 9vw, 120px) 0;
}

.pillars .wrap {
  display: flex;
  flex-direction: column;
  gap: clamp(72px, 9vw, 112px);
}

.pillar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.pillar--flip .pillar-shot {
  order: -1;
}

.pillar h2,
.how h2 {
  font-size: clamp(26px, 2.8vw, 34px);
}

/* Pillar heading icons: thin-stroke brass marks, aligned with the serif text. */
.pillar h2 {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pillar-icon {
  flex: none;
  width: 30px;
  height: 30px;
  color: var(--accent-hover);
}

.pillar-copy p {
  color: var(--text-dim);
  font-size: 17px;
  margin-top: 14px;
  max-width: 34rem;
}

.pillar-shot {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  overflow: hidden;
  padding: 10px;
}

.pillar-shot img {
  border-radius: 8px;
}

/* pillar 4: the side-picker strip is 2848x268 — a full-width inset band,
   never a framed "screenshot" (it would stretch or drown in a frame) */
.pillar--band {
  display: block;
}

.pillar--band .pillar-copy {
  max-width: 40rem;
}

.pillar--band .band {
  margin-top: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 8px;
}

.pillar--band .band img {
  border-radius: 6px;
  width: 100%;
}

/* ---------- how it teaches ---------- */

.how {
  padding-block: clamp(88px, 11vw, 140px) 0;
  text-align: center;
}

.steps {
  list-style: none;
  margin: clamp(36px, 5vw, 56px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  text-align: left;
}

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 26px 28px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--amber);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
}

.step-icon {
  width: 22px;
  height: 22px;
  color: var(--amber);
  vertical-align: -4px;
  margin-right: 8px;
}

.step p {
  margin-top: 16px;
  color: var(--text-dim);
}

.step strong {
  color: var(--text);
  font-weight: 600;
}

/* ---------- invite ---------- */

.invite {
  padding-block: clamp(88px, 11vw, 140px) 0;
}

.invite-card {
  background:
    radial-gradient(640px 300px at 50% -80px, rgba(217, 119, 6, 0.12), transparent 70%),
    var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  padding: clamp(44px, 6vw, 72px) clamp(20px, 4vw, 48px);
  text-align: center;
}

.invite-lead {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 2.8vw, 32px);
  line-height: 1.25;
  text-wrap: balance;
}

.invite-sub {
  color: var(--text-dim);
  margin-top: 14px;
}

.invite-form {
  margin-top: 28px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 34rem;
  text-align: left;
}

.invite-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  margin-top: 10px;
}

.invite-optional {
  font-weight: 400;
}

.invite-input {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.invite-input:focus-visible {
  outline: 3px solid var(--accent-hover);
  outline-offset: 1px;
}

.invite-form .cta {
  margin-top: 18px;
  align-self: center;
  border: 0;
  font-family: var(--font-ui);
  cursor: pointer;
}

.invite-fineprint {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
}

/* honeypot: visually gone, still submitted (bots fill it, humans can't) */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- legal (privacy) ---------- */

.legal {
  padding-block: clamp(40px, 7vw, 72px) 0;
}

.legal .wrap {
  max-width: 760px;
}

.legal h1 {
  font-size: clamp(30px, 4.4vw, 44px);
}

.legal h2 {
  font-size: clamp(20px, 2.4vw, 26px);
  margin-top: 44px;
}

.legal-lead {
  color: var(--text-dim);
  font-size: clamp(17px, 1.6vw, 19px);
  margin-top: 18px;
}

.legal p {
  margin-top: 16px;
}

.legal ul {
  margin-top: 14px;
  padding-left: 1.3em;
  color: var(--text-dim);
}

.legal li {
  margin-top: 8px;
}

.legal strong {
  color: var(--text);
  font-weight: 600;
}

.legal-updated {
  color: var(--text-dim);
  font-size: 15px;
  margin-top: 40px;
}

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

.footer {
  margin-top: clamp(72px, 9vw, 112px);
  border-top: 1px solid var(--border);
  padding-block: 32px 40px;
  text-align: center;
  color: var(--text-dim);
  font-size: 16px;
}

.footer a {
  color: var(--accent-hover);
}

/* ---------- responsive: single column <= 700px ---------- */

@media (max-width: 700px) {
  .pillar {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .pillar--flip .pillar-shot {
    order: 0; /* text first on mobile, every pillar */
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .frame-bar {
    padding: 9px 12px;
  }

  .frame-bar span {
    width: 8px;
    height: 8px;
  }
}
