/* ============================================================
   AETHLAN — AI Automation Agency
   Premium, cinematic, scroll-driven. Dark canvas, oversized
   type, restrained warm accent. Built for Lenis + GSAP.
   ============================================================ */
:root {
  --bg: #08080a;
  --bg-2: #0d0d10;
  --ink: #f2f0ea;
  --ink-dim: #8d8b85;
  --ink-faint: #4f4d49;
  --line: rgba(255, 255, 255, 0.10);
  --line-2: rgba(255, 255, 255, 0.18);
  --accent: #ff2e3e;              /* futuristic signal red */
  --accent-soft: rgba(255, 46, 62, 0.12);
  --accent-glow: rgba(255, 46, 62, 0.45);
  --panel: rgba(255, 255, 255, 0.02);
  --display: "Archivo", "Inter", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
/* Lenis drives scrolling; disable native smooth so they don't fight. */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: #0a0a0a; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { width: min(1280px, 92vw); margin: 0 auto; }
.mono { font-family: var(--mono); }
.accent { color: var(--accent); }
.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--accent);
  display: inline-flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--accent); display: inline-block; }

/* Display type */
.display {
  font-family: var(--display); font-weight: 800;
  line-height: 0.95; letter-spacing: -0.03em; text-transform: none;
}

/* ── Loader ──────────────────────────────────────────────── */
#loader {
  position: fixed; inset: 0; z-index: 9999; background: var(--bg);
  display: grid; place-items: center;
}
#loader .l-inner { text-align: center; }
#loader .l-mark { font-family: var(--display); font-weight: 800; font-size: clamp(38px, 9vw, 96px); letter-spacing: 0.04em; overflow: hidden; }
#loader .l-bar { width: 220px; max-width: 60vw; height: 2px; background: var(--line); margin: 22px auto 0; overflow: hidden; }
#loader .l-bar i { display: block; height: 100%; width: 0; background: var(--accent); }
#loader .l-pct { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); margin-top: 14px; letter-spacing: 0.2em; }

/* Scroll progress */
#progress { position: fixed; top: 0; left: 0; height: 2px; width: 0; background: var(--accent); z-index: 200; }

