/* ==========================================================================
   LifeOS - Landing site styles
   Author: DreamNotion
   A single, dependency-free stylesheet. Organised as:
     1.  Design tokens (CSS custom properties) + theming
     2.  Base / reset
     3.  Layout primitives (container, section, grid)
     4.  Typography
     5.  Buttons & pills
     6.  Navigation
     7.  Hero
     8.  Reusable components (cards, mockups, marquee, etc.)
     9.  Section-specific styles
     10. Footer
     11. Legal / doc pages
     12. Motion & reveal animations
     13. Responsive breakpoints
   ========================================================================== */

/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */
:root {
  /* Brand - LifeOS orange (#f97316), matching the app's design token */
  --accent:        #f97316;
  --accent-strong: #e86a0c;
  --accent-soft:   #ff9a45;
  --accent-ink:    #ffffff;

  /* Radii */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  /* Typography */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  --font-mono: "SFMono-Regular", ui-monospace, "JetBrains Mono", "Cascadia Code",
               Menlo, Consolas, "Liberation Mono", monospace;

  --fs-hero: clamp(2.6rem, 6vw, 4.6rem);
  --fs-h2:   clamp(1.9rem, 3.6vw, 3rem);
  --fs-h3:   clamp(1.25rem, 2vw, 1.6rem);
  --fs-lead: clamp(1.05rem, 1.6vw, 1.3rem);
  --fs-body: 1rem;
  --fs-sm:   0.9rem;
  --fs-xs:   0.8rem;

  --lh-tight: 1.08;
  --lh-snug:  1.3;
  --lh-body:  1.65;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.55s;

  --maxw: 1160px;
  --nav-h: 66px;
}

/* ---- Light theme (default) ---- */
:root,
:root[data-theme="light"] {
  color-scheme: light;
  --bg:           #ffffff;
  --bg-warm:      #faf9f7;
  --bg-elev:      #ffffff;
  --bg-sunken:    #f5f4f1;
  --surface:      #ffffff;
  --surface-2:    #f7f6f3;
  --ink:          #17171b;
  --ink-2:        #3a3a42;
  --muted:        #6b6b76;
  --faint:        #9a9aa5;
  --border:       rgba(20, 20, 30, 0.09);
  --border-strong:rgba(20, 20, 30, 0.16);
  --shadow-sm: 0 1px 2px rgba(15, 15, 25, 0.05), 0 2px 8px rgba(15, 15, 25, 0.05);
  --shadow-md: 0 4px 14px rgba(15, 15, 25, 0.08), 0 12px 40px rgba(15, 15, 25, 0.08);
  --shadow-lg: 0 12px 30px rgba(15, 15, 25, 0.10), 0 30px 80px rgba(20, 15, 10, 0.14);
  --glow: radial-gradient(60% 60% at 50% 0%, rgba(245, 128, 31, 0.16), transparent 70%);
  --hero-bg: linear-gradient(180deg, #fff8f2 0%, #ffffff 60%);
  --nav-bg: rgba(255, 255, 255, 0.72);
  --code-bg: #f6f5f2;
  --grid-line: rgba(20, 20, 30, 0.045);
}

/* ---- Dark theme ---- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:           #0a0a0c;
  --bg-warm:      #0d0d10;
  --bg-elev:      #131318;
  --bg-sunken:    #0d0d11;
  --surface:      #131318;
  --surface-2:    #1a1a21;
  --ink:          #f3f3f5;
  --ink-2:        #d6d6dd;
  --muted:        #9c9ca8;
  --faint:        #6f6f7c;
  --border:       rgba(255, 255, 255, 0.09);
  --border-strong:rgba(255, 255, 255, 0.18);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
  --glow: radial-gradient(55% 55% at 50% 0%, rgba(245, 128, 31, 0.22), transparent 70%);
  --hero-bg: linear-gradient(180deg, #100c09 0%, #0a0a0c 55%);
  --nav-bg: rgba(12, 12, 15, 0.66);
  --code-bg: #16161c;
  --grid-line: rgba(255, 255, 255, 0.04);
}

/* Follow system when no explicit choice is stored */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    color-scheme: dark;
    --bg:#0a0a0c; --bg-warm:#0d0d10; --bg-elev:#131318; --bg-sunken:#0d0d11;
    --surface:#131318; --surface-2:#1a1a21;
    --ink:#f3f3f5; --ink-2:#d6d6dd; --muted:#9c9ca8; --faint:#6f6f7c;
    --border:rgba(255,255,255,0.09); --border-strong:rgba(255,255,255,0.18);
    --shadow-sm:0 1px 2px rgba(0,0,0,0.4);
    --shadow-md:0 8px 30px rgba(0,0,0,0.45);
    --shadow-lg:0 20px 60px rgba(0,0,0,0.6);
    --glow:radial-gradient(55% 55% at 50% 0%, rgba(245,128,31,0.22), transparent 70%);
    --hero-bg:linear-gradient(180deg,#100c09 0%,#0a0a0c 55%);
    --nav-bg:rgba(12,12,15,0.66);
    --code-bg:#16161c; --grid-line:rgba(255,255,255,0.04);
  }
}

/* ==========================================================================
   2. BASE / RESET
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip; /* prevents horizontal scroll without breaking position: sticky */
}
html { overflow-x: clip; }

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(245, 128, 31, 0.28); }

