/* span marketing site — tokens mirror src/App.css exactly (light/dark chrome,
   accent defaults, Inter Variable). "The quiet default" is the app icon's own
   phrase for its near-black tile; the hero/CLI/why-Tauri bands borrow that
   ink gradient (#15181e -> #0b0d11) as the site's one dramatic color move. */

@font-face {
  font-family: "Inter Variable";
  src: url("/assets/fonts/inter-var.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}

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

:root {
  --font-sans: "Inter Variable", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;

  --bg: #ffffff;
  --text: #111319;
  --muted: #5f6b7a;
  --toolbar-bg: #f4f7fa;
  --border: #e6e9ec;
  --hover: #e8ecf0;
  --accent-default: #0366d6;

  --ink-1: #15181e;
  --ink-2: #0b0d11;
  --ink-text: #f4f6fb;
  --ink-muted: #a6adb8;
  --ink-border: rgba(255, 255, 255, 0.08);

  --radius-card: 16px;
  --radius-lg: 22px;
  --shadow-lg: 0 30px 80px -20px rgba(11, 13, 17, 0.35);
  --shadow-sm: 0 2px 10px rgba(11, 13, 17, 0.06);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --accent: var(--accent-override, var(--accent-default));
}

:root[data-theme="dark"] {
  --bg: #111319;
  --text: #e6e6e6;
  --muted: #a6adb8;
  --toolbar-bg: #171a22;
  --border: #2a2e39;
  --hover: #232732;
  --accent-default: #6aa3f0;
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #fff; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

kbd {
  font-family: var(--font-mono);
  font-size: 0.72em;
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--toolbar-bg);
  color: var(--text);
  box-shadow: 0 1px 0 var(--border);
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--toolbar-bg);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  z-index: 200;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---- grain overlay ---- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ================= NAV ================= */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.wordmark .mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--ink-1), var(--ink-2));
  color: var(--ink-text);
  font-weight: 800;
  font-size: 15px;
  border: 1px solid var(--ink-border);
}

.wordmark.small { font-size: 16px; }
.wordmark.small .mark { width: 22px; height: 22px; font-size: 13px; border-radius: 6px; }

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
}
.nav-links a { transition: color 0.15s; }
.nav-links a:hover { color: var(--text); }

.nav-controls { display: flex; align-items: center; gap: 6px; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  transition: background-color 0.15s, border-color 0.15s;
}
.theme-toggle:hover { background: var(--hover); }
.theme-icon { font-size: 13px; }

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 34px;
  height: 34px;
}
.nav-burger span {
  display: block;
  width: 18px;
  height: 1.6px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.6px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.6px) rotate(-45deg); }

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 4px 24px 18px;
  border-top: 1px solid var(--border);
}
.nav-mobile a {
  padding: 12px 4px;
  font-size: 15px;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.nav-mobile.open { display: flex; }

/* ================= HERO ================= */
.hero {
  position: relative;
  padding: 76px 24px 100px;
  overflow: hidden;
}

.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: 56px;
  align-items: center;
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
}

.hero-copy h1 {
  font-size: clamp(2.4rem, 4.6vw, 3.6rem);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 26px;
}
.hero-copy h1 em {
  font-style: normal;
  font-weight: 300;
  color: var(--muted);
}

.hero-lede {
  font-size: 18px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 46ch;
  margin-bottom: 34px;
}
.hero-lede strong { color: var(--text); font-weight: 650; }

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 11px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background-color 0.18s var(--ease), border-color 0.18s;
}
.btn:hover { transform: translateY(-1.5px); }
.btn svg { transition: transform 0.18s var(--ease); }
.btn:hover svg { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 28px -10px color-mix(in srgb, var(--accent) 70%, transparent);
}
.btn-primary:hover { box-shadow: 0 16px 34px -8px color-mix(in srgb, var(--accent) 75%, transparent); }

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: var(--hover); }

.hero-accents {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.hero-accents-label {
  font-size: 13px;
  color: var(--muted);
  margin-right: 2px;
}
.swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--sw);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1.5px var(--sw);
  transition: transform 0.15s var(--ease);
}
.swatch:hover { transform: scale(1.18); }
.swatch:active { transform: scale(0.95); }