/* ── Nav ─────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 150;
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px clamp(20px, 4vw, 48px);
  mix-blend-mode: difference; /* readable over any section */
}
.nav .logo { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: 0.06em; color: #fff; }
.nav .logo span { color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 30px; }
.nav-link { font-size: 14px; color: #fff; opacity: 0.7; transition: opacity 0.3s; }
.nav-link:hover { opacity: 1; }
.nav-cta {
  font-size: 13px; font-weight: 600; color: #fff; border: 1px solid rgba(255,255,255,0.4);
  padding: 11px 20px; border-radius: 100px; transition: all 0.3s;
}
@media (max-width: 760px) { .nav-link { display: none; } }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 12px; cursor: pointer;
  font-family: var(--sans); font-size: 15px; font-weight: 600; letter-spacing: 0.01em;
  padding: 18px 34px; border-radius: 100px; border: 1px solid var(--line-2);
  background: transparent; color: var(--ink); transition: all 0.35s cubic-bezier(.2,.7,.2,1);
}
.btn .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); transition: transform 0.35s; }
.btn:hover { background: var(--ink); color: #0a0a0a; border-color: var(--ink); }
.btn:hover .dot { background: #0a0a0a; transform: scale(2.2); }
.btn-solid { background: var(--accent); border-color: var(--accent); color: #0a0a0a; }
.btn-solid .dot { background: #0a0a0a; }
.btn-solid:hover { background: var(--ink); border-color: var(--ink); }

/* ── HERO ────────────────────────────────────────────────── */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg .glow {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5;
}
.hero-bg .g1 { width: 60vw; height: 60vw; top: -20%; right: -10%; background: radial-gradient(circle, rgba(255,46,62,0.20), transparent 60%); }
.hero-bg .g2 { width: 45vw; height: 45vw; bottom: -20%; left: -10%; background: radial-gradient(circle, rgba(120,30,40,0.20), transparent 60%); }
.hero-bg .grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px; opacity: 0.35;
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000, transparent 75%);
          mask-image: radial-gradient(circle at 50% 40%, #000, transparent 75%);
}
.hero .wrap { position: relative; z-index: 2; padding: 120px 0 80px; }
.hero h1 { font-size: clamp(48px, 9.5vw, 168px); }
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span { display: block; will-change: transform; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .sub {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 40px;
  margin-top: 48px; flex-wrap: wrap;
}
.hero .lead { max-width: 460px; font-size: clamp(16px, 1.5vw, 19px); color: var(--ink-dim); }
.hero .lead b { color: var(--ink); font-weight: 500; }
.scroll-ind { position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--ink-faint); font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; }
.scroll-ind .ln { width: 1px; height: 46px; background: linear-gradient(var(--accent), transparent); }

/* ── Marquee ─────────────────────────────────────────────── */
.marquee { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 26px 0; overflow: hidden; white-space: nowrap; }
.marquee .track { display: inline-flex; gap: 60px; will-change: transform; }
.marquee .item { font-family: var(--display); font-weight: 800; font-size: clamp(22px, 3vw, 40px); letter-spacing: -0.02em; color: var(--ink); display: inline-flex; align-items: center; gap: 60px; }
.marquee .item::after { content: "✶"; color: var(--accent); font-size: 0.6em; }

/* ── Section scaffolding ─────────────────────────────────── */
section { position: relative; }
.pad { padding: clamp(90px, 14vh, 200px) 0; }
.sec-head { max-width: 900px; margin-bottom: 70px; }
.sec-head h2 { font-family: var(--display); font-weight: 800; font-size: clamp(34px, 6vw, 88px); line-height: 0.98; letter-spacing: -0.03em; margin: 22px 0 0; }
.sec-head h2 em { font-style: normal; color: var(--accent); }

/* ── Manifesto (scroll-fill text) ────────────────────────── */
.manifesto { padding: clamp(120px, 22vh, 280px) 0; }
.manifesto .big {
  font-family: var(--display); font-weight: 700; font-size: clamp(28px, 4.6vw, 64px);
  line-height: 1.18; letter-spacing: -0.02em; max-width: 1100px;
}
.manifesto .big .w { color: var(--ink-faint); transition: color 0.1s linear; }

/* ── Stats ───────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.stat { background: var(--bg); padding: 48px clamp(16px, 2vw, 34px); }
.stat .n { font-family: var(--display); font-weight: 800; font-size: clamp(40px, 6vw, 84px); line-height: 1; letter-spacing: -0.03em; }
.stat .n .accent { color: var(--accent); }
.stat .l { font-size: 14px; color: var(--ink-dim); margin-top: 16px; max-width: 220px; }
@media (max-width: 880px) { .stats { grid-template-columns: 1fr 1fr; } }

/* ── Pinned scrollytelling (What we build) ───────────────── */
.pin-sec { position: relative; }
.pin-wrap { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 60px; align-items: center; min-height: 100vh; }
.pin-left { position: relative; }
.pin-left .eyebrow { margin-bottom: 26px; }
.pin-left h2 { font-family: var(--display); font-weight: 800; font-size: clamp(32px, 4.4vw, 64px); line-height: 1; letter-spacing: -0.03em; }
.pin-counter { font-family: var(--mono); font-size: 13px; color: var(--ink-faint); margin-top: 30px; }
.pin-counter b { color: var(--accent); }
.pin-right { position: relative; height: 60vh; }
.pin-card {
  position: absolute; inset: 0; border: 1px solid var(--line); border-radius: 20px;
  background: var(--bg-2); padding: clamp(28px, 4vw, 52px); display: flex; flex-direction: column; justify-content: space-between;
  opacity: 0;
}
.pin-card .pc-no { font-family: var(--mono); font-size: 13px; color: var(--accent); letter-spacing: 0.1em; }
.pin-card h3 { font-family: var(--display); font-weight: 800; font-size: clamp(26px, 3.4vw, 48px); line-height: 1.02; letter-spacing: -0.02em; margin-top: auto; }
.pin-card p { color: var(--ink-dim); font-size: clamp(15px, 1.4vw, 18px); margin-top: 18px; max-width: 460px; }
@media (max-width: 900px) {
  .pin-wrap { grid-template-columns: 1fr; gap: 30px; min-height: auto; padding: 60px 0; }
  .pin-right { height: 360px; }
}

/* ── Horizontal scroll ───────────────────────────────────── */
.h-scroll { overflow: hidden; }
.h-track { display: flex; gap: 28px; width: max-content; padding: 0 max(20px, calc((100vw - 1280px)/2)); will-change: transform; }
.h-card { width: clamp(300px, 38vw, 480px); flex-shrink: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); padding: 38px; min-height: 440px; display: flex; flex-direction: column; }
.h-card .hc-i { width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--line-2); display: grid; place-items: center; margin-bottom: auto; }
.h-card .hc-i svg { width: 24px; height: 24px; stroke: var(--accent); fill: none; }
.h-card .hc-no { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); }
.h-card h3 { font-family: var(--display); font-weight: 800; font-size: 28px; letter-spacing: -0.02em; margin: 20px 0 12px; }
.h-card p { color: var(--ink-dim); font-size: 15px; }