/* ==========================================================================
   3. LAYOUT PRIMITIVES
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.section { padding-block: clamp(64px, 10vw, 128px); position: relative; }
.section--tight { padding-block: clamp(48px, 7vw, 88px); }
.section--warm { background: var(--bg-warm); }
.section--sunken { background: var(--bg-sunken); }
.section--divide { border-top: 1px solid var(--border); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-strong);
}
.eyebrow::before {
  content: "";
  width: 18px; height: 1px;
  background: var(--accent);
  display: inline-block;
}
.section-head { max-width: 660px; margin-bottom: var(--space-8); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--muted); font-size: var(--fs-lead); margin-top: var(--space-4); }

.grid { display: grid; gap: var(--space-5); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ==========================================================================
   4. TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4 { line-height: var(--lh-snug); font-weight: 680; letter-spacing: -0.02em; color: var(--ink); }
h1 { font-size: var(--fs-hero); line-height: var(--lh-tight); letter-spacing: -0.035em; font-weight: 720; }
h2 { font-size: var(--fs-h2); letter-spacing: -0.03em; }
h3 { font-size: var(--fs-h3); }
.lead { font-size: var(--fs-lead); color: var(--muted); line-height: var(--lh-body); }
.text-accent { color: var(--accent-strong); }
.mono { font-family: var(--font-mono); }
.balance { text-wrap: balance; }

/* ==========================================================================
   5. BUTTONS & PILLS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.8rem 1.35rem;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.18s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.2s, color 0.2s;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn svg { width: 18px; height: 18px; }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 8px 22px rgba(245, 128, 31, 0.3);
}
.btn-primary:hover { background: var(--accent-strong); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(245, 128, 31, 0.4); }

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent-strong); transform: translateY(-2px); }

.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { color: var(--accent-strong); }

.btn-lg { padding: 1rem 1.7rem; font-size: 1rem; }
.btn-block { width: 100%; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.4rem 0.85rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(245, 128, 31, 0.16); }
.pill--live .dot { background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18); }

/* ==========================================================================
   6. NAVIGATION
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.nav.is-scrolled { border-bottom-color: var(--border); }
.nav .container { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); }

.brand { display: inline-flex; align-items: center; gap: var(--space-3); font-weight: 680; letter-spacing: -0.02em; font-size: 1.1rem; color: var(--ink); }
.brand img { width: 26px; height: 26px; }

.nav-links { display: flex; align-items: center; gap: var(--space-6); }
.nav-links a { font-size: var(--fs-sm); color: var(--muted); font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: var(--space-3); }

.theme-toggle {
  width: 38px; height: 38px;
  display: inline-grid; place-items: center;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-2);
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}
.theme-toggle:hover { color: var(--accent-strong); border-color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

.nav-toggle { display: none; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); align-items: center; justify-content: center; }
.nav-toggle svg { width: 20px; height: 20px; }

/* ==========================================================================
   7. HERO
   ========================================================================== */
.hero {
  position: relative;
  padding-top: clamp(56px, 8vw, 100px);
  padding-bottom: clamp(40px, 6vw, 80px);
  background: var(--hero-bg);
  overflow: hidden;
  text-align: center;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--glow);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(70% 60% at 50% 30%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000 0%, transparent 75%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }

.hero-badge { margin-inline: auto; margin-bottom: var(--space-6); }
.hero h1 { max-width: 16ch; margin-inline: auto; }
.hero h1 .grad {
  background: linear-gradient(120deg, var(--accent-strong), var(--accent-soft));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  max-width: 620px;
  margin: var(--space-5) auto 0;
  font-size: var(--fs-lead);
  color: var(--muted);
}
.hero-cta { display: flex; gap: var(--space-3); justify-content: center; flex-wrap: wrap; margin-top: var(--space-7); }
.hero-meta { margin-top: var(--space-4); font-size: var(--fs-xs); color: var(--faint); display: flex; gap: var(--space-4); justify-content: center; flex-wrap: wrap; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }

