/* ============================================================
   HandyDude - ochandydude.dev (SPA rebuild)
   Design system: CSS custom properties, light/dark, glass cards.
   Fonts are self-hosted under assets/fonts (preloaded in HTML).
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/Inter.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("assets/fonts/SpaceGrotesk.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Space Grotesk", "Inter", "Segoe UI", system-ui, sans-serif;

  --bg: #f4f6fb;
  --bg-soft: #eef1f8;
  --elev: #ffffff;
  --surface: rgba(255, 255, 255, 0.66);
  --surface-solid: #ffffff;
  --text: #141829;
  --text-2: #3d4560;
  --muted: #68739a;
  --border: rgba(20, 24, 41, 0.09);
  --border-strong: rgba(20, 24, 41, 0.16);

  --primary: #6d28d9;
  --primary-soft: rgba(109, 40, 217, 0.10);
  --cyan: #0891b2;
  --grad: linear-gradient(120deg, #7c3aed 0%, #4f46e5 45%, #0ea5e9 100%);
  --grad-soft: linear-gradient(120deg, rgba(124,58,237,.14), rgba(14,165,233,.14));

  --shadow-sm: 0 1px 2px rgba(16, 20, 40, .06), 0 1px 6px rgba(16, 20, 40, .05);
  --shadow-md: 0 4px 14px rgba(16, 20, 40, .08), 0 12px 34px rgba(16, 20, 40, .07);
  --shadow-lg: 0 10px 26px rgba(16, 20, 40, .12), 0 24px 60px rgba(16, 20, 40, .10);
  --glow: 0 0 0 1px rgba(124, 58, 237, .18), 0 14px 44px rgba(124, 58, 237, .18);

  --radius-s: 12px;
  --radius-m: 18px;
  --radius-l: 26px;

  --header-h: 66px;
  --max-w: 1140px;

  /* per-app accent - set inline on routed views, falls back to primary */
  --accent: #6d28d9;
  --accent-rgb: 109, 40, 217;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07080f;
  --bg-soft: #0b0d18;
  --elev: #12141f;
  --surface: rgba(19, 22, 36, 0.62);
  --surface-solid: #141728;
  --text: #eef0fa;
  --text-2: #b9c0d8;
  --muted: #8791b3;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.17);

  --primary: #a78bfa;
  --primary-soft: rgba(167, 139, 250, 0.14);
  --cyan: #22d3ee;
  --grad: linear-gradient(120deg, #a78bfa 0%, #818cf8 45%, #38bdf8 100%);
  --grad-soft: linear-gradient(120deg, rgba(167,139,250,.16), rgba(56,189,248,.14));

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35), 0 1px 6px rgba(0, 0, 0, .3);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, .4), 0 12px 34px rgba(0, 0, 0, .35);
  --shadow-lg: 0 10px 26px rgba(0, 0, 0, .5), 0 24px 60px rgba(0, 0, 0, .45);
  --glow: 0 0 0 1px rgba(167, 139, 250, .22), 0 14px 48px rgba(124, 58, 237, .30);

  --accent: #a78bfa;
  --accent-rgb: 167, 139, 250;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 14px); overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.14; letter-spacing: -0.02em; margin: 0; }
p { margin: 0 0 1em; }
button { font-family: inherit; }
::selection { background: rgba(124, 58, 237, .28); }

/* ---------- Accessibility helpers ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: -60px; left: 14px; z-index: 200;
  background: var(--elev); color: var(--text); font-weight: 700; font-size: 14px;
  padding: 10px 18px; border-radius: 12px; border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-md); transition: top .18s;
}
.skip-link:focus-visible { top: 12px; text-decoration: none; }
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}
main:focus, [tabindex="-1"]:focus { outline: none; }
h1:focus-visible, h2:focus-visible { outline: none; }

/* subtle page load fade */
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.page-in { animation: pageIn .45s cubic-bezier(.2,.7,.2,1) both; }