/* ── Process ─────────────────────────────────────────────── */
.steps { border-top: 1px solid var(--line); }
.step { display: grid; grid-template-columns: 120px 1fr auto; gap: 40px; align-items: baseline; padding: clamp(34px, 5vw, 60px) 0; border-bottom: 1px solid var(--line); transition: padding-left 0.4s; }
.step:hover { padding-left: 24px; }
.step .s-no { font-family: var(--mono); font-size: 14px; color: var(--accent); }
.step h3 { font-family: var(--display); font-weight: 800; font-size: clamp(26px, 3.6vw, 52px); letter-spacing: -0.02em; }
.step p { color: var(--ink-dim); font-size: 16px; max-width: 420px; justify-self: end; }
@media (max-width: 820px) { .step { grid-template-columns: 60px 1fr; } .step p { grid-column: 2; justify-self: start; margin-top: 12px; } }

/* ── CTA / booking ───────────────────────────────────────── */
.cta { position: relative; padding: clamp(110px, 18vh, 220px) 0; overflow: hidden; }
.cta::before { content: ""; position: absolute; inset: 0; background: radial-gradient(800px 420px at 50% 30%, var(--accent-soft), transparent 70%); }
.cta .inner { position: relative; z-index: 2; text-align: center; }
.cta h2 { font-family: var(--display); font-weight: 800; font-size: clamp(40px, 9vw, 150px); line-height: 0.92; letter-spacing: -0.04em; }
.cta h2 em { font-style: normal; color: var(--accent); }
.cta p { color: var(--ink-dim); font-size: 19px; max-width: 540px; margin: 30px auto 0; }
.book { max-width: 560px; margin: 48px auto 0; text-align: left; }
.book-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); }
.field input, .field select, .field textarea {
  background: rgba(255,255,255,0.03); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 15px 16px; color: var(--ink); font-family: var(--sans); font-size: 15px; outline: none; transition: border-color 0.25s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 90px; }
.book .btn { width: 100%; justify-content: center; margin-top: 6px; }
.book .note { text-align: center; font-size: 13px; color: var(--ink-faint); margin-top: 16px; }
.book-success { display: none; text-align: center; border: 1px solid var(--accent); border-radius: 16px; background: var(--accent-soft); padding: 44px; }
.book-success.show { display: block; }
.book-success h3 { font-family: var(--display); font-weight: 800; font-size: 30px; margin-bottom: 10px; }
.book-success p { color: var(--ink-dim); margin: 0; }
@media (max-width: 560px) { .book-grid { grid-template-columns: 1fr; } }

/* ── Footer ──────────────────────────────────────────────── */
footer { border-top: 1px solid var(--line); padding: 70px 0 40px; }
.foot-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; margin-bottom: 70px; }
.foot-top .f-lead { font-family: var(--display); font-weight: 700; font-size: clamp(22px, 3vw, 40px); letter-spacing: -0.02em; max-width: 560px; line-height: 1.1; }
.foot-links { display: flex; gap: 60px; flex-wrap: wrap; }
.foot-col h5 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 16px; }
.foot-col a { display: block; color: var(--ink-dim); font-size: 15px; padding: 5px 0; transition: color 0.25s; }
.foot-col a:hover { color: var(--accent); }
.foot-mark { font-family: var(--display); font-weight: 800; font-size: clamp(60px, 20vw, 300px); line-height: 0.8; letter-spacing: -0.04em; color: var(--ink); opacity: 0.96; overflow: hidden; }
.foot-mark span { color: var(--accent); }
.foot-bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 40px; color: var(--ink-faint); font-size: 13px; }