/* Hero product frame */
.hero-stage { position: relative; margin-top: clamp(48px, 7vw, 88px); }
.app-frame {
  position: relative;
  margin-inline: auto;
  max-width: 980px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.app-frame__bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.app-frame__bar .tl { width: 11px; height: 11px; border-radius: 50%; background: var(--border-strong); }
.app-frame__bar .tl:nth-child(1) { background: #ff5f57; }
.app-frame__bar .tl:nth-child(2) { background: #febc2e; }
.app-frame__bar .tl:nth-child(3) { background: #28c840; }
.app-frame__bar .title { margin-left: 10px; font-size: var(--fs-xs); color: var(--faint); }
.app-frame img { width: 100%; display: block; }

.hero-float {
  position: absolute;
  right: -8px; bottom: -28px;
  width: clamp(180px, 24vw, 260px);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: floaty 6s var(--ease) infinite alternate;
}
.hero-float img { width: 100%; }
@keyframes floaty { from { transform: translateY(0); } to { transform: translateY(-14px); } }

.scroll-cue {
  display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
  margin-top: clamp(56px, 8vw, 96px);
  color: var(--faint); font-size: var(--fs-xs); letter-spacing: 0.1em; text-transform: uppercase;
}
.scroll-cue .mouse { width: 22px; height: 34px; border: 1.5px solid var(--border-strong); border-radius: 12px; position: relative; }
.scroll-cue .mouse::after { content: ""; position: absolute; top: 6px; left: 50%; width: 3px; height: 6px; border-radius: 2px; background: var(--accent); transform: translateX(-50%); animation: wheel 1.6s var(--ease) infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translate(-50%, 0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, 10px); } }

/* ==========================================================================
   8. REUSABLE COMPONENTS
   ========================================================================== */

/* Logo strip / trust bar */
.trust { border-block: 1px solid var(--border); background: var(--bg-warm); }
.trust .container { display: flex; align-items: center; justify-content: center; gap: clamp(20px, 4vw, 56px); flex-wrap: wrap; padding-block: var(--space-6); }
.trust span { font-size: var(--fs-sm); color: var(--muted); font-weight: 500; display: inline-flex; align-items: center; gap: 8px; }
.trust svg { width: 18px; height: 18px; color: var(--accent-strong); }

/* Feature card */
.card {
  position: relative;
  padding: var(--space-6);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.card__icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  background: linear-gradient(140deg, rgba(245,128,31,0.16), rgba(245,128,31,0.05));
  border: 1px solid rgba(245,128,31,0.2);
  color: var(--accent-strong);
  margin-bottom: var(--space-4);
}
.card__icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 1.15rem; margin-bottom: var(--space-2); }
.card p { color: var(--muted); font-size: var(--fs-sm); }
.card--wide { grid-column: span 2; }

/* Split feature row (alternating) */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.feature-row + .feature-row { margin-top: clamp(64px, 9vw, 120px); }
.feature-row.reverse .feature-row__media { order: -1; }
.feature-row__copy .eyebrow { margin-bottom: var(--space-4); }
.feature-row__copy h2 { font-size: var(--fs-h3); margin-bottom: var(--space-4); }
.feature-row__copy p { color: var(--muted); }
.feature-list { margin-top: var(--space-5); display: grid; gap: var(--space-3); }
.feature-list li { display: flex; gap: var(--space-3); align-items: flex-start; font-size: var(--fs-sm); color: var(--ink-2); }
.feature-list svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }

/* Media frame for screenshots */
.shot {
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.shot img { width: 100%; display: block; }
.shot--pad { padding: 10px; background: var(--surface-2); }
.shot--pad img { border-radius: var(--r-sm); border: 1px solid var(--border); }

.media-glow { position: relative; }
.media-glow::before {
  content: ""; position: absolute; inset: -10% -6% auto; height: 60%;
  background: radial-gradient(50% 80% at 50% 0%, rgba(245,128,31,0.22), transparent 70%);
  filter: blur(30px); z-index: -1;
}

/* Steps */
.steps { counter-reset: step; display: grid; gap: var(--space-5); }
.step {
  display: grid; grid-template-columns: auto 1fr; gap: var(--space-5);
  padding: var(--space-6);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
}
.step__num {
  counter-increment: step;
  width: 42px; height: 42px; border-radius: var(--r-pill);
  display: grid; place-items: center;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 1.05rem;
}
.step__num::before { content: counter(step); }
.step h3 { font-size: 1.1rem; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: var(--fs-sm); }

/* Marquee (screenshot carousel) */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; gap: var(--space-5); width: max-content; animation: scrollx 44s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee figure { width: clamp(320px, 46vw, 560px); border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface-2); box-shadow: var(--shadow-md); overflow: hidden; }
.marquee figure img { width: 100%; }
.marquee figcaption { padding: 12px 16px; font-size: var(--fs-xs); color: var(--muted); border-top: 1px solid var(--border); background: var(--surface); }
@keyframes scrollx { from { transform: translateX(0); } to { transform: translateX(calc(-50% - var(--space-5) / 2)); } }

/* Privacy / value grid tiles */
.tile {
  padding: var(--space-5);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex; gap: var(--space-4); align-items: flex-start;
}
.tile__ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--accent-strong); flex-shrink: 0; }
.tile__ic svg { width: 20px; height: 20px; }
.tile h4 { font-size: 1rem; margin-bottom: 4px; }
.tile p { font-size: var(--fs-sm); color: var(--muted); }

/* Tech stack chips */
.stack-grid { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0.6rem 1rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: var(--fs-sm); color: var(--ink-2); font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, border-color 0.2s;
}
.chip:hover { transform: translateY(-2px); border-color: var(--accent); }
.chip b { color: var(--ink); font-weight: 650; }
.chip span { color: var(--faint); font-size: var(--fs-xs); }

/* Callout / local-first banner */
.callout {
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background:
    var(--glow),
    var(--surface);
  padding: clamp(32px, 5vw, 64px);
  text-align: center;
}
.callout h2 { max-width: 22ch; margin-inline: auto; }
.callout p { max-width: 60ch; margin: var(--space-4) auto 0; color: var(--muted); font-size: var(--fs-lead); }

/* Download card */
.download {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(24px, 5vw, 56px);
  align-items: center;
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  padding: clamp(28px, 5vw, 56px);
  position: relative; overflow: hidden;
}
.download::before { content: ""; position: absolute; inset: 0; background: var(--glow); pointer-events: none; }
.download > * { position: relative; z-index: 1; }
.download h2 { font-size: var(--fs-h2); }
.download p { color: var(--muted); margin-top: var(--space-3); }
.download__cta { margin-top: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); align-items: flex-start; }
.download__meta { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); margin-top: var(--space-4); font-size: var(--fs-xs); color: var(--faint); }
.download__meta span { display: inline-flex; align-items: center; gap: 6px; }
.download__panel { border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface-2); padding: var(--space-5); }
.req-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: var(--fs-sm); }
.req-row:last-child { border-bottom: 0; }
.req-row span:first-child { color: var(--muted); }
.req-row span:last-child { color: var(--ink); font-weight: 550; }

