/* ═══════════════════════════════════════════════════
   FLIXTAR — ELECTRIC NOIR Design System
   Fonts: Urbanist (display) + Figtree (body) + IBM Plex Mono
   (now actually loaded — index.html previously preconnected but never requested them)
   Palette: Void Black / Purple / Cyan / Ghost White
   ═══════════════════════════════════════════════════ */

:root {
  --bg-void: #040408;
  --bg-base: #06060B;
  --bg-raised: #0C0C14;
  --bg-card: #0E0E18;
  --bg-card-hover: #141422;
  --bg-glass: rgba(14,14,24,0.7);

  --purple: #8B5CF6;
  --purple-deep: #6B2FA0;
  --purple-glow: rgba(139,92,246,0.12);
  --cyan: #00C2FF;
  --cyan-glow: rgba(0,194,255,0.10);
  --white: #F0F0F5;
  --white-dim: #B0AEB8;
  --white-muted: #8A8894; /* was #55535E: failed WCAG contrast (2.6:1) on the dark background */

  --grad-brand: linear-gradient(135deg, #6B2FA0 0%, #8B5CF6 40%, #00C2FF 100%);
  --grad-purple: linear-gradient(135deg, #6B2FA0, #8B5CF6);
  --grad-glow: linear-gradient(135deg, rgba(139,92,246,0.08), rgba(0,194,255,0.05));
  --grad-line: linear-gradient(90deg, transparent, rgba(139,92,246,0.25), rgba(0,194,255,0.15), transparent);

  --line: rgba(139,92,246,0.08);
  --line-hover: rgba(139,92,246,0.18);
  --line-accent: rgba(139,92,246,0.35);

  --font-display: 'Urbanist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --max-w: 1260px;
  --section-pad: clamp(72px, 12vh, 140px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --r-sm: 8px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-body); background: var(--bg-base); color: var(--white); line-height: 1.6; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
button { border: none; cursor: pointer; font-family: inherit; background: none; color: inherit; }
img, video { max-width: 100%; display: block; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-void); }
::-webkit-scrollbar-thumb { background: var(--purple); border-radius: 2px; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 clamp(20px, 5vw, 56px); }
.section-pad { padding-top: var(--section-pad); padding-bottom: var(--section-pad); }

/* ═══ SHARED TYPOGRAPHY ═══ */
.label {
  font-family: var(--font-mono); font-size: 0.66rem;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--purple); display: inline-flex; align-items: center; gap: 10px;
}
.label::before { content: ''; width: 24px; height: 1px; background: var(--purple); }

.headline {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800; line-height: 1.06;
  letter-spacing: -0.03em; color: var(--white);
}

.gradient-text {
  background: var(--grad-brand);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.subhead {
  font-size: clamp(0.92rem, 1.3vw, 1.04rem);
  color: var(--white-dim); line-height: 1.75; max-width: 520px; font-weight: 400;
}

.section-title {
  font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800; line-height: 1.08; letter-spacing: -0.02em;
}

/* ═══ BUTTONS ═══ */
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 30px; background: var(--purple); color: #fff;
  font-family: var(--font-display); font-weight: 600; font-size: 0.86rem;
  border-radius: var(--r-md); position: relative; overflow: hidden;
  transition: all 0.4s var(--ease); letter-spacing: 0.01em;
}
.btn-primary::before { content: ''; position: absolute; inset: 0; background: var(--grad-brand); opacity: 0; transition: opacity 0.4s; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(139,92,246,0.35); }
.btn-primary:hover::before { opacity: 1; }
.btn-primary:active { transform: translateY(0) scale(0.97); }
.btn-primary span, .btn-primary svg { position: relative; z-index: 1; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 30px; background: transparent; color: var(--white);
  font-family: var(--font-display); font-weight: 600; font-size: 0.86rem;
  border-radius: var(--r-md); border: 1px solid var(--line-hover);
  transition: all 0.4s var(--ease);
}
.btn-ghost:hover { background: var(--purple-glow); border-color: var(--purple); transform: translateY(-2px); }
.btn-ghost:active { transform: scale(0.97); }

/* ═══ DIVIDER ═══ */
.divider { width: 100%; height: 1px; background: var(--grad-line); }

/* ═══ ANIMATIONS ═══ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(36px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(48px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes pulse-glow { 0%,100% { box-shadow: 0 0 12px rgba(139,92,246,0.2); } 50% { box-shadow: 0 0 28px rgba(139,92,246,0.4); } }
@keyframes grain { 0%,100%{transform:translate(0,0)}10%{transform:translate(-5%,-10%)}50%{transform:translate(-15%,10%)}90%{transform:translate(-10%,10%)}}
@keyframes orbit { 0% { transform: rotate(0deg) translateX(200px) rotate(0deg); } 100% { transform: rotate(360deg) translateX(200px) rotate(-360deg); } }

.grain {
  position: fixed; top: -50%; left: -50%; width: 200%; height: 200%;
  pointer-events: none; z-index: 9999; opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 5s steps(6) infinite;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
  .headline { font-size: clamp(1.7rem, 7vw, 2.5rem); }
  .btn-primary, .btn-ghost { padding: 12px 24px; font-size: 0.84rem; }
}
@media (max-width: 480px) {
  .btn-primary, .btn-ghost { width: 100%; justify-content: center; }
  .container { padding: 0 16px; }
  .section-pad { padding-top: 56px; padding-bottom: 56px; }
  .grain { display: none; }
}

.section-pad { content-visibility: auto; contain-intrinsic-size: auto 600px; }
html { scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
.calendly-overlay .calendly-popup { border-radius: 16px !important; }


/* ═══ ACCESSIBILITY ═══ */
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
.skip-link { position: absolute; left: 16px; top: -80px; z-index: 2000; padding: 10px 16px; border-radius: 10px; background: var(--purple); color: #fff; font-weight: 600; transition: top .2s; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ═══ MOTION (CSS only — replaces framer-motion) ═══
   Above-the-fold: .fx-rise moves but never starts invisible, so it can't delay LCP.
   Below-the-fold: .reveal only hides content when JS is running (html.js). */
@keyframes fxUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes fxRise { from { transform: translateY(18px); } to { transform: none; } }
.fx-up { animation: fxUp .7s var(--ease) both; }
.fx-rise { animation: fxRise .8s var(--ease) both; }
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ═══ INNER PAGE BLOCKS ═══ */
.container.narrow { max-width: 860px; }
.pg-hero { padding-top: 124px; padding-bottom: 48px; position: relative; overflow: hidden; }
.pg-hero::before { content: ''; position: absolute; top: -10%; right: -10%; width: 560px; height: 560px; background: radial-gradient(circle, rgba(139,92,246,.08), transparent 70%); filter: blur(60px); pointer-events: none; }
.pg-hero .container { position: relative; }
.pg-title { font-family: var(--font-display); font-size: clamp(2.2rem, 5.4vw, 4.2rem); font-weight: 900; line-height: 1.04; letter-spacing: -.04em; max-width: 900px; }
.pg-intro { margin-top: 22px; font-size: clamp(1rem, 1.4vw, 1.12rem); color: var(--white-dim); line-height: 1.75; max-width: 720px; }
.pg-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }

.crumbs { margin-bottom: 22px; font-size: .8rem; color: var(--white-muted); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs li { display: flex; gap: 8px; }
.crumbs a { color: var(--white-dim); } .crumbs a:hover { color: var(--purple); }
.crumbs [aria-current] { color: var(--white); }

.answer-box { margin-top: 28px; max-width: 760px; padding: 22px 24px; border: 1px solid var(--line-accent); border-radius: var(--r-lg); background: var(--grad-glow); }
.answer-box-t { font-family: var(--font-display); font-weight: 700; margin-bottom: 6px; }
.answer-box p:last-child { color: var(--white-dim); line-height: 1.75; }

.faq { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-card); }
.faq details { border-bottom: 1px solid var(--line); padding: 20px 24px; }
.faq details:last-child { border-bottom: 0; }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; line-height: 1.4; }
.faq summary span { color: var(--purple); font-size: 1.3rem; line-height: 1; transition: transform .3s var(--ease); }
.faq details[open] summary span { transform: rotate(45deg); }
.faq details p { margin-top: 12px; color: var(--white-dim); line-height: 1.75; font-size: .94rem; }