/* route swap fade (used when View Transitions API is absent) */
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.view-enter { animation: viewIn .32s cubic-bezier(.2,.7,.2,1) both; }

/* View Transitions - subtle crossfade, progressive enhancement */
::view-transition-old(root) { animation-duration: .18s; }
::view-transition-new(root) { animation-duration: .28s; }

/* aurora background wash */
.bg-aurora {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(52% 38% at 12% -4%, rgba(124, 58, 237, .12), transparent 70%),
    radial-gradient(46% 34% at 92% 8%, rgba(14, 165, 233, .10), transparent 70%),
    radial-gradient(40% 30% at 50% 110%, rgba(236, 72, 153, .07), transparent 70%);
}
[data-theme="dark"] .bg-aurora {
  background:
    radial-gradient(52% 38% at 12% -4%, rgba(124, 58, 237, .20), transparent 70%),
    radial-gradient(46% 34% at 92% 8%, rgba(56, 189, 248, .13), transparent 70%),
    radial-gradient(40% 30% at 50% 110%, rgba(217, 70, 239, .10), transparent 70%);
}

.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 22px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  display: flex; align-items: center;
  background: var(--surface);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { width: 100%; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; font-size: 19px; color: var(--text); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand-orb {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background:
    radial-gradient(38% 32% at 32% 28%, rgba(255,255,255,.95), transparent 55%),
    conic-gradient(from 210deg, #7c3aed, #4f46e5, #0ea5e9, #d946ef, #7c3aed);
  box-shadow: 0 0 14px rgba(124, 58, 237, .55), inset 0 -4px 8px rgba(0,0,0,.28);
}
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--text-2); font-weight: 600; font-size: 14.5px;
  padding: 10px 14px; border-radius: 999px; transition: background .18s, color .18s;
}
.nav a:hover { color: var(--text); background: var(--primary-soft); text-decoration: none; }
.nav a.active { color: var(--primary); background: var(--primary-soft); }

