/* ============================================================
   filmIQ.ai site styles
   Editorial-operational, dark mode
   Fraunces (display) + IBM Plex Sans (body) + IBM Plex Mono (data)
   ============================================================ */

:root {
  /* Brand */
  --blue: #4A9FC9;
  --blue-deep: #005F8E;
  --red: #E63B25;
  --red-bright: #FF4D34;
  --cyan-glow: #5AC8FA;

  /* Surface / text */
  --bg: #0A0B0D;
  --bg-raised: #111318;
  --bg-card: #14161C;
  --border: #23262D;
  --border-soft: #1C1F25;
  --text: #ECEDEF;
  --text-mute: #9AA0A8;
  --text-dim: #6B7079;

  /* Rhythm */
  --maxw: 1160px;
  --maxw-narrow: 780px;

  /* Transitions */
  --t-fast: 140ms cubic-bezier(.2,.7,.3,1);
  --t: 260ms cubic-bezier(.2,.7,.3,1);
  --t-slow: 520ms cubic-bezier(.2,.7,.3,1);
}

/* ---------- RESET + BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Grain overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  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.85' 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.18 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.06;
  mix-blend-mode: overlay;
}

/* Ambient radial gradient */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(230,59,37,0.06), transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 100%, rgba(0,95,142,0.08), transparent 60%);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; background: none; border: none; color: inherit; padding: 0; }
::selection { background: var(--red); color: #fff; }

/* ---------- TYPOGRAPHY ---------- */
.display {
  font-family: "Fraunces", "Times New Roman", serif;
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0;
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.mono {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-feature-settings: "ss01", "zero";
}

h1, h2, h3, h4 { margin: 0; font-weight: 400; }

.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.eyebrow .dot { color: var(--red); margin-right: 0.5em; }

/* ---------- LAYOUT PRIMITIVES ---------- */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}
.container-narrow { max-width: var(--maxw-narrow); margin: 0 auto; padding: 0 32px; }

.section { padding: 120px 0; position: relative; }
.section + .section { border-top: 1px solid var(--border-soft); }

.section-num {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-num::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-soft);
}

/* ---------- NAV ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,11,13,0.72);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.brand .mark { color: var(--text); }
.brand .mark .iq { letter-spacing: 0; }
.brand .tag {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 500;
}
.nav-links {
  display: flex;
  gap: 32px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-mute);
}
.nav-links a {
  position: relative;
  padding: 4px 0;
  transition: color var(--t-fast);
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--red);
}

/* ---------- BUTTONS / LINKS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: all var(--t);
  background: transparent;
}
.btn:hover {
  border-color: var(--red);
  color: var(--red-bright);
  transform: translateY(-1px);
}
.btn .arrow { transition: transform var(--t-fast); }
.btn:hover .arrow { transform: translateX(4px); }

.btn-primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.btn-primary:hover {
  background: var(--red-bright);
  border-color: var(--red-bright);
  color: #fff;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: all var(--t-fast);
  font-size: 15px;
}
.link-arrow:hover {
  color: var(--red-bright);
  border-color: var(--red);
}
.link-arrow .arrow { transition: transform var(--t-fast); }
.link-arrow:hover .arrow { transform: translateX(4px); }

/* ---------- HERO ---------- */
.hero { padding: 120px 0 140px; position: relative; overflow: hidden; }
.hero-eyebrow { margin-bottom: 40px; }
.hero-h1 {
  font-family: "Fraunces", serif;
  font-variation-settings: "opsz" 144;
  font-weight: 300;
  font-size: clamp(48px, 7vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.028em;
  color: var(--text);
  max-width: 16ch;
  position: relative;
}
.hero-h1 .ghost {
  position: absolute;
  left: 0.08em;
  top: 0;
  color: var(--red);
  opacity: 0.18;
  filter: blur(1.5px);
  pointer-events: none;
  z-index: -1;
  letter-spacing: -0.028em;
}
.hero-h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--red-bright);
}
.hero-sub {
  margin-top: 36px;
  font-size: 22px;
  font-weight: 300;
  color: var(--text);
  max-width: 48ch;
  line-height: 1.4;
}
.hero-sub strong { font-weight: 500; color: var(--text); }
.hero-supporting {
  margin-top: 28px;
  color: var(--text-mute);
  max-width: 56ch;
  font-size: 17px;
}
.hero-ctas {
  margin-top: 48px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.perforation { display: flex; gap: 10px; margin-top: 80px; }
.perforation .perf { width: 18px; height: 18px; border: 1px solid var(--red); opacity: 0.4; }
.perforation .perf:nth-child(4) { opacity: 0.9; }

/* ---------- PROSE ---------- */
.prose p {
  font-size: 19px;
  line-height: 1.65;
  color: var(--text);
  max-width: 62ch;
  margin: 0 0 1.2em 0;
  font-weight: 300;
}
.prose p:last-child { margin-bottom: 0; }
.prose p strong { font-weight: 500; color: var(--text); }
.prose h2 {
  font-family: "Fraunces", serif;
  font-variation-settings: "opsz" 96;
  font-weight: 300;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
  max-width: 18ch;
}
.prose h2 em { font-style: italic; color: var(--red-bright); font-weight: 400; }
.prose h3 {
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 500;
  font-size: 22px;
  line-height: 1.3;
  margin: 40px 0 12px;
  color: var(--text);
  letter-spacing: -0.005em;
}

/* ---------- FEATURE ROW ---------- */
.feature-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  margin-top: 56px;
}
.feature h4 {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.feature p { font-size: 15px; color: var(--text-mute); line-height: 1.6; }

/* ---------- DETAIL BLOCK ---------- */
.detail-block {
  padding: 48px 0;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 56px;
  align-items: start;
  border-top: 1px solid var(--border-soft);
}
.detail-block:first-child { border-top: none; padding-top: 0; }
.detail-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  padding-top: 8px;
}
.detail-body h3 {
  font-family: "Fraunces", serif;
  font-variation-settings: "opsz" 48;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
}
.detail-body p {
  color: var(--text-mute);
  font-size: 16px;
  margin: 0 0 16px;
  max-width: 60ch;
}
.detail-body p:last-child { margin-bottom: 0; }