/* FAQ */
.faq { display: grid; gap: var(--space-3); max-width: 820px; margin-inline: auto; }
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq details[open] { border-color: var(--border-strong); }
.faq summary {
  list-style: none; cursor: pointer;
  padding: var(--space-5);
  font-weight: 600; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-4);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev { width: 20px; height: 20px; color: var(--muted); transition: transform 0.25s var(--ease); flex-shrink: 0; }
.faq details[open] summary .chev { transform: rotate(45deg); color: var(--accent-strong); }
.faq .faq-body { padding: 0 var(--space-5) var(--space-5); color: var(--muted); font-size: var(--fs-sm); }

/* Section number chips for aesthetic */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-5); }
.stat { text-align: center; padding: var(--space-5); }
.stat b { display: block; font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 720; letter-spacing: -0.03em; color: var(--ink); }
.stat span { font-size: var(--fs-sm); color: var(--muted); }

/* ==========================================================================
   10. FOOTER
   ========================================================================== */
.footer { border-top: 1px solid var(--border); background: var(--bg-warm); padding-block: var(--space-8) var(--space-6); }
.footer__top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: var(--space-6); }
.footer__brand p { color: var(--muted); font-size: var(--fs-sm); margin-top: var(--space-3); max-width: 34ch; }
.footer h5 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); margin-bottom: var(--space-4); }
.footer ul { display: grid; gap: var(--space-3); }
.footer ul a { font-size: var(--fs-sm); color: var(--muted); transition: color 0.2s; }
.footer ul a:hover { color: var(--accent-strong); }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); flex-wrap: wrap; margin-top: var(--space-8); padding-top: var(--space-5); border-top: 1px solid var(--border); font-size: var(--fs-xs); color: var(--faint); }
.footer__bottom .badges { display: flex; gap: var(--space-3); flex-wrap: wrap; }

/* ==========================================================================
   11. LEGAL / DOC PAGES
   ========================================================================== */
.doc { padding-block: clamp(48px, 7vw, 96px); }
.doc__head { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--space-5); margin-bottom: var(--space-7); }
.doc__head .eyebrow { margin-bottom: var(--space-4); }
.doc__head h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); }
.doc__head .updated { color: var(--faint); font-size: var(--fs-sm); margin-top: var(--space-3); }
.doc__wrap { max-width: 820px; margin-inline: auto; padding-inline: var(--space-5); }
.doc__wrap h2 { font-size: 1.5rem; margin-top: var(--space-8); margin-bottom: var(--space-3); scroll-margin-top: 90px; }
.doc__wrap h3 { font-size: 1.15rem; margin-top: var(--space-6); margin-bottom: var(--space-2); }
.doc__wrap p, .doc__wrap li { color: var(--ink-2); font-size: 1rem; line-height: var(--lh-body); }
.doc__wrap p { margin-top: var(--space-3); }
.doc__wrap ul { list-style: disc; padding-left: 1.3em; margin-top: var(--space-3); display: grid; gap: var(--space-2); }
.doc__wrap ul li::marker { color: var(--accent); }
.doc__wrap a { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }
.doc__wrap strong { color: var(--ink); }
.doc-note {
  border: 1px solid var(--border); border-left: 3px solid var(--accent);
  background: var(--surface-2); border-radius: var(--r-sm);
  padding: var(--space-4) var(--space-5); margin-top: var(--space-5); font-size: var(--fs-sm); color: var(--muted);
}
.toc { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); padding: var(--space-5); margin-bottom: var(--space-7); }
.toc h4 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); margin-bottom: var(--space-3); }
.toc ul { display: grid; gap: var(--space-2); }
.toc a { color: var(--muted); font-size: var(--fs-sm); }
.toc a:hover { color: var(--accent-strong); }

/* ==========================================================================
   404
   ========================================================================== */
