/* ============================================================
   Data Dreams & Dilemmas — Summer School
   Hero reproduces Figma board "MacBook Pro 14" - 13" (2160 x 1350),
   followed by a scrollable content section + footer.
   ============================================================ */

/* local() first so an installed copy is used in every browser; the url() is
   only a fallback for when the web-font files are added to /fonts/.
   Without local() first, the (failing) url shadows the same-named system
   font and Firefox drops to the monospace fallback. */
@font-face {
  font-family: "Dither Compose";
  src: local("Dither Compose Data Dreams New UN 3"),
       local("Dither Compose"),
       url("fonts/DitherCompose.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "UN-11 ST";
  src: local("UN-11 ST"),
       local("UN-11 ST Regular"),
       local("UN-11"),
       url("fonts/UN-11-ST.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #b094ff;
  --white: #ffffff;
  --black: #000000;
  --ink: #1c0f3a;            /* readable dark text on the purple */
  --ghost-stroke: #58c0a3;

  --font-display: "Dither Compose Data Dreams New UN 3", "Dither Compose", "Arial Black", "Helvetica Neue", sans-serif;
  --font-body: "UN-11 ST", "UN-11", "Courier New", ui-monospace, monospace;

  --stage-w: 2160;
  --stage-h: 1350;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

.svg-defs { position: absolute; width: 0; height: 0; pointer-events: none; }

/* ============================ HERO ============================ */
/* Tall scroll track. Its height is set by script.js to (1 + N-1 steps)
   viewports so the pinned hero has scroll distance for the text sequence. */
.hero-scene {
  position: relative;
  width: 100%;
}

.hero {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 480px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* The 2160x1350 design canvas, scaled via --scale (set in script.js). */
.stage {
  position: relative;
  width: calc(var(--stage-w) * 1px);
  height: calc(var(--stage-h) * 1px);
  flex: none;
  background: var(--bg);
  transform-origin: center center;
  transform: scale(var(--scale, 0.5));
}

.bg-img {
  position: absolute;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  /* --p (0..1) is the scroll progress set on .stage by script.js — drives a
     hue/brightness shift so the blended images stay in motion while pinned. */
  filter: hue-rotate(calc(var(--p, 0) * 200deg)) brightness(calc(1 + var(--p, 0) * 0.12));
}
.rot-img {
  filter: hue-rotate(calc(var(--p, 0) * 160deg));
}

.rot-box {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rot-img { display: block; flex: none; object-fit: cover; }

/* Decorative outlined "ghost" letters */
.ghost-box {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.ghost-text {
  flex: none;
  font-family: var(--font-display);
  font-size: 314px;
  line-height: 320px;
  text-align: center;
  color: transparent;
  -webkit-text-stroke: 4px var(--ghost-stroke);
  text-stroke: 4px var(--ghost-stroke);
  white-space: nowrap;
}

/* Big display headlines + the animated resolution/blur "resolve" */
.display {
  position: absolute;
  font-family: var(--font-display);
  font-size: 236px;
  line-height: 177.7px;
  color: var(--white);
  text-align: center;
  font-weight: 400;
  word-break: break-word;
  filter: url(#ditherResolve);
  will-change: filter;
}
.display--left  { left: 578.5px;  transform: translateX(-50%); }
.display--right { left: 1572.5px; transform: translateX(-50%); }
.display--center {
  left: 1080px;
  width: 1600px;
  transform: translateX(-50%);
}
.display--link { text-decoration: none; color: var(--white); display: block; }
.display--link:hover { color: var(--black); }

/* --- Headline slide sequence (scroll-driven, set up in script.js) --- */
.slides { position: absolute; inset: 0; }
.slide {
  position: absolute;
  inset: 0;
  will-change: transform, opacity;
  backface-visibility: hidden;
}
/* Slides past the first start hidden/below; script.js animates them in.
   Slide 0 stays put so the poster looks correct with JS disabled. */
.slide[data-slide="1"],
.slide[data-slide="2"],
.slide[data-slide="3"] { opacity: 0; }

.marker {
  position: absolute;
  font-family: var(--font-body);
  font-size: 33.17px;
  line-height: 63.17px;
  letter-spacing: 35.16px;
  text-transform: uppercase;
  color: var(--black);
  white-space: nowrap;
}

.meta {
  position: absolute;
  font-family: var(--font-body);
  font-size: 38px;
  line-height: 38px;
  color: var(--white);
}
.meta a { color: inherit; text-decoration: none; }
.meta a:hover { text-decoration: underline; }
.meta--right { transform: translateX(-100%); text-align: right; }
.meta--upper { text-transform: uppercase; }

/* Scroll affordance */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--white);
  text-decoration: none;
  border-radius: 50%;
  mix-blend-mode: difference;
  animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 7px); }
}

/* ========================== CONTENT ========================== */
.content {
  /* full-bleed, only edge padding — no narrow centred column */
  padding: clamp(64px, 10vw, 170px) clamp(22px, 6vw, 96px);
}

/* Big opening statement — bold display type, scrolls in like the title */
.content .lead {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 6.4vw, 116px);
  line-height: 0.98;
  color: var(--white);
  margin: 0 0 clamp(44px, 7vw, 120px);
  max-width: 22ch;
  overflow-wrap: break-word;
  hyphens: manual;
}
.content strong { font-weight: 700; color: var(--white); }

/* Intro copy flows into multiple columns on wide screens */
.prose {
  columns: clamp(18rem, 23vw, 26rem);
  column-gap: clamp(32px, 4vw, 72px);
  margin: 0 0 clamp(52px, 8vw, 120px);
}
.prose p {
  font-size: clamp(16px, 1.15vw, 20px);
  line-height: 1.7;
  margin: 0 0 1.2em;
  color: var(--ink);
  hyphens: auto;
  break-inside: avoid;
}
.prose p:last-child { margin-bottom: 0; }

/* Topic sections — a responsive grid of bold blocks */
.sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(30px, 4vw, 72px) clamp(30px, 4vw, 64px);
  margin: 0 0 clamp(52px, 8vw, 110px);
}
.topic {
  border-top: 3px solid var(--black);
  padding-top: clamp(16px, 1.6vw, 26px);
}
.topic h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(26px, 3vw, 48px);
  line-height: 1.0;
  color: var(--white);
  margin: 0 0 0.55em;
  overflow-wrap: break-word;
}
.topic p {
  font-size: clamp(15px, 1.05vw, 18px);
  line-height: 1.6;
  margin: 0 0 1em;
  color: var(--ink);
}
.content ul { list-style: none; margin: 0 0 0.4em; padding: 0; }
.content li {
  position: relative;
  padding-left: 1.5em;
  margin-bottom: 0.5em;
  font-size: clamp(15px, 1.05vw, 18px);
  line-height: 1.5;
  color: var(--ink);
}
.content li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--white);
}

