/* ═══════════════════════════════════════════════════════════
   GRITWERK — Production CSS
   Dark mode, vibrant accents, OKLCH tokens, self-hosted fonts
   ═══════════════════════════════════════════════════════════ */

/* ── FONTS ── */
@font-face {
  font-family: 'Inter';
  src: url('/static/fonts/InterVariable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/static/fonts/JetBrainsMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/static/fonts/JetBrainsMono-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/static/fonts/JetBrainsMono-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

/* ── TOKENS ── */
:root {
  /* Surfaces — rich dark, not dead black */
  --bg:           oklch(0.12 0.03 270);
  --bg-card:      oklch(0.16 0.03 270);
  --bg-card-h:    oklch(0.19 0.035 270);

  /* Brand — VIBRANT, smooth hue progression: 175 → 270 → 330 */
  --cyan:         oklch(0.88 0.19 175);
  --purple:       oklch(0.72 0.24 290);
  --pink:         oklch(0.76 0.22 340);

  /* Accents — saturated */
  --blue:         oklch(0.72 0.20 260);
  --amber:        oklch(0.88 0.18 85);
  --green:        oklch(0.85 0.20 155);
  --red:          oklch(0.72 0.24 25);

  /* Text — brighter across the board */
  --text:         oklch(0.97 0.01 270);
  --text-mid:     oklch(0.82 0.03 270);
  --text-dim:     oklch(0.55 0.03 270);

  /* Borders */
  --border:       oklch(0.25 0.02 270 / 0.5);
  --border-h:     oklch(0.35 0.02 270 / 0.5);

  /* Typography */
  --font-sans:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* Fluid type scale */
  --text-xs:      clamp(0.7rem, 0.65rem + 0.25vw, 0.8rem);
  --text-sm:      clamp(0.8rem, 0.75rem + 0.25vw, 0.9rem);
  --text-base:    clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
  --text-lg:      clamp(1rem, 0.9rem + 0.5vw, 1.2rem);
  --text-xl:      clamp(1.2rem, 1rem + 0.8vw, 1.6rem);
  --text-2xl:     clamp(1.6rem, 1.3rem + 1.5vw, 2.5rem);
  --text-3xl:     clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
  --text-hero:    clamp(2.8rem, 2rem + 4vw, 6rem);

  /* Motion */
  --ease:         cubic-bezier(0.4, 0, 0.2, 1);
  --spring:       cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast:     120ms;
  --dur-base:     200ms;
  --dur-slow:     400ms;

  /* Layout */
  --nav-h:        60px;
  --radius:       12px;
  --radius-sm:    8px;
  --radius-pill:  9999px;
  --max-w:        1200px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

/* ── SCANLINE OVERLAY ── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    oklch(0 0 0 / 0.03) 2px, oklch(0 0 0 / 0.03) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--text-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan); }

/* ── UTILITIES ── */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

/* ── SCROLL ANIMATIONS (CSS only) ── */
@keyframes rise {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}
@supports (animation-timeline: view()) {
  .reveal {
    animation: rise linear both;
    animation-timeline: view();
    animation-range: entry 5% cover 25%;
  }
}
@supports not (animation-timeline: view()) {
  .reveal { opacity: 1; }
}

/* ── PARTICLE CANVAS ── */
#particles {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* ── AMBIENT MESH ORBS ── */
.mesh, .ambient {
  position: absolute; border-radius: 50%;
  pointer-events: none;
  filter: blur(90px);
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(60px, -50px); }
  50% { transform: translate(-40px, 70px); }
  75% { transform: translate(50px, 30px); }
}

/* Hero meshes */
.mesh-1 {
  width: 1400px; height: 1400px;
  background: radial-gradient(circle, oklch(0.55 0.18 175 / 0.35) 0%, oklch(0.50 0.14 195 / 0.1) 35%, transparent 60%);
  top: -400px; left: -350px;
  animation: drift 30s ease-in-out infinite;
}
.mesh-2 {
  width: 1200px; height: 1200px;
  background: radial-gradient(circle, oklch(0.50 0.22 290 / 0.3) 0%, oklch(0.45 0.16 270 / 0.08) 35%, transparent 60%);
  bottom: -350px; right: -300px;
  animation: drift 25s ease-in-out infinite reverse;
}
.mesh-3 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, oklch(0.55 0.22 340 / 0.2) 0%, oklch(0.50 0.16 320 / 0.05) 40%, transparent 60%);
  top: 25%; right: -150px;
  animation: drift 22s ease-in-out infinite;
  animation-delay: -5s;
}
.mesh-4 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, oklch(0.55 0.16 200 / 0.18) 0%, oklch(0.50 0.12 220 / 0.04) 40%, transparent 60%);
  bottom: 15%; left: 15%;
  animation: drift 18s ease-in-out infinite;
  animation-delay: -12s;
}