.err { min-height: 68vh; display: grid; place-items: center; text-align: center; padding-block: var(--space-9); }
.err h1 { font-size: clamp(4rem, 14vw, 9rem); line-height: 1; background: linear-gradient(120deg, var(--accent-strong), var(--accent-soft)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.err p { color: var(--muted); font-size: var(--fs-lead); margin: var(--space-4) 0 var(--space-6); }

/* ==========================================================================
   12. MOTION & REVEAL
   ========================================================================== */
/* Reveal is a progressive enhancement: only hide content when JS is active
   (the .js class is added to <html> before paint). Without JS, everything
   stays visible so the page is fully usable and crawlable. */
.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
.js [data-reveal][data-delay="1"] { transition-delay: 0.08s; }
.js [data-reveal][data-delay="2"] { transition-delay: 0.16s; }
.js [data-reveal][data-delay="3"] { transition-delay: 0.24s; }
.js [data-reveal][data-delay="4"] { transition-delay: 0.32s; }

/* ==========================================================================
   13. RESPONSIVE
   ========================================================================== */
@media (max-width: 940px) {
  .nav-links, .nav-actions .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.mobile-open + .mobile-menu { display: block; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .feature-row { grid-template-columns: 1fr; }
  .feature-row.reverse .feature-row__media { order: 0; }
  .download { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .hero-float { position: static; width: 60%; margin: var(--space-5) auto 0; }
  .card--wide { grid-column: span 1; }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr; gap: var(--space-6); }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .hero-cta .btn { width: 100%; }
  .step { grid-template-columns: 1fr; gap: var(--space-3); }
}

/* ==========================================================================
   14. SHOWCASE COMPONENTS (added sections)
   ========================================================================== */

/* Utilities */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
main section[id] { scroll-margin-top: calc(var(--nav-h) + 14px); }
.split-cards { align-items: stretch; }
.split-cards > * { height: 100%; }

/* Inline code & keys */
:not(pre):not(.db-path) > code {
  font-family: var(--font-mono); font-size: 0.86em;
  background: var(--code-bg); border: 1px solid var(--border);
  border-radius: 6px; padding: 0.08em 0.38em; color: var(--ink-2);
}
kbd {
  font-family: var(--font-mono); font-size: 0.8em;
  background: var(--surface-2); border: 1px solid var(--border-strong);
  border-bottom-width: 2px; border-radius: 6px; padding: 0.05em 0.42em; color: var(--ink);
}

/* Comparison / cost tables */
.table-wrap { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--border); box-shadow: var(--shadow-sm); -webkit-overflow-scrolling: touch; }
.compare { width: 100%; border-collapse: collapse; background: var(--surface); font-size: var(--fs-sm); min-width: 580px; }
.compare th, .compare td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--border); vertical-align: top; }
.compare thead th { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); background: var(--surface-2); font-weight: 650; }
.compare tbody th[scope="row"] { color: var(--ink); font-weight: 600; width: 22%; }
.compare td { color: var(--muted); }
.compare tbody .is-lifeos { color: var(--ink-2); background: rgba(245, 128, 31, 0.055); font-weight: 500; }
.compare thead th.is-lifeos { color: var(--accent-strong); background: rgba(245, 128, 31, 0.12); }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare .is-yes { color: #15803d; font-weight: 600; }
.compare .is-no { color: var(--faint); }
:root[data-theme="dark"] .compare .is-yes { color: #4ade80; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .compare .is-yes { color: #4ade80; } }
.cost-table { min-width: 660px; }

/* Application flow (vertical rail) */
.flow { position: relative; max-width: 760px; margin-inline: auto; }
.flow::before { content: ""; position: absolute; left: 23px; top: 22px; bottom: 24px; width: 2px; background: linear-gradient(var(--border-strong), var(--border)); }
.flow-step, .flow-phase { position: relative; display: grid; grid-template-columns: 46px 1fr; gap: var(--space-4); align-items: start; }
.flow-step { margin-top: var(--space-4); }
.flow-phase { margin-top: var(--space-7); }
.flow-phase:first-child { margin-top: 0; }
.flow-step__dot, .flow-phase__dot { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; z-index: 1; flex-shrink: 0; }
.flow-step__dot { background: var(--surface); border: 1px solid var(--border-strong); color: var(--accent-strong); box-shadow: var(--shadow-sm); }
.flow-step__dot svg { width: 20px; height: 20px; }
.flow-step--cloud .flow-step__dot { border-color: var(--accent); background: linear-gradient(140deg, rgba(245,128,31,0.18), rgba(245,128,31,0.04)); }
.flow-phase__dot { background: var(--accent); color: #fff; font-weight: 720; font-size: 1.1rem; box-shadow: 0 6px 18px rgba(245,128,31,0.35); }
.flow-phase__body h3 { font-size: 1.15rem; }
.flow-phase__body p { color: var(--muted); font-size: var(--fs-sm); margin-top: 2px; }
.flow-step__body { padding-top: 3px; }
.flow-step__body h4 { font-size: 1rem; margin-bottom: 3px; }
.flow-step__body p { color: var(--muted); font-size: var(--fs-sm); }
.flow-branch { position: relative; margin-top: var(--space-4); padding-left: 62px; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.flow-branch::before { content: ""; position: absolute; left: 17px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent-soft); border: 3px solid var(--bg); }
.flow-route { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: var(--space-4); box-shadow: var(--shadow-sm); }
.flow-route__ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--accent-strong); margin-bottom: 8px; }
.flow-route__ic svg { width: 18px; height: 18px; }
.flow-route h5 { font-size: 0.95rem; margin-bottom: 4px; }
.flow-route p { font-size: var(--fs-xs); color: var(--muted); }

/* Architecture layers */
.arch { max-width: 840px; margin-inline: auto; }
.arch-layer { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); padding: var(--space-5); box-shadow: var(--shadow-sm); }
.arch-layer--accent { border-color: var(--accent); background: linear-gradient(180deg, rgba(245,128,31,0.06), var(--surface)); }
.arch-layer--core { border-style: dashed; border-color: var(--border-strong); }
.arch-layer--ext { background: var(--surface-2); }
.arch-layer__head { display: flex; gap: var(--space-4); align-items: flex-start; }
.arch-layer__ic { width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--accent-strong); }
.arch-layer__ic svg { width: 20px; height: 20px; }
.arch-layer__head h3 { font-size: 1.05rem; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.arch-layer__head .tag { font-size: var(--fs-xs); font-weight: 500; color: var(--faint); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 1px 9px; }
.arch-layer__head p { color: var(--muted); font-size: var(--fs-sm); margin-top: 3px; }
.arch-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--space-4); padding-left: 56px; }
.arch-chip { font-size: var(--fs-xs); color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 5px 11px; }
.arch-chip b { color: var(--ink); font-weight: 650; }
.arch-chip code { font-size: 0.95em; }
.arch-link { position: relative; display: grid; place-items: center; height: 42px; }
.arch-link::before { content: ""; position: absolute; width: 2px; height: 100%; background: var(--border-strong); }
.arch-link--gated::before { background: repeating-linear-gradient(var(--accent) 0 5px, transparent 5px 10px); opacity: 0.5; }
.arch-link__label { position: relative; z-index: 1; font-size: var(--fs-xs); color: var(--faint); background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 3px 12px; }
.arch-layer--warm-bg .arch-link__label { background: var(--bg-warm); }
.arch-link--gated .arch-link__label { color: var(--accent-strong); border-color: var(--accent); }

