/*
 * The cinematic parts: the home hero and its sign, the sky break, framed
 * media, and the little motion the site has. Video is decoration. With
 * reduced motion on, or with no script, every video is its poster frame.
 */

/* ── framed media ──────────────────────────────────────────────────── */

.frame {
  position: relative;
  margin: 0;
  background: var(--ink);
  border: 3px solid var(--paper);
  box-shadow: 8px 8px 0 var(--registry);
}
.frame img,
.frame video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.frame figcaption {
  position: absolute;
  left: 0;
  bottom: 0;
  max-width: 85%;
  padding: 5px 12px;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}
.vid {
  background: var(--ink);
}

/* ── home hero ─────────────────────────────────────────────────────── */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  column-gap: 20px;
  min-height: max(calc(100svh - var(--head-h)), 620px);
  max-height: 960px;
  padding: 28px max(var(--pad), calc((100% - var(--max)) / 2 + var(--pad))) 40px;
  overflow: hidden;
  isolation: isolate;
  background: var(--ink);
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero-vid {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 30%;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.55) 38%, transparent 70%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.55), transparent 55%);
}

/* The sign: hardware bolted to a tower, sodium tubes on black. */
.sign {
  grid-row: 1;
  grid-column: 1;
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 10px 12px 14px;
  background: var(--ink);
  border: 4px solid var(--paper);
  box-shadow:
    8px 8px 0 var(--registry),
    -4px -4px 0 var(--night-2);
  transform: rotate(-2deg);
}
.sign-top {
  font-family: var(--display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper);
  border-bottom: 2px solid var(--registry);
  margin-bottom: 4px;
  padding-bottom: 2px;
}
.sign-v {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(40px, 7.6svh, 88px);
  line-height: 0.84;
  color: #fff1dd;
  -webkit-text-stroke: 2px var(--sodium);
  text-shadow:
    4px 0 0 var(--registry),
    -3px 0 0 var(--sodium);
}

.hero-copy {
  grid-row: 2;
  grid-column: 1 / -1;
  align-self: end;
  max-width: 40rem;
  margin-top: 28px;
}
.hero-line {
  margin: 0 0 12px;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(38px, 8.4vw, 76px);
  line-height: 0.9;
  text-transform: uppercase;
  color: var(--paper);
  text-shadow:
    3px 0 0 var(--registry),
    -3px 0 0 var(--lattice);
  text-wrap: balance;
}
.hero-sub {
  margin: 0;
  max-width: 28em;
  font-size: 20px;
  line-height: 1.4;
  color: var(--paper);
}
.hero-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 22px 0 0;
  font-size: 15px;
  color: var(--text);
}
.stamp {
  display: inline-block;
  padding: 2px 10px;
  font-family: var(--display);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sodium);
  background: var(--ink);
  border: 3px double var(--sodium);
  transform: rotate(-3deg);
}

/* Phones: the header already says the name, and the sign would push the pitch
   below the fold. It stays in the document for assistive tech, off screen. */
@media (max-width: 599px) {
  .sign {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    border: 0;
    box-shadow: none;
    white-space: nowrap;
  }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 1fr;
    min-height: max(calc(100svh - var(--head-h)), 520px);
  }
  .hero-copy {
    grid-row: 1;
    margin-top: 0;
  }
  .hero-line {
    text-shadow:
      2px 0 0 var(--registry),
      -2px 0 0 var(--lattice);
  }
  .hero-media::after {
    background:
      linear-gradient(0deg, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.72) 45%, rgba(0, 0, 0, 0.2) 80%),
      linear-gradient(90deg, rgba(0, 0, 0, 0.55), transparent 55%);
  }
}

@media (min-width: 960px) {
  .hero {
    grid-template-rows: auto 1fr;
    column-gap: clamp(32px, 3.5vw, 56px);
    padding-bottom: 64px;
  }
  .sign {
    grid-row: 1 / 3;
  }
  .hero-copy {
    grid-row: 2;
    grid-column: 2;
    margin-top: 0;
  }
}

/* A phone on its side: the hero is one screen tall, not 620px, so the pitch is on
   the first screen; the sign is hidden off screen as it is on a phone held upright. */
@media (max-height: 500px) {
  .hero {
    min-height: calc(100svh - var(--head-h));
    padding-top: 16px;
    padding-bottom: 20px;
  }
  .sign {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    border: 0;
    box-shadow: none;
    white-space: nowrap;
  }
  .hero-copy {
    grid-column: 1 / -1;
  }
  .hero-line {
    font-size: clamp(30px, 6vw, 48px);
  }
  .hero-status {
    margin-top: 12px;
  }
}

/* ── the sky break: the city from the air, full bleed ──────────────── */

.sky {
  position: relative;
  height: clamp(340px, 43vw, 640px);
  overflow: hidden;
  border-top: 3px solid var(--paper);
  background: var(--ink);
}
.sky-media {
  position: absolute;
  inset: 0;
}
.sky-media video,
.sky-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sky-cap {
  position: absolute;
  left: var(--pad);
  bottom: 22px;
  max-width: min(30rem, calc(100% - 2 * var(--pad)));
  margin: 0;
  padding: 10px 14px;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}
.sky-cap b {
  font-weight: 800;
}

/* ── token teaser: a rift behind a block of copy ───────────────────── */

.teaser {
  overflow: hidden;
  isolation: isolate;
}
.teaser-media {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.teaser-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 40%;
}
.teaser-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.55) 55%, rgba(0, 0, 0, 0) 100%);
}
.teaser-in {
  max-width: var(--max);
}
.teaser-in > p,
.teaser-in > h2,
.teaser-in > .acts {
  max-width: 36rem;
}
.teaser-in > p {
  font-size: 18px;
  color: var(--paper);
}

/* ── motion: small, hard-stepped, and off when asked ───────────────── */

@media (prefers-reduced-motion: no-preference) {
  .sign-v span {
    animation: tube 0.9s steps(1) both;
    animation-delay: calc(0.25s + var(--i) * 0.11s);
  }
  .door img,
  .tcomic img {
    transition: transform 0.25s steps(5);
  }
  .door a:hover img,
  .tcomic a:hover img {
    transform: scale(1.05);
  }
}
@keyframes tube {
  0% {
    color: #241406;
    -webkit-text-stroke-color: #3a220c;
    text-shadow: none;
  }
  30% {
    color: #fff1dd;
    -webkit-text-stroke-color: var(--sodium);
  }
  40% {
    color: #241406;
    -webkit-text-stroke-color: #3a220c;
    text-shadow: none;
  }
  55% {
    color: #fff1dd;
  }
}
