/* =========================================================
   BUG, FISH, MONSTER, ROBOT — site styles
   Matches the dossier and deck design system
   ========================================================= */

/* ---------- design tokens ---------- */
:root {
  /* the four colors, each derived from its film */
  --green:  #4caf3a;   /* BUG - A Bug's Life leaf green */
  --orange: #ee5524;   /* FISH - Nemo clownfish orange */
  --purple: #b48cd6;   /* MONSTER - Monsters Inc lavender */
  --yellow: #d4a017;   /* ROBOT - WALL-E sunset mustard */

  /* document palette */
  --cream:  #faf8f3;
  --ink:    #1a1a1a;
  --black:  #000000;
  --muted:  #595959;
  --rule:   #c8c8c8;
  --accent: #8b0000;   /* the deep red of the pull quotes */

  /* type */
  --serif: "Cambria", "Georgia", "Iowan Old Style", serif;
  --sans:  "Calibri", "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --display: "Arial Black", "Helvetica Neue", Arial, sans-serif; /* for the rainbow title */
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font-family: inherit; cursor: pointer; }

/* ---------- top nav (used on subpages) ---------- */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--black);
  position: relative;
}
.topnav::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(to right,
    var(--green) 0%, var(--green) 25%,
    var(--orange) 25%, var(--orange) 50%,
    var(--purple) 50%, var(--purple) 75%,
    var(--yellow) 75%, var(--yellow) 100%);
}
.topnav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 32px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.topnav-title {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--cream);
  text-transform: uppercase;
}
.topnav-title:hover { text-decoration: none; opacity: 0.6; }
.topnav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  letter-spacing: 0.5px;
}
.topnav-links a {
  color: rgba(250, 248, 243, 0.55);
  transition: color 0.2s;
}
.topnav-links a:hover { color: var(--cream); text-decoration: none; }
.topnav-links a.active { color: var(--cream); font-weight: 600; }

/* ---------- the cover / hero ---------- */
.cover {
  min-height: 100vh;
  background: var(--black);
  color: var(--cream);
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  align-items: center;
  padding: 60px 80px;
  position: relative;
  overflow: hidden;
}
.cover::before {
  /* the rainbow strip at top, matches the deck cover */
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 8px;
  background: linear-gradient(to right,
    var(--green) 0%, var(--green) 25%,
    var(--orange) 25%, var(--orange) 50%,
    var(--purple) 50%, var(--purple) 75%,
    var(--yellow) 75%, var(--yellow) 100%);
}
.cover-lamp {
  display: flex;
  justify-content: center;
  align-items: center;
}
.cover-lamp img {
  width: 100%;
  max-width: 320px;
  filter: brightness(1.05);
}
.cover-title {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(56px, 8vw, 124px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.cover-title .bug    { color: var(--green); }
.cover-title .fish   { color: var(--orange); }
.cover-title .monster{ color: var(--purple); }
.cover-title .robot  { color: var(--yellow); }
.cover-title .punct  { color: var(--cream); }
.cover-logline {
  margin-top: 40px;
  max-width: 620px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.5;
  color: var(--cream);
  opacity: 0.92;
}
.cover-credits {
  margin-top: 32px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--cream);
  opacity: 0.6;
  text-transform: uppercase;
}
.cover-credits strong { font-weight: 700; opacity: 1; letter-spacing: 3px; }
.cover-cta {
  margin-top: 48px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.btn {
  display: inline-block;
  padding: 14px 26px;
  border: 1.5px solid var(--cream);
  color: var(--cream);
  font-size: 13px;
  letter-spacing: 2px;
  font-weight: 600;
  text-transform: uppercase;
  background: transparent;
  transition: all 0.2s;
}
.btn:hover {
  background: var(--cream);
  color: var(--black);
  text-decoration: none;
}
.btn-primary {
  background: var(--cream);
  color: var(--black);
}
.btn-primary:hover {
  background: transparent;
  color: var(--cream);
}

/* ---------- page content (subpages) ---------- */
.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 80px 32px 120px;
}
.page-eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.page-title {
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--black);
  margin-bottom: 24px;
}
.page-deck {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 48px;
}
.page h2 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--black);
  margin: 56px 0 16px;
  line-height: 1.2;
}
.page h3 {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin: 36px 0 12px;
}
.page p {
  margin-bottom: 18px;
  color: var(--ink);
}
.page p + p { margin-top: -4px; }
.page ul, .page ol {
  margin: 18px 0 24px 24px;
}
.page li {
  margin-bottom: 8px;
  line-height: 1.55;
}
.page strong { font-weight: 700; color: var(--ink); }
.page em { font-style: italic; }

.pull {
  margin: 48px 0;
  padding: 8px 0 8px 24px;
  border-left: 3px solid var(--accent);
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.45;
  color: var(--accent);
}

.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 56px 0;
}