/* Panels (internals + roadmap) */
.panel { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); padding: var(--space-6); box-shadow: var(--shadow-sm); }
.panel__head { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-5); padding-bottom: var(--space-4); border-bottom: 1px solid var(--border); }
.panel__ic { width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(140deg, rgba(245,128,31,0.16), rgba(245,128,31,0.05)); border: 1px solid rgba(245,128,31,0.2); color: var(--accent-strong); }
.panel__ic svg { width: 20px; height: 20px; }
.panel__head h3 { font-size: 1.15rem; }
.deflist dt { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-strong); font-weight: 600; }
.deflist dd { color: var(--muted); font-size: var(--fs-sm); margin: 2px 0 var(--space-4); }
.deflist dd:last-child { margin-bottom: 0; }
.road-list { display: grid; gap: var(--space-3); }
.road-list li { position: relative; padding-left: 22px; font-size: var(--fs-sm); color: var(--muted); }
.road-list li::before { content: ""; position: absolute; left: 3px; top: 7px; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
.road-list li b { color: var(--ink); font-weight: 600; }
.road-list--warn li::before { background: #f59e0b; }
.road-hedge { margin-top: var(--space-4); font-size: var(--fs-xs); color: var(--faint); font-style: italic; }

/* Mini flow (live demo) */
.demo-subhead { font-size: 1.3rem; text-align: center; margin-bottom: var(--space-6); }
.miniflow { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--space-3); }
.miniflow__step { position: relative; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: var(--space-4) var(--space-2); box-shadow: var(--shadow-sm); }
.miniflow__ic { width: 40px; height: 40px; margin: 0 auto var(--space-2); border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--accent-strong); }
.miniflow__ic svg { width: 20px; height: 20px; }
.miniflow__step b { display: block; font-size: 0.9rem; }
.miniflow__step span { font-size: var(--fs-xs); color: var(--muted); }
.miniflow__step:not(:last-child)::after { content: ""; position: absolute; right: -11px; top: 50%; width: 8px; height: 8px; border-top: 2px solid var(--faint); border-right: 2px solid var(--faint); transform: translateY(-50%) rotate(45deg); z-index: 2; }

/* Proud features */
.proud { display: flex; flex-direction: column; }
.proud__shot { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); overflow: hidden; padding: 0; cursor: zoom-in; margin-bottom: var(--space-4); box-shadow: var(--shadow-sm); transition: transform 0.3s var(--ease), box-shadow 0.3s, border-color 0.3s; }
.proud__shot:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.proud__media { display: block; width: 100%; aspect-ratio: 16 / 10; background: var(--surface-2); }
.proud__media img { width: 100%; height: 100%; object-fit: contain; display: block; }
.proud h4 { font-size: 1.1rem; margin-bottom: 6px; }
.proud p { color: var(--muted); font-size: var(--fs-sm); }

/* Edge cases */
.edge { border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--r-sm); background: var(--surface); padding: var(--space-5); box-shadow: var(--shadow-sm); }
.edge h4 { font-size: 0.98rem; margin-bottom: 6px; line-height: 1.35; }
.edge__tag { display: inline-block; font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent-strong); margin-right: 6px; }
.edge p { color: var(--muted); font-size: var(--fs-sm); }

/* Why local-first tile hover + equal heights */
.tile { transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s; }
.tile:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.why-grid { align-items: stretch; }
.why-grid .tile { height: 100%; }

/* Built With - tech grid */
.tech-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.tech { display: flex; gap: var(--space-4); align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--space-5); box-shadow: var(--shadow-sm); transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s; }
.tech:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.tech__ic { width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(140deg, rgba(245,128,31,0.16), rgba(245,128,31,0.05)); border: 1px solid rgba(245,128,31,0.2); color: var(--accent-strong); }
.tech__ic svg { width: 20px; height: 20px; }
.tech__cat { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); font-weight: 600; }
.tech__body h4 { font-size: 1rem; margin: 2px 0 5px; }
.tech__ver { font-size: var(--fs-xs); font-weight: 500; color: var(--accent-strong); background: rgba(245,128,31,0.1); border-radius: var(--r-pill); padding: 1px 8px; margin-left: 4px; }
.tech__body p { font-size: var(--fs-sm); color: var(--muted); }