.hero-shot {
  position: relative;
  perspective: 1600px;
}
.shot-glow {
  position: absolute;
  inset: -8%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 32%, transparent), transparent 70%);
  filter: blur(38px);
  z-index: -1;
  opacity: 0.65;
  transition: background 0.3s;
}
.shot {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--ink-border);
  box-shadow: var(--shadow-lg);
  transform: rotateY(-8deg) rotateX(3deg) scale(0.98);
  transition: transform 0.5s var(--ease);
}
.hero-shot:hover .shot { transform: rotateY(-3deg) rotateX(1deg) scale(1); }
.shot-light { display: none; }
:root[data-theme="light"] .shot-dark { display: none; }
:root[data-theme="light"] .shot-light { display: block; }

@media (prefers-reduced-motion: reduce) {
  .shot, .btn, .swatch { transition: none !important; }
}

/* ================= WHY (ink band) ================= */
.why {
  background: linear-gradient(135deg, var(--ink-1), var(--ink-2));
  color: var(--ink-text);
  padding: 64px 24px;
}
.why-inner {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}
.why-kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 16px;
}
.why-statement {
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  line-height: 1.55;
  font-weight: 400;
  margin-bottom: 28px;
}
.why-statement strong { font-weight: 700; }
.why-pills {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.pill {
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--ink-border);
}
.pill-yes { background: rgba(255, 255, 255, 0.08); color: var(--ink-text); }
.pill-no { color: var(--ink-muted); text-decoration: line-through; text-decoration-color: rgba(166,173,184,0.5); }

/* ================= SECTION HEAD ================= */
.section-head {
  max-width: 640px;
  margin: 0 auto 44px;
  text-align: center;
  padding: 0 24px;
}
.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.section-head p { color: var(--muted); font-size: 16px; }
.section-head.light-on-dark p { color: var(--ink-muted); }
.section-head.light-on-dark h2 { color: var(--ink-text); }

/* ================= FEATURES ================= */
.features { padding: 96px 24px; max-width: 1180px; margin: 0 auto; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.feature-wide { grid-column: span 2; }

.feature-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--toolbar-bg);
  transition: transform 0.22s var(--ease), border-color 0.22s;
}
.feature-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}
.feature-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--accent);
  margin-bottom: 18px;
}
.feature-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.01em; }
.feature-card p { font-size: 14.5px; color: var(--muted); line-height: 1.6; }
.feature-card kbd { margin: 0 1px; }

/* ================= GALLERY ================= */
.gallery-section { padding: 40px 24px 100px; max-width: 1180px; margin: 0 auto; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: start;
  gap: 16px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  background: var(--toolbar-bg);
}
.gallery-trigger {
  display: block;
  position: relative;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.gallery-trigger img {
  width: 100%;
  aspect-ratio: 1280 / 800;
  object-fit: cover;
  object-position: top;
  transition: transform 0.4s var(--ease);
}
.gallery-item:hover .gallery-trigger img { transform: scale(1.035); }

.gallery-trigger::after {
  content: "⛶";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
  background: rgba(11, 13, 17, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.15);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.gallery-item:hover .gallery-trigger::after { opacity: 1; transform: translateY(0); }

.gallery-item figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 16px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(to top, rgba(11,13,17,0.82), transparent);
}

/* ---- lightbox ---- */
body.lightbox-open { overflow: hidden; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  background: rgba(6, 7, 9, 0.92);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease), visibility 0.25s;
}
.lightbox.open { opacity: 1; visibility: visible; }

.lightbox-frame {
  position: relative;
  max-width: min(1100px, 90vw);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-img {
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  border-radius: 14px;
  border: 1px solid var(--ink-border);
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.lightbox.open .lightbox-img { opacity: 1; transform: scale(1); }

.lightbox-caption {
  margin-top: 18px;
  color: var(--ink-text);
  font-size: 14.5px;
  font-weight: 600;
  text-align: center;
}

.lightbox-close, .lightbox-nav {
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink-text);
  border: 1px solid var(--ink-border);
  transition: background-color 0.15s, transform 0.15s;
}
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255, 255, 255, 0.16); }

.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-close:hover { transform: scale(1.06); }
.lightbox-prev:hover { transform: translateY(-50%) scale(1.06); }
.lightbox-next:hover { transform: translateY(-50%) scale(1.06); }