/* ---------- about page photos ---------- */
.about-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 40px 0;
}
.about-photos img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}
.about-photo-caption {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  margin-top: 10px;
  margin-bottom: 0;
}
@media (max-width: 600px) {
  .about-photos {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .about-photos img { height: 200px; }
}

/* ---------- timeline page ---------- */
.timeline-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 48px 32px 96px;
}
.timeline-header {
  max-width: 760px;
  margin: 0 auto 48px;
  text-align: left;
}
.timeline-image {
  margin: 0 auto;
  max-width: 100%;
  border: 1px solid var(--rule);
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}
.timeline-cta {
  max-width: 760px;
  margin: 32px auto 0;
  text-align: center;
}

/* ---------- dossier page ---------- */
.dossier-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 32px 96px;
}
.dossier-header {
  max-width: 760px;
  margin: 0 auto 32px;
}
.dossier-toc {
  max-width: 760px;
  margin: 0 auto 32px;
  padding: 24px 28px;
  background: rgba(0,0,0,0.025);
  border-left: 3px solid var(--accent);
}
.dossier-toc h3 {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.dossier-toc ol {
  margin: 0 0 0 20px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  columns: 2;
  column-gap: 32px;
}
.dossier-toc li { break-inside: avoid; }
.dossier-embed {
  margin: 32px auto 0;
  border: 1px solid var(--rule);
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  width: 100%;
  height: 900px;
}

/* ---------- buttons on light backgrounds ---------- */
.btn-light {
  display: inline-block;
  padding: 14px 26px;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 2px;
  font-weight: 600;
  text-transform: uppercase;
  background: transparent;
  transition: all 0.2s;
}
.btn-light:hover {
  background: var(--ink);
  color: var(--cream);
  text-decoration: none;
}
.btn-light-primary {
  background: var(--ink);
  color: var(--cream);
}
.btn-light-primary:hover {
  background: transparent;
  color: var(--ink);
}

/* ---------- contact box ---------- */
.contact-box {
  margin-top: 64px;
  padding: 32px;
  background: rgba(0,0,0,0.03);
  border-left: 3px solid var(--ink);
}
.contact-box h3 {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}
.contact-box a {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink);
}

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--rule);
  padding: 32px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--muted);
}
.footer-rainbow {
  width: 80px;
  height: 4px;
  margin: 0 auto 16px;
  background: linear-gradient(to right,
    var(--green) 0%, var(--green) 25%,
    var(--orange) 25%, var(--orange) 50%,
    var(--purple) 50%, var(--purple) 75%,
    var(--yellow) 75%, var(--yellow) 100%);
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .cover {
    grid-template-columns: 1fr;
    padding: 60px 32px;
    text-align: center;
  }
  .cover-lamp { display: none; }
  .cover-credits, .cover-logline { margin-left: auto; margin-right: auto; }
  .cover-cta { justify-content: center; }
  .topnav-inner { padding: 14px 20px; gap: 12px; }
  .topnav-links { gap: 16px; font-size: 13px; }
  .topnav-title { font-size: 12px; letter-spacing: 1px; }
  .page { padding: 48px 24px 80px; }
  .dossier-toc ol { columns: 1; }
  .dossier-embed { height: 600px; }
}

/* PDF iframes don't work on iOS and are awkward on most mobile browsers —
   hide the embed and rely on the download button already present in the HTML */
@media (max-width: 768px) {
  .dossier-embed { display: none; }
}

@media (max-width: 600px) {
  /* Cover */
  .cover {
    padding: 48px 20px 56px;
    min-height: 100svh;
  }
  .cover-title {
    font-size: clamp(52px, 17vw, 90px);
  }
  .cover-logline {
    font-size: 17px;
    margin-top: 24px;
  }
  .cover-credits { margin-top: 20px; }
  .cover-cta {
    margin-top: 32px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .btn {
    text-align: center;
    padding: 16px 20px;
  }

  /* Nav — show all links; scroll horizontally if they don't fit */
  .topnav-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 16px;
    gap: 6px;
  }
  .topnav-title {
    font-size: 11px;
    letter-spacing: 1.5px;
  }
  .topnav-links {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0;
    padding-bottom: 2px;
  }
  .topnav-links::-webkit-scrollbar { display: none; }
  .topnav-links a {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    min-height: 36px;
    padding: 4px 20px 4px 0;
    white-space: nowrap;
  }

  /* Page content */
  .page { padding: 32px 16px 64px; }
  .page h2 { font-size: 22px; margin-top: 40px; }
  .page-deck { font-size: 17px; margin-bottom: 36px; }
  .pull { font-size: 18px; }

  /* Contact */
  .contact-box { padding: 24px 16px; }
  .contact-box a { font-size: 18px; word-break: break-word; }

  /* Light-bg buttons */
  .btn-light, .btn-light-primary {
    display: block;
    text-align: center;
    padding: 16px 20px;
  }

  /* Dossier */
  .dossier-wrap { padding: 32px 16px 64px; }
  .dossier-toc { padding: 16px 18px; }

  /* Timeline */
  .timeline-wrap { padding: 32px 16px 64px; }
  .timeline-cta { margin-top: 20px; }

  /* Footer */
  .footer { padding: 24px 16px; }
}
