/* strikes-back/decks/deck.css
   Cinema-noir projector-slide framework for the Media Strikes Back revision decks.
   Large fonts, one idea per slide, keyboard-driven. Self-contained (declares its
   own tokens) so a deck is portable. Matches the media.codes design system. */

:root {
  --bg:        #0b0b0d;
  --bg-2:      #14141a;
  --bg-3:      #1c1c24;
  --ink:       #f4ead5;
  --ink-dim:   #8a8273;
  --ink-mid:   #b8ad95;
  --rule:      rgba(244,234,213,0.12);
  --rule-2:    rgba(244,234,213,0.22);
  --accent:    #dc2626;
  --accent-2:  #ef3535;
  --accent-dim:#7a1818;
  --good:      #4ade80;
  --bad:       #f87171;
  --warn:      #fbbf24;
  --info:      #60a5fa;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  height: 100%;
  overflow: hidden;
}

/* Film grain + vignette */
.grain {
  position: fixed; inset: -50%;
  pointer-events: none; z-index: 2; opacity: 0.04;
  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' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1   0 0 0 0 1   0 0 0 0 1   0 0 0 1 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  animation: grain 0.5s steps(6) infinite; will-change: transform;
}
@keyframes grain {
  0%{transform:translate(0,0)} 20%{transform:translate(-3%,2%)} 40%{transform:translate(2%,-2%)}
  60%{transform:translate(-2%,-3%)} 80%{transform:translate(3%,1%)} 100%{transform:translate(0,0)}
}
body::after {
  content:''; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.7) 100%);
}

/* --- Deck stage --- */
.deck { position: fixed; inset: 0; z-index: 3; }

.slide {
  position: absolute; inset: 0;
  display: none;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2.5rem, 6vw, 6rem) clamp(2.5rem, 7vw, 8rem);
  opacity: 0;
  animation: slidein 0.4s cubic-bezier(.16,1,.3,1);
}
.slide.active { display: flex; opacity: 1; }
@keyframes slidein { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Kicker / section label */
.kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.75rem, 1.1vw, 1rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: clamp(1rem, 2.5vh, 2rem);
  display: flex; align-items: center; gap: 0.8rem;
}
.kicker::before { content:''; width: clamp(20px,3vw,40px); height: 2px; background: var(--accent); }
.kicker.dim { color: var(--ink-dim); }
.kicker.dim::before { background: var(--ink-dim); }

/* Headings */
h1.big, .slide-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3.2rem, 9vw, 9rem);
  line-height: 0.88;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin-bottom: clamp(0.8rem, 2vh, 1.6rem);
}
.slide-title .dot, h1.big .dot { color: var(--accent); text-shadow: 0 0 30px rgba(220,38,38,0.55); }
h2.head {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.4rem, 5.5vw, 5rem);
  line-height: 0.92; letter-spacing: 0.02em;
  margin-bottom: clamp(1rem, 2.5vh, 2rem);
}
h2.head .accent { color: var(--accent-2); }

.lede {
  font-size: clamp(1.2rem, 2.1vw, 2rem);
  line-height: 1.5; color: var(--ink-mid);
  max-width: 36ch;
}
.lede strong { color: var(--ink); font-weight: 600; }

/* Big single statement */
.statement {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.6rem, 6vw, 6rem);
  line-height: 1.0; letter-spacing: 0.01em;
  max-width: 22ch;
}
.statement .accent { color: var(--accent-2); }

/* Bulleted content — large for projector */
ul.points, ol.points { list-style: none; max-width: 60ch; }
ul.points > li, ol.points > li {
  font-size: clamp(1.15rem, 1.9vw, 1.85rem);
  line-height: 1.42; color: var(--ink);
  padding-left: 2.2rem; position: relative;
  margin-bottom: clamp(0.7rem, 1.6vh, 1.3rem);
}
ul.points > li::before {
  content: '▸'; position: absolute; left: 0; color: var(--accent);
  font-size: 0.9em;
}
ol.points { counter-reset: p; }
ol.points > li::before {
  counter-increment: p; content: counter(p);
  position: absolute; left: 0; top: 0.05em;
  font-family: 'JetBrains Mono', monospace; font-size: 0.7em; font-weight: 700;
  color: var(--accent); border: 1px solid var(--accent-dim);
  width: 1.7em; height: 1.7em; display: flex; align-items: center; justify-content: center;
}
ol.points > li { padding-left: 2.8rem; }
.points strong { color: var(--accent-2); font-weight: 600; }
.points em { color: var(--ink-mid); font-style: normal; }
li .sub { display: block; font-size: 0.82em; color: var(--ink-dim); margin-top: 0.2rem; line-height: 1.4; }

