:root {
  --bg: #f6f8fb;
  --bg-dark: #070e1a;
  --surface: #ffffff;
  --surface-soft: #eef2f7;
  --surface-warm: #f4efe6;
  --ink: #0f172a;
  --ink-soft: #475569;
  --ink-muted: #64748b;
  --line: #e2e8f0;
  --brand: #0ea5e9;
  --brand-deep: #0284c7;
  --indigo: #6366f1;
  --emerald: #10b981;
  --amber: #f59e0b;
  --coral: #e0523c;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-sm: 0 2px 10px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 16px 40px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 60px rgba(7, 14, 26, 0.28);
  --max-w: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
}

a {
  color: var(--brand-deep);
  text-decoration: none;
  transition: color 0.18s ease, opacity 0.18s ease;
}

a:hover {
  color: var(--brand);
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* Sticky Glass Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 14, 26, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  font-size: 18px;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.brand-link:hover {
  color: #ffffff;
  opacity: 0.92;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #38bdf8 0%, #2563eb 55%, #4f46e5 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14.5px;
  font-weight: 500;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.78);
}

.nav-links a:hover {
  color: #ffffff;
}

/* =========================================
   HERO POSTER CAROUSEL (Big Widescreen Slides)
   ========================================= */
.hero-carousel {
  position: relative;
  background: var(--bg-dark);
  color: #ffffff;
  overflow: hidden;
  min-height: 580px;
}

#hero-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.65;
}

.slides-viewport {
  position: relative;
  z-index: 2;
  min-height: 580px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition: opacity 0.65s ease, transform 0.65s ease, visibility 0.65s;
  display: flex;
  align-items: center;
  padding: 64px 0 88px;
}