@media (max-width: 640px) {
  .lightbox { padding: 20px; }
  .lightbox-nav { width: 38px; height: 38px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-close { top: 12px; right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox, .lightbox-img { transition: none; }
}

/* ================= SHORTCUTS ================= */
.shortcuts { padding: 96px 24px; background: var(--toolbar-bg); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.shortcuts-inner { max-width: 760px; margin: 0 auto; }

.shortcuts-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.shortcuts-col { background: var(--bg); }
.shortcuts-col table { width: 100%; border-collapse: collapse; }
.shortcuts-col td {
  padding: 15px 20px;
  font-size: 14.5px;
  border-bottom: 1px solid var(--border);
}
.shortcuts-col tr:last-child td { border-bottom: none; }
.shortcuts-col .keys { text-align: right; white-space: nowrap; }
.shortcuts-col kbd { margin-left: 3px; }

.shortcuts-note {
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 22px;
}

/* ================= CLI (ink band) ================= */
.cli {
  background: linear-gradient(180deg, var(--ink-2), var(--ink-1));
  padding: 96px 24px;
}
.cli-inner { max-width: 640px; margin: 0 auto; }
.cli-inner .section-head { margin-bottom: 32px; }
.cli-inner .section-head code { background: rgba(255,255,255,0.08); color: var(--ink-text); }

.terminal {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--ink-border);
  box-shadow: 0 24px 60px -16px rgba(0,0,0,0.6);
}
.terminal-bar {
  display: flex;
  gap: 7px;
  padding: 12px 14px;
  background: #1a1d24;
}
.terminal-bar .dot { width: 11px; height: 11px; border-radius: 50%; background: #333947; }
.terminal-body {
  background: #0d0f13;
  padding: 20px 22px 24px;
  font-family: var(--font-mono);
  font-size: 14px;
}
.term-line { color: #e6e6e6; padding: 5px 0; white-space: pre-wrap; }
.term-line .prompt { color: #6aa3f0; margin-right: 8px; }
.term-line .comment { color: #676f7f; }

.cli-note {
  text-align: center;
  color: var(--ink-muted);
  font-size: 13.5px;
  margin-top: 22px;
}
.cli-note strong { color: var(--ink-text); }

/* ================= DOWNLOAD ================= */
.download { padding: 96px 24px; max-width: 1180px; margin: 0 auto; }

.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 900px;
  margin: 0 auto;
}
.platform-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding: 34px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s;
}
.platform-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: var(--shadow-sm);
}
.platform-card svg { color: var(--text); margin-bottom: 4px; }
.platform-name { font-weight: 700; font-size: 16px; }
.platform-file { font-size: 13px; color: var(--muted); font-family: var(--font-mono); }
.platform-card.current { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--bg)); }

.unsigned-note {
  max-width: 620px;
  margin: 44px auto 0;
  padding: 22px 26px;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: var(--toolbar-bg);
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}
.unsigned-note strong { color: var(--text); }
.unsigned-note ul { margin: 12px 0 0 20px; }
.unsigned-note li { margin-bottom: 5px; }

/* ================= FOOTER ================= */
.site-footer { border-top: 1px solid var(--border); padding: 36px 24px; }
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-meta { font-size: 13px; color: var(--muted); }
.footer-meta a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.footer-meta a:hover { color: var(--text); }
.footer-gh { color: var(--muted); transition: color 0.15s; }
.footer-gh:hover { color: var(--text); }

/* ================= REVEAL ANIMATION ================= */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--delay, 0ms);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-shot { order: -1; max-width: 560px; margin: 0 auto; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-wide { grid-column: span 2; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .platform-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .theme-toggle .theme-label { display: none; }
  .hero { padding: 48px 20px 72px; }
  .hero-copy h1 { font-size: clamp(2rem, 8vw, 2.6rem); }
  .why { padding: 48px 20px; }
  .features, .gallery-section, .download { padding: 64px 20px; }
  .shortcuts, .cli { padding: 64px 20px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-wide { grid-column: span 1; }
  .gallery-grid { grid-template-columns: 1fr; }
  .shortcuts-panel { grid-template-columns: 1fr; }
  .platform-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
}
