/* ============================================================
   THE AI OPERATOR — design tokens & liquid glass
   ============================================================ */

:root {
  --background: 0 0% 0%;
  --foreground: 0 0% 100%;
  --card: 0 0% 9%;
  --primary: 0 0% 97%;
  --primary-foreground: 0 0% 9%;
  --secondary: 0 0% 15%;
  --muted: 0 0% 15%;
  --muted-foreground: 0 0% 75%;
  --border: 0 0% 20%;
  --input: 0 0% 20%;
  --ring: 0 0% 100%;
  --emerald: 110 70% 67%;
  --radius: 2px;
  --font-body: 'Barlow', sans-serif;
  --font-accent: 'Instrument Serif', serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: var(--font-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body { font-size: 16px; line-height: 1.5; }

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

::selection { background: rgba(255,255,255,0.2); color: white; }

/* Scrollbar (subtle) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #1a1a1a; border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: #2a2a2a; }

/* ============================================================
   Liquid Glass
   ============================================================ */
.liquid-glass {
  position: relative;
  background: rgba(255,255,255,0.01);
  background-blend-mode: luminosity;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.1);
}
.liquid-glass::before {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit; padding: 1.4px;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.45) 0%, rgba(255,255,255,0.15) 20%,
    transparent 40%, transparent 60%,
    rgba(255,255,255,0.15) 80%, rgba(255,255,255,0.45) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.liquid-glass-strong {
  position: relative;
  background: rgba(255,255,255,0.01);
  background-blend-mode: luminosity;
  backdrop-filter: blur(50px);
  -webkit-backdrop-filter: blur(50px);
  box-shadow: 4px 4px 4px rgba(0,0,0,0.05),
              inset 0 1px 1px rgba(255,255,255,0.15);
}
.liquid-glass-strong::before {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit; padding: 1.4px;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.2) 20%,
    transparent 40%, transparent 60%,
    rgba(255,255,255,0.2) 80%, rgba(255,255,255,0.5) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}

/* ============================================================
   Typography helpers
   ============================================================ */
.font-body   { font-family: var(--font-body); }
.font-accent { font-family: var(--font-accent); font-style: italic; font-weight: 400; }
.font-mono   { font-family: var(--font-mono); }

.text-muted-foreground { color: hsl(var(--muted-foreground)); }
.text-foreground { color: hsl(var(--foreground)); }
.bg-background { background: hsl(var(--background)); }
.bg-foreground { background: hsl(var(--foreground)); }
.text-background { color: hsl(var(--background)); }
.border-border { border-color: hsl(var(--border)); }

/* ============================================================
   Utilities used across components
   ============================================================ */
.tracking-wide      { letter-spacing: 0.025em; }
.tracking-tight-1   { letter-spacing: -1px; }
.tracking-tight-2   { letter-spacing: -2px; }
.tracking-mono-3    { letter-spacing: 0.3em; }
.tracking-mono-2    { letter-spacing: 0.2em; }

.glow-emerald {
  box-shadow: 0 0 0 0 hsl(var(--emerald) / 0.6),
              0 0 8px 1px hsl(var(--emerald) / 0.4);
}

/* Op-dot pulse */
@keyframes op-pulse {
  0%,100% { opacity: 1; }
  50% { opacity: 0.55; }
}
.op-dot {
  display: inline-block;
  width: 8px; height: 8px; border-radius: 9999px;
  background: hsl(var(--emerald));
  box-shadow: 0 0 8px 1px hsl(var(--emerald) / 0.55);
  animation: op-pulse 2.4s ease-in-out infinite;
}