/* ═══════════════════════════
   NAV
   ═══════════════════════════ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  background: rgba(16, 16, 32, 0.6);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}
.nav-logo {
  font-family: var(--font-mono);
  font-weight: 700; font-size: 1.05rem;
  letter-spacing: 0.1em;
  color: var(--cyan);
  text-shadow: 0 0 15px oklch(0.88 0.19 175 / 0.5);
  text-decoration: none;
}
.nav-logo span { color: var(--text-mid); font-weight: 300; }

.nav-links {
  display: flex; align-items: center;
  gap: 2rem; list-style: none;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: var(--text-xs); font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-mid);
  text-decoration: none;
  position: relative;
  transition: color var(--dur-base);
}
.nav-links a::after {
  content: ''; position: absolute;
  bottom: -3px; left: 0; right: 0; height: 1px;
  background: var(--cyan);
  transform: scaleX(0); transition: transform var(--dur-base) var(--ease);
}
.nav-links a:hover { color: var(--cyan); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-cta {
  font-family: var(--font-mono) !important;
  font-size: var(--text-xs) !important;
  background: var(--cyan) !important;
  color: var(--bg) !important;
  padding: 0.45rem 1.1rem;
  border-radius: 6px;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  transition: box-shadow var(--dur-base), transform var(--dur-base) var(--spring) !important;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover {
  box-shadow: 0 0 20px oklch(0.88 0.19 175 / 0.4), 0 0 60px oklch(0.88 0.19 175 / 0.1) !important;
  transform: translateY(-1px) !important;
  color: var(--bg) !important;
}

/* ═══════════════════════════
   HERO
   ═══════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: calc(var(--nav-h) + 3rem) 1.5rem 5rem;
  text-align: center;
  overflow: hidden;
}

.hero-content {
  position: relative; z-index: 1;
  max-width: 820px;
}

/* Glitch title */
.hero-title {
  font-family: var(--font-mono);
  font-size: var(--text-hero);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  position: relative;
}
.hero-title .grit {
  background: linear-gradient(135deg, #fff 0%, oklch(0.85 0.02 270) 50%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title::before, .hero-title::after {
  content: 'GRITWERK';
  position: absolute; top: 0; left: 0; right: 0;
  font-family: var(--font-mono); font-size: inherit;
  font-weight: 800; line-height: 0.95; letter-spacing: -0.03em;
  pointer-events: none; opacity: 0;
}
.hero-title::before {
  -webkit-text-fill-color: var(--cyan);
  transform: translateX(-3px);
  animation: glitch-a 8s step-end infinite;
}
.hero-title::after {
  -webkit-text-fill-color: var(--purple);
  transform: translateX(3px);
  animation: glitch-b 8s step-end infinite;
}
@keyframes glitch-a {
  0%,92%,100% { opacity: 0; clip-path: none; }
  93% { opacity: 0.7; clip-path: inset(20% 0 60% 0); transform: translateX(-4px); }
  94% { opacity: 0; }
  95% { opacity: 0.5; clip-path: inset(65% 0 10% 0); transform: translateX(-2px); }
  96% { opacity: 0; }
}
@keyframes glitch-b {
  0%,92%,100% { opacity: 0; clip-path: none; }
  93% { opacity: 0.6; clip-path: inset(55% 0 20% 0); transform: translateX(4px); }
  94% { opacity: 0; }
  95% { opacity: 0.4; clip-path: inset(10% 0 70% 0); transform: translateX(3px); }
  96% { opacity: 0; }
}

/* Typing */
.hero-typing {
  font-size: var(--text-xl);
  color: var(--text-mid);
  margin-bottom: 2.5rem;
  min-height: 2em;
  line-height: 1.5;
}
.hero-typing .cursor {
  display: inline-block;
  width: 2px; height: 1.2em;
  background: var(--cyan);
  margin-left: 2px;
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}
@keyframes blink { 50% { opacity: 0; } }

/* Hero CTAs */
.hero-cta {
  display: flex; gap: 0.75rem;
  justify-content: center; flex-wrap: wrap;
  margin-bottom: 3rem;
}
.cta-main {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: var(--cyan); color: var(--bg);
  padding: 0.8rem 2rem; border-radius: 10px;
  font-size: var(--text-base); font-weight: 700;
  text-decoration: none; border: none; cursor: pointer;
  min-height: 48px;
  transition: transform 0.25s var(--spring), box-shadow 0.25s;
}
.cta-main:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 0 20px oklch(0.88 0.19 175 / 0.4), 0 0 60px oklch(0.88 0.19 175 / 0.1);
}
.cta-main svg { width: 18px; height: 18px; }

