/* ThreadOFM — Dark tech glassmorphism */
:root {
  --bg: #07070b;
  --bg-2: #0c0c14;
  --fg: #f3f3f7;
  --fg-dim: rgba(243, 243, 247, 0.62);
  --fg-faint: rgba(243, 243, 247, 0.38);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --glass: rgba(255, 255, 255, 0.035);
  --glass-2: rgba(255, 255, 255, 0.06);
  --accent-violet: oklch(0.72 0.18 290);
  --accent-cyan: oklch(0.82 0.14 200);
  --accent-pink: oklch(0.74 0.19 350);
  --accent-lime: oklch(0.88 0.18 135);
  --accent-amber: oklch(0.82 0.16 75);
  --of-blue: #00AFF0;
  --grad-primary: linear-gradient(135deg, oklch(0.72 0.18 290) 0%, oklch(0.82 0.14 200) 100%);
  --grad-warm: linear-gradient(135deg, oklch(0.74 0.19 350) 0%, oklch(0.82 0.16 75) 100%);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  /* Density (Compact/Spacious) */
  --section-pad: 128px;
  --gap-lg: 40px;
  --gap-md: 24px;
  --container: 1240px;
}
[data-density="compact"] {
  --section-pad: 80px;
  --gap-lg: 28px;
  --gap-md: 18px;
}
[data-theme="light"] {
  --bg: #f5f4ef;
  --bg-2: #ecebe5;
  --fg: #0a0a10;
  --fg-dim: rgba(10, 10, 16, 0.66);
  --fg-faint: rgba(10, 10, 16, 0.42);
  --line: rgba(10, 10, 16, 0.10);
  --line-strong: rgba(10, 10, 16, 0.18);
  --glass: rgba(255, 255, 255, 0.55);
  --glass-2: rgba(255, 255, 255, 0.75);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  font-feature-settings: "ss01", "cv11";
}

/* Background blobs */
.bg-stage {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.55;
  mix-blend-mode: screen;
}
[data-theme="light"] .blob { opacity: 0.32; mix-blend-mode: multiply; }
.blob-1 { top: -15%; left: -10%; width: 720px; height: 720px; background: oklch(0.6 0.22 290); }
.blob-2 { top: 40%; right: -15%; width: 680px; height: 680px; background: oklch(0.7 0.18 200); }
.blob-3 { top: 130%; left: 20%; width: 640px; height: 640px; background: oklch(0.68 0.2 350); }
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.05;
  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'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.6'/></svg>");
}

/* Typography */
.display {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.02;
}
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-feature-settings: "ss01"; }

h1, h2, h3 { margin: 0; }
p { margin: 0; }

/* Layout */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 2;
}
.section { padding: var(--section-pad) 0; position: relative; z-index: 2; }

/* Glass card */
.glass {
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.glass-strong {
  background: var(--glass-2);
  backdrop-filter: blur(32px) saturate(1.5);
  -webkit-backdrop-filter: blur(32px) saturate(1.5);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--grad-primary);
  color: #07070b;
  box-shadow: 0 10px 40px -10px oklch(0.72 0.18 290 / 0.6), inset 0 1px 0 rgba(255,255,255,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 50px -10px oklch(0.72 0.18 290 / 0.8), inset 0 1px 0 rgba(255,255,255,0.3); }
.btn-ghost {
  background: var(--glass);
  color: var(--fg);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(20px);
}
.btn-ghost:hover { background: var(--glass-2); transform: translateY(-2px); }

/* Eyebrow tag */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--line);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-lime); box-shadow: 0 0 10px var(--accent-lime); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.grad-text {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.grad-text-warm {
  background: var(--grad-warm);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Placeholder image */
.ph {
  background:
    repeating-linear-gradient(135deg, var(--glass-2) 0 8px, var(--glass) 8px 16px);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--fg-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  background: var(--glass);
  color: var(--fg-dim);
}
.badge-wip { color: var(--accent-amber); border-color: oklch(0.82 0.16 75 / 0.35); background: oklch(0.82 0.16 75 / 0.08); }
.badge-live { color: var(--accent-lime); border-color: oklch(0.88 0.18 135 / 0.35); background: oklch(0.88 0.18 135 / 0.08); }

/* Section headers */
.sec-head { max-width: 760px; margin-bottom: var(--gap-lg); }
.sec-head h2 { font-size: clamp(36px, 5vw, 56px); font-family: 'Space Grotesk', sans-serif; font-weight: 500; letter-spacing: -0.03em; line-height: 1.02; margin-bottom: 16px; }
.sec-head p { font-size: 18px; color: var(--fg-dim); max-width: 600px; }

/* Tweaks panel */
.tweaks-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: #07070b;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 40px -8px oklch(0.72 0.18 290 / 0.7);
}
.tweaks-panel {
  position: fixed;
  bottom: 84px;
  right: 24px;
  z-index: 101;
  width: 300px;
  padding: 20px;
  display: none;
  flex-direction: column;
  gap: 18px;
}
.tweaks-panel.open { display: flex; }
.tweaks-fab.visible { display: flex; }
.tweak-row { display: flex; flex-direction: column; gap: 8px; }
.tweak-row label { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-dim); }
.tweak-segments {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 2px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 3px;
}
.tweak-segments button {
  background: transparent;
  color: var(--fg-dim);
  border: none;
  padding: 7px 10px;
  border-radius: 7px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.tweak-segments button.active {
  background: var(--fg);
  color: var(--bg);
}
.tweak-stack { display: flex; flex-direction: column; gap: 6px; }
.tweak-stack button {
  text-align: left;
  background: var(--glass);
  border: 1px solid var(--line);
  color: var(--fg-dim);
  padding: 9px 12px;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.tweak-stack button.active { border-color: var(--accent-violet); color: var(--fg); background: oklch(0.72 0.18 290 / 0.1); }

/* Generic anim */
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }
.cursor { display: inline-block; width: 8px; height: 1.05em; background: var(--accent-lime); vertical-align: -2px; margin-left: 2px; animation: blink 1s steps(1) infinite; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }
.reveal.d5 { transition-delay: 0.40s; }
.reveal.d6 { transition-delay: 0.48s; }

/* Card hover lift */
.hover-lift { transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s, box-shadow 0.4s; }
.hover-lift:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: 0 30px 60px -20px rgba(0,0,0,0.4); }