/* ── Reveal base states (GSAP sets to visible) ───────────── */
[data-reveal] { opacity: 0; transform: translateY(40px); }
[data-reveal-line] { opacity: 0; transform: translateY(100%); }

@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal-line], .pin-card { opacity: 1 !important; transform: none !important; }
}

/* ============================================================
   PARTICLE FIELD + layering
   ============================================================ */
#webgl {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  z-index: 0; pointer-events: none; display: block;
}
/* Content rides above the particle canvas */
.hero, .marquee, section, footer { position: relative; z-index: 1; }

/* Hero now overlays the particle portrait — let it breathe, anchor low */
.hero { align-items: flex-end; }
.hero .hero-bg .grid { display: none; }      /* particles replace the grid */
.hero .hero-bg .glow { opacity: 0.35; }
.hero h1 { font-size: clamp(40px, 6.4vw, 112px); }
.hero .wrap { padding-bottom: 64px; }

/* After the hero, give sections a readable dark backing while the
   dispersed particles stay faintly visible behind them */
.marquee { background: rgba(8,8,10,0.72); backdrop-filter: blur(2px); }
#manifesto, .pin-sec, #work, #process, .cta, footer { background: rgba(8,8,10,0.78); }
.stats .stat { background: rgba(8,8,10,0.82); }
.pin-card { background: rgba(15,15,18,0.9); backdrop-filter: blur(3px); }
.h-card { background: rgba(13,13,16,0.88); backdrop-filter: blur(3px); }