/* ---------- STATS ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 56px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat {
  padding: 40px 24px;
  border-left: 1px solid var(--border-soft);
  position: relative;
}
.stat:first-child { border-left: none; }
.stat-num {
  font-family: "IBM Plex Mono", monospace;
  font-size: 44px;
  font-weight: 400;
  color: var(--red-bright);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.stat-label { font-size: 13px; color: var(--text-mute); letter-spacing: 0.02em; }

/* ---------- FINDING ---------- */
.finding {
  margin-top: 56px;
  padding: 40px 0;
  border-top: 1px solid var(--border-soft);
}
.finding p {
  font-family: "Fraunces", serif;
  font-variation-settings: "opsz" 96;
  font-weight: 300;
  font-style: italic;
  font-size: 28px;
  line-height: 1.35;
  color: var(--text);
  max-width: 30ch;
}
.finding p em { color: var(--red-bright); font-style: italic; font-weight: 400; }

/* ---------- TEAM ---------- */
.team {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px 56px;
  margin-top: 56px;
}
.founder { padding-top: 24px; border-top: 1px solid var(--border); }
.founder-name {
  font-family: "Fraunces", serif;
  font-variation-settings: "opsz" 48;
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.founder-role {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 16px;
}
.founder-bio { font-size: 15px; color: var(--text-mute); line-height: 1.55; margin: 0; }

/* ---------- ESSAY CARDS ---------- */
.essay-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-top: 56px;
}
.essay-card {
  display: block;
  padding: 40px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: all var(--t);
  position: relative;
}
.essay-card:hover { border-color: var(--red); transform: translateY(-2px); }
.essay-card .meta {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 20px;
}
.essay-card h3 {
  font-family: "Fraunces", serif;
  font-variation-settings: "opsz" 72;
  font-weight: 400;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
  color: var(--text);
}
.essay-card .excerpt { color: var(--text-mute); font-size: 15px; line-height: 1.55; margin-bottom: 24px; font-style: italic; }
.essay-card .read {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
}
.essay-card .read .arrow { transition: transform var(--t-fast); }
.essay-card:hover .read { color: var(--red-bright); }
.essay-card:hover .read .arrow { transform: translateX(4px); }

/* ---------- ARCHIVE ---------- */
.archive { margin-top: 64px; border-top: 1px solid var(--border); }
.archive a {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 24px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-soft);
  transition: color var(--t-fast);
}
.archive a:hover { color: var(--red-bright); }
.archive a .t { font-size: 17px; font-weight: 400; }
.archive a .d { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--text-dim); letter-spacing: 0.05em; }
.archive a .r {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color var(--t-fast);
}
.archive a:hover .r { color: var(--red-bright); }

/* ---------- LEDGER ---------- */
.ledger { margin-top: 48px; }
.ledger-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 32px 0;
  border-top: 1px solid var(--border-soft);
}
.ledger-item:first-child { border-top: 1px solid var(--border); }
.ledger-item:last-child { border-bottom: 1px solid var(--border); }
.ledger-item .not { color: var(--text-mute); font-size: 16px; line-height: 1.55; }
.ledger-item .not::before {
  content: "NOT CLAIMING";
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.ledger-item .yes { color: var(--text); font-size: 16px; line-height: 1.55; }
.ledger-item .yes::before {
  content: "CLAIMING";
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--red);
  margin-bottom: 10px;
}

/* ---------- CTA ---------- */
.cta {
  padding: 140px 0;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent 0%, rgba(230,59,37,0.04) 100%);
}
.cta h2 {
  font-family: "Fraunces", serif;
  font-variation-settings: "opsz" 144;
  font-weight: 300;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  max-width: 22ch;
  margin-bottom: 32px;
}
.cta p { color: var(--text-mute); font-size: 18px; max-width: 58ch; margin: 0 0 16px; }
.cta .btn-row { margin-top: 40px; }