.cta-box { background: var(--bg-card); border: 1px solid var(--line-accent); border-radius: var(--r-xl); padding: 56px; text-align: center; position: relative; overflow: hidden; }
.cta-box::before { content: ''; position: absolute; inset: 0; background: var(--grad-glow); opacity: .5; pointer-events: none; }
.cta-box > * { position: relative; }
.cta-box h2 { font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 2.2rem); font-weight: 800; margin: 10px 0 12px; }
.cta-box p { color: var(--white-dim); max-width: 460px; margin: 0 auto 24px; line-height: 1.7; }

.link-cards { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.link-card { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 26px; border-radius: var(--r-lg); background: var(--bg-card); border: 1px solid var(--line); transition: all .4s var(--ease); }
.link-card:hover { border-color: var(--line-accent); transform: translateY(-4px); }
.link-card-t { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.link-card-d { color: var(--white-dim); font-size: .88rem; line-height: 1.65; flex: 1; }
.link-card-go { display: inline-flex; align-items: center; gap: 6px; color: var(--purple); font-family: var(--font-display); font-weight: 700; font-size: .86rem; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.check-list { list-style: none; display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.check-list li { display: flex; gap: 12px; color: var(--white-dim); line-height: 1.65; }
.check-list li::before { content: ''; flex-shrink: 0; width: 8px; height: 8px; margin-top: 9px; border-radius: 50%; background: var(--grad-brand); }
.h-sub { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.4rem, 2.6vw, 1.9rem); letter-spacing: -.02em; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 28px; counter-reset: step; }
.steps li { padding: 24px; border-radius: var(--r-lg); background: var(--bg-card); border: 1px solid var(--line); counter-increment: step; }
.steps li::before { content: 'Step ' counter(step); font-family: var(--font-mono); font-size: .7rem; color: var(--purple); letter-spacing: .08em; }
.steps h3 { font-family: var(--font-display); font-weight: 700; margin: 8px 0 6px; }
.steps p { color: var(--white-dim); font-size: .9rem; line-height: 1.65; }

.txt-link { color: var(--purple); text-decoration: underline; text-underline-offset: 3px; }
.txt-link:hover { color: var(--cyan); }

/* Clickable video tiles: a transparent button covers the tile so it's keyboard-accessible */
.tile-open { position: absolute; inset: 0; z-index: 4; background: transparent; cursor: pointer; }

/* ═══ ARTICLE (blog + case studies) ═══ */
.article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 48px; align-items: start; }
.prose { color: var(--white-dim); font-size: 1.04rem; line-height: 1.8; }
.prose > * + * { margin-top: 18px; }
.prose h2 { font-family: var(--font-display); color: var(--white); font-size: clamp(1.4rem, 2.6vw, 1.8rem); font-weight: 800; letter-spacing: -.02em; margin-top: 40px; line-height: 1.2; }
.prose h3 { font-family: var(--font-display); color: var(--white); font-size: 1.15rem; font-weight: 700; margin-top: 28px; }
.prose strong { color: var(--white); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 8px; }
.prose li::marker { color: var(--purple); }
.prose .callout { padding: 18px 22px; border-left: 3px solid var(--purple); background: var(--purple-glow); border-radius: 0 var(--r-md) var(--r-md) 0; color: var(--white); }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.prose table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.prose th, .prose td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--white); font-family: var(--font-display); background: var(--bg-card); }
.prose tbody th { font-weight: 600; }
.toc { position: sticky; top: 100px; padding: 22px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-card); }
.toc p { font-family: var(--font-display); font-weight: 700; margin-bottom: 12px; }
.toc ol { list-style: none; display: flex; flex-direction: column; gap: 9px; font-size: .86rem; }
.toc a { color: var(--white-dim); } .toc a:hover { color: var(--purple); }
.byline { margin-top: 18px; font-size: .84rem; color: var(--white-muted); }
.byline a { color: var(--white-dim); text-decoration: underline; text-underline-offset: 3px; }
.quote { margin: 0; padding: 26px; border-radius: var(--r-lg); background: var(--bg-card); border: 1px solid var(--line); }
.quote blockquote p { color: var(--white); line-height: 1.75; font-size: 1rem; }
.quote figcaption { margin-top: 14px; font-size: .85rem; color: var(--white-dim); }
.quote figcaption strong { display: block; color: var(--white); font-family: var(--font-display); }
.metric-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-top: 32px; max-width: 760px; }
.metric { padding: 20px; border-radius: var(--r-lg); background: var(--bg-card); border: 1px solid var(--line); }
.metric dt { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--white-muted); }
.metric dd { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: #22C55E; margin-top: 6px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-top: 24px; }
.card-grid article { padding: 22px; border-radius: var(--r-lg); background: var(--bg-card); border: 1px solid var(--line); }
.card-grid h3 { font-family: var(--font-display); font-weight: 700; margin-bottom: 6px; }
.card-grid p { color: var(--white-dim); font-size: .9rem; line-height: 1.65; }

@media (max-width: 968px) {
  .two-col, .article-grid { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; order: -1; }
}
@media (max-width: 600px) { .cta-box { padding: 36px 20px; } .pg-hero { padding-top: 104px; } }