/* OpenAI cost */
.cost-note { max-width: 820px; margin: var(--space-6) auto 0; padding: var(--space-4) var(--space-5); border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); font-size: var(--fs-sm); color: var(--muted); }
.cost-estimates { margin-top: var(--space-7); }
.cost-est { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.cost-est b { color: var(--accent-strong); }
.cost-est span { line-height: 1.45; }
.tick-list { display: grid; gap: var(--space-2); margin-top: var(--space-3); }
.tick-list li { position: relative; padding-left: 26px; font-size: var(--fs-sm); color: var(--ink-2); }
.tick-list li::before { content: ""; position: absolute; left: 5px; top: 5px; width: 11px; height: 6px; border-left: 2px solid #15803d; border-bottom: 2px solid #15803d; transform: rotate(-45deg); }
.tick-list--cloud li::before { border-color: var(--accent); }
.cost-col--free { border-top: 3px solid #15803d; }
.cost-col--paid { border-top: 3px solid var(--accent); }
:root[data-theme="dark"] .tick-list li::before { border-color: #4ade80; }
:root[data-theme="dark"] .tick-list--cloud li::before { border-color: var(--accent-soft); }

/* Local database */
.db-path { border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface); padding: var(--space-5); margin-bottom: var(--space-4); }
.db-path__label { display: block; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); margin-bottom: 6px; }
.db-path > code { font-family: var(--font-mono); font-size: 1.02rem; color: var(--ink); word-break: break-all; }
.db-path__sub { display: block; font-size: var(--fs-xs); color: var(--muted); margin-top: 8px; }
.db-tree { background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--r-sm); padding: var(--space-4); overflow-x: auto; font-family: var(--font-mono); font-size: 0.8rem; line-height: 1.75; color: var(--ink-2); }
.db-caption { font-size: var(--fs-sm); color: var(--muted); margin-top: var(--space-4); }
.db-kv { border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); }
.db-kv__row { display: flex; justify-content: space-between; gap: var(--space-4); align-items: center; flex-wrap: wrap; padding: 13px var(--space-5); border-bottom: 1px solid var(--border); }
.db-kv__row:last-child { border-bottom: 0; }
.db-kv__row span { font-size: var(--fs-sm); color: var(--ink-2); font-weight: 550; }
.db-kv__row code { font-size: var(--fs-xs); color: var(--accent-strong); background: var(--surface-2); }

