@font-face { font-family: "Host Grotesk"; font-style: normal; font-weight: 500; font-display: swap; src: url("../penshurst/fonts/host-500.ttf") format("truetype"); }
@font-face { font-family: "Host Grotesk"; font-style: normal; font-weight: 600; font-display: swap; src: url("../penshurst/fonts/host-600.ttf") format("truetype"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url("../penshurst/fonts/inter-400.ttf") format("truetype"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 500; font-display: swap; src: url("../penshurst/fonts/inter-500.ttf") format("truetype"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 600; font-display: swap; src: url("../penshurst/fonts/inter-600.ttf") format("truetype"); }

:root {
  --ink: #0b2a20;
  --paper: #f3f4ef;
  --paper-hi: #faf9f3;
  --measure: #16382c;
  --fit-w: calc(100vw / 1280px);
  --fit-h: calc(100svh / 800px);
  --fit-h: calc(100dvh / 800px);
  --stage-fit: min(var(--fit-w), var(--fit-h));
}

#phase-hero {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  background: #e4e6df;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms cubic-bezier(0.22, 0.7, 0.2, 1);
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}
#phase-hero.is-on {
  opacity: 1;
  pointer-events: auto;
}

.letterbox { position: relative; width: 100%; height: 100%; overflow: hidden; }

.hero-stage {
  position: absolute; left: 50%; top: 50%;
  width: 1280px; height: 800px;
  margin-left: -640px; margin-top: -400px;
  overflow: hidden; isolation: isolate;
  background: var(--paper);
  box-shadow: 0 22px 70px rgba(11,42,32,.10);
  transform-origin: center center;
  transform: scale(var(--stage-fit));
  cursor: pointer;
}
.hero-stage:after {
  content: "";
  position: absolute; z-index: 80; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(11,42,32,.08);
}

.world { position: absolute; inset: 0; overflow: hidden; background: var(--paper); }

.layer {
  position: absolute; left: 0; top: 0;
  width: 1920px; height: 979px;
  transform-origin: 0 0;
  will-change: transform, opacity;
  opacity: 0;
  z-index: 2;
}
.layer img, .layer svg {
  position: absolute; inset: 0;
  width: 1920px; height: 979px;
  display: block;
}

.ink {
  filter: grayscale(1) contrast(1.62) brightness(1.20);
  mix-blend-mode: multiply;
  opacity: .88;
}
.ink-edge {
  filter: grayscale(1) contrast(2.35) brightness(1.70);
  mix-blend-mode: multiply;
  opacity: .16;
}
.color-roof {
  opacity: 0;
  mix-blend-mode: normal;
  filter: saturate(1.06) contrast(1.04);
}

.paper-wash {
  position: absolute; z-index: 3; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 48% 46%, rgba(243,244,239,0) 16%, rgba(243,244,239,.16) 50%, rgba(243,244,239,.58) 100%);
}
.paper-field {
  position: absolute; z-index: 1; inset: 0;
  background: var(--paper);
  opacity: 0;
}

.edge, .rib, .pitch-arc {
  fill: none;
  stroke: var(--measure);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0;
}
.edge-halo, .rib-halo {
  fill: none;
  stroke: rgba(243,244,239,.62);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0;
}
.edge { stroke-width: 5.8; }
.edge-halo { stroke-width: 13.5; }
.rib { stroke-width: 3.6; }
.rib-halo { stroke-width: 9.5; }
.pitch-arc { stroke-width: 3.2; }
.tick {
  fill: none;
  stroke: var(--measure);
  stroke-width: 3.0;
  stroke-linecap: square;
  opacity: 0;
}
.read {
  font-family: "Host Grotesk", sans-serif;
  font-weight: 600;
  font-size: 30px;
  letter-spacing: -.03em;
  fill: var(--measure);
  opacity: 0;
}
.edge.is-paper, .rib.is-paper, .pitch-arc.is-paper { stroke: #24362d; }
.edge.is-paper { stroke-width: 4.6; }
.rib.is-paper { stroke-width: 2.8; }
.edge-halo.is-paper, .rib-halo.is-paper { stroke: rgba(11,42,32,.10); }

.face {
  fill: #e8eae3;
  stroke: none;
  opacity: 0;
}

#viz {
  position: absolute;
  z-index: 8;
  inset: 0;
  width: 1280px;
  height: 800px;
  opacity: 0;
  pointer-events: none;
}

.chrome-hero { position: absolute; z-index: 30; inset: 0; pointer-events: none; }
.chrome-hero > * { pointer-events: auto; }
.topbar {
  position: absolute; left: 28px; right: 28px; top: 22px;
  display: flex; justify-content: space-between; align-items: baseline;
  pointer-events: none;
}
.wordmark {
  font-family: "Host Grotesk", sans-serif;
  font-weight: 600; font-size: 16px; letter-spacing: .02em;
  color: var(--ink);
  opacity: 0;
}
.preview-note {
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(11,42,32,.38);
}

.replay {
  position: absolute; right: 28px; bottom: 22px;
  margin: 0; padding: 0; border: 0; background: none;
  font-family: Inter, sans-serif; font-size: 12px; font-weight: 500;
  letter-spacing: .02em; color: rgba(11,42,32,.62);
  cursor: pointer; opacity: 0; pointer-events: none; z-index: 40;
}
.replay.is-on { opacity: .86; pointer-events: auto; }
.replay:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.year-hero {
  position: absolute; z-index: 25;
  left: 28px; bottom: 22px;
  width: 4.6em; height: 1.1em;
  pointer-events: none;
  font-family: "Host Grotesk", sans-serif;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: .03em;
  color: var(--ink);
}
.year-hero span {
  position: absolute; left: 0; bottom: 0;
  opacity: 0;
}

.film-grain {
  position: absolute; z-index: 75; inset: 0; pointer-events: none; opacity: .18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.14'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

@media (prefers-reduced-motion: reduce) {
  .layer, .color-roof, .edge, .rib, .face, #viz, .paper-field, .replay, .wordmark, .year-hero span { transition: none !important; }
  #phase-open, #phase-hero { transition: none !important; }
}