.content .soon {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: clamp(16px, 1.5vw, 24px);
  color: var(--white);
  margin: 0 0 1.4em;
}

.cta-wrap { margin: 0; }
.cta {
  display: inline-block;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: clamp(17px, 1.6vw, 24px);
  color: var(--bg);
  background: var(--white);
  padding: 0.7em 1.4em;
  text-decoration: none;
  transition: transform 0.12s ease, background 0.12s ease;
}
.cta:hover { background: var(--black); color: var(--white); transform: translateY(-2px); }

/* Scroll-in reveal — echoes the title dissolve (blur + rise). Only active
   when JS is on (the .js class) so content is never hidden without it. */
.js .reveal {
  opacity: 0;
  transform: translateY(52px);
  filter: blur(14px);
  transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.2,0.7,0.2,1), filter 0.75s ease;
  will-change: opacity, transform, filter;
}
.js .reveal.in { opacity: 1; transform: none; filter: none; }

/* =========================== FOOTER =========================== */
.site-footer {
  border-top: 2px solid rgba(28,15,58,0.35);
  padding: clamp(40px, 6vw, 72px) clamp(22px, 6vw, 80px);
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: flex-start;
  justify-content: space-between;
}
.footer-meta {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--white);
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}
.footer-meta p { margin: 0; }
.footer-meta a { color: var(--white); text-decoration: none; }
.footer-meta a:hover { text-decoration: underline; }
.footer-meta strong { font-weight: 700; }

.footer-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(22px, 3vw, 44px);
}
.footer-logos img {
  display: block;
  height: 38px;
  width: auto;
  /* logos are white artwork */
}
.footer-logos img[src$=".png"] { height: 30px; }

/* Funding notice (BMFTR) */
.footer-funding {
  max-width: 1100px;
  margin: clamp(28px, 4vw, 48px) auto 0;
  padding-top: clamp(20px, 3vw, 32px);
  border-top: 1px solid rgba(28,15,58,0.30);
  display: flex;
  align-items: flex-start;
  gap: clamp(20px, 3vw, 40px);
}
.footer-funding .funding-logo {
  display: block;
  height: 64px;
  width: auto;
  flex: none;
}
.footer-funding .funding-text {
  margin: 0;
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink);
  max-width: 720px;
}

/* ===================== Responsive / motion ===================== */
@media (max-width: 640px) {
  .footer-inner { flex-direction: column; gap: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .display { filter: none; }
  .scroll-hint { animation: none; }
  .js .reveal { opacity: 1; transform: none; filter: none; transition: none; }
}