/* ---------- FOOTER ---------- */
.footer { padding: 64px 0 40px; border-top: 1px solid var(--border); color: var(--text-mute); }
.footer-cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand { font-family: "IBM Plex Sans", sans-serif; font-weight: 600; font-size: 18px; color: var(--text); margin-bottom: 8px; }
.footer-tag { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--red); }
.footer-col h5 {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 500;
  margin-bottom: 16px;
}
.footer-col a, .footer-col .line {
  display: block;
  font-size: 14px;
  color: var(--text-mute);
  padding: 4px 0;
  transition: color var(--t-fast);
}
.footer-col a:hover { color: var(--red-bright); }
.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-family: "IBM Plex Mono", monospace;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

/* ---------- PAGE HERO ---------- */
.page-hero { padding: 100px 0 80px; border-bottom: 1px solid var(--border-soft); }
.page-hero .eyebrow { margin-bottom: 32px; }
.page-hero h1 {
  font-family: "Fraunces", serif;
  font-variation-settings: "opsz" 144;
  font-weight: 300;
  font-size: clamp(44px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  max-width: 20ch;
  margin-bottom: 28px;
}
.page-hero h1 em { font-style: italic; color: var(--red-bright); font-weight: 400; }
.page-hero .sub { font-size: 20px; color: var(--text-mute); max-width: 60ch; line-height: 1.4; }

/* ---------- CAPABILITY ARC ---------- */
.arc {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 56px;
  border-top: 1px solid var(--border);
}
.arc-stage {
  padding: 40px 32px 40px 0;
  border-right: 1px solid var(--border-soft);
  position: relative;
}
.arc-stage:last-child { border-right: none; padding-right: 0; }
.arc-stage:not(:first-child) { padding-left: 32px; }
.arc-stage .n { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: 0.2em; color: var(--red); margin-bottom: 16px; }
.arc-stage h3 {
  font-family: "Fraunces", serif;
  font-weight: 400;
  font-size: 24px;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}
.arc-stage p { color: var(--text-mute); font-size: 14px; line-height: 1.55; }
.arc-stage.current::before {
  content: "";
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 2px;
  background: var(--red);
}
.arc-stage.current .n { color: var(--red-bright); }

/* ---------- PROCESS ---------- */
.process { margin-top: 48px; counter-reset: step; }
.process-step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 32px;
  padding: 24px 0;
  border-top: 1px solid var(--border-soft);
  counter-increment: step;
  align-items: baseline;
}
.process-step:first-child { border-top: 1px solid var(--border); }
.process-step::before {
  content: counter(step, decimal-leading-zero);
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  color: var(--red);
  letter-spacing: 0.05em;
}
.process-step p { color: var(--text); font-size: 17px; margin: 0; max-width: 50ch; }

/* ---------- INVESTOR WHY-GRID ---------- */
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 48px; margin-top: 56px; }
.why-item .n { font-family: "IBM Plex Mono", monospace; font-size: 14px; color: var(--red); margin-bottom: 12px; letter-spacing: 0.1em; }
.why-item h3 {
  font-family: "Fraunces", serif;
  font-variation-settings: "opsz" 48;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.why-item p { color: var(--text-mute); font-size: 15px; line-height: 1.55; }

/* ---------- 404 ---------- */
.error-page { min-height: 70vh; display: flex; align-items: center; justify-content: center; }
.error-inner { text-align: center; max-width: 560px; padding: 0 32px; }
.error-code { font-family: "IBM Plex Mono", monospace; font-size: 14px; letter-spacing: 0.2em; color: var(--red); margin-bottom: 24px; }
.error-title {
  font-family: "Fraunces", serif;
  font-variation-settings: "opsz" 144;
  font-weight: 300;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 24px;
}
.error-title em { font-style: italic; color: var(--red-bright); font-weight: 400; }
.error-sub { color: var(--text-mute); font-size: 18px; margin-bottom: 40px; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 860px) {
  .section { padding: 80px 0; }
  .hero { padding: 80px 0; }
  .feature-row, .team, .essay-grid, .arc, .why-grid { grid-template-columns: 1fr; gap: 32px; }
  .arc { border-top: none; }
  .arc-stage { border-right: none; border-top: 1px solid var(--border-soft); padding: 32px 0 !important; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: none; border-top: 1px solid var(--border-soft); }
  .stat:nth-child(4) { border-top: 1px solid var(--border-soft); }
  .detail-block { grid-template-columns: 1fr; gap: 16px; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 32px; }
  .ledger-item { grid-template-columns: 1fr; gap: 16px; }
  .archive a { grid-template-columns: 1fr auto; }
  .archive a .r { display: none; }
  .nav-links { gap: 20px; font-size: 13px; }
  .brand .tag { display: none; }
  .process-step { grid-template-columns: 40px 1fr; gap: 16px; }
}
