/* ============================================================
   Pitch Deck — Template Styles
   Override --brand-* variables to rebrand the entire site.
   ============================================================ */

:root {
  /* BRAND — Autonomy halftone CMYK (PROVISIONAL — see CLAUDE.md brand law) */
  --brand-primary:   #35B6E6;  /* halftone cyan — eyebrows, markers, floods, CTA */
  --brand-secondary: #E23A8E;  /* halftone magenta — the "reveal" color */
  --brand-accent:    #F7C948;  /* halftone yellow — highlight */

  /* THEME */
  --bg:        #050505;
  --bg-elev:   #0F0F10;
  --text:      #f5f5f5;
  --text-dim:  rgba(245, 245, 245, 0.65);
  --rule:      rgba(255, 255, 255, 0.08);

  /* TYPE */
  --font-sans:   "Inter", system-ui, -apple-system, sans-serif;
  --font-tight:  "Inter Tight", "Inter", system-ui, sans-serif;
  --font-mono:   "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* ============================================================
   TYPE
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-tight);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}
h1 { font-size: clamp(2.5rem, 6vw, 5rem); line-height: 1.05; }
h2 { font-size: clamp(2rem, 4.5vw, 4rem); line-height: 1.1; }
h3 { font-size: clamp(1.5rem, 3vw, 2.5rem); line-height: 1.15; }
h2.display { font-size: clamp(3rem, 8vw, 7rem); font-weight: 900; line-height: 0.95; padding-bottom: 0.14em; }
/* Typesetting law: tight display leading paints descenders outside the line box —
   every display headline keeps descender clearance so following text never overlaps. */
.flood-inner h2.display { margin-bottom: 0.75rem; }

p { margin: 0 0 1rem; }
.lede { font-size: clamp(1rem, 1.4vw, 1.25rem); font-weight: 400; color: var(--text); max-width: 56ch; }
.dim  { color: var(--text-dim); max-width: 56ch; }
.pull-quote {
  font-family: var(--font-tight);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  letter-spacing: -0.01em;
  color: var(--text);
  max-width: 24ch;
  margin-top: 1.5rem;
}
.accent       { color: var(--brand-primary); }
.accent.yellow{ color: var(--brand-accent); }
.accent.blue  { color: var(--brand-secondary); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-primary);
  margin: 0 0 0.5rem;
}

.label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.val {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: var(--text);
  margin-left: 0.5rem;
}

.chapter-marker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}
.chapter-marker .num { color: var(--brand-primary); font-weight: 700; }
.chapter-marker .bar { flex: 0 0 80px; height: 1px; background: var(--brand-primary); }

/* ============================================================
   SECTIONS
   ============================================================ */
.section, .hero {
  position: relative;
  padding: clamp(3rem, 8vw, 8rem) clamp(1.5rem, 5vw, 6rem);
  min-height: 100vh;
  display: flex;
  align-items: center;
}
.section.center, .hero { align-items: center; justify-content: center; }

/* HERO */
.hero { padding: 0; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(5,5,5,0.5) 0%, rgba(5,5,5,0.85) 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  max-width: 1200px;
}
.hero-meta { display: flex; justify-content: center; gap: 0.5rem; margin-bottom: 2rem; }
.hero-title { color: #fff; }
.hero-title .eyebrow {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--brand-primary);
}
.hero-sub {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 1.5rem;
}

/* TWO-COL — copy + image side by side */
.section.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.section.two-col.image-right .img-wrap { order: 2; }
.section.two-col .copy { display: flex; flex-direction: column; gap: 1rem; max-width: 48ch; }
.section.two-col .img-wrap { overflow: hidden; border-radius: 12px; aspect-ratio: 3/4; background: var(--bg-elev); }
.section.two-col .img-wrap img { width: 100%; height: 100%; object-fit: cover; }
/* UI screenshots stay landscape at native ratio — never crop an interface to portrait */
.section.two-col .img-wrap.ui {
  aspect-ratio: 2311/1396;
  border: 1px solid var(--rule);
  align-self: center;
}
/* Landscape photography in a two-col slot */
.section.two-col .img-wrap.landscape {
  aspect-ratio: 16/10;
  align-self: center;
}

