/* Barra landing. Tokens follow the app's theme (lib/src/theme.dart). */

@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("fonts/Inter-Regular.ttf?v=0.11.4") format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("fonts/Inter-Medium.ttf?v=0.11.4") format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("fonts/Inter-SemiBold.ttf?v=0.11.4") format("truetype"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url("fonts/JetBrainsMono-Regular.ttf?v=0.11.4") format("truetype"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url("fonts/JetBrainsMono-Medium.ttf?v=0.11.4") format("truetype"); }

:root {
  --paper: #FFFFFF;
  --surface: #F6F6F8;
  --border: #E3E4E8;
  --ink: #1B1C20;
  --muted: #6B6D76;
  --accent: #1F5FD1;
  --on-accent: #FFFFFF;
  --beta-bg: #FFF1D6;
  --beta-ink: #9A6200;
  /* The preview's light-table looks the same in both themes, as in the app. */
  --canvas: #2A2C31;
  --canvas-grid: #3A3D44;
  --dimension: #9AA3B2;
  --canvas-text: #C9CED8;
  --sheet-outline: #D5D9E0;

  --ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, Menlo, "DejaVu Sans Mono", monospace;
  --wrap: 1120px;
  --gutter: 24px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1C1D21;
    --surface: #141518;
    --border: #2D2F35;
    --ink: #E7E8EB;
    --muted: #9A9CA5;
    --accent: #7AA2FF;
    --on-accent: #0E1A33;
    --beta-bg: #3A2C10;
    --beta-ink: #E8B04A;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--ui);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
code { font-family: var(--mono); font-size: 0.88em; word-break: break-all; }

h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); letter-spacing: -0.02em; }
h3 { font-size: 1.0625rem; letter-spacing: -0.005em; }

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

