/* =====================================================================
   O&A Consulting — reveal.js brand theme (gold-on-dark)
   Field notes: "Goldens Aren't Ground Truth"
   ===================================================================== */

:root {
  --bg: #0a0b0e;
  --bg-warm: #0e0f13;
  --surface: #14161c;
  --surface-2: #191c24;
  --edge: rgba(227, 176, 75, 0.22);
  --edge-soft: rgba(236, 231, 221, 0.12);
  --fg: #ece7dd;
  --fg-soft: #c3bdb2;
  --muted: #8b8f99;
  --gold: #e3b04b;
  --gold-hi: #f2d494;
  --gold-deep: #8f6c1f;
  --pass: #8fd39a;
  --pass-bg: rgba(143, 211, 154, 0.10);
  --fail: #e6746b;
  --fail-bg: rgba(230, 116, 107, 0.12);
  --display: "Fraunces", "Didot", Georgia, serif;
  --sans: "Inter", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
}

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

html, body { background: var(--bg); }

.reveal {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--fg-soft);
  font-size: 30px;
}

.reveal .slides { text-align: left; }
.reveal .slides section { top: 0 !important; }

/* a soft gold glow anchored top-right of every slide */
.reveal .backgrounds { background: var(--bg); }
.reveal::after {
  content: "";
  position: fixed;
  top: -14vh; right: -10vw;
  width: 60vw; height: 60vh;
  background: radial-gradient(circle, rgba(227, 176, 75, 0.10), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ---------- typography ---------- */
.reveal h1, .reveal h2, .reveal h3 {
  font-family: var(--display);
  font-weight: 400;
  color: var(--fg);
  letter-spacing: -0.015em;
  line-height: 1.06;
  text-transform: none;
  margin: 0 0 0.5em;
}
.reveal h1 { font-size: 2.5em; }
.reveal h2 { font-size: 1.72em; margin-bottom: 0.7em; }
.reveal h3 { font-size: 1.1em; }
.reveal em { color: var(--gold-hi); font-style: italic; }
.reveal strong { color: var(--fg); font-weight: 600; }
.reveal .gold { color: var(--gold); }
.reveal .red { color: var(--fail); font-style: italic; }
.reveal p { line-height: 1.5; margin: 0 0 0.6em; }
.reveal a { color: var(--gold); text-decoration: none; border-bottom: 1px solid var(--edge); }
.reveal a:hover { color: var(--gold-hi); }

.kicker {
  font-family: var(--mono);
  font-size: 0.52em;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.1em;
}
.subtle { color: var(--muted); font-size: 0.62em; font-family: var(--mono); letter-spacing: 0.04em; }
.lede { color: var(--fg-soft); font-size: 0.92em; max-width: 20em; }

.rule { height: 1px; background: linear-gradient(90deg, var(--gold), transparent); margin: 0.8em 0 1em; }

/* ---------- controls / progress ---------- */
.reveal .progress { color: var(--gold); height: 3px; }
.reveal .controls { color: var(--gold); }
.reveal .slide-number { background: transparent; color: var(--muted); font-family: var(--mono); }

/* ---------- title slide ---------- */
.title-slide .brand {
  font-family: var(--display);
  font-size: 0.72em;
  color: var(--fg);
}
.title-slide .brand em { color: var(--gold); font-style: normal; }
.title-slide h1 { margin-top: 0.3em; max-width: 15em; }
.title-slide .foot {
  position: absolute; bottom: -2.2em; left: 0; right: 0;
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 0.5em; letter-spacing: 0.06em;
  color: var(--muted); text-transform: uppercase;
}

/* ---------- generic lists ---------- */
.reveal ul.clean { list-style: none; margin: 0; padding: 0; }
.reveal ul.clean li {
  padding: 0.5em 0 0.5em 1.3em;
  position: relative;
  border-bottom: 1px solid var(--edge-soft);
  font-size: 0.82em;
  line-height: 1.4;
}
.reveal ul.clean li::before {
  content: "→"; position: absolute; left: 0; color: var(--gold);
}
.reveal ul.clean li strong { color: var(--fg); }
.reveal ul.clean li .why { color: var(--muted); }

/* ---------- quadrant (where goldens fit) ---------- */
.quad { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 0.4em; }
.quad .cell {
  border: 1px solid var(--edge-soft);
  border-radius: 10px;
  padding: 16px 18px;
  background: linear-gradient(160deg, rgba(227,176,75,0.05), transparent 70%), var(--bg-warm);
}
.quad .cell .t {
  font-family: var(--mono); font-size: 0.44em; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 0.5em;
}
.quad .cell h3 { font-size: 0.92em; margin: 0 0 0.25em; }
.quad .cell p { font-size: 0.62em; color: var(--fg-soft); margin: 0; line-height: 1.42; }

/* ---------- interactive: drift demo ---------- */
.drift-stage { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; margin: 0.3em 0 0.6em; align-items: start; }

.panel {
  border: 1px solid var(--edge-soft);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
}
.panel-head {
  font-family: var(--mono); font-size: 0.46em; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
  padding: 10px 14px; border-bottom: 1px solid var(--edge-soft);
  background: var(--bg-warm);
}
.panel-body { padding: 14px 16px; font-size: 0.62em; line-height: 1.5; color: var(--fg-soft); }
.panel-body p { margin: 0 0 0.5em; }
.panel-body p:last-child { margin: 0; }
.answer-add {
  color: var(--fg);
  border-left: 2px solid var(--gold);
  padding-left: 10px;
  background: rgba(227, 176, 75, 0.06);
}

.drift-checks { display: flex; flex-direction: column; gap: 12px; }
.badge {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--edge-soft); border-radius: 9px;
  padding: 12px 14px; font-size: 0.6em; font-family: var(--mono);
  letter-spacing: 0.03em; color: var(--fg-soft);
  transition: border-color 0.4s ease, background 0.4s ease;
}
.badge .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; transition: background 0.4s ease, box-shadow 0.4s ease; }
.badge .label { flex: 1; }
.badge b { font-family: var(--mono); letter-spacing: 0.06em; }
.badge.pass { background: var(--pass-bg); border-color: rgba(143,211,154,0.35); color: var(--pass); }
.badge.pass .dot { background: var(--pass); box-shadow: 0 0 10px rgba(143,211,154,0.7); }
.badge.pass b { color: var(--pass); }
.badge.fail { background: var(--fail-bg); border-color: rgba(230,116,107,0.45); color: var(--fail); }
.badge.fail .dot { background: var(--fail); box-shadow: 0 0 12px rgba(230,116,107,0.8); }
.badge.fail b { color: var(--fail); }
.badge .sub { display: block; margin-top: 4px; font-size: 0.82em; color: var(--muted); letter-spacing: 0; }
.badge.fail .sub { color: var(--fail); opacity: 0.85; }
.badge.pass .sub { color: var(--pass); opacity: 0.8; }

