/* ============================================================
   Phase 1 — shared design system for /timeline + 4 installation sites
   Tokens extracted from docs/phase1-revised/index.html.
   Document mode (single scrollable page), not slide-snap deck.
   ============================================================ */

:root {
  /* base palette */
  --bg: #f8f7f4;
  --bg-soft: #fcfbf8;
  --bg-card: #ffffff;
  --bg-alt: #f2efe8;
  --border: #e2e0d8;
  --border-strong: #ccc9be;
  --text: #1a1a2e;
  --text-mid: #4a4a5a;
  --text-dim: #7a7a8a;

  /* accent system, one per installation + neutrals */
  --gold: #b8860b;          /* Skills & Drills */
  --gold-light: #daa520;
  --gold-bg: #fdf6e3;
  --gold-border: #e6d5a0;
  --green: #059669;         /* Mini Games */
  --green-bg: #ecfdf5;
  --green-border: #a7f3d0;
  --blue: #2563eb;          /* Decision */
  --blue-light: #60a5fa;
  --blue-bg: #eff6ff;
  --blue-border: #bfdbfe;
  --purple: #7c3aed;        /* Dribble Around the World */
  --purple-bg: #f5f3ff;
  --purple-border: #ddd6fe;
  --red: #dc2626;
  --red-bg: #fef3f2;

  --font-display: "New Amsterdam", "Arial Narrow", sans-serif;
  --font-body: "Inter Tight", "Inter", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --page-max: 1280px;
  --section-pad: clamp(56px, 7vw, 96px);

  /* installation-specific accent. Default = gold; per-page override below. */
  --accent: var(--gold);
  --accent-bg: var(--gold-bg);
  --accent-border: var(--gold-border);
}

* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  font-weight: 500;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgba(184, 134, 11, 0.06), transparent 28%),
    radial-gradient(circle at 85% 12%, rgba(37, 99, 235, 0.05), transparent 24%),
    linear-gradient(180deg, #fbfaf7 0%, var(--bg) 38%, #f4f1ea 100%);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}
::selection { background: var(--accent); color: #fff; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) { .container { padding: 0 20px; } }

/* ============================================================
   Top nav strip — small, monospace, links between timeline + 4 sites
   ============================================================ */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 247, 244, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topnav-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 12px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.topnav-logo {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--accent);
}
.topnav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
  flex-wrap: wrap;
}
.topnav-links a {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-mid);
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: all 0.15s;
}
.topnav-links a:hover { color: var(--text); background: var(--bg-card); border-color: var(--border); text-decoration: none; }
.topnav-links a.is-active {
  color: var(--accent);
  background: var(--accent-bg);
  border-color: var(--accent-border);
}
@media (max-width: 720px) {
  .topnav-inner { padding: 10px 20px; gap: 12px; }
  .topnav-logo { display: none; }
  .topnav-links { margin-left: 0; }
  .topnav-links a { padding: 6px 8px; font-size: 10px; letter-spacing: 1px; }
}

/* ============================================================
   Hero — cover with display title + meta
   ============================================================ */
.hero {
  padding: var(--section-pad) 0 calc(var(--section-pad) * 0.55);
  position: relative;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 28px;
}
.hero-eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.96;
  letter-spacing: 0.005em;
  font-weight: 400;
  color: var(--text);
  max-width: 16ch;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub {
  margin-top: 22px;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.55;
  color: var(--text-mid);
  max-width: 56ch;
}

.hero-meta {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
@media (max-width: 760px) { .hero-meta { grid-template-columns: repeat(2, 1fr); } }
.hero-meta-cell {
  background: var(--bg-card);
  padding: 18px 20px;
}
.hero-meta-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 6px;
}
.hero-meta-val {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.05;
  color: var(--text);
}
.hero-meta-val small {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  margin-left: 6px;
  letter-spacing: 1px;
}

/* ============================================================
   Hero cover variant — full-bleed image, overlaid text (used on the 4 pitch sites)
   ============================================================ */
