/* ================================================================
   JPEG FILM FESTIVAL — design system
   Base: projection-room black. Accents: chroma-subsampling magenta
   + green, always paired as fringing, never solid fills.
   Type: Big Shoulders (display) / Archivo (body) / Space Mono (files)
   ================================================================ */

:root {
  --black: #0a0a0c;
  --panel: #141318;
  --line: #2a2932;
  --paper: #f2efe9;
  --paper-line: #d8d3c8;
  --ink: #16151a;
  --text: #e8e6e1;
  --muted: #8b8b95;
  --muted-dark: #6f6d63;
  --magenta: #ff2bd6;
  --green: #3dffa0;
  --display: "Big Shoulders", "Big Shoulders Display", "Archivo Narrow", sans-serif;
  --body: "Archivo", "Helvetica Neue", sans-serif;
  --mono: "Space Mono", "Courier New", monospace;
  --pad: clamp(1.25rem, 4vw, 4rem);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: var(--mono); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

a { color: inherit; }

::selection { background: var(--magenta); color: var(--black); }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

/* inline text links */
.hero-eyebrow a,
.editor-caption a,
.step p a,
.foot-pxld p a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--muted);
  transition: color 120ms ease;
}

.hero-eyebrow a:hover,
.editor-caption a:hover,
.foot-pxld p a:hover { color: var(--text); }

.step p a:hover { color: var(--ink); }

.pxld-mark-link { text-decoration: none; }

/* Chroma-fringe: the misregistered magenta/green edge pair */
.fringe {
  text-shadow: -0.045em 0 var(--magenta), 0.045em 0 var(--green);
}

/* ================= HEADER ================= */

.site-head {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem var(--pad);
  background: linear-gradient(to bottom, rgba(10,10,12,0.88), rgba(10,10,12,0));
  transition: background 200ms ease;
}

.site-head.scrolled {
  background: rgba(10,10,12,0.94);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.brand-mark {
  width: 18px; height: 18px;
  flex: none;
  background:
    conic-gradient(from 0deg at 50% 50%,
      var(--paper) 0 25%, var(--magenta) 0 50%,
      var(--paper) 0 75%, var(--green) 0 100%);
  image-rendering: pixelated;
}

.brand-name {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.75rem);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.site-nav a {
  text-decoration: none;
  color: #d6d5dd;
  text-shadow: 0 1px 6px rgba(10, 10, 12, 0.9);
  transition: color 120ms ease;
}

.site-nav a:hover { color: #ffffff; }

.site-head.scrolled .site-nav a { text-shadow: none; }

.site-nav .nav-cta {
  white-space: nowrap;
  color: var(--black);
  background: var(--paper);
  padding: 0.45rem 0.9rem;
  font-weight: 700;
  transition: background 120ms ease, box-shadow 120ms ease;
}

.site-nav .nav-cta:hover {
  color: var(--black);
  background: #fff;
  box-shadow: -3px 0 var(--magenta), 3px 0 var(--green);
}

/* ================= HERO ================= */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(10,10,12,0.95) 0%, rgba(10,10,12,0.55) 42%, rgba(10,10,12,0.18) 75%, rgba(10,10,12,0.05) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 var(--pad) 1.5rem;
  max-width: 68rem;
}

.hero-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.wordmark { line-height: 0.92; }

.wordmark-jpeg {
  display: block;
  width: min(58vw, 30rem);
  margin-bottom: 0.5rem;
}

.wordmark-jpeg svg { display: block; width: 100%; height: auto; }

.wordmark-fest {
  display: block;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(3rem, 10vw, 7.5rem);
  letter-spacing: 0.015em;
  text-transform: uppercase;
  color: var(--paper);
}

.hero-tag {
  margin-top: 1.5rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.3rem, 3vw, 2.1rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero-sub {
  margin-top: 0.75rem;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1rem;
}

.hero-sub strong { color: var(--text); }

/* Quality control: a strip of film. Sprocket perforations top and
   bottom, a graded step wedge you scrub like a printer's light scale,
   and a playhead needle. */
.quality-bar {
  position: relative;
  z-index: 2;
  margin: 1.75rem var(--pad) 1.5rem;
  background: #1b1a21;
  max-width: 40rem;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6);
}

.perfs {
  height: 9px;
  background: repeating-linear-gradient(90deg,
    var(--black) 0 12px, transparent 12px 26px);
  background-color: #1b1a21;
}

.quality-row {
  display: flex;
  align-items: stretch;
  gap: 0.9rem;
  padding: 0.35rem 0.9rem;
  border-top: 1px solid #26252d;
  border-bottom: 1px solid #26252d;
}

.quality-label {
  align-self: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.quality-readout {
  align-self: center;
  font-size: 0.72rem;
  color: var(--green);
  white-space: nowrap;
  min-width: 8ch;
  text-align: right;
}

.wedge {
  position: relative;
  flex: 1;
  height: 34px;
}

/* density steps: coarse grain on the left, fine on the right */
.wedge-steps {
  position: absolute;
  inset: 4px 0;
  display: flex;
  gap: 2px;
}

.wedge-step {
  flex: 1;
  background-image: repeating-conic-gradient(#3c3a45 0% 25%, #211f28 0% 50%);
}

.wedge-needle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 92%;
  width: 2px;
  background: var(--paper);
  box-shadow: -2px 0 var(--magenta), 2px 0 var(--green);
  pointer-events: none;
}

.wedge-needle::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--paper);
}

