/* AutoLog landing — the app's blue, a display face for headings (Bricolage Grotesque, SIL OFL 1.1, self-hosted:
   no requests to third parties) and system fonts for body text. Radii: 4px small parts, 8px buttons and the few
   real cards; the rest is open layout separated by rules. Light/dark. */
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url('fonts/bricolage-grotesque-latin.woff2') format('woff2'); }
:root {
  --bg: #f3f5f9; --card: #fff; --text: #151a24; --muted: #5f6879; --line: #e3e7ee;
  --accent: #2f5fd0; --accent-soft: rgba(47, 95, 208, 0.1); --alt: #c47a0a; --band: #2148b8;
  --hero: linear-gradient(135deg, #2148b8 0%, #2f5fd0 45%, #5b86f0 100%);
  --shadow: 0 18px 50px rgba(20, 35, 80, 0.18); --r-sm: 4px; --r: 8px;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1015; --card: #181b22; --text: #eef1f6; --muted: #9aa1b0; --line: #2a2f38;
    --accent: #6b93f0; --accent-soft: rgba(107, 147, 240, 0.15); --alt: #ffb547; --band: #1b3a8f;
    --hero: linear-gradient(135deg, #1b3a8f 0%, #2a50b8 50%, #4a72d8 100%);
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.025em; line-height: 1.08; }

/* nav */
.nav { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; padding: 12px max(16px, calc(50% - 560px));
  background: color-mix(in srgb, var(--bg) 85%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); font-family: var(--display); font-weight: 800; font-size: 20px; text-decoration: none; }
.brand svg { width: 30px; height: 30px; border-radius: 9px; }
.links { display: flex; gap: 22px; margin-left: auto; }
.links a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.links a:hover { color: var(--text); }
.lang { padding: 6px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--card); color: var(--text); font: 700 13px system-ui, sans-serif; cursor: pointer; }
@media (max-width: 640px) { .links { display: none; } .lang { margin-left: auto; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border-radius: var(--r); font-weight: 700; text-decoration: none; transition: transform 0.15s, box-shadow 0.2s; }
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--hero); color: #fff; box-shadow: 0 10px 24px rgba(33, 72, 184, 0.35); }
.btn.ghost { background: var(--card); color: var(--text); border: 1.5px solid var(--line); }
.btn.bmc { background: #ffdd00; color: #1d1a05; box-shadow: 0 8px 20px rgba(255, 200, 0, 0.3); }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.ctas.center { justify-content: center; }

/* hero */
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 48px; max-width: 1120px; margin: 0 auto; padding: 56px 16px 40px; }
.eyebrow { margin: 0 0 12px; color: var(--accent); font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; }
.hero h1 { margin: 0; font-size: clamp(40px, 6vw, 68px); font-weight: 800; }
.hero h1 em { font-style: normal; text-decoration: underline; text-decoration-color: var(--alt); text-decoration-thickness: 0.12em; text-underline-offset: 0.12em; text-decoration-skip-ink: none; }
.lead { margin: 18px 0 0; color: var(--muted); font-size: 19px; max-width: 560px; }
.pills { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 26px 0 0; padding: 0; list-style: none; }
.pills li { font-size: 15px; font-weight: 600; }
.pills li + li::before { content: '/'; margin: 0 12px; color: var(--alt); font-weight: 700; }

/* phone with the live demo: the app inside is a real 390 px viewport, scaled to fit (see fit() in landing.js) */
.hero-phone { display: grid; justify-items: center; gap: 14px; scroll-margin-top: 80px; }
.phone { position: relative; height: clamp(540px, calc(100svh - 240px), 780px); aspect-ratio: 390 / 812; padding: 26px 10px 12px; border-radius: 52px; background: #0b0d12; box-shadow: var(--shadow), inset 0 0 0 2px #2a2e37; }
.phone-notch { position: absolute; z-index: 2; top: 10px; left: 50%; width: 76px; height: 6px; transform: translateX(-50%); border-radius: 999px; background: #2a2e37; }
.phone-screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 34px; background: var(--bg); }
.phone-screen iframe { position: absolute; top: 0; left: 0; width: 390px; height: 100%; border: 0; transform-origin: 0 0; background: var(--bg); }
.phone-cover { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 28px; background: url('screenshots/light-summary.png') top center / cover; text-decoration: none; }
.phone-cover::after { content: ''; position: absolute; inset: 50% 0 0; background: linear-gradient(transparent, rgba(12, 24, 64, 0.65)); }
.cover-btn { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 24px; border-radius: 999px; background: var(--hero); color: #fff; font-weight: 800; font-size: 17px; box-shadow: 0 10px 26px rgba(33, 72, 184, 0.5); }
.cover-btn::before { content: '▶'; font-size: 13px; }
.phone.live .phone-cover { display: none; }
.try { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 10px; color: var(--muted); font-size: 14px; font-weight: 600; }
.chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--text); font-size: 14px; font-weight: 700; text-decoration: none; transition: border-color 0.15s, transform 0.15s; }
.chip:hover { border-color: var(--accent); }
.chip:active { transform: scale(0.96); }
.phone-note { max-width: 360px; margin: 0; color: var(--muted); font-size: 14px; text-align: center; }
.phone-full { font-weight: 600; white-space: nowrap; }

/* sections */
.section { max-width: 1120px; margin: 0 auto; padding: 56px 16px; scroll-margin-top: 60px; }
.section > h2 { margin: 0 0 8px; font-size: clamp(28px, 3.6vw, 40px); text-align: center; }
.sub { margin: 0 auto 28px; max-width: 640px; color: var(--muted); text-align: center; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px 28px; margin-top: 40px; }
.feature { padding-top: 16px; border-top: 2px solid var(--text); }
.feature .figure { margin: 0 0 10px; color: var(--accent); font: 800 clamp(26px, 2.6vw, 32px)/1.05 var(--display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.feature h3 { margin: 0 0 8px; font-size: 19px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }
.card { padding: 22px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); }
.card p { margin: 0; color: var(--muted); }

.shots { display: flex; gap: 18px; justify-content: center; overflow-x: auto; padding-top: 8px; scrollbar-width: none; }
.shots img { width: 220px; flex: none; border-radius: 10px; border: 1px solid var(--line); box-shadow: var(--shadow); }

/* privacy: full-width solid blue band, the one loud moment of the page */
.privacy { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; max-width: none; margin: 40px 0; padding: 80px max(16px, calc(50% - 544px)); background: var(--band); color: #fff; }
.privacy h2 { margin: 0 0 14px; font-size: clamp(34px, 4.6vw, 54px); }
.privacy p { margin: 0; color: rgba(255, 255, 255, 0.82); font-size: 18px; }
.checks { margin: 0; padding: 0; list-style: none; border-top: 1px solid rgba(255, 255, 255, 0.25); }
.checks li { position: relative; padding: 14px 0 14px 34px; border-bottom: 1px solid rgba(255, 255, 255, 0.25); }
.checks li::before { content: '✓'; position: absolute; left: 4px; top: 13px; color: #ffb547; font-weight: 800; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { display: grid; align-content: start; gap: 10px; padding-top: 14px; border-top: 2px solid var(--text); counter-increment: step; }
.steps li::before { content: counter(step, decimal-leading-zero); color: var(--alt); font: 800 34px/1 var(--display); letter-spacing: -0.03em; }
.steps code { display: block; padding: 10px 12px; border-radius: var(--r-sm); background: #0f1320; color: #dbe4ff; font: 13px/1.6 ui-monospace, "SF Mono", Menlo, Consolas, monospace; overflow-x: auto; white-space: nowrap; }
.steps span { color: var(--muted); font-size: 15px; }

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card.big { display: grid; align-content: start; justify-items: start; gap: 12px; padding: 30px; }
.card.big h2 { margin: 4px 0 0; font-size: 26px; }
.card.big p { font-size: 16px; }
.card.coffee { background: linear-gradient(160deg, color-mix(in srgb, #ffdd00 14%, var(--card)), var(--card) 60%); }

.footer { padding: 30px 16px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; text-align: center; }

/* responsive */
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 36px; }
  .phone { height: auto; width: min(300px, 78vw); }
  .privacy, .duo, .steps { grid-template-columns: 1fr; }
}
@media (max-width: 520px) { .grid { grid-template-columns: 1fr; } .shots { justify-content: flex-start; } .shots img { width: 180px; } }

/* three ways to start */
.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; margin-top: 34px; }
.way { position: relative; display: grid; align-content: start; justify-items: start; gap: 12px; padding: 26px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); }
.way.main { border: 2px solid var(--accent); box-shadow: var(--shadow); }
.way h3 { margin: 0; font-size: 22px; }
.way p { margin: 0; color: var(--muted); font-size: 16px; }
.way .way-tag { margin: 0; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 800; }
.way .btn { margin-top: 6px; }
.way small { color: var(--muted); font-size: 13.5px; }
.adv { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 10px; }
.adv summary { padding: 14px 0; color: var(--accent); font-weight: 700; cursor: pointer; }
.adv .steps { margin: 18px 0 8px; }
@media (max-width: 900px) { .ways { grid-template-columns: 1fr; } .way .btn { width: 100%; } }

/* ---- mobile polish ---- */
html { -webkit-text-size-adjust: 100%; }
a, button, summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.nav-demo { display: none; }
.sticky-cta { display: none; }
.steps code { position: relative; }
.copy { position: absolute; top: 6px; right: 6px; min-height: 32px; padding: 0 10px; border-radius: var(--r-sm); border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1); color: #dbe4ff; font: 700 12px system-ui, sans-serif; cursor: pointer; }
.copy.done { background: #2a7a4b; border-color: #2a7a4b; color: #fff; }

/* sections fade up as they enter (only when JS marks the page; never hides content without JS) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 640px) {
  .nav { padding-top: max(10px, env(safe-area-inset-top)); gap: 10px; }
  .nav-demo { display: inline-flex; align-items: center; margin-left: auto; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--hero); color: #fff; font-weight: 700; font-size: 14px; text-decoration: none; }
  .lang { margin-left: 0 !important; min-height: 36px; min-width: 44px; }
  .hero { padding: 28px 16px 24px; gap: 28px; }
  .hero h1 { font-size: clamp(36px, 11vw, 48px); }
  .lead { font-size: 17px; }
  .ctas .btn { flex: 1 1 100%; } /* full-width thumb targets */
  .pills { gap: 6px 0; }
  .hero-phone { width: 100%; }
  .phone { width: min(300px, 78vw); height: auto; }
  .phone-full { display: none; } /* the cover itself opens the demo on phones */
  .try > span { display: none; }
  .try { width: 100%; }
  .chip { flex: 1 1 100%; justify-content: center; min-height: 46px; font-size: 15px; }
  .section { padding: 40px 16px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 26px 16px; margin-top: 28px; }
  .feature .figure { font-size: 21px; }
  .feature h3 { font-size: 17px; }
  .feature p { font-size: 14px; }
  .privacy { padding: 56px 16px; }
  .steps code { padding-right: 64px; white-space: pre-wrap; word-break: break-all; }
  .card.big { padding: 22px; }
  .card.big .btn { width: 100%; }

  /* screenshots: swipeable carousel that snaps card by card */
  .shots { justify-content: flex-start; gap: 14px; margin: 0; padding: 8px 16px 20px; scroll-snap-type: x mandatory; scroll-padding: 0 16px; -webkit-overflow-scrolling: touch; }
  .shots img { width: 68vw; max-width: 260px; scroll-snap-align: center; }

  /* sticky call to action, shown after the hero */
  .sticky-cta { position: fixed; z-index: 9; left: 0; right: 0; bottom: 0; display: flex; gap: 10px; padding: 10px 16px calc(env(safe-area-inset-bottom) + 10px);
    background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
    transform: translateY(110%); transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .sticky-cta.show { transform: none; }
  .sticky-cta .btn { flex: 1; min-height: 48px; padding: 0 12px; font-size: 15px; }
  .footer { padding-bottom: calc(env(safe-area-inset-bottom) + 92px); }
}
@media (hover: none) { .btn:hover { transform: none; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } .js .reveal { opacity: 1; transform: none; } .sticky-cta { transition: none; } }