.skip { position: absolute; left: -9999px; top: 8px; padding: 8px 12px; background: var(--paper); color: var(--ink); z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.top { border-bottom: 1px solid var(--border); background: var(--paper); }
.top-row { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-width: 0; }
.brand img { display: block; flex: none; }
.brand .name { font-weight: 600; font-size: 1.125rem; letter-spacing: -0.01em; }
.beta {
  font-size: 10px; font-weight: 600; letter-spacing: 0.06em; line-height: 1;
  padding: 4px 6px; border-radius: 4px; background: var(--beta-bg); color: var(--beta-ink);
}
.ver { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.top-nav { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.lang-switch { color: var(--muted); font-size: 0.9375rem; text-decoration: none; }
.lang-switch:hover { color: var(--ink); text-decoration: underline; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border-radius: 10px;
  background: var(--accent); color: var(--on-accent);
  font-weight: 600; font-size: 1rem; text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }
.btn-small { min-height: 38px; padding: 0 14px; font-size: 0.9375rem; border-radius: 8px; }
.link { font-weight: 500; }

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 56px; align-items: center; padding-top: 72px; padding-bottom: 88px;
}
.tagline { margin: 0 0 18px; color: var(--muted); font-size: 0.9375rem; }
.hero h1 { font-size: clamp(2.25rem, 1.4rem + 3.2vw, 3.6rem); letter-spacing: -0.03em; line-height: 1.04; max-width: 13ch; }
.lede { margin: 22px 0 30px; color: var(--muted); font-size: 1.1875rem; max-width: 36ch; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.notice { margin: 18px 0 0; font-size: 0.9375rem; color: var(--muted); }
.formats { margin: 28px 0 0; padding-top: 18px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.9375rem; max-width: 46ch; }

/* The light-table: the same dark, dotted canvas the app previews on. */
.table {
  margin: 0; position: relative; border-radius: 16px;
  background: var(--canvas) radial-gradient(var(--canvas-grid) 1px, transparent 1.2px) 0 0 / 18px 18px;
  padding: 44px 64px 76px 40px;
}
.sheet-wrap { position: relative; }
.sheet {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  background: #FFFFFF; padding: 3.5% 3%;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.3);
}
.label {
  aspect-ratio: 70 / 37; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4%; padding: 8% 6%; outline: 1px dashed var(--sheet-outline); outline-offset: -0.5px;
  color: #1B1C20; animation: print 420ms cubic-bezier(.2, .7, .3, 1) both; animation-delay: calc(var(--i) * 70ms + 150ms);
}
.label svg { display: block; width: 100%; height: 58%; }
.label span { font-family: var(--mono); font-size: clamp(7px, 0.62vw, 9.5px); letter-spacing: 0.02em; color: #1B1C20; }
@keyframes print { from { opacity: 0; transform: translateY(2px); } }
@media (prefers-reduced-motion: reduce) { .label { animation: none; } }

.dim { position: absolute; color: var(--dimension); font: 400 11px/1 var(--mono); }
.dim-x { left: 0; right: 0; bottom: -30px; height: 9px; border-left: 1px solid; border-right: 1px solid; }
.dim-x::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; border-top: 1px solid; }
.dim-x span { position: absolute; left: 50%; top: -1px; transform: translateX(-50%); padding: 0 8px; background: var(--canvas); }
.dim-y { top: 0; bottom: 0; right: -32px; width: 9px; border-top: 1px solid; border-bottom: 1px solid; }
.dim-y::before { content: ""; position: absolute; top: 0; bottom: 0; left: 4px; border-left: 1px solid; }
.dim-y span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(90deg); white-space: nowrap; padding: 0 8px; background: var(--canvas); }
.readout {
  position: absolute; left: 16px; bottom: 14px; padding: 6px 12px; border-radius: 99px;
  background: rgba(20, 21, 24, 0.7); color: var(--canvas-text); font: 400 12px/1.2 var(--mono);
}

/* How it works: a real sequence, so it is numbered. */
.steps { padding-top: 24px; padding-bottom: 88px; }
.steps ol { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; counter-reset: step; }
.steps li { counter-increment: step; padding-top: 18px; border-top: 2px solid var(--ink); }
.steps li::before { content: counter(step); display: block; margin-bottom: 10px; font: 500 0.875rem/1 var(--mono); color: var(--muted); }
.steps p { margin: 8px 0 0; color: var(--muted); }

/* Features */
.features { padding-top: 0; padding-bottom: 96px; }
.features dl { margin: 36px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; }
.features dl > div { padding: 22px 0 26px; border-top: 1px solid var(--border); }
.features dt { font-weight: 600; }
.features dd { margin: 6px 0 0; color: var(--muted); }

/* Private by design: back on the light-table. */
.private { background: var(--canvas) radial-gradient(var(--canvas-grid) 1px, transparent 1.2px) 0 0 / 18px 18px; color: var(--canvas-text); }
.private-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; padding-top: 80px; padding-bottom: 80px; }
.private h2 { color: #FFFFFF; max-width: 16ch; }
.private p { margin: 0 0 14px; font-size: 1.125rem; max-width: 46ch; }
.private a { color: #9DBBFF; }

/* FAQ */
.faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; padding-top: 88px; padding-bottom: 96px; }
.faq-list { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px;
  padding: 18px 0; font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.25rem/1 var(--mono); color: var(--muted); transition: transform 160ms; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: -4px 0 20px; color: var(--muted); max-width: 60ch; }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }

/* Footer */
.foot { border-top: 1px solid var(--border); background: var(--surface); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; padding-top: 22px; padding-bottom: 22px; font-size: 0.875rem; color: var(--muted); }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--ink); }
.foot .ver { margin-left: auto; }

/* Privacy policy */
.prose { max-width: 720px; padding-top: 64px; padding-bottom: 96px; }
.prose h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem); letter-spacing: -0.025em; }
.prose .updated { margin: 10px 0 40px; color: var(--muted); font-size: 0.9375rem; }
.prose h2 { font-size: 1.25rem; margin-top: 36px; }
.prose p { margin: 10px 0 0; }
.prose .back { margin-top: 48px; }

/* Narrow screens */
@media (max-width: 900px) {
  .hero, .private-inner, .faq { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero { padding-top: 48px; padding-bottom: 64px; }
  .features dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .top-row { min-height: 56px; gap: 10px; }
  .brand { gap: 8px; }
  .brand .ver { display: none; }
  .top-nav { gap: 14px; }
  .lede { font-size: 1.0625rem; }
  .table { padding: 24px 22px 56px 16px; border-radius: 12px; margin: 0 calc(-1 * var(--gutter) + 4px); }
  .dim-y { display: none; }
  .dim-x { bottom: -22px; }
  .readout { left: 10px; bottom: 8px; font-size: 11px; }
  .label span { font-size: 6.5px; }
  .steps ol, .features dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .steps li { padding-bottom: 24px; }
  .steps, .features { padding-bottom: 56px; }
  .private-inner { padding-top: 56px; padding-bottom: 56px; }
  .faq { padding-top: 56px; padding-bottom: 64px; }
  .foot .ver { margin-left: 0; }
}