.wedge input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: none;
  opacity: 0;
  cursor: ew-resize;
}

.quality-bar:focus-within {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

/* ================= TICKER ================= */

.ticker {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.ticker::before,
.ticker::after {
  content: "";
  display: block;
  height: 8px;
  background: repeating-linear-gradient(90deg,
    var(--black) 0 12px, transparent 12px 26px);
}

.ticker-track { padding: 0.45rem 0; }

.ticker-track {
  display: flex;
  width: max-content;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  white-space: nowrap;
  animation: ticker 36s linear infinite;
}

@keyframes ticker {
  to { transform: translateX(-50%); }
}

/* ================= SECTIONS ================= */

.section { position: relative; }

.section-dark {
  background: var(--black);
  padding: 4.5rem 0 5.5rem;
}

.section-light {
  background: var(--paper);
  color: var(--ink);
  padding: 4.5rem 0 5.5rem;
}

.section-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* file-tab: every section is a reel, still named as a file */
.file-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-bottom: none;
  padding: 0.45rem 0.9rem 0.45rem 0.55rem;
  margin-left: var(--pad);
  transform: translateY(1px);
  background: var(--panel);
}

.tab-mark {
  width: 14px;
  height: 14px;
  flex: none;
  background: repeating-linear-gradient(-45deg,
    var(--paper) 0 3px, var(--black) 3px 6px);
}

.section-light .file-tab {
  color: var(--muted-dark);
  border-color: var(--paper-line);
  background: #faf8f3;
}

.section h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  margin-bottom: 2.5rem;
}

.section-light h2 { border-top-color: var(--paper-line); }

/* ================= THE IDEA / EDITOR ================= */

.idea-cols {
  display: grid;
  grid-template-columns: minmax(16rem, 5fr) 7fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}

.idea-copy p { margin-bottom: 1.1rem; max-width: 30rem; }

.idea-copy em { color: var(--paper); font-style: italic; }

.idea-kicker {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--paper);
}

.editor {
  border: 1px solid var(--line);
  background: var(--panel);
}

/* editor header as a slate: clapper stripes, then LOC and NOTE fields */
.editor-chrome {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--paper);
  border-bottom: 1px solid var(--line);
}

.editor-chrome .clapper {
  flex: none;
  width: 42px;
  background: repeating-linear-gradient(-45deg,
    var(--paper) 0 7px, var(--black) 7px 14px);
}

.slate-field {
  display: flex;
  align-items: baseline;
  gap: 0.55em;
  padding: 0.65rem 0;
}

.slate-key {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.slate-note { margin-left: auto; padding-right: 0.9rem; color: var(--muted); }

.slate-note .slate-key { color: var(--muted); opacity: 0.7; }

.stage {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  isolation: isolate; /* keeps blend modes inside the stage */
  cursor: crosshair;
}

.stage-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.stage-video {
  position: absolute;
  inset: 8% 12%;
  width: 76%;
  height: 84%;
  object-fit: contain;
  mix-blend-mode: screen;
  filter: contrast(1.18) brightness(1.06);
  pointer-events: none;
}

.stage-drop[hidden] { display: none; }

.stage-drop {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--green);
  background: rgba(10,10,12,0.75);
  border: 2px dashed var(--green);
  z-index: 3;
}

.editor-controls { padding: 0.9rem; border-top: 1px solid var(--line); }

.control-row {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  padding: 0.35rem 0;
}

.control-label {
  flex: none;
  width: 4.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.chip-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.chip {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: none;
  border: 1px solid var(--line);
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease;
}

.chip:hover { color: var(--text); border-color: var(--muted); }

.chip[aria-pressed="true"] {
  color: var(--black);
  background: var(--paper);
  border-color: var(--paper);
  box-shadow: -2px 0 var(--magenta), 2px 0 var(--green);
}

.editor-caption {
  padding: 0 0.9rem 0.9rem;
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 36rem;
}

/* ================= HOW IT WORKS ================= */

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  margin-bottom: 3.5rem;
}

.step { border-top: 3px solid var(--ink); padding-top: 1rem; }

