/* =========================================================================
   Flying Banana Productions — Summer Studio 2026 talk deck
   "When the Prototype Is the Product"
   Palette + type drawn from the FBP brand: parchment, banana, rust, teal.
   Presented dark ("the banana cave") for projector contrast.
   ========================================================================= */

:root {
  /* Brand palette (from www-fbp-com) */
  --parchment:      #e0c78e;
  --parchment-deep: #b48b4a;
  --panel:          #f3e1b4;
  --panel-soft:     #f6edd0;
  --ink:            #21160f;
  --ink-soft:       #4a3525;

  --yellow: #ffb933;
  --rust:   #d26036;
  --sun:    #f4853a;
  --teal:   #1c8a7a;
  --olive:  #b9a14a;

  /* Dark stage */
  --stage-0: #15100b;
  --stage-1: #221913;
  --stage-2: #2b2219;
  --cream:   #f6edd0;
  --cream-dim: #cdbb95;

  /* Per-act accent (set on .slide via data-accent) */
  --accent: var(--yellow);

  --serif: 'DM Serif Display', Georgia, serif;
  --sans:  'Space Grotesk', system-ui, -apple-system, sans-serif;
  --mono:  'Space Mono', ui-monospace, 'SFMono-Regular', monospace;

  --maxw: 1180px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }

body {
  font-family: var(--sans);
  color: var(--cream);
  background:
    radial-gradient(120% 90% at 50% -10%, #3a2c1d 0%, var(--stage-1) 45%, var(--stage-0) 100%);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Subtle film grain over the whole stage */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* =========================  DECK / SLIDES  ============================= */

#deck {
  position: fixed;
  inset: 0;
  z-index: 1;
}

.slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(2rem, 5vw, 5.5rem) clamp(2rem, 7vw, 7rem);
  opacity: 0;
  visibility: hidden;
  transform: translateY(28px) scale(0.985);
  transition: opacity 0.55s var(--ease), transform 0.7s var(--ease);
}
.slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  z-index: 2;
}
.slide.is-prev {
  opacity: 0;
  transform: translateY(-22px) scale(0.985);
}

.slide__inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
}

/* Accent colour wiring */
.slide[data-accent="teal"]   { --accent: var(--teal); }
.slide[data-accent="sun"]    { --accent: var(--sun); }
.slide[data-accent="rust"]   { --accent: var(--rust); }
.slide[data-accent="yellow"] { --accent: var(--yellow); }
.slide[data-accent="olive"]  { --accent: var(--olive); }