.hero-slide.is-active {
  position: relative;
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.slide-bg-tech {
  background:
    radial-gradient(circle at 78% 35%, rgba(14, 165, 233, 0.26), transparent 52%),
    radial-gradient(circle at 22% 80%, rgba(99, 102, 241, 0.22), transparent 48%),
    linear-gradient(135deg, #060c18 0%, #0b192e 55%, #0f2542 100%);
}

.slide-bg-games {
  background:
    radial-gradient(circle at 76% 42%, rgba(245, 158, 11, 0.25), transparent 52%),
    radial-gradient(circle at 30% 85%, rgba(224, 82, 60, 0.22), transparent 50%),
    linear-gradient(135deg, #120f1d 0%, #24192c 52%, #33202a 100%);
}

.slide-bg-apps {
  background:
    radial-gradient(circle at 78% 38%, rgba(16, 185, 129, 0.24), transparent 50%),
    radial-gradient(circle at 25% 78%, rgba(56, 189, 248, 0.2), transparent 50%),
    linear-gradient(135deg, #07131e 0%, #0d2235 55%, #10313b 100%);
}

.slide-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 44px;
  align-items: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #7dd3fc;
  margin-bottom: 20px;
}

.hero-pill-warm {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.28);
}

.hero-pill-emerald {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.28);
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.hero-copy p {
  margin: 0 0 28px;
  font-size: clamp(16.5px, 1.8vw, 19px);
  color: rgba(226, 232, 240, 0.84);
  max-width: 540px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-glow {
  background: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.38);
}

.btn-glow:hover {
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(56, 189, 248, 0.48);
}

.btn-warm {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  color: #ffffff;
  box-shadow: 0 10px 26px rgba(234, 88, 12, 0.36);
}

.btn-warm:hover {
  color: #ffffff;
}

.btn-emerald {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 10px 26px rgba(16, 185, 129, 0.34);
}

.btn-emerald:hover {
  color: #ffffff;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
}

.btn-primary:hover {
  background: #1e293b;
  color: #fff;
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

.btn-secondary:hover {
  border-color: #cbd5e1;
  color: var(--ink);
}

/* Poster Visual Stage inside Hero */
.poster-stage {
  position: relative;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 26px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.poster-hud-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.64);
  margin-bottom: 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.hud-dots {
  display: flex;
  gap: 6px;
}

.hud-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}

.hud-dots span:nth-child(1) { background: #fb7185; }
.hud-dots span:nth-child(2) { background: #fbbf24; }
.hud-dots span:nth-child(3) { background: #34d399; }

.tech-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.metric-tile {
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  padding: 14px 16px;
}

.metric-tile strong {
  display: block;
  font-size: 22px;
  color: #38bdf8;
  letter-spacing: -0.02em;
}

.metric-tile span {
  font-size: 12.5px;
  color: rgba(226, 232, 240, 0.72);
}

/* Game Poster Mockup inside Slide 2 */
.game-poster-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(255, 248, 238, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 16px;
}

.game-poster-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38);
  flex-shrink: 0;
}

.yarn-board-preview {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  padding: 14px;
  background: rgba(15, 12, 24, 0.55);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stitch-cell {
  height: 22px;
  border-radius: 6px;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.25);
}

/* Scanner Animation inside Slide 3 */
.scanner-viewport {
  position: relative;
  height: 220px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, rgba(14, 165, 233, 0.06) 100%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 24px);
  border: 1px solid rgba(110, 231, 183, 0.28);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scan-beam {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #34d399, #38bdf8, transparent);
  box-shadow: 0 0 18px 4px rgba(52, 211, 153, 0.55);
  animation: scanSweep 3.2s ease-in-out infinite;
}

@keyframes scanSweep {
  0%, 100% { top: 14%; }
  50% { top: 84%; }
}

/* Carousel Controls */
.carousel-controls {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  z-index: 5;
}

.carousel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.slide-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.slide-tab {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.72);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.slide-tab.is-active,
.slide-tab:hover {
  background: #ffffff;
  color: #0f172a;
  border-color: #ffffff;
}

.slide-arrows {
  display: flex;
  gap: 8px;
}

.arrow-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background 0.18s ease;
}

.arrow-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* =========================================
   SCROLLING VISUAL SHOWCASE MARQUEE
   ========================================= */
.marquee-section {
  padding: 46px 0 38px;
  background: #0c1424;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.marquee-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  color: #fff;
}

.marquee-header h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: #f8fafc;
}

.marquee-header span {
  font-size: 13px;
  color: #94a3b8;
}

.marquee-track-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.marquee-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: marqueeScroll 36s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.poster-card {
  width: 310px;
  height: 200px;
  border-radius: 18px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.poster-card-tag {
  display: inline-flex;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
}

.poster-card h3 {
  margin: 0 0 4px;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.poster-card p {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}

.p-yarn { background: linear-gradient(135deg, #9a3412 0%, #c2410c 52%, #f59e0b 100%); }
.p-vision { background: linear-gradient(135deg, #065f46 0%, #059669 55%, #0ea5e9 100%); }
.p-match { background: linear-gradient(135deg, #4c1d95 0%, #7c3aed 55%, #ec4899 100%); }
.p-scan { background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #38bdf8 100%); }
.p-album { background: linear-gradient(135deg, #78350f 0%, #b45309 55%, #d97706 100%); }
.p-habit { background: linear-gradient(135deg, #0f172a 0%, #334155 55%, #0ea5e9 100%); }

.poster-card-deco {
  position: absolute;
  right: -12px;
  top: 16px;
  opacity: 0.24;
  pointer-events: none;
}

/* =========================================
   SECTIONS, FILTERABLE APPS & TECH STACK
   ========================================= */
.section {
  padding: 68px 0;
  border-bottom: 1px solid var(--line);
}

.section-alt {
  background: #ffffff;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 34px;
}

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 580px;
}

/* Filter Pills */
.filter-tabs {
  display: inline-flex;
  background: var(--surface-soft);
  padding: 4px;
  border-radius: 12px;
  gap: 4px;
}

.filter-btn {
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 13.5px;
  padding: 8px 16px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.filter-btn.is-active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* Featured App Showcase */
.app-showcase {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 28px;
  align-items: center;
  margin-bottom: 24px;
}

.app-icon {
  width: 128px;
  height: 128px;
  border-radius: 28px;
  object-fit: cover;
  box-shadow: 0 12px 28px rgba(68, 41, 20, 0.18);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.app-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--ink-soft);
}

.badge-live {
  background: #dcfce7;
  color: #15803d;
}

.badge-accent {
  background: #ffedd5;
  color: #c2410c;
}

.badge-tech {
  background: #e0f2fe;
  color: #0369a1;
}

.app-info h3 {
  margin: 0 0 8px;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.app-info p {
  margin: 0 0 18px;
  color: var(--ink-soft);
}

.app-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  font-size: 14.5px;
  font-weight: 600;
}

/* Product Matrix Cards */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.product-card.is-hidden {
  display: none;
}

.prod-icon-box {
  width: 56px;
  height: 56px;
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 16px;
}

.product-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.product-card p {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 14.5px;
}

/* Tech Pillars Grid */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.tech-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #e0f2fe;
  color: #0284c7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 17.5px;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14.5px;
}

/* Legal / Prose Pages */
.prose-wrap {
  padding: 52px 0 72px;
}

.prose-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

.prose-card h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 34px);
  letter-spacing: -0.02em;
}

.prose-meta {
  color: var(--ink-muted);
  font-size: 14px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.prose-card h2 {
  margin: 28px 0 10px;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.prose-card p,
.prose-card li {
  color: var(--ink-soft);
}

.prose-card ul {
  padding-left: 20px;
}

.prose-card li {
  margin-bottom: 8px;
}

.info-box {
  background: var(--surface-soft);
  border-left: 4px solid var(--brand);
  padding: 16px 20px;
  border-radius: 8px;
  margin: 20px 0;
}

.info-box p {
  margin: 4px 0;
  color: var(--ink);
  font-size: 15px;
}

/* Footer */
.site-footer {
  background: #070e1a;
  color: rgba(226, 232, 240, 0.78);
  padding: 52px 0 40px;
  font-size: 14px;
}

.site-footer a {
  color: #93c5fd;
}

.site-footer a:hover {
  color: #ffffff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 30px;
}

.footer-col h4 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 13.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col p {
  margin: 0 0 8px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-bottom {
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: #94a3b8;
  font-size: 13px;
}

@media (max-width: 920px) {
  .slide-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-grid,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .app-showcase {
    grid-template-columns: 1fr;
    padding: 24px;
    gap: 18px;
  }

  .app-icon {
    width: 96px;
    height: 96px;
    border-radius: 22px;
  }

  .grid-4,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .prose-card {
    padding: 24px 20px;
  }

  .nav-links {
    gap: 14px;
    font-size: 13px;
  }
}