.step h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.9rem;
  text-transform: uppercase;
  margin: 0 0 0.6rem;
}

.step p { font-size: 0.95rem; color: #4c4a42; }

.spec-sheet {
  border: 1px solid var(--ink);
  background: #faf8f3;
}

.spec-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid var(--ink);
}

.spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.spec-row {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--paper-line);
}

.spec-row:nth-last-child(-n+2) { border-bottom: none; }

.spec-row dt {
  flex: none;
  width: 6.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted-dark);
}

.spec-row dd { font-size: 0.98rem; }

/* ================= FIND A WORLD ================= */

.worlds-lede {
  max-width: 40rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
}

.source-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.75rem;
}

.source {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  height: 100%;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  background: var(--panel);
  text-decoration: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.source:hover {
  border-color: var(--paper);
  box-shadow: -3px 0 var(--magenta), 3px 0 var(--green);
}

.source-name {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--paper);
}

.source-desc {
  font-size: 0.85rem;
  color: var(--muted);
}

.worlds-note {
  margin-top: 2rem;
  max-width: 40rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ================= PRIZE ================= */

.prize-inner { text-align: center; }

.prize-amount {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(5rem, 18vw, 14rem);
  line-height: 1;
  text-transform: uppercase;
  color: var(--paper);
  cursor: default;
}

.prize-line {
  margin: 0.75rem auto 0;
  max-width: 28rem;
  color: var(--muted);
}

.prize-york {
  margin: 3.5rem auto 0;
  max-width: 38rem;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 2rem clamp(1.25rem, 4vw, 2.5rem);
}

.prize-york h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.8rem;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.prize-york p { color: var(--muted); font-size: 0.98rem; }

/* ================= JURY ================= */

.section-jury { padding-top: 0; }

.jury-lede { max-width: 40rem; color: var(--muted); margin-bottom: 2.5rem; }

.jury-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 1rem;
}

.juror {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.juror canvas {
  width: 96px; height: 96px;
  image-rendering: pixelated;
  cursor: pointer;
}

.juror span {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-align: center;
}

/* ================= SUBMIT ================= */

.submit-steps {
  list-style: none;
  counter-reset: sub;
  max-width: 42rem;
  margin-bottom: 2.5rem;
}

.submit-steps li {
  counter-increment: sub;
  display: flex;
  gap: 1.1rem;
  align-items: baseline;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--paper-line);
  font-size: 1.05rem;
}

.submit-steps li::before {
  content: counter(sub) ".";
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted-dark);
  flex: none;
}

.submit-cta {
  display: inline-block;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  padding: 1rem 2rem;
  transition: box-shadow 140ms ease, transform 140ms ease;
}

.submit-cta:hover {
  box-shadow: -5px 0 var(--magenta), 5px 0 var(--green);
  transform: translateY(-2px);
}

.submit-note {
  margin-top: 1.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--muted-dark);
}

/* ================= FOOTER ================= */

.site-foot {
  border-top: 1px solid var(--line);
  background: var(--panel);
  padding: 3.5rem 0;
}

.foot-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 4rem);
}

.pxld-mark {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  margin-bottom: 0.9rem;
  text-shadow: -2px 0 var(--magenta), 2px 0 var(--green);
}

.foot-pxld p { color: var(--muted); font-size: 0.95rem; max-width: 30rem; }

.foot-credits {
  font-size: 0.72rem;
  line-height: 1.8;
  color: var(--muted);
}

.foot-credits p { margin-bottom: 0.9rem; }

.foot-credits a { color: var(--text); }

/* ================= PRIVACY PAGE ================= */

.page-main {
  min-height: 70vh;
  padding-top: 7rem;
}

.page-inner { max-width: 46rem; margin: 0; }

.page-inner h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.5rem;
  text-transform: uppercase;
  margin: 2.25rem 0 0.6rem;
}

.page-inner p { color: var(--muted); max-width: 40rem; }

.page-inner p a { color: var(--text); }

.page-meta {
  margin-top: 3rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

/* ================= REVEAL ON SCROLL ================= */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal.in { opacity: 1; transform: none; }

/* ================= RESPONSIVE ================= */

@media (max-width: 56rem) {
  .idea-cols { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .spec-grid { grid-template-columns: 1fr; }
  .spec-row:nth-last-child(2) { border-bottom: 1px solid var(--paper-line); }
  .foot-inner { grid-template-columns: 1fr; }
  .site-nav a:not(.nav-cta) { display: none; }
  .quality-bar { margin-inline: 1.25rem; }
}

@media (max-width: 40rem) {
  .quality-readout { display: none; }
  .slate-note { display: none; }
  .control-row { flex-direction: column; gap: 0.35rem; }
}

/* ================= REDUCED MOTION ================= */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .submit-cta:hover { transform: none; }
}