/* =========================  TYPE  ===================================== */

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.04; margin: 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: clamp(0.7rem, 1vw, 0.85rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.eyebrow::before {
  content: "";
  width: 2.4rem;
  height: 2px;
  background: var(--accent);
  display: inline-block;
}

h1.title { font-size: clamp(2.8rem, 8.5vw, 6.6rem); letter-spacing: -0.01em; }
h2.head  { font-size: clamp(2.1rem, 5.6vw, 4.2rem); }
h3.sub   { font-size: clamp(1.4rem, 3vw, 2.2rem); }

.accent  { color: var(--accent); }
.serif   { font-family: var(--serif); }

.lead {
  font-size: clamp(1.15rem, 1.9vw, 1.6rem);
  line-height: 1.5;
  color: var(--cream-dim);
  max-width: 40ch;
  margin: 1.6rem 0 0;
}
.lead.wide { max-width: 56ch; }

.big-statement {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.big-statement em { font-style: normal; color: var(--accent); }

p { margin: 0.8rem 0; }
strong { color: var(--cream); }

/* Sunset stripe motif — a recurring brand rule */
.stripes {
  display: flex;
  height: 8px;
  width: clamp(120px, 22vw, 260px);
  border-radius: 99px;
  overflow: hidden;
  margin: 0 0 2rem;
}
.stripes i { flex: 1; }
.stripes i:nth-child(1) { background: var(--rust); }
.stripes i:nth-child(2) { background: var(--sun); }
.stripes i:nth-child(3) { background: var(--yellow); }
.stripes i:nth-child(4) { background: var(--panel-soft); }
.stripes i:nth-child(5) { background: var(--teal); }

/* =========================  LAYOUT HELPERS  ========================== */

.cols {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.cols.narrow-left { grid-template-columns: 0.85fr 1.15fr; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; gap: 2rem; } }

.stack > * + * { margin-top: 1.1rem; }

/* Bullet lists with brand ticks */
ul.ticks { list-style: none; margin: 1.4rem 0 0; padding: 0; }
ul.ticks li {
  position: relative;
  padding-left: 2rem;
  margin: 0.85rem 0;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.45;
  color: var(--cream-dim);
}
ul.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 0.7rem; height: 0.7rem;
  background: var(--accent);
  border-radius: 2px;
  transform: rotate(45deg);
}
ul.ticks li strong { color: var(--cream); }

/* Stat blocks */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: clamp(1rem, 2.4vw, 2.2rem);
  margin-top: 2rem;
}
.stat { text-align: left; }
.stat .num {
  font-family: var(--mono);
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat .lbl {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin-top: 0.6rem;
}

/* Panels / cards */
.panel {
  background: linear-gradient(180deg, rgba(246,237,208,0.07), rgba(246,237,208,0.03));
  border: 1px solid rgba(246,237,208,0.14);
  border-radius: 18px;
  padding: clamp(1.4rem, 2.4vw, 2.2rem);
  backdrop-filter: blur(2px);
}
.panel + .panel { margin-top: 1rem; }

.two-card { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.two-card .panel + .panel { margin-top: 0; }
@media (max-width: 900px) { .two-card { grid-template-columns: 1fr; } }
.card h3 { font-family: var(--sans); font-weight: 700; font-size: 1.15rem; color: var(--accent); margin-bottom: 0.6rem; }
.card.warn { border-color: rgba(210,96,54,0.45); }
.card.go   { border-color: rgba(28,138,122,0.5); }

/* Image / screenshot placeholder slot */
.shot {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(246,237,208,0.16);
  background:
    repeating-linear-gradient(45deg, rgba(246,237,208,0.04) 0 14px, rgba(246,237,208,0.02) 14px 28px),
    linear-gradient(160deg, var(--stage-2), var(--stage-0));
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  box-shadow: 0 30px 70px rgba(0,0,0,0.45);
}
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* For UI screenshots / mockups where nothing should be cropped */
.shot--contain { background: linear-gradient(160deg, #241a12, #15100b); }
.shot--contain img { object-fit: contain; }
/* Free-aspect image band (e.g. the wide mockup composite): container hugs the image */
.shot.band { aspect-ratio: auto; display: block; }
.shot.band img { position: static; width: 100%; height: auto; }
.shot[data-placeholder]::after {
  content: "▣  " attr(data-placeholder);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--cream-dim);
  text-transform: uppercase;
  padding: 0 2rem;
  text-align: center;
}
.shot.tall { aspect-ratio: 4 / 5; }
.shot.wide { aspect-ratio: 16 / 9; }

.caption {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin-top: 0.9rem;
}

/* Pull-quote */
.quote {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
}
.quote .mark { color: var(--accent); }
.quote-attr {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin-top: 1.6rem;
}

/* Logo lockup */
.brand-lockup { display: flex; align-items: center; gap: 1.4rem; }
.brand-lockup img { width: clamp(76px, 9vw, 128px); height: auto; filter: drop-shadow(0 8px 24px rgba(0,0,0,0.5)); }
.brand-lockup .bl-name { font-family: var(--serif); font-size: clamp(1.1rem, 2vw, 1.6rem); line-height: 1.1; }
.brand-lockup .bl-sub { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--cream-dim); margin-top: 0.4rem; }

/* Hero logo (title slide) */
.hero-logo { width: clamp(150px, 22vw, 300px); height: auto; margin: 0 auto 2.2rem; display: block; filter: drop-shadow(0 18px 50px rgba(0,0,0,0.55)); }

/* Timeline ribbon (origin / arc slides) */
.arc {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.6rem;
  margin-top: 2.4rem;
}
.arc .node { text-align: left; opacity: 0.45; transition: opacity 0.3s; }
.arc .node.on { opacity: 1; }
.arc .node .yr { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; color: var(--accent); }
.arc .node .nm { font-family: var(--serif); font-size: clamp(0.95rem, 1.5vw, 1.3rem); margin-top: 0.3rem; }
.arc .node .role { font-size: 0.78rem; color: var(--cream-dim); margin-top: 0.25rem; line-height: 1.3; }
.arc .bar { grid-column: 1 / -1; height: 3px; background: linear-gradient(90deg, var(--rust), var(--sun), var(--yellow), var(--teal)); border-radius: 99px; margin-bottom: 0.9rem; }

/* Toolkit / framework table */
.matrix { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; margin-top: 1.8rem; }
@media (max-width: 900px){ .matrix { grid-template-columns: 1fr; } }

/* Centered slide variant */
.slide.center .slide__inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.slide.center .eyebrow { justify-content: center; }
.slide.center .stripes { margin-left: auto; margin-right: auto; }
.slide.center .lead { margin-left: auto; margin-right: auto; }

/* =========================  PRODUCT CO-BRAND THEMES  ================= */
/* The PlayerDesk / CHIEF / Deed Lineage acts each take on their product's
   palette — FBP type & layout persist. (Also a live demo of what a few CSS
   variables buy you when the deck is HTML.) */

.slide[data-theme="playerdesk"] {
  --accent: #7cc79a;             /* club green, lifted for dark bg */
  background: radial-gradient(120% 90% at 50% -10%, #24402d 0%, #16281c 45%, #0c1510 100%);
}
.slide[data-theme="playerdesk"] .panel {
  background: linear-gradient(180deg, rgba(233,237,233,0.08), rgba(233,237,233,0.03));
  border-color: rgba(169,201,168,0.28);
}
.slide[data-theme="playerdesk"] .shot { border-color: rgba(169,201,168,0.3); }

.slide[data-theme="chief"] {
  --accent: #6fa3f7;             /* clinical blue */
  background: radial-gradient(120% 90% at 50% -10%, #202a3d 0%, #151d2c 45%, #0b111c 100%);
}
.slide[data-theme="chief"] .panel {
  background: linear-gradient(180deg, rgba(226,234,248,0.07), rgba(226,234,248,0.03));
  border-color: rgba(111,163,247,0.26);
}
.slide[data-theme="chief"] .shot { border-color: rgba(111,163,247,0.28); }

.slide[data-theme="deed"] {
  --accent: #ae6435;             /* survey amber */
  --cream: #2b2114;              /* flip to ink on vellum */
  --cream-dim: #5c4a33;
  color: var(--cream);
  background: radial-gradient(120% 90% at 50% -10%, #f4eedc 0%, #e6e0ce 45%, #cfc3a6 100%);
}
.slide[data-theme="deed"] .panel {
  background: rgba(255,252,240,0.55);
  border-color: rgba(99,89,76,0.32);
  backdrop-filter: none;
}
.slide[data-theme="deed"] .shot {
  border-color: rgba(99,89,76,0.4);
  box-shadow: 0 24px 55px rgba(60,45,20,0.35);
}
.slide[data-theme="deed"] ul.ticks li::before { background: var(--accent); }

/* HUD legibility when the active slide is a light theme */
body.on-light .hud, body.on-light #brand-corner { color: #5c4a33; }
body.on-light #counter b { color: #2b2114; }

/* =========================  FIELD-GUIDE TABLE  ======================= */

.tbl { width: 100%; border-collapse: collapse; margin-top: 1.8rem;
       font-size: clamp(0.85rem, 1.35vw, 1.08rem); }
.tbl th {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent); text-align: left;
  padding: 0.55rem 0.95rem; border-bottom: 2px solid rgba(246,237,208,0.25);
}
.tbl td {
  padding: 0.68rem 0.95rem; border-bottom: 1px solid rgba(246,237,208,0.12);
  color: var(--cream-dim); vertical-align: top; line-height: 1.4;
}
.tbl td:first-child { color: var(--cream); font-weight: 600; }
.tbl td:nth-child(2) { color: var(--accent); font-weight: 600; white-space: nowrap; }

/* =========================  CHROME / HUD  ============================ */

#progress {
  position: fixed;
  left: 0; bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--rust), var(--sun), var(--yellow), var(--teal));
  z-index: 20;
  transition: width 0.45s var(--ease);
  box-shadow: 0 0 18px rgba(244,133,58,0.5);
}

.hud {
  position: fixed;
  z-index: 20;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--cream-dim);
  text-transform: uppercase;
}
#counter { right: 1.4rem; bottom: 1.1rem; }
#counter b { color: var(--cream); }
#act-tag { left: 1.4rem; bottom: 1.1rem; }
#act-tag .dot { display:inline-block; width:7px; height:7px; border-radius:99px; background: var(--accent); margin-right:0.5rem; vertical-align: middle; }