.oa-btn {
  font-family: var(--mono); font-size: 0.56em; letter-spacing: 0.04em;
  color: var(--bg); background: var(--gold);
  border: none; border-radius: 8px; padding: 12px 20px; cursor: pointer;
  transition: background 0.2s ease, transform 0.08s ease;
}
.oa-btn:hover { background: var(--gold-hi); }
.oa-btn:active { transform: translateY(1px); }
.oa-btn.ghost { background: transparent; color: var(--gold); border: 1px solid var(--edge); }
.oa-btn.ghost:hover { color: var(--gold-hi); border-color: var(--gold); }
/* when the button is an anchor, beat reveal's base `.reveal a` gold/underline */
.reveal a.oa-btn { color: var(--bg); border-bottom: none; }
.reveal a.oa-btn:hover { color: var(--bg); }
.reveal a.oa-btn.ghost { color: var(--gold); }
.reveal a.oa-btn.ghost:hover { color: var(--gold-hi); }

.drift-caption, .stage-caption {
  font-family: var(--display); font-style: italic; font-size: 0.72em;
  color: var(--fg); margin-top: 0.7em; min-height: 1.4em;
}
.drift-caption .em { color: var(--gold-hi); }

.flash { animation: flash 0.6s ease; }
@keyframes flash { 0% { background: rgba(230,116,107,0.0); } 30% { background: rgba(230,116,107,0.22); } 100% { background: rgba(230,116,107,0.0); } }
.reveal .fade-in { animation: fadeUp 0.5s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- cost curves (bars) ---------- */
.curves { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-top: 0.4em; }
.curve h3 { font-size: 0.95em; margin-bottom: 0.1em; }
.curve .cap { font-size: 0.58em; color: var(--muted); margin-bottom: 0.9em; font-family: var(--mono); letter-spacing: 0.03em; }
.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-size: 0.55em; font-family: var(--mono); }
.bar-row .bl { width: 5.5em; color: var(--fg-soft); flex: none; }
.bar-track { flex: 1; height: 12px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.bar-fill { height: 100%; width: 0; border-radius: 6px; transition: width 1.1s cubic-bezier(.2,.7,.2,1); }
.bar-fill.gold { background: linear-gradient(90deg, var(--gold-deep), var(--gold)); }
.bar-fill.red { background: linear-gradient(90deg, #7a2f2a, var(--fail)); }
.curve .pt { font-size: 0.62em; color: var(--fg-soft); margin-top: 0.8em; line-height: 1.4; }
.curve .pt strong { color: var(--fg); }

/* ---------- oracle problem ---------- */
.oracle-card {
  border: 1px solid var(--edge-soft); border-radius: 10px; background: var(--surface);
  max-width: 20em; margin-top: 0.3em;
}
.oracle-card .panel-body { font-size: 0.66em; }
.q { color: var(--muted); }
.golden-ans { color: var(--fg); }
.mark { position: relative; }
.mark.bad { color: var(--fail); }
.oracle-reveal { display: none; margin-top: 0.8em; font-size: 0.62em; line-height: 1.45; color: var(--fg-soft); }
.oracle-reveal.show { display: block; animation: fadeUp 0.5s ease both; }
.oracle-reveal strong { color: var(--fg); }
.strike { text-decoration: line-through; text-decoration-color: var(--fail); text-decoration-thickness: 2px; }

/* ---------- layer stack (what instead) ---------- */
.layers { display: flex; flex-direction: column; gap: 10px; margin-top: 0.3em; max-width: 22em; }
.layer {
  border: 1px solid var(--edge-soft); border-radius: 9px; padding: 12px 16px;
  background: linear-gradient(160deg, rgba(227,176,75,0.05), transparent 70%), var(--bg-warm);
  display: flex; align-items: baseline; gap: 12px;
}
.layer .n { font-family: var(--mono); font-size: 0.5em; color: var(--gold); flex: none; letter-spacing: 0.1em; }
.layer .txt { font-size: 0.62em; line-height: 1.35; }
.layer .txt b { color: var(--fg); }
.layer.foundation { border-color: var(--edge); background: linear-gradient(160deg, rgba(227,176,75,0.12), transparent 75%), var(--bg-warm); }
.layer.one-of { opacity: 0.72; }

/* ---------- close ---------- */
.close-slide h2 { max-width: 15em; }
.close-actions { display: flex; gap: 14px; margin-top: 1.2em; align-items: center; flex-wrap: wrap; }

/* ---------- misc helpers ---------- */
.hint {
  font-family: var(--mono); font-size: 0.46em; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); margin-top: 1.4em;
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.pull-q {
  border-left: 2px solid var(--gold); padding-left: 16px;
  font-family: var(--display); font-size: 0.95em; color: var(--fg); line-height: 1.4;
  font-style: italic;
}

/* =====================================================================
   Mobile — reveal switches to scroll view (see app.js). Everything goes
   single-column, tap targets grow, and the absolutely-placed footers
   return to normal flow so nothing overlaps while scrolling.
   ===================================================================== */
@media (max-width: 800px) {
  /* scale is locked 1:1 (see app.js), so these are real on-screen sizes */
  .reveal { font-size: 19px; }
  .reveal h1 { font-size: 2.1em; }
  .reveal h2 { font-size: 1.6em; margin-bottom: 0.6em; }
  .reveal h3 { font-size: 1.15em; }
  .kicker { font-size: 0.62em; }

  /* the fixed glow can smear while scrolling a long page; calm it down */
  .reveal::after { position: absolute; height: 40vh; }

  .drift-stage,
  .two-col,
  .quad,
  .curves { grid-template-columns: 1fr; gap: 14px; }

  .layers, .oracle-card, .lede, .pull-q { max-width: none; }
  .lede { font-size: 1em; }
  .quad .cell p, .panel-body, .layer .txt, .curve .pt { font-size: 0.86em; }
  .badge { font-size: 0.82em; padding: 14px 15px; }
  .drift-caption, .stage-caption { font-size: 1em; }

  .oa-btn {
    display: block; width: 100%; text-align: center;
    padding: 15px 18px; font-size: 0.82em; line-height: 1.35;
  }
  .close-actions { flex-direction: column; align-items: stretch; }
  .close-actions .oa-btn { width: 100%; }

  /* footers back into flow on the title & close slides */
  .title-slide .foot,
  .close-slide .foot {
    position: static !important;
    margin-top: 1.4em;
    flex-direction: column;
    gap: 0.3em;
    font-size: 0.62em;
  }

  /* real edge padding (canvas margin is 0 on mobile) + page separation */
  .reveal .slides section { padding: 5vh 20px; }
}