.hero-cover {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  padding: var(--section-pad) 0 calc(var(--section-pad) * 0.6);
  overflow: hidden;
  isolation: isolate;
}
.hero-cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--cover-img);
  background-size: cover;
  background-position: center;
  z-index: -2;
}
.hero-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 10, 18, 0.05) 0%, rgba(8, 10, 18, 0.65) 70%, rgba(8, 10, 18, 0.92) 100%);
  z-index: -1;
}
.hero-cover .hero-eyebrow {
  background: rgba(0,0,0,0.45);
  border-color: rgba(255,255,255,0.18);
  color: #fff;
  backdrop-filter: blur(8px);
}
.hero-cover .hero-eyebrow::before { background: var(--accent); }
.hero-cover h1 { color: #fff; max-width: 14ch; }
.hero-cover h1 em { color: var(--accent-light, var(--accent)); }
.hero-cover .hero-sub { color: rgba(255,255,255,0.82); }
.hero-cover .hero-meta {
  background: rgba(0,0,0,0.4);
  border-color: rgba(255,255,255,0.1);
  backdrop-filter: blur(12px);
}
.hero-cover .hero-meta-cell { background: rgba(0,0,0,0.55); }
.hero-cover .hero-meta-label { color: rgba(255,255,255,0.55); }
.hero-cover .hero-meta-val { color: #fff; }
.hero-cover .hero-meta-val small { color: rgba(255,255,255,0.55); }

body[data-pitch="skills"]    .hero-cover h1 em { color: var(--gold-light); }
body[data-pitch="minigames"] .hero-cover h1 em { color: #34d399; }
body[data-pitch="decision"]  .hero-cover h1 em { color: var(--blue-light); }
body[data-pitch="dribble"]   .hero-cover h1 em { color: #c4b5fd; }

/* ============================================================
   Generic section / heading
   ============================================================ */
section { padding: calc(var(--section-pad) * 0.7) 0; }
.section-head { margin-bottom: 36px; }
.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
  display: block;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.02;
  font-weight: 400;
  letter-spacing: 0.005em;
  color: var(--text);
  max-width: 22ch;
}
.section-sub {
  margin-top: 14px;
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--text-mid);
  max-width: 64ch;
  line-height: 1.55;
}

/* ============================================================
   Master Gantt — 4 lanes × 8 weeks
   Used on /timeline + per-installation lite version
   ============================================================ */
.gantt {
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 12px;
  padding: 24px 24px 22px;
  overflow-x: auto;
}
.gantt-scale {
  display: grid;
  grid-template-columns: 180px repeat(8, 1fr);
  gap: 0;
  align-items: end;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
  min-width: 880px;
}
.gantt-scale-spacer {}
.gantt-scale-cell {
  padding: 0 8px 8px;
  border-bottom: 1px solid var(--border);
  display: grid;
  gap: 2px;
}
.gantt-scale-cell strong {
  color: var(--text);
  font-size: 12px;
  letter-spacing: 1.2px;
}
.gantt-scale-cell em { font-style: normal; opacity: 0.85; }
.gantt-scale-cell.is-current {
  background: var(--accent-bg);
  border-bottom-color: var(--accent);
  color: var(--accent);
}
.gantt-scale-cell.is-current strong { color: var(--accent); }

.gantt-row {
  display: grid;
  grid-template-columns: 180px repeat(8, 1fr);
  align-items: center;
  min-height: 56px;
  border-top: 1px solid var(--border);
  min-width: 880px;
}
.gantt-row:first-of-type { border-top: 0; }
.gantt-label {
  padding: 10px 16px 10px 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gantt-label-name {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.05;
  color: var(--text);
}
.gantt-label-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
}
.gantt-track {
  grid-column: 2 / span 8;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  position: relative;
  height: 100%;
  align-items: center;
}
.gantt-track::before,
.gantt-track::after { content: none; }
.gantt-track-cell {
  border-left: 1px dashed rgba(0,0,0,0.06);
  height: 100%;
}
.gantt-track-cell:first-child { border-left: 0; }

.gantt-bar {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.gantt-bar.skills { background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%); }
.gantt-bar.minigames { background: linear-gradient(90deg, var(--green) 0%, #10b981 100%); }
.gantt-bar.decision { background: linear-gradient(90deg, var(--blue) 0%, var(--blue-light) 100%); }
.gantt-bar.dribble { background: linear-gradient(90deg, var(--purple) 0%, #a78bfa 100%); }

/* milestone diamond on the gantt */
.gantt-milestone {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  background: var(--text);
  transform: translate(-50%, -50%) rotate(45deg);
  border: 2px solid var(--bg-card);
  z-index: 2;
}
.gantt-milestone.is-gate { background: var(--accent); }

/* current-week vertical line */
.gantt-now {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  opacity: 0.7;
  pointer-events: none;
  z-index: 3;
}
.gantt-now::after {
  content: 'TODAY';
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: var(--accent);
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  padding: 2px 8px;
  border-radius: 4px;
}

@media (max-width: 720px) {
  .gantt { padding: 16px 12px; }
}

/* ============================================================
   Week-by-week breakdown
   ============================================================ */
.weeks {
  display: grid;
  gap: 28px;
}
.week {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  position: relative;
}
.week:first-child { border-top: 2px solid var(--text); padding-top: 36px; }
.week.is-milestone {
  background: linear-gradient(90deg, var(--accent-bg) 0%, transparent 70%);
  margin-left: -12px;
  padding-left: 12px;
  border-radius: 8px;
}
.week.is-current {
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 28px 24px;
  margin: 4px 0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}
.week-meta { display: grid; gap: 6px; align-content: start; position: sticky; top: 100px; align-self: start; }
@media (max-width: 900px) { .week-meta { position: static; } }
.week-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  color: var(--text-dim);
  text-transform: uppercase;
}
.week-num strong { color: var(--text); font-size: 13px; }
.week-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.05;
  color: var(--text);
}
.week.is-milestone .week-title,
.week.is-current .week-title { color: var(--accent); }
.week-dates {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.2px;
  color: var(--text-dim);
  font-weight: 600;
}
.week-flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  padding: 4px 10px;
  border-radius: 999px;
  width: max-content;
}
.week-flag::before { content: '★'; font-size: 9px; }

.week-body { display: grid; gap: 18px; }
.week-pitch {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 16px;
  align-items: start;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.week-pitch-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-top: 7px;
  flex-shrink: 0;
}
.week-pitch.skills .week-pitch-dot { background: var(--gold); }
.week-pitch.minigames .week-pitch-dot { background: var(--green); }
.week-pitch.decision .week-pitch-dot { background: var(--blue); }
.week-pitch.dribble .week-pitch-dot { background: var(--purple); }
.week-pitch.shared .week-pitch-dot { background: var(--text); }
.week-pitch-name {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 2px;
}
.week-pitch.skills .week-pitch-name { color: var(--gold); }
.week-pitch.minigames .week-pitch-name { color: var(--green); }
.week-pitch.decision .week-pitch-name { color: var(--blue); }
.week-pitch.dribble .week-pitch-name { color: var(--purple); }
.week-pitch p { font-size: 16px; line-height: 1.55; color: var(--text); }
.week-pitch p + p { margin-top: 6px; }
.week-pitch .work-list {
  margin-top: 6px;
  list-style: none;
  display: grid;
  gap: 4px;
}
.week-pitch .work-list li {
  font-size: 15px;
  color: var(--text-mid);
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}
.week-pitch .work-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.65em;
  width: 6px;
  height: 1px;
  background: var(--text-dim);
}

@media (max-width: 900px) {
  .week { grid-template-columns: 1fr; gap: 18px; }
  .week.is-current { padding: 22px 18px; }
}

/* ============================================================
   Phase 2 summary block (resumed view at end of timeline)
   ============================================================ */
.p2-block {
  margin-top: 28px;
  padding: 36px 32px 32px;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.04), transparent 100%);
  border: 1px solid var(--blue-border);
  border-radius: 14px;
}
.p2-block h3 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 400;
  color: var(--text);
  margin-bottom: 8px;
}
.p2-block .section-label { color: var(--blue); margin-bottom: 6px; }
.p2-deliveries {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 760px) { .p2-deliveries { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .p2-deliveries { grid-template-columns: 1fr; } }
.p2-card {
  padding: 20px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  border-left: 3px solid var(--accent);
}
.p2-card.skills { border-left-color: var(--gold); }
.p2-card.minigames { border-left-color: var(--green); }
.p2-card.decision { border-left-color: var(--blue); }
.p2-card.dribble { border-left-color: var(--purple); }
.p2-card-name {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.05;
  margin-bottom: 4px;
  color: var(--text);
}
.p2-card-when {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.p2-card.skills .p2-card-when { color: var(--gold); }
.p2-card.minigames .p2-card-when { color: var(--green); }
.p2-card.decision .p2-card-when { color: var(--blue); }
.p2-card.dribble .p2-card-when { color: var(--purple); }
.p2-card-desc { font-size: 14px; color: var(--text-mid); line-height: 1.55; }

/* ============================================================
   Per-installation site shells: deliverables + open questions
   ============================================================ */
.deliverables { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 720px) { .deliverables { grid-template-columns: 1fr; } }
.deliverable {
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  border-top: 3px solid var(--accent);
  display: grid;
  gap: 6px;
}
.deliverable-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  color: var(--accent);
  text-transform: uppercase;
}
.deliverable-name {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.1;
  color: var(--text);
}
.deliverable-desc { font-size: 15px; color: var(--text-mid); line-height: 1.5; }

.questions { display: grid; gap: 10px; max-width: 760px; }
.question {
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
}
.question::before {
  content: '?';
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--accent);
  line-height: 1;
}
.question .q-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
  margin-top: 6px;
  display: block;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  margin-top: var(--section-pad);
  padding: 48px 0 36px;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
}
@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr; gap: 18px; } }
.footer-brand {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.footer-info { font-size: 14px; color: var(--text-mid); margin-top: 6px; }
.footer-info a { color: var(--accent); }
.footer-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.footer-nav a {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-mid);
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-weight: 600;
}
.footer-nav a:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }

/* ============================================================
   Per-installation accent overrides (set on <body data-pitch="...">)
   ============================================================ */
body[data-pitch="skills"]    { --accent: var(--gold);   --accent-bg: var(--gold-bg);   --accent-border: var(--gold-border); }
body[data-pitch="minigames"] { --accent: var(--green);  --accent-bg: var(--green-bg);  --accent-border: var(--green-border); }
body[data-pitch="decision"]  { --accent: var(--blue);   --accent-bg: var(--blue-bg);   --accent-border: var(--blue-border); }
body[data-pitch="dribble"]   { --accent: var(--purple); --accent-bg: var(--purple-bg); --accent-border: var(--purple-border); }
body[data-pitch="timeline"]  { --accent: var(--text);   --accent-bg: var(--bg-alt);    --accent-border: var(--border-strong); }