/* Magnetic glow on hover */
.glow-hover { position: relative; overflow: hidden; }
.glow-hover::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.06), transparent 40%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.glow-hover:hover::before { opacity: 1; }

/* Float anim for accents */
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes floatXY { 0% { transform: translate(0, 0); } 33% { transform: translate(10px, -6px); } 66% { transform: translate(-8px, 4px); } 100% { transform: translate(0, 0); } }
.float { animation: floatY 6s ease-in-out infinite; }
.float-xy { animation: floatXY 14s ease-in-out infinite; }

/* Marquee-style number roll */
@keyframes numberIn { from { opacity: 0; transform: translateY(12px); filter: blur(4px); } to { opacity: 1; transform: translateY(0); filter: blur(0); } }
.num-in { animation: numberIn 0.6s cubic-bezier(0.16, 1, 0.3, 1); }

/* Shimmer for live elements */
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.shimmer {
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.08) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 2.2s infinite linear;
}

/* Pulse ring for live badges */
@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 var(--accent-lime); } 70% { box-shadow: 0 0 0 8px rgba(0,0,0,0); } 100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); } }
.pulse-ring { animation: pulseRing 2s infinite; }

/* Hero entry anim */
@keyframes heroFade { from { opacity: 0; transform: translateY(20px); filter: blur(8px); } to { opacity: 1; transform: translateY(0); filter: blur(0); } }
.hero-fade { animation: heroFade 1s cubic-bezier(0.16, 1, 0.3, 1) both; }
.hero-fade.d1 { animation-delay: 0.1s; }
.hero-fade.d2 { animation-delay: 0.2s; }
.hero-fade.d3 { animation-delay: 0.3s; }
.hero-fade.d4 { animation-delay: 0.4s; }

/* OF brand glyph — OnlyFans-blue gradient text, works on dark + light */
.of-glyph {
  display: inline-block;
  background-image: linear-gradient(135deg, #7dd6ff 0%, #00AFF0 50%, #0086c4 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  font-weight: 600;
  letter-spacing: -0.02em;
  filter: drop-shadow(0 4px 18px rgba(0, 175, 240, 0.55));
}
[data-theme="light"] .of-glyph {
  background-image: linear-gradient(135deg, #00c8ff 0%, #00AFF0 45%, #0072a8 100%) !important;
  filter: drop-shadow(0 3px 10px rgba(0, 175, 240, 0.35));
}

/* Gradient breathe */
@keyframes gradBreathe { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.grad-text { background-size: 200% 200%; animation: gradBreathe 8s ease-in-out infinite; }

/* Slow blob drift */
@keyframes driftA { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(40px, -30px) scale(1.1); } }
@keyframes driftB { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-50px, 30px) scale(0.95); } }
@keyframes driftC { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(30px, 40px) scale(1.08); } }
.blob-1 { animation: driftA 20s ease-in-out infinite; }
.blob-2 { animation: driftB 24s ease-in-out infinite; }
.blob-3 { animation: driftC 28s ease-in-out infinite; }

/* Counter */
.count-up { font-variant-numeric: tabular-nums; }

/* Utility */
.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; }
.hidden-mobile { display: inherit; }
@media (max-width: 760px) {
  .hidden-mobile { display: none !important; }
  .container { padding: 0 20px; }
  :root { --section-pad: 80px; }
}