/* ── Meeting request toggle ──────────────────────────────── */
.meet-toggle { display: flex; align-items: center; gap: 14px; cursor: pointer; margin: 14px 0 2px; padding: 12px 0; user-select: none; }
.meet-toggle input { display: none; }
.meet-toggle .track { width: 48px; height: 27px; border-radius: 100px; border: 1px solid var(--line-2); background: rgba(255,255,255,0.04); position: relative; transition: all 0.3s; flex-shrink: 0; }
.meet-toggle .knob { position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: var(--ink-dim); transition: all 0.3s; }
.meet-toggle input:checked + .track { background: var(--accent); border-color: var(--accent); }
.meet-toggle input:checked + .track .knob { left: 24px; background: #0a0a0a; }
.meet-toggle .lbl { font-size: 15px; color: var(--ink); }
.meet-extra { max-height: 0; overflow: hidden; transition: max-height 0.45s cubic-bezier(.2,.7,.2,1); }
.meet-extra.open { max-height: 160px; }

/* ============================================================
   FUTURISTIC LAYER — custom cursor, magnetic, 3D depth
   ============================================================ */
/* Custom cursor */
.cursor, .cursor-ring { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9000; border-radius: 50%; }
.cursor { width: 6px; height: 6px; background: var(--accent); transform: translate(-50%, -50%); box-shadow: 0 0 12px var(--accent-glow); }
.cursor-ring { width: 36px; height: 36px; border: 1px solid rgba(255,255,255,0.45); transform: translate(-50%, -50%);
  transition: width .28s cubic-bezier(.2,.7,.2,1), height .28s cubic-bezier(.2,.7,.2,1), border-color .28s, background .28s; }
.cursor-ring.hover { width: 66px; height: 66px; border-color: var(--accent); background: var(--accent-soft); }
body.has-cursor, body.has-cursor a, body.has-cursor button, body.has-cursor input, body.has-cursor select, body.has-cursor textarea, body.has-cursor label { cursor: none; }
@media (hover: none), (max-width: 760px) { .cursor, .cursor-ring { display: none !important; } }

[data-magnetic] { will-change: transform; }

/* 3D depth on card grids */
.h-track, .pin-right, .stats, .steps, #process .wrap, #work { perspective: 1500px; }
[data-3d] { transform-style: preserve-3d; will-change: transform, opacity; backface-visibility: hidden; }

/* red-glow on solid buttons for the futuristic feel */
.btn-solid { box-shadow: 0 0 0 1px var(--accent), 0 14px 50px -16px var(--accent-glow); }
.nav-cta:hover { border-color: var(--accent); box-shadow: 0 0 24px -6px var(--accent-glow); }

/* ── Wireframe centerpiece (Systems section) ─────────────── */
.pin-sec { overflow: hidden; }
.pin-wrap { position: relative; }
#wire { position: absolute; inset: -20% 0; width: 100%; height: 140%; z-index: 0; pointer-events: none; }
.pin-left, .pin-right { position: relative; z-index: 2; }
/* let the rotating core glow through the active card */
.pin-card { background: rgba(13,13,16,0.62); backdrop-filter: blur(6px); }

/* ── Mobile refinements ──────────────────────────────────── */
@media (max-width: 760px) {
  .h-card { min-height: 340px; padding: 26px; justify-content: flex-start; }
  .h-card .hc-i { margin-bottom: 22px; }
  .h-card h3 { margin-top: 26px; }
  .hero .wrap { padding-bottom: 48px; }
  .hero h1 { font-size: clamp(40px, 12vw, 64px); }
  .hero .sub { gap: 24px; }
  .hero .lead { font-size: 15px; }
  .stat { padding: 34px 20px; }
  .pin-card { min-height: 280px; }
  #wire { inset: -10% 0; height: 120%; }
  .marquee .item { font-size: 26px; gap: 40px; }
}

/* ── Lead magnet band ────────────────────────────────────── */
.magnet-band { display:grid; grid-template-columns:1.3fr 1fr; gap:48px; align-items:center;
  border:1px solid var(--line); border-radius:22px; padding:48px; background:
  radial-gradient(600px 300px at 0% 0%, var(--accent-soft), transparent 70%), rgba(13,13,16,0.6); backdrop-filter:blur(4px); }
.magnet-band h3 { font-size:clamp(26px,3.4vw,42px); line-height:1.05; margin:18px 0 14px; }
.magnet-band h3 em { font-style:normal; color:var(--accent); }
.magnet-band p { color:var(--ink-dim); font-size:16px; max-width:520px; }
.magnet-band form .field { margin-bottom:14px; }
.magnet-band .btn { width:100%; justify-content:center; }
.magnet-band .note { text-align:center; font-size:12px; color:var(--ink-faint); margin-top:12px; }
@media (max-width:860px){ .magnet-band { grid-template-columns:1fr; gap:28px; padding:32px 24px; } }

/* ── Pricing ─────────────────────────────────────────────── */
.price-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; align-items:stretch; }
.price-card { border:1px solid var(--line); border-radius:20px; padding:36px 30px; background:rgba(13,13,16,0.6);
  backdrop-filter:blur(4px); display:flex; flex-direction:column; position:relative; }
.price-card.featured { border-color:var(--accent); box-shadow:0 0 0 1px var(--accent), 0 30px 70px -30px var(--accent-glow); }
.price-card .pc-badge { position:absolute; top:-12px; left:30px; background:var(--accent); color:#0a0a0a;
  font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; padding:5px 12px; border-radius:100px; }
.price-card .pc-name { font-family:var(--mono); font-size:13px; letter-spacing:.12em; text-transform:uppercase; color:var(--ink-dim); }
.price-card .pc-price { font-family:var(--display); font-weight:800; font-size:clamp(34px,4vw,48px); letter-spacing:-.02em; margin:14px 0 2px; }
.price-card .pc-price span { font-family:var(--sans); font-weight:500; font-size:14px; color:var(--ink-faint); margin-left:8px; }
.price-card .pc-sub { color:var(--accent); font-size:14px; font-weight:500; margin-bottom:22px; }
.price-card ul { list-style:none; display:flex; flex-direction:column; gap:11px; margin-bottom:28px; flex:1; }
.price-card li { font-size:14.5px; color:var(--ink-dim); padding-left:24px; position:relative; }
.price-card li::before { content:"✓"; position:absolute; left:0; color:var(--accent); font-weight:700; }
.price-card .btn { width:100%; justify-content:center; }
@media (max-width:860px){ .price-grid { grid-template-columns:1fr; } }