.theme-toggle {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--elev); color: var(--text-2); cursor: pointer;
  display: grid; place-items: center; margin-left: 6px;
  transition: transform .18s, box-shadow .18s, color .18s;
}
.theme-toggle:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); color: var(--primary); }
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(90px, 16vh, 160px) 0 clamp(60px, 10vh, 110px);
  overflow: hidden;
  isolation: isolate;
}
.hero-fluid {
  position: absolute; inset: 0; z-index: -2;
  background: radial-gradient(58% 75% at 30% 42%, rgba(124,58,237,.30), transparent 70%),
              radial-gradient(45% 60% at 72% 60%, rgba(14,165,233,.22), transparent 70%),
              var(--bg);
}
.hero-fluid canvas { width: 100%; height: 100%; display: block; }
.hero-scrim {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(62% 58% at 32% 46%, var(--scrim-core, rgba(244,246,251,.64)), transparent 72%),
    linear-gradient(180deg, transparent 62%, var(--bg) 100%);
}
[data-theme="dark"] .hero-scrim {
  --scrim-core: rgba(7,8,15,.52);
}
.hero .wrap { position: relative; max-width: 780px; margin: 0 auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: .10em; text-transform: uppercase;
  color: var(--primary); background: var(--primary-soft);
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--grad); animation: pulse 2.6s infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: .55; } }
.hero h1 {
  font-size: clamp(40px, 6.4vw, 72px); font-weight: 800; margin: 20px 0 18px;
  text-shadow: 0 1px 22px var(--scrim-core, rgba(244,246,251,.5));
}
.hero h1 .grad-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { font-size: clamp(16px, 1.8vw, 19px); color: var(--text-2); max-width: 54ch; margin: 0 auto 28px; }
.hero-cta { display: flex; gap: 13px; flex-wrap: wrap; align-items: center; justify-content: center; }
.hero-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 30px; justify-content: center; }
.stat-pill {
  font-size: 13.5px; color: var(--muted); font-weight: 600;
  border: 1px solid var(--border); background: var(--surface);
  padding: 7px 14px; border-radius: 999px;
}
.stat-pill b { color: var(--text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 15px; padding: 13px 24px;
  border-radius: 14px; border: 1px solid transparent; cursor: pointer;
  transition: transform .18s, box-shadow .18s, background .18s, opacity .18s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 26px rgba(99, 60, 230, .38); }
.btn-primary:hover { box-shadow: 0 12px 34px rgba(99, 60, 230, .48); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { box-shadow: var(--shadow-md); }
.btn-lg { padding: 15px 30px; font-size: 16px; border-radius: 16px; }
.btn-disabled, .btn[disabled] { opacity: .55; cursor: not-allowed; box-shadow: none; background: var(--bg-soft); color: var(--muted); border-color: var(--border); }
.btn-disabled:hover { transform: none; box-shadow: none; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- Hero visual tile (per-app) ---------- */
.hero-visual {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-m);
  overflow: hidden; border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  align-self: center; width: 100%; max-width: 340px; justify-self: center;
  min-height: clamp(170px, 26vw, 230px);
  background: var(--bg-soft);
}
.hero-visual > canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-visual.orb-tile {
  display: grid; place-items: center;
  /* frameless: the orb floats on the card, glow spills onto it */
  aspect-ratio: 1; overflow: visible; border: none; box-shadow: none;
  background:
    radial-gradient(60% 60% at 50% 46%, rgba(124,58,237,.16), transparent 76%),
    radial-gradient(34% 34% at 60% 58%, rgba(14,165,233,.08), transparent 74%);
}
.hero-visual.orb-tile .orb {
  /* square anchor sized from tile HEIGHT - the sphere + halo always fit */
  position: relative; height: 84%; aspect-ratio: 1; border-radius: 50%;
  overflow: visible; isolation: isolate;
  /* soft-edged fallback if the canvas cannot render (fades to transparent,
     no hard circle) */
  background:
    radial-gradient(circle at 46% 42%, #6d46c8 0%, #3a2088 40%, rgba(18,9,50,.85) 56%, transparent 72%);
  box-shadow:
    0 0 58px rgba(124, 58, 237, .38),
    0 0 150px rgba(14, 165, 233, .22);
}
.hero-visual.orb-tile .orb canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  filter: saturate(1.25) contrast(1.06);
}

/* ---------- Sections ---------- */
.section { padding: clamp(44px, 7vh, 84px) 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; margin-bottom: 12px; }
.section-head p { color: var(--text-2); font-size: 16.5px; margin: 0; }

/* ---------- Chips / filters ---------- */
.chips { display: flex; gap: 9px; flex-wrap: wrap; justify-content: center; margin-bottom: 34px; }
.chip {
  font-size: 14px; font-weight: 650; color: var(--text-2);
  border: 1px solid var(--border-strong); background: var(--surface);
  padding: 10px 18px; border-radius: 999px; cursor: pointer;
  transition: all .18s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.chip.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 18px rgba(99,60,230,.35); }

/* ---------- App cards ---------- */
.apps-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.app-card {
  position: relative; display: flex; flex-direction: column; gap: 13px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-m); padding: 22px;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  transition: transform .22s cubic-bezier(.2,.7,.2,1), box-shadow .22s, border-color .22s;
  color: var(--text); overflow: hidden;
  transform-style: preserve-3d; will-change: transform;
}
.app-card::before { /* top edge sheen */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent);
  opacity: .5;
}
.app-card:hover { transform: translateY(-5px); box-shadow: var(--glow), var(--shadow-lg); border-color: var(--border-strong); text-decoration: none; }
.app-card .tilt-glow {
  position: absolute; inset: 0; opacity: 0; transition: opacity .25s; pointer-events: none;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(139,92,246,.14), transparent 65%);
}
.app-card:hover .tilt-glow { opacity: 1; }
.app-top { display: flex; align-items: flex-start; gap: 15px; }
.app-icon {
  width: 58px; height: 58px; border-radius: 16px; flex: none; object-fit: cover;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.app-title { font-family: var(--font-display); font-weight: 700; font-size: 17.5px; line-height: 1.25; letter-spacing: -0.01em; }
.app-cat { font-size: 12.5px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .07em; margin-top: 3px; }
.app-tagline { color: var(--text-2); font-size: 14.5px; margin: 0; flex: 1; }
.app-foot { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); font-weight: 600; }
.app-foot .go { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-weight: 700; }
.app-card:hover .go svg { transform: translateX(3px); }
.go svg { width: 15px; height: 15px; transition: transform .2s; }
.badge-soon {
  font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: #92400e; background: #fef3c7; border: 1px solid #fde68a;
  padding: 4px 10px; border-radius: 999px;
}
[data-theme="dark"] .badge-soon { color: #fcd34d; background: rgba(251, 191, 36, .12); border-color: rgba(251, 191, 36, .3); }
.app-card.soon { opacity: .82; }
.app-card.soon:hover { transform: translateY(-3px); }
.apps-grid .app-card.hide { display: none; }

/* ---------- Feature strip ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.feat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m);
  padding: 26px 24px; box-shadow: var(--shadow-sm);
}
.feat .ficon {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: var(--grad-soft); color: var(--primary); margin-bottom: 15px;
}
.feat .ficon svg { width: 22px; height: 22px; }
.feat h3 { font-size: 17px; margin-bottom: 7px; }
.feat p { color: var(--text-2); font-size: 14.5px; margin: 0; }

/* ---------- App detail view ---------- */
.app-view { max-width: var(--max-w); margin: 0 auto; padding: 0 22px; }
.crumb { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; font-size: 14px; margin: 30px 0 26px; }
.crumb:hover { color: var(--primary); text-decoration: none; }
.crumb svg { width: 15px; height: 15px; }
.app-hero {
  display: grid; grid-template-columns: auto 1fr minmax(240px, 300px); gap: 26px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l);
  padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow-md);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  position: relative; overflow: hidden;
}
.app-hero::before {
  content: ""; position: absolute; inset: -40% -20% auto; height: 130%;
  background: radial-gradient(45% 70% at 78% 30%, rgba(var(--accent-rgb), .16), transparent 70%);
  pointer-events: none;
}
.app-hero .app-icon-big {
  width: 108px; height: 108px; border-radius: 26px; object-fit: cover;
  box-shadow: var(--shadow-md); border: 1px solid var(--border); position: relative;
}
.app-hero h1 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; margin-bottom: 8px; }
.app-hero .tagline { color: var(--text-2); font-size: 16.5px; margin-bottom: 16px; max-width: 52ch; }
.meta-row { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 20px; }
.meta-chip {
  font-size: 12.5px; font-weight: 700; color: var(--text-2);
  border: 1px solid var(--border); background: var(--elev);
  padding: 5px 12px; border-radius: 999px;
}
.meta-chip.cat { color: var(--accent); background: rgba(var(--accent-rgb), .12); border-color: transparent; }
.prose { max-width: 68ch; margin: 34px auto 0; }
.prose h2 { font-size: 23px; margin-bottom: 12px; }
.prose p { color: var(--text-2); font-size: 16px; }
.feat-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 11px; }
.feat-list li { display: flex; gap: 11px; align-items: flex-start; color: var(--text-2); font-size: 15.5px; }
.feat-list li svg { width: 19px; height: 19px; color: var(--accent); flex: none; margin-top: 2px; }
.notice {
  border: 1px solid rgba(251, 191, 36, .45); background: rgba(251, 191, 36, .10);
  color: var(--text-2); border-radius: var(--radius-m); padding: 18px 22px; font-size: 15px;
  display: flex; gap: 13px; align-items: flex-start; margin-top: 22px;
}
.notice svg { width: 21px; height: 21px; color: #d97706; flex: none; margin-top: 1px; }

/* more-apps strip */
.more-apps { margin-top: 54px; }
.more-apps h2 { font-size: 21px; margin-bottom: 20px; }
.more-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.mini-card {
  display: flex; align-items: center; gap: 13px; padding: 15px 17px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-s);
  color: var(--text); transition: transform .18s, box-shadow .18s;
}
.mini-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); text-decoration: none; }
.mini-card img { width: 42px; height: 42px; border-radius: 11px; }
.mini-card .t { font-weight: 700; font-size: 14.5px; font-family: var(--font-display); }
.mini-card .c { font-size: 12px; color: var(--muted); font-weight: 600; }