.cta-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: 1px solid rgba(255,255,255,0.14);
  border-top-color: rgba(255,255,255,0.22);
  border-bottom-color: rgba(255,255,255,0.05);
  color: var(--text-mid);
  background: rgba(18, 18, 36, 0.4);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  padding: 0.8rem 1.75rem; border-radius: 10px;
  font-size: var(--text-base); font-weight: 500;
  text-decoration: none; min-height: 48px;
  transition: all var(--dur-base);
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.06);
}
.cta-secondary:hover {
  border-color: var(--cyan);
  color: var(--text);
  background: oklch(0.88 0.19 175 / 0.08);
  transform: translateY(-2px);
}

/* Trust bar */
.trust-bar {
  display: flex; align-items: center; justify-content: center;
  gap: 0.6rem; flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}
.trust-item {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(18, 18, 36, 0.35);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border: 1px solid rgba(255,255,255,0.12);
  border-top-color: rgba(255,255,255,0.20);
  border-bottom-color: rgba(255,255,255,0.04);
  border-radius: var(--radius-pill);
  padding: 0.4rem 0.9rem;
  color: oklch(0.88 0.02 270);
  transition: border-color var(--dur-base), background var(--dur-base);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 2px 8px rgba(0,0,0,0.2);
}
.trust-item:hover {
  border-color: rgba(0,230,200,0.3);
  background: rgba(0,230,200,0.06);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.1),
    0 4px 16px rgba(0,0,0,0.3),
    0 0 12px rgba(0,230,200,0.08);
}
.trust-val {
  color: var(--cyan);
  font-weight: 800;
  text-shadow: 0 0 12px oklch(0.88 0.19 175 / 0.4);
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px oklch(0.85 0.20 155 / 0.8), 0 0 30px oklch(0.85 0.20 155 / 0.3);
  display: inline-block; margin-right: 4px;
  animation: pulse-dot 2.5s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 12px oklch(0.85 0.20 155 / 0.8), 0 0 30px oklch(0.85 0.20 155 / 0.3); }
  50% { opacity: 0.6; box-shadow: 0 0 25px oklch(0.85 0.20 155 / 0.4); }
}

/* ═══════════════════════════
   SECTIONS — shared
   ═══════════════════════════ */
section {
  padding: clamp(4rem, 10vw, 8rem) 0;
  position: relative;
  overflow: hidden;
}
section > .wrap { position: relative; z-index: 1; }

.sec-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs); font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--cyan);
  text-shadow: 0 0 20px oklch(0.88 0.19 175 / 0.3);
  margin-bottom: 1rem;
}
.sec-title {
  font-size: var(--text-3xl);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 1.5rem;
  text-wrap: balance;
  color: #fff;
}
.sec-title .dim { color: oklch(0.75 0.04 270); }
.sec-sub {
  font-size: var(--text-lg);
  color: oklch(0.82 0.02 270);
  max-width: 540px; line-height: 1.7;
  margin-bottom: 3rem;
}