/* FLOOD — solid brand color background */
.section.flood {
  background: var(--brand-primary);
  color: #000;
}
.section.flood .chapter-marker,
.section.flood .chapter-marker .num,
.section.flood .chapter-marker .bar { color: #000; background: #000; }
.section.flood .lede { color: #000; max-width: 56ch; }
.section.flood .pull-quote { color: #000; }
.flood-inner { max-width: 1000px; }

/* TWO-UP */
.section.two-up { display: flex; flex-direction: column; gap: 2rem; padding-top: 4rem; padding-bottom: 4rem; }
.section.two-up .head { margin-bottom: 1.5rem; max-width: 56ch; }
.section.two-up .grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.section.two-up .tile { overflow: hidden; border-radius: 8px; aspect-ratio: 4/3; background: var(--bg-elev); }
.section.two-up .tile img { width: 100%; height: 100%; object-fit: cover; }

/* BLEED — full-width image or video */
.section.bleed {
  padding: 0;
  min-height: 100vh;
  overflow: hidden;
}
.section.bleed img,
.section.bleed video { width: 100%; height: 100vh; object-fit: cover; display: block; }

/* CLOSING */
.section.closing { text-align: center; }
.closing-inner { max-width: 800px; }
.cta {
  display: inline-block;
  margin-top: 2rem;
  padding: 1rem 2rem;
  background: var(--brand-primary);
  color: #000;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 8px;
}
.cta:hover { background: var(--brand-accent); }

/* TWO-COL image-left variant */
.section.two-col.image-left .img-wrap { order: -1; }

/* HERO / CLOSING logos */
.hero-logo { height: 44px; width: auto; margin: 0 auto 2rem; }
.closing-logo { height: 72px; width: auto; margin: 0 auto 1.5rem; }

/* ============================================================
   TWO-UP TILE CAPTIONS — tag chip + punchline caption overlay
   FANTASY = cyan, REVEAL = magenta (see CLAUDE.md color coding)
   ============================================================ */
.section.two-up .tile { position: relative; }
.section.two-up .tile .tag {
  position: absolute; top: 0.75rem; left: 0.75rem; z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 0.35rem 0.6rem; border-radius: 4px;
  background: rgba(0,0,0,0.72); color: var(--brand-primary);
}
.section.two-up .tile .tag.reveal { color: var(--brand-secondary); }
.section.two-up .tile .tag.alt { color: var(--brand-accent); }

/* Alt-takes grid — 3 fantasy alts over 2 wider reveal alts, edge-to-edge both rows */
.section.two-up .grid.three { grid-template-columns: repeat(6, 1fr); }
.section.two-up .grid.three .tile { aspect-ratio: 16/10; grid-column: span 2; }
.section.two-up .grid.three .tile.wide { grid-column: span 3; aspect-ratio: 16/8; }
.section.two-up .tile .cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 2.5rem 1rem 0.9rem;
  background: linear-gradient(0deg, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.55) 55%, rgba(0,0,0,0) 100%);
  font-family: var(--font-mono);
  font-size: 0.78rem; line-height: 1.45;
  color: var(--text);
}

/* ============================================================
   VERSUS — two facing cards (The Ad vs The Reality)
   ============================================================ */
.versus {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  width: 100%;
  margin-top: 2rem;
}
.vcard {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 2rem;
  position: relative;
}
.vcard::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 48px; height: 3px; background: var(--brand-primary);
}
.vcard.reality::before { background: var(--brand-secondary); }
.vcard .eyebrow { margin-bottom: 1rem; }
.vcard.reality .eyebrow { color: var(--brand-secondary); }
.vcard ul { list-style: none; margin: 0; padding: 0; }
.vcard li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--text-dim);
  font-size: 0.95rem;
}
.vcard li:last-child { border-bottom: none; }
.vcard li strong { color: var(--text); font-weight: 500; }

/* ============================================================
   CARDS — 3-up feature grid (pipeline, takeaways)
   ============================================================ */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  width: 100%;
  margin-top: 2rem;
}
.card {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.75rem;
  position: relative;
  display: flex; flex-direction: column; gap: 0.75rem;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 32px; height: 3px; background: var(--brand-primary);
}
.card .label {
  font-family: var(--font-mono);
  font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--brand-primary);
}
.card h3 { font-size: 1.35rem; line-height: 1.15; }
.card p { font-size: 0.9rem; line-height: 1.55; color: var(--text-dim); margin: 0; }

/* ============================================================
   REVEAL-ON-SCROLL (pairs with [data-reveal] in script.js)
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 768px) {
  .section.two-col {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .section.two-col.image-right .img-wrap { order: 0; }
  .section.two-col.image-left .img-wrap { order: 0; }
  .section.two-up .grid { grid-template-columns: 1fr; }
  .section.two-up .tile { aspect-ratio: 16/9; }
  .section.two-up .grid.three .tile,
  .section.two-up .grid.three .tile.wide { grid-column: auto; aspect-ratio: 16/9; }
  .versus { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
}

/* ============================================================
   PASSWORD GATE (uncomment in index.html if needed)
   ============================================================ */
#pw-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 2rem;
}
#pw-gate.hidden { display: none; }
#pw-gate .label { color: var(--brand-primary); margin-bottom: 1rem; }
#pw-gate .title {
  font-family: var(--font-tight);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 4rem);
  margin: 0 0 1.5rem;
  text-align: center;
}
#pw-gate form { display: flex; gap: 0.5rem; width: min(90vw, 480px); }
#pw-gate input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  padding: 1rem 1.25rem;
  font-family: inherit;
  font-size: 1rem;
  border-radius: 8px;
  outline: none;
}
#pw-gate input:focus { border-color: var(--brand-primary); }
#pw-gate button {
  background: var(--brand-primary);
  color: #000;
  border: none;
  padding: 1rem 1.5rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
}
#pw-gate .err { color: #ff6b6b; font-size: 0.875rem; margin-top: 0.75rem; min-height: 1.2em; }