/* ---------- Legal / privacy page ---------- */
.legal-card {
  max-width: 820px; margin: 40px auto 60px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-m); padding: clamp(24px, 4.5vw, 44px);
  box-shadow: var(--shadow-md);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.legal-card h1 { font-size: clamp(24px, 3vw, 30px); margin-bottom: 6px; }
.legal-card .subtitle { color: var(--muted); font-size: 14px; border-bottom: 1px solid var(--border); padding-bottom: 16px; margin-bottom: 22px; }
.legal-card h2 { font-size: 19px; margin: 26px 0 10px; }
.legal-card h3 { font-size: 16px; margin: 20px 0 8px; }
.legal-card p { color: var(--text-2); font-size: 15px; margin-bottom: 13px; }
.legal-card ul { margin: 0 0 15px 22px; color: var(--text-2); font-size: 15px; }
.legal-card li { margin-bottom: 7px; }
.legal-card code { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; font-size: 13px; }
.legal-badge {
  display: inline-block; background: var(--primary-soft); color: var(--primary);
  padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; margin-bottom: 14px;
}
.legal-foot { margin-top: 32px; border-top: 1px solid var(--border); padding-top: 18px; color: var(--muted); font-size: 13px; text-align: center; }

/* ---------- 404 ---------- */
.nf { text-align: center; padding: clamp(70px, 14vh, 140px) 0; }
.nf .code { font-family: var(--font-display); font-size: clamp(80px, 16vw, 150px); font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.nf h1 { font-size: 26px; }
.nf p { color: var(--text-2); font-size: 17px; margin: 14px 0 30px; }

/* empty-state + misc utilities */
.apps-empty { text-align: center; color: var(--muted); }
.footer-bottom.flat { border-top: 0; }

/* boot splash while catalog.json loads (replaced by router instantly) */
.boot {
  padding: clamp(90px, 18vh, 180px) 0; text-align: center; color: var(--muted);
}
.boot .brand-orb { width: 42px; height: 42px; margin: 0 auto 18px; animation: pulse 2.2s infinite; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; background: var(--bg-soft); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 34px; padding: 46px 0 34px; }
.footer-grid h4 { font-family: var(--font-display); font-size: 14px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 0 0 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-grid ul a { color: var(--text-2); font-size: 14.5px; }
.footer-grid ul a:hover { color: var(--primary); }
.footer-brand p { color: var(--text-2); font-size: 14.5px; max-width: 34ch; margin-top: 12px; }
.footer-bottom {
  border-top: 1px solid var(--border); padding: 18px 0 26px;
  display: flex; gap: 16px; flex-wrap: wrap; align-items: center;
  color: var(--muted); font-size: 13.5px;
}
.footer-bottom .spacer { margin-left: auto; }
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--primary); }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s cubic-bezier(.2,.7,.2,1), transform .6s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .07s; } .reveal-d2 { transition-delay: .14s; } .reveal-d3 { transition-delay: .21s; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-cta, .hero-stats { justify-content: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .app-hero { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .app-hero .hero-visual { order: -1; margin-bottom: 4px; }
  .meta-row { justify-content: center; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .nav a { padding: 8px 10px; font-size: 14px; }
  .apps-grid { grid-template-columns: 1fr; }
  .btn-lg { width: 100%; justify-content: center; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; animation-iteration-count: 1 !important; }
  .reveal { opacity: 1; transform: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
}
