/*
 * On The Baize marketing site: one shared stylesheet, no build step.
 *
 * Tokens mirror api/portal/static/portal.css (and mobile/lib/theme/otb_tokens.dart). Every colour
 * below is a var(--token) from :root. Gold is a fill or a line, never text on a light surface
 * (1.75:1 on cream), so it is only ever a fill behind ink text. Muted text uses --mute, never ink at
 * reduced opacity. Page-only styles live in a <style> block in the page, not here.
 */

@font-face {
  font-family: "OtbDisplay";
  src: url("fonts/BricolageGrotesque-Variable.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "OtbText";
  src: url("fonts/InstrumentSans-Variable.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --baize: #0d4309;
  --cream: #f6f4ee;
  --paper: #fffdf8;
  --ink: #0b1f0d;
  --mute: #5b6458;
  --chalk: #2f5ea8;
  --brass: #8a6a2f;
  --gold: #e8b325;
  --line: #d9d6cc;
  --line-on-dark: #3d6a3a;
  --on-dark-mute: #cfd8cb;
  --tint-gold: #fbf3d9;

  --radius-card: 12px;
  --radius-control: 8px;
  --radius-pill: 999px;
  --font-display: "OtbDisplay", system-ui, sans-serif;
  --font-text: "OtbText", system-ui, sans-serif;
  --gutter: 20px;
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

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

a { color: var(--chalk); }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.12;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(34px, 7vw, 56px); }
h2 { font-size: clamp(26px, 4.5vw, 38px); }
h3 { font-size: 20px; }

p { margin: 0 0 16px; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.muted { color: var(--mute); }

/* ---------- Header ---------- */

.site-header {
  background: var(--baize);
  color: var(--cream);
  position: relative;
  z-index: 10;
}
.site-header a:not(.btn) { color: var(--cream); text-decoration: none; }
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.brand img { width: 40px; height: 40px; border-radius: var(--radius-control); display: block; }

.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius-control);
  font-weight: 600;
  cursor: pointer;
}
.nav-toggle:focus-visible + .nav-button { outline: 2px solid var(--gold); outline-offset: 2px; }

.site-nav { display: none; width: 100%; padding-bottom: 16px; }
.nav-toggle:checked ~ .site-nav { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.site-nav li a:not(.btn) { display: flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 500; }
.site-nav li a:not(.btn):hover { text-decoration: underline; }
.site-nav .btn { margin-top: 8px; }

/* ---------- Footer ---------- */

.site-footer { background: var(--ink); color: var(--cream); padding: 40px 0 28px; font-size: 15px; }
.site-footer a { color: var(--cream); }
.site-footer .container { display: grid; gap: 24px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer .brand { margin-bottom: 8px; }
.footer-legal { color: var(--on-dark-mute); border-top: 1px solid var(--line-on-dark); padding-top: 16px; }
.footer-legal p { margin: 0 0 6px; }

/* ---------- Buttons and tags ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-control);
  border: 2px solid transparent;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary { background: var(--gold); color: var(--ink); }
.btn-primary:hover { background: var(--cream); }
.btn-secondary { background: transparent; color: var(--baize); border-color: var(--baize); }
.btn-secondary:hover { background: var(--baize); color: var(--cream); }
.btn-on-dark { background: transparent; color: var(--cream); border-color: var(--cream); }
.btn-on-dark:hover { background: var(--cream); color: var(--baize); }
.btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--chalk);
  outline-offset: 2px;
}
.site-header a:focus-visible, .site-footer a:focus-visible, .on-dark a:focus-visible,
.hero a:focus-visible, .cta-band a:focus-visible, .cta-band input:focus-visible,
.cta-band textarea:focus-visible, .cta-band button:focus-visible { outline-color: var(--gold); }

.tag-soon {
  display: inline-block;
  background: var(--gold);
  color: var(--ink);
  border-radius: var(--radius-pill);
  padding: 1px 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}

/* ---------- Sections ---------- */

.hero { background: var(--baize); color: var(--cream); padding: 56px 0 64px; }
.hero p { max-width: 620px; font-size: 18px; color: var(--on-dark-mute); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.section { padding: 56px 0; }
.section-alt { background: var(--paper); }
.eyebrow {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}
.hero .eyebrow, .on-dark .eyebrow, .cta-band .eyebrow { color: var(--on-dark-mute); }
.on-dark { background: var(--baize); color: var(--cream); }

.card-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 24px; }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 24px;
}
.section-alt .card { background: var(--cream); }
.card p:last-child { margin-bottom: 0; }

.steps { list-style: none; counter-reset: step; margin: 24px 0 0; padding: 0; display: grid; gap: 16px; }
.steps li { counter-increment: step; position: relative; padding-left: 52px; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: var(--gold);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
}

.stat-tile { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 20px; }
.stat-tile .num { display: block; font-family: var(--font-display); font-size: 36px; font-weight: 700; line-height: 1.1; color: var(--baize); }
.stat-tile .label { color: var(--mute); font-size: 14px; }

.cta-band { background: var(--baize); color: var(--cream); padding: 48px 0; }
.cta-band p { color: var(--on-dark-mute); max-width: 560px; }

/* ---------- Forms ---------- */

.form { display: grid; gap: 14px; max-width: 520px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.form input, .form textarea, .form select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--mute);
  border-radius: var(--radius-control);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}
.form textarea { min-height: 96px; resize: vertical; }
.form-note { font-size: 14px; color: var(--mute); margin: 0; }
.on-dark .form-note, .cta-band .form-note { color: var(--on-dark-mute); }
.on-dark .form label, .cta-band .form label { color: var(--cream); }
.on-dark a:not(.btn), .cta-band a:not(.btn) { color: var(--cream); }

/* ---------- Desktop ---------- */

/* The full nav needs about 1080px; below that the menu button stays. */
@media (min-width: 1080px) {
  .nav-button, .nav-toggle { display: none; }
  .site-nav,.nav-toggle:checked ~ .site-nav { display: block; width: auto; padding-bottom: 0; }
  .site-header .container { flex-wrap: nowrap; }
  .site-nav ul { flex-direction: row; align-items: center; gap: 16px; font-size: 15px; }
  .site-nav a, .brand { white-space: nowrap; }
  .site-nav .btn { margin-top: 0; min-height: 40px; }
}

@media (min-width: 760px) {
  :root { --gutter: 32px; }
  .site-footer .container { grid-template-columns: 1fr auto; align-items: start; }
  .footer-legal { grid-column: 1 / -1; }
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .hero { padding: 88px 0 96px; }
  .section { padding: 80px 0; }
  .steps { grid-template-columns: repeat(3, 1fr); }
}