/* ═══════════════════════════
   PILLS / BADGES
   ═══════════════════════════ */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: var(--text-xs); font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1.25rem;
}
.pill .indicator {
  width: 5px; height: 5px; border-radius: 50%;
  background: currentColor;
}

.pill-live {
  /* UI chrome: no backdrop-filter, just tinted surface */
  background: rgba(60, 239, 176, 0.1);
  color: var(--green);
  border: 1px solid rgba(60, 239, 176, 0.25);
  box-shadow: 0 0 16px rgba(60, 239, 176, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.pill-live .indicator {
  animation: pulse-dot 2s ease-in-out infinite;
  box-shadow: 0 0 8px currentColor;
}
.pill-review {
  background: rgba(255, 207, 64, 0.1);
  color: var(--amber);
  border: 1px solid rgba(255, 207, 64, 0.25);
  box-shadow: 0 0 12px rgba(255, 207, 64, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.pill-soon {
  background: rgba(91, 140, 255, 0.08);
  color: var(--blue);
  border: 1px solid rgba(91, 140, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* ═══════════════════════════
   APP CARDS (Bento)
   ═══════════════════════════ */
/* Apps section — single panel, no grid needed */

/* Noise texture data URI — used by all glass elements */
.glass-noise {
  --noise-svg: url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' seed='42' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.app-card {
  position: relative;
  /* Apple glass: saturate(180%) BEFORE blur — keeps colors vivid */
  background: rgba(18, 18, 36, 0.5);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  /* Lit glass rim: bright top-left, dim bottom-right */
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top-color: rgba(255, 255, 255, 0.22);
  border-left-color: rgba(255, 255, 255, 0.17);
  border-bottom-color: rgba(255, 255, 255, 0.05);
  border-right-color: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  contain: layout style;
  transition: border-color 0.3s, transform 0.4s var(--spring), box-shadow 0.4s, background 0.3s;
  /* Apple three-layer shadows: outer depth + inner highlight + inner bottom shadow */
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}
.app-card:hover {
  background: rgba(14, 14, 26, 0.55);
  border-color: rgba(255, 255, 255, 0.18);
  border-top-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-4px);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.5),
    0 4px 16px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

/* Noise grain overlay — makes glass feel physical */
.app-card::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  opacity: 0.04;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' seed='42' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 182px;
}

/* Specular highlight — top edge light catch */
.app-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.2) 20%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(255, 255, 255, 0.2) 80%,
    transparent 100%
  );
  border-radius: 16px 16px 0 0;
  pointer-events: none;
  z-index: 2;
}

/* Neon glow top bar + shimmer animation */
@keyframes shimmer {
  0% { transform: translateX(-100%) skewX(-15deg); }
  100% { transform: translateX(200%) skewX(-15deg); }
}

.app-hero {
  grid-column: span 7; min-height: 300px;
  border-top: 2px solid rgba(0,230,200,0.6);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.1),
    inset 0 -1px 0 rgba(0,0,0,0.15),
    0 -4px 20px rgba(0,230,200,0.15),
    inset 0 2px 12px rgba(0,230,200,0.06);
}
/* Hover shimmer — light sweeps across card surface */
.app-hero .app-desc::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0,230,200,0.04), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.app-hero:hover .app-desc::after {
  opacity: 1;
  animation: shimmer 1.5s ease-in-out;
}

.app-half {
  grid-column: span 6;
  border-top: 2px solid rgba(160,100,255,0.6);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.1),
    inset 0 -1px 0 rgba(0,0,0,0.15),
    0 -4px 20px rgba(160,100,255,0.12),
    inset 0 2px 12px rgba(160,100,255,0.05);
}
.app-half:nth-child(3) {
  border-top-color: rgba(240,100,170,0.6);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.1),
    inset 0 -1px 0 rgba(0,0,0,0.15),
    0 -4px 20px rgba(240,100,170,0.12),
    inset 0 2px 12px rgba(240,100,170,0.05);
}