/* Gallery hint + uniform marquee tiles */
.hint-zoom { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-strong); font-weight: 500; font-size: var(--fs-sm); }
.hint-zoom svg { width: 16px; height: 16px; }
.marquee__item { display: block; width: clamp(300px, 42vw, 460px); flex: 0 0 auto; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); overflow: hidden; box-shadow: var(--shadow-md); cursor: zoom-in; padding: 0; text-align: left; transition: transform 0.3s var(--ease), box-shadow 0.3s, border-color 0.3s; }
.marquee__item:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.marquee__media { display: block; width: 100%; aspect-ratio: 16 / 10; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.marquee__media img { width: 100%; height: 100%; object-fit: contain; display: block; }
.marquee__cap { display: block; padding: 12px 16px; font-size: var(--fs-xs); color: var(--muted); background: var(--surface); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: clamp(16px, 4vw, 56px); animation: lb-fade 0.2s var(--ease); }
.lightbox[hidden] { display: none; }
.lightbox__backdrop { position: absolute; inset: 0; background: rgba(8, 8, 12, 0.86); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lightbox__stage { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: var(--space-4); max-width: 100%; max-height: 100%; }
.lightbox__img { max-width: min(1200px, 92vw); max-height: 76vh; width: auto; height: auto; border-radius: var(--r-md); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); background: #0d0d10; cursor: zoom-in; object-fit: contain; transition: transform 0.25s var(--ease); }
.lightbox.is-zoomed .lightbox__img { transform: scale(1.6); cursor: zoom-out; }
.lightbox__cap { color: #e7e7ea; font-size: var(--fs-sm); text-align: center; max-width: 60ch; }
.lightbox__btn { position: absolute; z-index: 2; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.22); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: background 0.2s, transform 0.2s; }
.lightbox__btn:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox__btn svg { width: 22px; height: 22px; }
.lightbox__close { top: clamp(12px, 3vw, 28px); right: clamp(12px, 3vw, 28px); }
.lightbox__prev { left: clamp(8px, 2vw, 24px); top: 50%; transform: translateY(-50%); }
.lightbox__next { right: clamp(8px, 2vw, 24px); top: 50%; transform: translateY(-50%); }
.lightbox__prev:hover { transform: translateY(-50%) scale(1.08); }
.lightbox__next:hover { transform: translateY(-50%) scale(1.08); }
.lightbox__hud { position: absolute; z-index: 2; bottom: clamp(12px, 3vw, 26px); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: var(--space-4); }
.lightbox__count { color: #cfcfd6; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.lightbox__zoom { position: static; width: auto; height: auto; padding: 8px 14px; border-radius: var(--r-pill); gap: 8px; }
.lightbox__zoomlabel { font-size: var(--fs-sm); }
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lb-pop { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
.lightbox__img.is-entering { animation: lb-pop 0.25s var(--ease); }

/* ==========================================================================
   15. COMPARISON SECTION (How LifeOS Compares)
   ========================================================================== */
.cmp-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.ccard { display: flex; flex-direction: column; gap: var(--space-3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--space-5); box-shadow: var(--shadow-sm); transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s; }
.ccard:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.ccard.is-lifeos { border-color: var(--accent); background: linear-gradient(180deg, rgba(245,128,31,0.06), var(--surface)); }
.ccard__top { display: flex; align-items: center; gap: var(--space-3); }
.ccard__logo { width: 44px; height: 44px; flex-shrink: 0; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.ccard__logo img { width: 30px; height: 30px; object-fit: contain; display: block; }
.ccard.is-lifeos .ccard__logo { background: #fff; }
.ccard__name { font-size: 1.05rem; font-weight: 650; letter-spacing: -0.01em; }
.ccard__focus { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.07em; color: var(--faint); font-weight: 600; margin-top: 1px; }
.ccard__desc { font-size: var(--fs-sm); color: var(--muted); flex: 1; }
.ccard__link { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--accent-strong); }
.ccard__link svg { width: 15px; height: 15px; }
.ccard__link:hover { text-decoration: underline; text-underline-offset: 3px; }
.ccard.is-lifeos .ccard__link { color: var(--accent-strong); }

/* Comparison matrix */
.cmp-scroll { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--border); box-shadow: var(--shadow-sm); -webkit-overflow-scrolling: touch; }
.cmp { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); font-size: var(--fs-sm); min-width: 920px; }
.cmp th, .cmp td { padding: 13px 14px; border-bottom: 1px solid var(--border); text-align: center; vertical-align: middle; white-space: nowrap; }
.cmp thead th { position: sticky; top: 0; z-index: 3; background: var(--surface-2); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 650; }
.cmp thead th:first-child, .cmp tbody th { text-align: left; }
.cmp th.cmp-prod, .cmp td.cmp-prod { position: sticky; left: 0; z-index: 2; background: var(--surface); text-align: left; min-width: 180px; box-shadow: 1px 0 0 var(--border); }
.cmp thead th.cmp-prod { z-index: 4; background: var(--surface-2); }
.cmp tbody tr:last-child th, .cmp tbody tr:last-child td { border-bottom: 0; }
.cmp-prod__inner { display: flex; align-items: center; gap: 10px; }
.cmp-logo { width: 26px; height: 26px; flex-shrink: 0; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; overflow: hidden; }
.cmp-logo img { width: 18px; height: 18px; object-fit: contain; }
.cmp-prod__name { font-weight: 600; color: var(--ink); }
.cmp .y { color: #15803d; font-weight: 700; }
.cmp .n { color: var(--faint); }
.cmp .p { color: #d97706; font-weight: 600; font-size: var(--fs-xs); }
.cmp .cmp-txt { color: var(--muted); font-size: var(--fs-xs); white-space: normal; min-width: 120px; }
:root[data-theme="dark"] .cmp .y { color: #4ade80; }
:root[data-theme="dark"] .cmp .p { color: #fbbf24; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cmp .y { color: #4ade80; } :root:not([data-theme="light"]) .cmp .p { color: #fbbf24; } }
.cmp tr.is-lifeos-row td, .cmp tr.is-lifeos-row th { background: rgba(245,128,31,0.08); }
.cmp tr.is-lifeos-row th.cmp-prod { background: rgba(252,238,225,1); }
:root[data-theme="dark"] .cmp tr.is-lifeos-row th.cmp-prod { background: #241a12; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cmp tr.is-lifeos-row th.cmp-prod { background: #241a12; } }
.cmp tr.is-lifeos-row .cmp-prod__name { color: var(--accent-strong); }
.cmp-legend { display: flex; flex-wrap: wrap; gap: var(--space-4); justify-content: center; margin-top: var(--space-4); font-size: var(--fs-xs); color: var(--muted); }
.cmp-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cmp-note { text-align: center; font-size: var(--fs-xs); color: var(--faint); margin-top: var(--space-3); }

/* Why LifeOS exists */
.why-exists { max-width: 900px; margin: var(--space-9) auto 0; }
.why-exists .grid { margin-top: var(--space-6); }
.why-point { display: flex; gap: var(--space-4); align-items: flex-start; }
.why-point__ic { width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(140deg, rgba(245,128,31,0.16), rgba(245,128,31,0.05)); border: 1px solid rgba(245,128,31,0.2); color: var(--accent-strong); }
.why-point__ic svg { width: 19px; height: 19px; }
.why-point h4 { font-size: 1rem; margin-bottom: 3px; }
.why-point p { font-size: var(--fs-sm); color: var(--muted); }

@media (max-width: 940px) {
  .cmp-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .cmp-cards { grid-template-columns: 1fr; }
}

/* Responsive - showcase */
@media (max-width: 940px) {
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
  .miniflow { grid-template-columns: repeat(3, 1fr); }
  .arch-chips { padding-left: 0; }
}
@media (max-width: 760px) {
  .miniflow__step:not(:last-child)::after { display: none; }
}
@media (max-width: 600px) {
  .tech-grid { grid-template-columns: 1fr; }
  .miniflow { grid-template-columns: repeat(2, 1fr); }
  .flow-branch { grid-template-columns: 1fr; padding-left: 0; }
  .flow-branch::before { display: none; }
  .flow-step, .flow-phase { grid-template-columns: 40px 1fr; gap: var(--space-3); }
  .flow-step__dot, .flow-phase__dot { width: 40px; height: 40px; }
  .flow::before { left: 20px; }
  .db-kv__row { flex-direction: column; align-items: flex-start; gap: 3px; }
  .lightbox__zoomlabel { display: none; }
  .lightbox__btn { width: 42px; height: 42px; }
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: sticky; top: var(--nav-h); z-index: 99;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
  padding: var(--space-4) var(--space-5);
}
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: var(--space-3) 0; color: var(--ink-2); font-weight: 500; border-bottom: 1px solid var(--border); }
.mobile-menu a:last-of-type { border-bottom: 0; }
.mobile-menu .btn { margin-top: var(--space-4); }