/* Marquee */
@keyframes scroll-l { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes scroll-r { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.marquee-track {
  display: flex; gap: 16px; width: max-content;
  animation: scroll-l 60s linear infinite;
}
.marquee-track.rtl { animation-name: scroll-r; animation-duration: 70s; }
.marquee-row:hover .marquee-track { animation-play-state: paused; }

/* FAQ chevron */
.faq-plus {
  transition: transform 0.35s cubic-bezier(.4,0,.2,1);
}
.faq-open .faq-plus { transform: rotate(45deg); }

/* Subtle reveal default */
.reveal-init { opacity: 0; transform: translateY(40px); }
.reveal-in   { opacity: 1; transform: translateY(0); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }

/* CTA hover */
.cta-primary {
  background: hsl(var(--emerald));
  color: #06140b;
  border-radius: 9999px;
  padding: 16px 32px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.025em;
  transition: transform .18s ease, box-shadow .25s ease, background .25s ease;
  display: inline-block;
  box-shadow: 0 8px 28px hsl(var(--emerald) / 0.28), 0 0 0 1px hsl(var(--emerald) / 0.4) inset;
}
.cta-primary:hover { transform: translateY(-1px); background: hsl(120 75% 74%); box-shadow: 0 12px 40px hsl(var(--emerald) / 0.45); }
.cta-primary:active { transform: translateY(0) scale(.98); }

.cta-glass {
  border-radius: 9999px;
  padding: 16px 32px;
  font-size: 14px;
  font-weight: 500;
  display: inline-block;
  transition: transform .18s ease;
}
.cta-glass:hover { transform: translateY(-1px); }
.cta-glass:active { transform: scale(.98); }

/* Avatars */
.avatar {
  width: 32px; height: 32px;
  border-radius: 9999px;
  border: 2px solid hsl(var(--background));
  background: linear-gradient(135deg, #2a2a2a, #0a0a0a);
  background-size: cover;
}

/* Stat tile */
.stat-tile {
  border-radius: 12px;
  padding: 16px 14px;
}
.stat-tile .num { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; color: hsl(var(--muted-foreground)); }
.stat-tile .lbl { margin-top: 4px; font-size: 13px; font-weight: 500; }

/* Mission control mock UI */
.mc-card {
  background: linear-gradient(180deg, rgba(20,20,22,0.92), rgba(8,8,10,0.96));
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}
.mc-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: hsl(var(--muted-foreground));
}
.mc-traffic { display: flex; gap: 6px; }
.mc-traffic span { width: 10px; height: 10px; border-radius: 9999px; background: #232325; }

/* Module card lesson badge */
.lesson-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.08em;
}

/* Skill card */
.skill-card {
  width: 280px; height: 168px;
  border-radius: 14px;
  padding: 18px;
  display: flex; flex-direction: column; justify-content: space-between;
  flex-shrink: 0;
}
.skill-card .skill-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 14px;
  color: rgba(255,255,255,0.85);
}

/* Persona / generic card */
.glass-card {
  border-radius: 16px;
  padding: 28px;
  display: flex; flex-direction: column;
}

/* Faq item */
.faq-item {
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-q {
  width: 100%;
  text-align: left;
  padding: 22px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 16px;
  font-weight: 500;
}
.faq-a {
  padding: 0 26px 24px 26px;
  color: hsl(var(--muted-foreground));
  font-size: 15px;
  line-height: 1.6;
  max-width: 65ch;
}

/* Footer link */
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
  margin: 0 0 16px 0;
  font-weight: 500;
}
.footer-col a {
  display: block;
  font-size: 14px;
  margin-bottom: 10px;
  color: rgba(255,255,255,0.85);
  transition: color .2s;
}
.footer-col a:hover { color: white; }

/* Video gradient bottom */
.hero-fade {
  position: absolute; inset-inline: 0; bottom: 0; height: 18rem;
  background: linear-gradient(to top, hsl(var(--background)) 0%, hsl(var(--background) / 0.85) 25%, transparent 100%);
  pointer-events: none;
}

/* The placeholder hero "video" — animated dark gradient mesh */
.video-placeholder {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 80% at 30% 30%, rgba(110,231,160,0.04) 0%, transparent 60%),
    radial-gradient(80% 70% at 80% 50%, rgba(255,255,255,0.04) 0%, transparent 60%),
    radial-gradient(50% 60% at 60% 80%, rgba(255,255,255,0.03) 0%, transparent 60%),
    linear-gradient(180deg, #050505 0%, #0a0a0c 60%, #000 100%);
  overflow: hidden;
}
.video-placeholder::after {
  content: "";
  position: absolute; inset: -40%;
  background:
    repeating-linear-gradient(115deg, transparent 0 40px, rgba(255,255,255,0.012) 40px 41px),
    repeating-linear-gradient(25deg, transparent 0 60px, rgba(255,255,255,0.008) 60px 61px);
  animation: drift 28s linear infinite;
}
@keyframes drift {
  to { transform: translate(-8%, -6%); }
}

.grain {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Container */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 768px) { .container { padding: 0 48px; } }

/* Section spacing */
.section { padding: 128px 0; }
.section-tight { padding: 96px 0; }

/* Heading sizes */
.h-display {
  font-size: clamp(40px, 7vw, 88px);
  line-height: 1.03;
  letter-spacing: -2px;
  font-weight: 500;
}
.h-section {
  font-size: clamp(32px, 4.6vw, 60px);
  line-height: 1.06;
  letter-spacing: -1.5px;
  font-weight: 500;
}
.h-sub {
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.1;
  letter-spacing: -1px;
  font-weight: 500;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
}

.text-lead {
  font-size: clamp(15px, 1.2vw, 20px);
  color: hsl(var(--muted-foreground));
  line-height: 1.55;
  max-width: 38rem;
}

/* Persona card column row */
.persona-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

/* Hover lift */
.lift { transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s; }
.lift:hover { transform: translateY(-4px); }

/* Telegram chat mock */
.tg-msg {
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.45;
  max-width: 85%;
}
.tg-msg.bot { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); align-self: flex-start; }
.tg-msg.you { background: rgba(110,231,160,0.10); border: 1px solid rgba(110,231,160,0.20); align-self: flex-end; color: #d8ffe6; }

/* Booking link cursor cue */
[data-book] { cursor: pointer; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