/* Columns */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.cols.c3 { grid-template-columns: repeat(3, 1fr); }
.cols.tight { gap: clamp(1rem, 2vw, 2rem); }

/* Cards / panels */
.panel {
  background: var(--bg-2); border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  padding: clamp(1.1rem, 2vw, 1.8rem) clamp(1.3rem, 2.4vw, 2rem);
}
.panel.plain { border-left-color: var(--rule-2); }
.panel.good { border-left-color: var(--good); }
.panel.info { border-left-color: var(--info); }
.panel.warn { border-left-color: var(--warn); }
.panel h3 {
  font-family: 'Bebas Neue', sans-serif; letter-spacing: 0.1em;
  font-size: clamp(1.3rem, 2.2vw, 2rem); margin-bottom: 0.5rem; color: var(--ink);
}
.panel p, .panel li { font-size: clamp(1rem, 1.5vw, 1.4rem); line-height: 1.45; color: var(--ink-mid); }
.panel ul { list-style: none; }
.panel ul li { padding-left: 1.2rem; position: relative; margin-bottom: 0.35rem; }
.panel ul li::before { content: '·'; position: absolute; left: 0.3rem; color: var(--accent); font-weight: 700; }
.panel .tag {
  font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ink-dim); display: block; margin-bottom: 0.6rem;
}

/* Do Now */
.do-now {
  background: linear-gradient(180deg, var(--bg-2), rgba(220,38,38,0.06));
  border: 1px solid var(--accent-dim);
  padding: clamp(1.4rem, 3vw, 2.6rem);
  max-width: 70ch;
}
.do-now .label {
  font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--accent-2); margin-bottom: 1rem;
  display: flex; align-items: center; gap: 0.7rem;
}
.do-now .label::before { content:'●'; animation: rec 1.6s ease-in-out infinite; }
@keyframes rec { 0%,100%{opacity:1} 50%{opacity:0.3} }
.do-now ol { counter-reset: dn; list-style: none; }
.do-now ol li {
  counter-increment: dn; font-size: clamp(1.1rem, 1.8vw, 1.7rem); line-height: 1.4;
  margin-bottom: 0.9rem; padding-left: 2.4rem; position: relative; color: var(--ink);
}
.do-now ol li::before {
  content: counter(dn); position: absolute; left: 0; top: 0.05em;
  font-family: 'Bebas Neue'; color: var(--accent); font-size: 1.3em; line-height: 1;
}

/* Model answer block */
.model {
  background: var(--bg-2); border: 1px solid var(--rule);
  border-top: 3px solid var(--good);
  padding: clamp(1.2rem, 2.4vw, 2rem); max-width: 80ch;
}
.model .tag {
  font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--good); margin-bottom: 0.7rem; display: block;
}
.model p { font-size: clamp(1rem, 1.5vw, 1.4rem); line-height: 1.55; color: var(--ink); }
.model .mark-tag { color: var(--accent-2); font-family: 'JetBrains Mono', monospace; font-size: 0.75em; }
.model .anno { color: var(--accent-2); font-weight: 600; }

/* COCA / labelled inline tags */
.lbl {
  display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 0.62em;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--bg);
  background: var(--accent); padding: 0.05em 0.5em; border-radius: 2px; margin-right: 0.3em;
  vertical-align: middle;
}
.lbl.g { background: var(--good); } .lbl.i { background: var(--info); } .lbl.w { background: var(--warn); }

/* Pills / chips */
.pillrow { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.4rem; }
.pill {
  font-family: 'JetBrains Mono', monospace; font-size: clamp(0.8rem, 1.1vw, 1.05rem);
  letter-spacing: 0.06em; padding: 0.5rem 0.95rem; background: var(--bg-3);
  border: 1px solid var(--rule-2); color: var(--ink);
}
.pill.accent { border-color: var(--accent); color: var(--accent-2); }