#brand-corner {
  position: fixed; top: 1.2rem; left: 1.4rem; z-index: 20;
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--cream-dim);
}
#brand-corner img { width: 26px; height: 26px; }

/* Timer (presenter) */
#timer {
  position: fixed; top: 1.1rem; right: 1.4rem; z-index: 20;
  font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.1em;
  color: var(--cream-dim);
  background: rgba(21,16,11,0.6); border: 1px solid rgba(246,237,208,0.14);
  border-radius: 99px; padding: 0.35rem 0.85rem;
  display: none; align-items: center; gap: 0.6rem;
}
#timer.on { display: inline-flex; }
#timer b { color: var(--cream); }
#timer button { all: unset; cursor: pointer; color: var(--accent); font-size: 0.9rem; }

/* =========================  SPEAKER NOTES  ========================== */

.notes { display: none; }

body.presenter #deck { right: 34%; }
body.presenter .slide { padding-right: clamp(1.5rem, 3vw, 3rem); }
#notes-pane {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 34%;
  background: #0e0a07;
  border-left: 1px solid rgba(246,237,208,0.14);
  z-index: 25;
  padding: 2.2rem 1.8rem;
  overflow-y: auto;
  display: none;
  flex-direction: column;
}
body.presenter #notes-pane { display: flex; }
#notes-pane h4 {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--yellow); margin: 0 0 0.4rem;
}
#notes-pane .np-title { font-family: var(--serif); font-size: 1.3rem; color: var(--cream); margin-bottom: 1.2rem; line-height: 1.15; }
#notes-pane .np-body { font-size: 0.98rem; line-height: 1.6; color: var(--cream-dim); }
#notes-pane .np-body li { margin: 0.5rem 0; }
#notes-pane .np-next {
  margin-top: auto; padding-top: 1.4rem; border-top: 1px solid rgba(246,237,208,0.12);
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.08em; color: var(--cream-dim);
}
#notes-pane .np-next b { color: var(--sun); }