/* Hover glow intensifies per card color */
.app-hero:hover {
  border-top-color: rgba(0,230,200,0.8);
  box-shadow:
    0 16px 48px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.14),
    0 -6px 30px rgba(0,230,200,0.2),
    inset 0 3px 20px rgba(0,230,200,0.08);
}
.app-half:hover {
  border-top-color: rgba(160,100,255,0.8);
  box-shadow:
    0 16px 48px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.14),
    0 -6px 30px rgba(160,100,255,0.18),
    inset 0 3px 20px rgba(160,100,255,0.07);
}
.app-half:nth-child(3):hover {
  border-top-color: rgba(240,100,170,0.8);
  box-shadow:
    0 16px 48px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.14),
    0 -6px 30px rgba(240,100,170,0.18),
    inset 0 3px 20px rgba(240,100,170,0.07);
}

.app-full { grid-column: span 12; }

/* ── Consolidated app rows inside one panel ── */
.app-row {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem 0;
  position: relative;
  z-index: 3;
}
.app-row-featured { padding: 2rem 0; }
.app-row-featured h3 { font-size: var(--text-2xl); }
.app-row .app-text { flex: 1; min-width: 0; }

.app-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1) 20%, rgba(255,255,255,0.1) 80%, transparent);
}

/* ── Pipeline panel ── */
.pipeline-panel { padding: clamp(1.5rem, 3vw, 2rem) !important; }
.pipeline-header { margin-bottom: 1.5rem; }
.pipeline-sub {
  font-size: var(--text-sm); color: var(--text-mid);
  margin-top: 0.25rem;
}
.pipeline-apps { display: flex; flex-direction: column; gap: 1rem; }
.pipeline-app {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid rgba(91,140,255,0.12);
  border-left: 3px solid rgba(91,140,255,0.4);
  background: rgba(91,140,255,0.04);
  transition: border-color 0.2s, background 0.2s, transform 0.3s var(--spring);
}
.pipeline-app:hover {
  border-color: rgba(91,140,255,0.25);
  border-left-color: rgba(91,140,255,0.6);
  background: rgba(91,140,255,0.07);
  transform: translateX(4px);
}
.pipeline-icon {
  font-size: 1.5rem;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(91,140,255,0.08);
  border: 1px solid rgba(91,140,255,0.15);
  border-radius: 10px;
  flex-shrink: 0;
}
.pipeline-info { flex: 1; }
.pipeline-name {
  font-family: var(--font-mono);
  font-weight: 700; font-size: var(--text-base);
  color: var(--text);
}
.pipeline-desc {
  font-size: var(--text-xs); color: var(--text-mid);
  line-height: 1.4; margin-top: 0.15rem;
}

/* ── Team panel — clean list inside one glass card ── */
.team-panel { padding: clamp(1.5rem, 3vw, 2.5rem) !important; }
.team-tier { margin-bottom: 1.5rem; }
.team-tier:last-child { margin-bottom: 0; }
.tier-header {
  font-family: var(--font-mono);
  font-size: var(--text-xs); font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.tier-header.tier-core { color: var(--cyan); border-bottom-color: rgba(0,230,200,0.15); }
.tier-header.tier-ops { color: var(--purple); border-bottom-color: rgba(160,100,255,0.15); }
.tier-header.tier-spec { color: var(--pink); border-bottom-color: rgba(240,100,170,0.15); }

.agent-list { display: flex; flex-direction: column; gap: 0.35rem; }
.agent-item {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  transition: background 0.15s;
}
.agent-item:hover { background: rgba(255,255,255,0.04); }
.agent-emoji { font-size: 0.9rem; width: 1.5rem; text-align: center; flex-shrink: 0; }
.agent-name-inline {
  font-family: var(--font-mono);
  font-weight: 700; font-size: var(--text-sm);
  color: var(--text);
  min-width: 85px;
}
.agent-dash { color: var(--text-dim); }
.agent-role-inline { font-size: var(--text-xs); color: var(--text-mid); }

/* Color accents on hover per tier */
.core-item:hover { background: rgba(0,230,200,0.04); }
.ops-item:hover { background: rgba(160,100,255,0.04); }
.spec-item:hover { background: rgba(240,100,170,0.04); }

/* ── Metrics — floating, no box ── */
.metrics-float {
  display: flex; gap: clamp(2rem, 5vw, 5rem);
  margin-top: 3rem;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
}

/* App card split layout */
.app-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  position: relative;
  z-index: 3;
}
.app-text { flex: 1; min-width: 0; }
.app-visual { flex-shrink: 0; }