/* "Your turn" call to action → links to the interactive app */
.your-turn {
  background: linear-gradient(180deg, var(--bg-2), var(--bg-3));
  border: 1px solid var(--rule-2); padding: clamp(1.2rem, 2.4vw, 2rem); max-width: 70ch;
}
.your-turn .tag {
  font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--accent-2); margin-bottom: 0.8rem; display: block;
}
.your-turn a {
  color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--accent);
  font-weight: 600;
}
.your-turn a:hover { color: var(--accent-2); }
.your-turn .url {
  font-family: 'JetBrains Mono', monospace; font-size: clamp(1rem,1.6vw,1.5rem);
  color: var(--accent-2); margin: 0.5rem 0 0.3rem; letter-spacing: 0.02em;
}

/* Active-note cue (maps to the printed handout) */
.note-cue {
  display: inline-flex; align-items: center; gap: 0.55rem; margin-top: clamp(1rem,2vh,1.6rem);
  font-family: 'JetBrains Mono', monospace; font-size: clamp(0.78rem,1.1vw,1rem);
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--warn);
}
.note-cue::before { content: '✎'; font-size: 1.3em; }

.muted { color: var(--ink-dim); }
.spacer { height: clamp(1rem, 3vh, 2.4rem); }
.small { font-size: 0.8em; }

/* --- Deck chrome: progress, counter, controls --- */
.deck-chrome {
  position: fixed; z-index: 6; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.6rem clamp(1rem, 3vw, 2rem);
  pointer-events: none;
}
.deck-brand {
  font-family: 'JetBrains Mono', monospace; font-size: 0.6rem; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--ink-dim); pointer-events: auto;
}
.deck-brand .dot { color: var(--accent); }
.deck-nav { display: flex; align-items: center; gap: 0.6rem; pointer-events: auto; }
.deck-nav button {
  background: var(--bg-2); border: 1px solid var(--rule-2); color: var(--ink);
  font-family: 'Bebas Neue', sans-serif; font-size: 1.1rem; letter-spacing: 0.1em;
  width: 2.4rem; height: 2.1rem; cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.deck-nav button:hover { background: var(--bg-3); border-color: var(--accent); }
.deck-counter {
  font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; letter-spacing: 0.18em;
  color: var(--ink-mid); min-width: 4.5rem; text-align: center;
}
.deck-counter b { color: var(--ink); }

.deck-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 6;
  background: rgba(244,234,213,0.06);
}
.deck-progress-fill {
  height: 100%; width: 0;
  background: linear-gradient(to right, var(--accent-dim), var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(220,38,38,0.5);
  transition: width 0.35s cubic-bezier(.16,1,.3,1);
}

/* Click zones for tapping forward/back */
.tap-zone { position: fixed; top: 0; bottom: 3rem; width: 22%; z-index: 4; cursor: pointer; }
.tap-zone.prev { left: 0; } .tap-zone.next { right: 0; }

/* Help hint */
.deck-help {
  position: fixed; top: 0.8rem; right: 1rem; z-index: 6;
  font-family: 'JetBrains Mono', monospace; font-size: 0.6rem; letter-spacing: 0.18em;
  color: var(--ink-dim); text-transform: uppercase; pointer-events: none;
  opacity: 0.7;
}

/* --- Print: stack every slide as an A4 handout --- */
@media print {
  html, body { height: auto; overflow: visible; background: #fff; color: #111; }
  .grain, body::after, .deck-chrome, .deck-progress, .tap-zone, .deck-help { display: none !important; }
  .deck { position: static; }
  .slide {
    position: static; display: flex !important; opacity: 1 !important; animation: none;
    page-break-after: always; min-height: 90vh; padding: 1.5cm;
    border-bottom: 1px solid #ccc;
  }
  .slide-title, h2.head, .panel h3 { color: #111; }
  .lede, .points > li, .panel p, .model p { color: #222; }
  .kicker { color: var(--accent); }
}

@media (prefers-reduced-motion: reduce) {
  .grain, .do-now .label::before { animation: none !important; }
  .slide { animation: none !important; }
  * { transition: none !important; }
}

/* Narrow screens (preview/phone) */
@media (max-width: 760px) {
  .cols, .cols.c3 { grid-template-columns: 1fr; }
  .slide { padding: 3.5rem 1.5rem 4rem; justify-content: flex-start; overflow-y: auto; }
}
