/* Analyst's Grid Paper, web-native tokens (PRD §6.11) - derived from the same palette
   as the Android app's ui/theme/Color.kt, not copy-pasted: the app is dark-only
   (mid-workout, low-glare use case, see the app's own DESIGN.md), the marketing site
   is light-first with a dark variant (a public page, browsed anytime) - the app's own
   reserved-but-unused light tokens (Paper/Ink/MutedInk/SignalOnLight) are exactly this
   site's primary palette, not an afterthought. */

:root {
  --bg: #f6f4ee;
  --bg-line: #dedacc;
  --surface: #ffffff;
  --text: #23262b;
  --text-muted: #6b6f76;
  --accent: #0e7c93;
  --accent-ink: #f6f4ee;
  --border: #dedacc;
  --font-sans: -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #23262b;
    --bg-line: #2b2f36;
    --surface: #2b2f36;
    --text: #e4e7ec;
    --text-muted: #8b93a1;
    --accent: #4fc1d9;
    --accent-ink: #23262b;
    --border: #363b44;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  background-image: linear-gradient(var(--bg-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-line) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.55;
}

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

.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 18px;
  text-decoration: none;
  color: var(--text);
}
.site-header nav a {
  margin-left: 20px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 15px;
}
.site-header nav a:hover { color: var(--accent); }

.nav-toggle-checkbox { display: none; }

.nav-toggle-label {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 24px;
  cursor: pointer;
}
.nav-toggle-label span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
}

main { padding: 48px 0 64px; }

.hero { max-width: 900px; margin: 0 auto; padding: 0 20px 48px; text-align: center; }
.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
  color: var(--accent);
  margin: 0 0 12px;
}
.hero h1 { font-size: 38px; line-height: 1.15; margin: 0 0 20px; }
.hero .lede { font-size: 18px; color: var(--text-muted); max-width: 620px; margin: 0 auto; }

.play-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 24px 0 0;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}
.play-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  flex: 0 0 auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.signup-form {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px auto 0;
}
.signup-form input {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  width: 260px;
  max-width: 100%;
}
.signup-form button {
  font: inherit;
  font-weight: 600;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
}
.signup-success {
  margin: 16px auto 0;
  max-width: 420px;
  color: var(--accent);
  font-size: 15px;
}

.features {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
}
.feature h2 { font-size: 18px; margin: 0 0 8px; }
.feature p { color: var(--text-muted); margin: 0; font-size: 15px; }

.gallery {
  max-width: 900px;
  margin: 56px auto 0;
  padding: 0 20px;
}
.gallery h2 {
  text-align: center;
  font-size: 24px;
  margin: 0 0 24px;
}
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.screenshot-grid .screenshot-placeholder,
.screenshot-grid .screenshot {
  margin: 0;
  min-height: 320px;
}
.screenshot-grid .screenshot img { max-width: 220px; }

.cta {
  max-width: 900px;
  margin: 48px auto 0;
  padding: 0 20px;
  text-align: center;
}
.cta h2 { font-size: 22px; }

.guide { max-width: 720px; margin: 0 auto; padding: 0 20px; }
.guide h1 { font-size: 32px; margin-bottom: 8px; }
.guide .lede { color: var(--text-muted); font-size: 17px; }

.guide-steps { list-style: none; margin: 32px 0 0; padding: 0; }
.guide-steps li {
  border-top: 1px solid var(--border);
  padding: 24px 0;
}
.guide-steps li:first-child { border-top: none; }
.guide-steps h2 { font-size: 19px; margin: 0 0 8px; }
.guide-steps p { margin: 0; }

.screenshot-placeholder {
  margin-top: 16px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--surface);
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}
.screenshot-placeholder::after {
  content: attr(data-caption);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}

.screenshot {
  margin: 16px 0 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
  text-align: center;
}
.screenshot img {
  display: block;
  max-width: 260px;
  width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 4px;
}
.screenshot figcaption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}

.reset-form {
  max-width: 360px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.reset-form label { font-size: 14px; color: var(--text-muted); }
.reset-form input {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
}
.reset-form button {
  font: inherit;
  font-weight: 600;
  padding: 10px 12px;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
}
.form-error { color: #c0392b; font-size: 14px; margin: 0; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
}
.site-footer p {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0;
}

/* Mobile: collapse the nav behind a hamburger (checkbox hack, no JS - see base.html's
   own comment). Breakpoint picked to cover real phones in portrait (390-430px CSS px
   on current devices) with margin, while tablets/landscape still get the full inline
   nav. */
@media (max-width: 700px) {
  .nav-toggle-label { display: flex; }

  /* Classic mobile header: hamburger pinned right, brand centered between the (empty)
     left column and the hamburger's column - not left-aligned next to it, which reads
     lopsided once the nav links themselves are hidden behind the toggle. */
  .site-header .wrap {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }
  .brand { grid-column: 2; justify-self: center; }
  .nav-toggle-label { grid-column: 3; justify-self: end; }

  .site-header nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 4px 20px 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
  }
  .nav-toggle-checkbox:checked ~ nav { display: flex; }

  .site-header nav a {
    margin-left: 0;
    padding: 12px 0;
    border-top: 1px solid var(--border);
    font-size: 16px;
  }
  .site-header nav a:first-child { border-top: none; }

  .hero h1 { font-size: 30px; }
  .hero .lede { font-size: 16px; }
}