/* Phone frame mockup */
.phone-frame {
  width: 120px;
  height: 220px;
  border-radius: 20px;
  border: 2px solid rgba(255,255,255,0.15);
  background: rgba(8,8,18,0.8);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 8px 32px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.1);
  transition: transform 0.4s var(--spring), box-shadow 0.3s;
}
.app-card:hover .phone-frame {
  transform: translateY(-4px) rotate(-2deg);
  box-shadow:
    0 16px 40px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.12);
}
.app-hero .phone-frame {
  width: 160px;
  height: 300px;
  border-radius: 24px;
}

/* Color glow per app */
.phone-cyan { border-color: rgba(0,230,200,0.3); box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 20px rgba(0,230,200,0.1); }
.phone-purple { border-color: rgba(160,100,255,0.3); box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 20px rgba(160,100,255,0.1); }
.phone-pink { border-color: rgba(240,100,170,0.3); box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 20px rgba(240,100,170,0.1); }

.phone-notch {
  width: 40%;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 0 0 8px 8px;
  margin: 0 auto;
}
.app-hero .phone-notch { height: 8px; }

.phone-screen {
  padding: 8px;
  height: calc(100% - 6px);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.app-hero .phone-screen { padding: 10px; gap: 8px; }

/* Mock app bars */
.mock-app-bar {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.app-hero .mock-app-bar { font-size: 0.6rem; padding: 6px 0; }

/* Delivery Boss mock — message cards */
.mock-msg {
  border-radius: 6px;
  height: 28px;
  background: rgba(0,230,200,0.08);
  border: 1px solid rgba(0,230,200,0.12);
}
.mock-msg-2 { height: 22px; background: rgba(0,230,200,0.06); width: 85%; }
.mock-msg-3 { height: 18px; background: rgba(0,230,200,0.04); width: 70%; }
.app-hero .mock-msg { height: 36px; }
.app-hero .mock-msg-2 { height: 28px; }
.app-hero .mock-msg-3 { height: 24px; }
.mock-btn-row { margin-top: auto; }
.mock-copy-btn {
  height: 20px;
  border-radius: 6px;
  background: rgba(0,230,200,0.2);
  border: 1px solid rgba(0,230,200,0.3);
}
.app-hero .mock-copy-btn { height: 28px; }

/* Muleline mock — photo grid */
.mock-grid-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  flex: 1;
}
.mock-photo {
  border-radius: 3px;
  background: linear-gradient(135deg, rgba(160,100,255,0.15), rgba(91,140,255,0.1));
  aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,0.04);
}
.mock-photo:nth-child(2) { background: linear-gradient(135deg, rgba(0,230,200,0.12), rgba(160,100,255,0.08)); }
.mock-photo:nth-child(4) { background: linear-gradient(135deg, rgba(240,100,170,0.12), rgba(160,100,255,0.08)); }

/* Archifi mock — face circles + album rows */
.mock-faces {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 6px 0;
}
.mock-face {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(240,100,170,0.2), rgba(160,100,255,0.15));
  border: 1px solid rgba(240,100,170,0.2);
}
.mock-face:nth-child(2) { background: linear-gradient(135deg, rgba(0,230,200,0.15), rgba(91,140,255,0.12)); border-color: rgba(0,230,200,0.2); }
.mock-face:nth-child(3) { background: linear-gradient(135deg, rgba(255,207,64,0.15), rgba(240,100,170,0.1)); border-color: rgba(255,207,64,0.2); }
.mock-album-row {
  height: 14px;
  border-radius: 4px;
  background: rgba(240,100,170,0.08);
  border: 1px solid rgba(240,100,170,0.1);
}
.mock-album-row.short { width: 60%; }

