/* BayDraft marketing site — self-contained, no external fonts or assets.
   Kept deliberately small: the CSP in template.yaml allows 'self' only. */

:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --bg-alt: #f4f6f9;
  --bg-card: #ffffff;
  --fg: #12181f;
  --fg-muted: #55606d;
  --fg-faint: #7b8694;
  --accent: #1a63c8;
  --accent-fg: #ffffff;
  --border: #dde3ea;
  --shadow: 0 1px 2px rgba(18, 24, 31, 0.06), 0 8px 24px rgba(18, 24, 31, 0.06);

  --measure: 68ch;
  --page: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1319;
    --bg-alt: #141b23;
    --bg-card: #161e27;
    --fg: #e8edf3;
    --fg-muted: #a3aebc;
    --fg-faint: #7f8b99;
    --accent: #5fa3f5;
    --accent-fg: #0e1319;
    --border: #26313d;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-thickness: 2px;
}

/* Visible focus for keyboard users on every interactive element. */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Header ──────────────────────────────────────────────────────────────── */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

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

.brand {
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  color: var(--fg);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 22px;
  font-size: 0.94rem;
}

.site-nav a {
  color: var(--fg-muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--fg);
  text-decoration: underline;
}

/* ── Hero ────────────────────────────────────────────────────────────────── */

.hero {
  padding: 88px 0 72px;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 700;
  max-width: 18ch;
}

/* The product shot. `aspect-ratio` plus the width/height attributes on the
   <img> keep the space reserved before it loads, so the sections below do not
   jump. The image is a real screenshot, so it carries the app's own chrome —
   the border and radius frame it as a screen rather than letting it bleed into
   the page. */
.hero-shot {
  margin: 40px 0 0;
}

.hero-shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero .lede {
  margin: 0;
  font-size: clamp(1.08rem, 2.4vw, 1.3rem);
  color: var(--fg-muted);
  max-width: 58ch;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ── Sections ────────────────────────────────────────────────────────────── */

section {
  padding: 64px 0;
}

section + section {
  border-top: 1px solid var(--border);
}

section h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  font-weight: 650;
}

section .section-lede {
  margin: 0 0 36px;
  color: var(--fg-muted);
  max-width: var(--measure);
}

/* ── Feature grid ────────────────────────────────────────────────────────── */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.features h3 {
  margin: 0 0 6px;
  font-size: 1.02rem;
  font-weight: 650;
}

.features p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.96rem;
}

/* ── Download cards ──────────────────────────────────────────────────────── */

.downloads {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.download {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.download .platform {
  font-weight: 650;
  font-size: 1rem;
}

.download .status {
  font-size: 0.88rem;
  color: var(--fg-faint);
}

/* Active download links get .download--ready and an <a class="btn"> inside.
   The accent border is the only thing separating a card you can act on from
   three that just say "coming soon" — without it the button is easy to miss
   in a row of otherwise identical cards. */
.download--ready {
  border-color: var(--accent);
}

.btn {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 16px;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 7px;
  text-decoration: none;
  text-align: center;
}

.btn:hover {
  text-decoration: none;
  filter: brightness(1.08);
}

.note {
  margin: 0;
  font-size: 0.92rem;
  color: var(--fg-faint);
  max-width: var(--measure);
}

/* ── Legal / prose pages ─────────────────────────────────────────────────── */

.prose {
  max-width: var(--measure);
  padding: 56px 0 72px;
}

.prose h1 {
  margin: 0 0 6px;
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.prose .effective {
  margin: 0 0 40px;
  color: var(--fg-faint);
  font-size: 0.93rem;
}

.prose h2 {
  margin: 44px 0 12px;
  font-size: 1.28rem;
  letter-spacing: -0.015em;
  scroll-margin-top: 24px;
}

.prose h3 {
  margin: 28px 0 8px;
  font-size: 1.04rem;
  font-weight: 650;
}

.prose p,
.prose li {
  color: var(--fg-muted);
}

.prose strong {
  color: var(--fg);
  font-weight: 620;
}

.prose ul,
.prose ol {
  padding-left: 22px;
}

.prose li {
  margin-bottom: 7px;
}

.prose li::marker {
  color: var(--fg-faint);
}

/* Orientation callout above a legal document (e.g. which copy governs). */
.prose .note {
  margin: 0 0 28px;
  padding: 16px 20px;
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  font-size: 0.94rem;
  color: var(--fg-muted);
  max-width: none;
}

.toc {
  margin: 0 0 8px;
  padding: 20px 24px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.toc h2 {
  margin: 0 0 10px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

.toc ol {
  margin: 0;
  columns: 2;
  column-gap: 32px;
  font-size: 0.94rem;
}

@media (max-width: 560px) {
  .toc ol {
    columns: 1;
  }
}

/* Wide content must scroll inside its own box, never the page body. */
.table-scroll {
  overflow-x: auto;
  margin: 18px 0;
  border: 1px solid var(--border);
  border-radius: 10px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 480px;
  font-size: 0.94rem;
}

th,
td {
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  color: var(--fg-muted);
}

th {
  background: var(--bg-alt);
  color: var(--fg);
  font-weight: 620;
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: none;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */

.site-footer {
  padding: 32px 0 48px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  font-size: 0.9rem;
  color: var(--fg-faint);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: baseline;
  justify-content: space-between;
}

.site-footer nav {
  display: flex;
  gap: 20px;
}

.disclaimer {
  margin: 18px 0 0;
  max-width: var(--measure);
  font-size: 0.86rem;
  color: var(--fg-faint);
}
/* ── Guide icons ─────────────────────────────────────────────────────────── */
/* Inline glyphs pulled from the same Material Icons font the app renders, so a
   toolbar button described in prose is unmistakable. Sized in em and filled
   with currentColor, so they track the surrounding text and the light/dark
   theme without a second asset. */
/* Sized to sit at cap height, not em height. The glyphs fill roughly 83% of
   their 24-unit box, so a 1em box renders visibly taller than the capitals
   beside it and the icon reads as an image dropped into the sentence rather
   than as punctuation. 0.82em box ≈ 0.68em of ink ≈ cap height. */
.gi {
  width: 0.92em;
  height: 0.92em;
  vertical-align: -0.13em;
  fill: currentColor;
  flex: none;
  opacity: 0.75;
}

/* Headings already carry optical weight, so the marker is proportionally
   smaller there and takes the accent colour instead of competing at full
   contrast. */
h2 .gi,
h3 .gi {
  width: 0.8em;
  height: 0.8em;
  vertical-align: -0.04em;
  margin-right: 0.18em;
  color: var(--accent);
  opacity: 1;
}