/* =========================  OVERVIEW GRID  ========================== */

#overview {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(10,7,4,0.96);
  display: none;
  padding: 2.5rem;
  overflow-y: auto;
}
#overview.on { display: block; }
#overview .ov-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  max-width: 1400px; margin: 0 auto;
}
.ov-card {
  aspect-ratio: 16/10;
  border: 1px solid rgba(246,237,208,0.16);
  border-radius: 12px;
  padding: 1rem;
  cursor: pointer;
  background: linear-gradient(160deg, var(--stage-2), var(--stage-0));
  display: flex; flex-direction: column; justify-content: space-between;
  transition: border-color 0.2s, transform 0.2s;
}
.ov-card:hover { border-color: var(--accent, var(--yellow)); transform: translateY(-3px); }
.ov-card.cur { border-color: var(--yellow); box-shadow: 0 0 0 2px rgba(255,185,51,0.4); }
.ov-card .ov-n { font-family: var(--mono); font-size: 0.7rem; color: var(--cream-dim); }
.ov-card .ov-t { font-family: var(--serif); font-size: 1.05rem; color: var(--cream); line-height: 1.1; }

/* =========================  HELP  ================================== */

#help {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(10,7,4,0.9);
  display: none; place-items: center;
}
#help.on { display: grid; }
#help .help-card {
  background: var(--stage-2); border: 1px solid rgba(246,237,208,0.16);
  border-radius: 18px; padding: 2.4rem 2.8rem; max-width: 460px;
  font-family: var(--mono); font-size: 0.9rem; color: var(--cream-dim);
}
#help h4 { font-family: var(--serif); font-size: 1.6rem; color: var(--cream); margin: 0 0 1.4rem; }
#help dl { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem 1.4rem; margin: 0; }
#help dt { color: var(--yellow); }
#help kbd {
  background: rgba(246,237,208,0.1); border: 1px solid rgba(246,237,208,0.2);
  border-radius: 5px; padding: 0.1rem 0.45rem; font-size: 0.8rem;
}

/* =========================  PRINT (PDF export)  ==================== */

@media print {
  @page { size: 1280px 720px; margin: 0; }
  body { overflow: visible; background: var(--stage-1); }
  body::after, .hud, #progress, #brand-corner, #timer, #notes-pane, #overview, #help { display: none !important; }
  #deck { position: static; right: 0 !important; }
  .slide {
    position: relative !important;
    opacity: 1 !important; visibility: visible !important; transform: none !important;
    page-break-after: always;
    width: 1280px; height: 720px;
    break-inside: avoid;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slide { transition: opacity 0.2s linear; transform: none !important; }
}