/* Responsive: hide phone on small screens */
@media (max-width: 500px) {
  .app-visual { display: none; }
}

.app-card h3 {
  font-size: var(--text-xl); font-weight: 800;
  letter-spacing: -0.02em; margin-bottom: 0.5rem;
  color: #fff;
}
.app-hero h3 { font-size: var(--text-2xl); }
.app-card .app-desc {
  font-size: var(--text-sm);
  color: oklch(0.85 0.02 270);
  line-height: 1.65; max-width: 400px;
}
.app-card .app-links {
  display: flex; gap: 1rem; margin-top: 1.25rem;
}
.app-link {
  font-family: var(--font-mono);
  font-size: var(--text-xs); font-weight: 500;
  color: var(--cyan); text-decoration: none;
  display: inline-flex; align-items: center; gap: 4px;
  transition: color var(--dur-fast);
}
.app-link:hover { color: #fff; }
.app-link::after { content: '↗'; font-size: 0.65rem; }

/* Pipeline row */
.pipeline-row {
  grid-column: span 12;
  display: flex; align-items: center; justify-content: center;
  gap: 0.75rem; flex-wrap: wrap;
  padding: 1.75rem;
  font-family: var(--font-mono); font-size: var(--text-sm);
}
.pipeline-row .label { color: var(--text-mid); font-weight: 600; }
.pipeline-row .name {
  color: oklch(0.90 0.02 270); font-weight: 600;
  padding: 0.35rem 0.85rem; border-radius: var(--radius-sm);
  background: rgba(91,140,255,0.06);
  border: 1px solid rgba(91,140,255,0.2);
  border-top-color: rgba(91,140,255,0.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  transition: all var(--dur-base) var(--spring);
}
.pipeline-row .name:hover {
  border-color: rgba(91,140,255,0.45);
  color: #fff;
  background: rgba(91,140,255,0.12);
  transform: translateY(-2px);
  box-shadow:
    0 4px 16px rgba(91,140,255,0.12),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

/* ═══════════════════════════
   TEAM
   ═══════════════════════════ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.6rem;
}

.agent {
  position: relative;
  /* Secondary glass: lighter blur (6px), sits on top of primary glass */
  background: rgba(255, 255, 255, 0.04);
  -webkit-backdrop-filter: saturate(120%) blur(6px);
  backdrop-filter: saturate(120%) blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top-color: rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color var(--dur-base), background var(--dur-base), transform 0.3s var(--spring), box-shadow 0.3s;
}
.agent:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
  border-top-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-3px);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.agent-top {
  display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 0.4rem;
}
.agent-ico {
  width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}
/* Tier-colored inner glow on agent cards */
.core-agent {
  border-left: 2px solid rgba(0,230,200,0.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), inset 3px 0 12px rgba(0,230,200,0.04);
}
.core-agent:hover {
  border-left-color: rgba(0,230,200,0.4);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1), inset 3px 0 20px rgba(0,230,200,0.06);
}
.ops-agent {
  border-left: 2px solid rgba(160,100,255,0.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), inset 3px 0 12px rgba(160,100,255,0.04);
}
.ops-agent:hover {
  border-left-color: rgba(160,100,255,0.4);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1), inset 3px 0 20px rgba(160,100,255,0.06);
}
.spec-agent {
  border-left: 2px solid rgba(240,100,170,0.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), inset 3px 0 12px rgba(240,100,170,0.04);
}
.spec-agent:hover {
  border-left-color: rgba(240,100,170,0.4);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1), inset 3px 0 20px rgba(240,100,170,0.06);
}

.core-agent .agent-ico {
  background: rgba(0,230,200,0.1);
  border: 1px solid rgba(0,230,200,0.25);
  border-top-color: rgba(0,230,200,0.35);
  box-shadow: 0 0 10px rgba(0,230,200,0.1), inset 0 1px 0 rgba(255,255,255,0.08);
}
.ops-agent .agent-ico {
  background: rgba(160,100,255,0.1);
  border: 1px solid rgba(160,100,255,0.25);
  border-top-color: rgba(160,100,255,0.35);
  box-shadow: 0 0 10px rgba(160,100,255,0.1), inset 0 1px 0 rgba(255,255,255,0.08);
}
.spec-agent .agent-ico {
  background: rgba(240,100,170,0.1);
  border: 1px solid rgba(240,100,170,0.25);
  border-top-color: rgba(240,100,170,0.35);
  box-shadow: 0 0 10px rgba(240,100,170,0.1), inset 0 1px 0 rgba(255,255,255,0.08);
}
.agent-n {
  font-family: var(--font-mono);
  font-size: var(--text-sm); font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}
.agent-r {
  font-size: var(--text-xs);
  color: oklch(0.80 0.02 270);
  line-height: 1.45;
}

/* Tier labels */
.tier-label {
  grid-column: 1 / -1;
  font-family: var(--font-mono);
  font-size: var(--text-xs); font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.6rem 1rem;
  margin-top: 1rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-top-color: rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.tier-label:first-child { margin-top: 0; }
.tier-core { color: var(--cyan); }
.tier-ops { color: var(--purple); }
.tier-spec { color: var(--pink); }

/* Metrics */
.metrics-row {
  display: flex; gap: clamp(2rem, 5vw, 5rem);
  margin-top: 4rem; padding: 2.5rem;
  background: rgba(18, 18, 36, 0.4);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border: 1px solid rgba(255,255,255,0.1);
  border-top-color: rgba(255,255,255,0.18);
  border-radius: 16px;
  flex-wrap: wrap;
  box-shadow:
    0 8px 32px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.08);
}
.metric-val {
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 900;
  line-height: 1;
}
.metric:nth-child(1) .metric-val { color: var(--cyan); text-shadow: 0 0 30px oklch(0.88 0.19 175 / 0.4); }
.metric:nth-child(2) .metric-val { color: var(--purple); text-shadow: 0 0 30px oklch(0.72 0.24 290 / 0.4); }
.metric:nth-child(3) .metric-val { color: var(--pink); text-shadow: 0 0 30px oklch(0.76 0.22 340 / 0.4); }
.metric:nth-child(4) .metric-val { color: var(--cyan); text-shadow: 0 0 30px oklch(0.88 0.19 175 / 0.5); }
.metric-lbl {
  font-size: var(--text-xs);
  color: var(--text-mid);
  margin-top: 0.35rem;
  font-weight: 500;
}

/* ═══════════════════════════
   FOOTER
   ═══════════════════════════ */
footer {
  position: relative;
  padding: 4rem 0 2rem;
}
.foot {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 2rem;
  background: rgba(18, 18, 36, 0.45);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-top-color: rgba(255,255,255,0.18);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow:
    0 8px 32px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.08);
}
.foot-about p {
  font-size: var(--text-sm); color: var(--text-mid);
  line-height: 1.6; margin-top: 0.75rem; max-width: 280px;
}
.foot-col h4 {
  font-family: var(--font-mono);
  font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 0.75rem;
}
.foot-col a {
  display: block; font-size: var(--text-sm); color: var(--text-mid);
  text-decoration: none; margin-bottom: 0.5rem;
  transition: color var(--dur-fast);
}
.foot-col a:hover { color: var(--cyan); }

.foot-bottom {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 2rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-family: var(--font-mono);
  font-size: var(--text-xs); color: var(--text-dim);
}

/* ═══════════════════════════
   RESPONSIVE
   ═══════════════════════════ */
@media (max-width: 900px) {
  .app-hero, .app-half { grid-column: span 12; }
  .app-hero { min-height: auto; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .foot { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .foot { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: center; }
  .metrics-row { gap: 1.5rem; }
}

/* ── GLASS FALLBACK ── */
@supports not (backdrop-filter: blur(1px)) {
  .app-card, .agent, nav, .trust-item, .cta-secondary, .foot, .metrics-row {
    background: rgba(18, 18, 36, 0.92);
  }
}
