/* terra alpina — landing page
   Palette and type follow the game's UI tokens (godot/ui/tokens.gd): slate
   surfaces under warm off-white text, signpost yellow as the one accent, every
   edge a 1px rule, corners barely rounded. Type is Barlow throughout, with
   Barlow Semi Condensed for tracked uppercase labels. */

@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/barlow-400.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/barlow-500.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/barlow-600.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/barlow-700.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/barlow-semicondensed-600.woff2") format("woff2");
}

:root {
  /* Surfaces */
  --bg: #0e1214;
  --surface: #151a1d;
  --raised: #1c2226;
  --hover: #232a2f;
  /* Rules */
  --border-faint: #222a2f;
  --border: #2b343a;
  --border-strong: #45525a;
  /* Text */
  --text: #ece8dd;
  --muted: #a4a89e;
  --faint: #6b716c;
  --on-accent: #1a1a14;
  /* Intent */
  --accent: #f0c43c;
  --accent-strong: #f7d35e;
  --accent-soft: #f3cd5c;
  --success: #5fb37a;
  --danger: #e4625c;
  /* Trail-map data colours (godot/ui/palette.gd) */
  --diff-green: #2fa54a;
  --diff-blue: #2f7fe0;
  --diff-black: #16181c;
  --lift-red: #d23b3b;

  --font: "Barlow", ".AppleSystemUIFont", "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", sans-serif;
  --font-label: "Barlow Semi Condensed", "Barlow", "Segoe UI", Roboto, sans-serif;

  --wrap: 1280px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 3px;
  --radius-lg: 4px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 100%;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
  overflow-x: clip;
  /* Clipping content does not stop Safari's sideways rubber-band gesture. */
  overscroll-behavior-x: none;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, picture, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

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

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}
.trap {
  position: absolute !important;
  left: -10000px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}

.skip {
  position: absolute; left: 16px; top: -100px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--accent); color: var(--on-accent);
  font-weight: 600; text-decoration: none; border-radius: var(--radius);
}
.skip:focus { top: 16px; }

/* The wordmark, as the game's title screen sets it: lowercase, Barlow SemiBold. */
.brand, .wordmark { font-family: var(--font); font-weight: 600; text-transform: lowercase; }
.brand { display: inline-block; text-decoration: none; color: var(--text); font-size: 22px; letter-spacing: -0.01em; line-height: 1; }
.brand--small { font-size: 18px; }

/* Tracked uppercase label, as the game's LABEL_EYEBROW: semi-condensed, heavy, 0.09em. */
.label, .eyebrow {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}
.eyebrow--light { color: var(--text); opacity: 0.85; }
.eyebrow__num { color: var(--accent); }
.eyebrow__num::after { content: ""; display: inline-block; width: 22px; height: 1px; background: var(--border-strong); vertical-align: middle; margin-left: 12px; }

/* Piste-difficulty symbols: circle, square, diamond, and a lift line */
.diff { display: inline-block; width: 12px; height: 12px; flex: none; }
.diff--green { background: var(--diff-green); border-radius: 50%; }
.diff--blue { background: var(--diff-blue); border-radius: 1px; }
.diff--black { background: var(--diff-black); transform: rotate(45deg) scale(0.82); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.32); border-radius: 1px; }
.diff--lift { width: 16px; height: 0; border-top: 2px solid var(--lift-red); position: relative; }
.diff--lift::after { content: ""; position: absolute; left: 50%; top: -5px; width: 7px; height: 7px; margin-left: -4px; border-radius: 50%; background: var(--lift-red); }

/* Buttons: the game's primary is the accent with dark ink; secondary is a ruled surface. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 0 20px; min-height: 48px;
  border: 1px solid transparent; border-radius: var(--radius);
  font-weight: 600; font-size: 15px; letter-spacing: 0.01em; cursor: pointer;
  text-decoration: none; white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-strong); }
.btn--primary:active { background: #e3b733; }
.btn--discord { --discord: #5865f2; background: var(--discord); color: #fff; border-color: var(--discord); }
.btn--discord:hover { background: #4752c4; border-color: #4752c4; }
.btn--discord:active { background: #3c45a5; }
.btn--discord:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.btn__icon { flex: none; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  min-height: max(100svh, 680px);
  display: grid;
  grid-template-rows: 1fr;
  /* Keep full-bleed gradient rounding inside the hero on mobile Safari. */
  overflow: hidden;
  /* The hero has no horizontal interaction. Keep vertical scrolling and zoom,
     while preventing sideways touch panning, including Safari rubber-banding. */
  touch-action: pan-y pinch-zoom;
  isolation: isolate;
  color: var(--text);
}
.hero__media { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: var(--raised); }
.hero__media picture, .hero__poster, .hero__video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%;
}
.hero__video { opacity: 0; }
.hero__video.is-playing { opacity: 1; }
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(14, 18, 20, 0.6) 0%, rgba(14, 18, 20, 0.08) 26%, rgba(14, 18, 20, 0.1) 48%, rgba(14, 18, 20, 0.82) 80%, var(--bg) 100%),
    linear-gradient(to right, rgba(14, 18, 20, 0.4), transparent 50%);
}

.topbar {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background-color 0.25s, box-shadow 0.25s;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 16px max(var(--gutter), calc((100vw - var(--wrap)) / 2));
  width: 100%;
  margin-inline: auto;
}
.topbar__links { display: flex; align-items: center; gap: 26px; font-size: 15px; font-weight: 500; }
.topbar__links a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--text); opacity: 0.82; transition: opacity 0.15s; }
.topbar__links a:hover { opacity: 1; }
.topbar__cta {
  padding: 8px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius);
  opacity: 1 !important; backdrop-filter: blur(6px); background: rgba(14, 18, 20, 0.35);
}
.topbar__cta:hover { border-color: var(--accent); color: var(--accent-soft); }
@media (pointer: coarse) {
  .topbar__cta { display: inline-flex; align-items: center; min-height: 44px; }
}
/* On phones the hero already supplies the wordmark and Discord action. */
@media (max-width: 720px), (max-height: 500px) {
  .topbar { display: none; }
  .hero {
    grid-template-rows: 1fr auto;
    /* Keep the initial, toolbar-expanded height while Safari chrome compacts.
       Dynamic viewport height would move the content during a scroll. */
    min-height: 100svh;
  }
}

.hero__content {
  align-self: end;
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin-inline: auto;
  padding-block: 40px 36px;
  max-width: 100%;
}

.hero__title {
  font-size: clamp(60px, 11vw, 152px);
  line-height: 0.9;
  letter-spacing: -0.035em;
  font-weight: 600;
  text-transform: lowercase;
  margin: 0 0 22px -0.03em;
  text-shadow: 0 2px 40px rgba(14, 18, 20, 0.5);
}
.hero__hook {
  font-size: clamp(24px, 2.8vw, 38px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  max-width: 24ch;
  text-wrap: balance;
}
.hero__sub {
  margin-top: 14px;
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.45;
  max-width: 54ch;
  color: var(--text); opacity: 0.88;
  text-wrap: pretty;
  text-shadow: 0 1px 12px rgba(14, 18, 20, 0.6);
}
.hero__status {
  margin-top: 18px;
  font-family: var(--font-label); font-weight: 600; font-size: 13px; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--muted);
}
.hero__status strong { color: var(--accent-soft); font-weight: 600; }

.hero__actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 14px; margin-top: 28px; }
.hero__actions .btn--discord { min-height: 48px; }

@media (max-height: 500px) {
  .hero__content { padding-block: 20px 12px; }
  .hero__title { font-size: min(11vw, 22svh); margin-bottom: 12px; }
  .hero__hook { font-size: 24px; }
  .hero__sub { margin-top: 8px; font-size: 16px; }
  .hero__status { margin-top: 10px; }
  .hero__actions { margin-top: 16px; }
}

.topbar.is-scrolled { background: rgba(14, 18, 20, 0.96); box-shadow: 0 1px var(--border); }
.js .topbar .brand { opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.js .topbar.is-scrolled .brand { opacity: 1; pointer-events: auto; }
.topbar__links a[aria-current="location"] { color: var(--accent); opacity: 1; box-shadow: inset 0 -2px var(--accent); }
#claim, #gallery, #signup { scroll-margin-top: 96px; }
@media (max-width: 720px), (max-height: 500px) {
  .hero { grid-template-rows: 1fr; }
  .hero__scrim { background: none; }
  /* The fade to --bg lives on .hero__details, whose bottom is the content's
     bottom. Safari can leave a hairline of the video showing where that fade
     ends, so cover the hero's last few pixels from above the media layer. */
  .hero::after {
    content: ""; position: absolute; inset: auto 0 0; height: 8px;
    background: var(--bg); pointer-events: none; z-index: 1;
  }
  .hero__content {
    align-self: stretch;
    display: flex; flex-direction: column; justify-content: space-between;
    min-height: 100svh;
    padding-block: 32px 12px;
    gap: 64px;
  }
  .hero__intro, .hero__details { position: relative; isolation: isolate; }
  .hero__intro::before, .hero__details::before {
    content: ""; position: absolute; z-index: -1; pointer-events: none;
    left: calc(-1 * var(--gutter)); right: calc(-1 * var(--gutter));
  }
  .hero__intro::before {
    top: -32px; bottom: -32px;
    background: linear-gradient(to bottom, rgba(14, 18, 20, 0.55), rgba(14, 18, 20, 0.3) 65%, transparent);
  }
  .hero__details::before {
    top: -32px; bottom: -12px;
    background: linear-gradient(to bottom, transparent, rgba(14, 18, 20, 0.75) 28%, var(--bg));
  }
  .hero__sub { margin-top: 0; }
}
@media (max-height: 500px) {
  .hero__content { padding-top: 20px; gap: 32px; }
  .hero__intro::before { top: -20px; }
}

/* Signup forms */
.signup { max-width: 520px; }
.signup__row { display: flex; gap: 10px; }
.signup__input {
  flex: 1 1 auto; min-width: 0; width: 300px;
  min-height: 48px; padding: 0 14px;
  background: rgba(14, 18, 20, 0.6);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text); font: inherit; font-size: 16px;
  backdrop-filter: blur(8px);
  transition: border-color 0.15s, background-color 0.15s;
}
.signup__input::placeholder { color: var(--muted); }
.signup__input:focus { outline: none; border-color: var(--accent); background: rgba(14, 18, 20, 0.75); }
.signup__input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.signup__status {
  min-height: 1.5em; margin-top: 10px;
  font-size: 15px; color: var(--muted);
}
.signup__status:empty { display: none; }
.signup__status.is-ok { color: #8fd0a3; }
.signup__status.is-error { color: #ee8a85; }
@media (max-width: 520px) {
  .signup, .hero__actions .btn--discord { width: 100%; }
  .signup__row { flex-direction: column; }
  .signup__input { width: 100%; }
  .btn { width: 100%; }
}

/* ---------- Features ---------- */
.features { padding: clamp(24px, 4vw, 56px) 0 clamp(40px, 6vw, 80px); }
.feature { position: relative; margin: 0 auto clamp(72px, 10vw, 150px); }
.feature__inner {
  display: grid; gap: clamp(28px, 4vw, 64px);
  align-items: center;
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin: 0 auto;
}
@media (min-width: 900px) {
  .feature__inner { grid-template-columns: 5fr 7fr; }
  .feature--flip .feature__inner { grid-template-columns: 7fr 5fr; }
}
.feature__media { margin: 0; position: relative; }
@media (max-width: 899px) {
  .feature--flip .feature__body { order: -1; }
}
@media (max-width: 720px) {
  .feature__media { margin-inline: calc(-1 * var(--gutter)); }
  .feature__media picture, .plan__media picture, .feature__open { border-radius: 0; }
}
.feature__media picture, .plan__media picture, .shot picture { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: var(--surface); }
.feature__media img, .plan__media img { width: 100%; }
.feature__media picture::after, .plan__media picture::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(236, 232, 221, 0.08);
  border-radius: inherit;
}
.feature__body { max-width: 50ch; }
.feature__title {
  font-size: clamp(30px, 3.2vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin-bottom: 18px;
  text-wrap: balance;
}
.feature__body > p:not(.eyebrow) { font-size: 18px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }

/* 01 stands on the contour sheet, as the game's first screen does. */
.feature--claim { isolation: isolate; overflow-x: clip; padding: clamp(56px, 8vw, 120px) 0 clamp(16px, 3vw, 40px); }
.feature--claim::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("/contours.svg");
  background-size: 1440px auto;
  background-position: center top;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 70%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 70%, transparent);
}
.feature--claim .feature__body { position: relative; }
.feature--claim .feature__body::before {
  /* Clean ground under the text, as the shader's `fade`. */
  content: ""; position: absolute; inset: -40px -60px -40px -60px; z-index: -1;
  background: radial-gradient(closest-side, var(--bg) 55%, transparent);
  opacity: 0.9;
}

/* The planning moment */
.plan { padding-top: clamp(24px, 4vw, 48px); }
.plan__head { max-width: 62ch; margin-bottom: clamp(28px, 4vw, 48px); }
.plan__head p:not(.eyebrow) { font-size: 18px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.plan__media { margin: 0 auto; width: min(var(--wrap), 100% - 2 * var(--gutter)); position: relative; }
@media (max-width: 720px) { .plan__media { width: 100%; } }
.plan__media picture { box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--border); }
.plan__legend {
  display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 14px;
  font-family: var(--font-label); font-weight: 600; font-size: 12px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted);
}
.plan__legend span { display: inline-flex; align-items: center; gap: 10px; }
@media (max-width: 720px) {
  .plan__legend { display: grid; grid-template-columns: repeat(2, max-content); gap: 12px 28px; padding-inline: var(--gutter); }
}
.plan__legend .diff--lift { margin-right: 2px; }

/* ---------- Season / atmosphere ---------- */
.season {
  position: relative; isolation: isolate;
  min-height: 80svh;
  display: grid; align-content: center;
  padding: clamp(96px, 14vw, 200px) 0 clamp(96px, 14vw, 200px);
  overflow: hidden;
}
@media (max-width: 720px) {
  .season { min-height: 0; padding: 88px 0 72px; }
}
.season__bg { position: absolute; inset: 0; z-index: -2; }
.season__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.season::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to bottom, var(--bg) 0%, rgba(14, 18, 20, 0.2) 22%, rgba(14, 18, 20, 0.3) 60%, var(--bg) 100%),
    linear-gradient(to right, rgba(14, 18, 20, 0.55), rgba(14, 18, 20, 0.05) 70%);
}
.season__content { position: relative; max-width: 64ch; }
.season__title {
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.0; letter-spacing: -0.025em;
  text-wrap: balance; max-width: 16ch;
  text-shadow: 0 2px 30px rgba(14, 18, 20, 0.6);
}
.season__text { margin-top: 24px; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.5; color: var(--text); max-width: 54ch; text-wrap: pretty; text-shadow: 0 1px 12px rgba(14, 18, 20, 0.7); }

/* ---------- Gallery ---------- */
.gallery { padding: clamp(64px, 9vw, 130px) 0; }
.gallery__head { display: grid; gap: 8px; margin-bottom: clamp(28px, 4vw, 48px); }
.gallery__head h2 { font-size: clamp(34px, 4vw, 52px); line-height: 1; letter-spacing: -0.02em; }
.gallery__head .eyebrow { margin-bottom: 6px; }
.gallery__hint { display: none; color: var(--muted); font-size: 15px; }
.gallery__grid {
  display: grid; gap: 10px;
  grid-template-columns: 1fr;
}
@media (max-width: 699px) {
  .gallery__hint { display: block; }
  .gallery__grid {
    display: flex; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
  }
  .gallery__grid::-webkit-scrollbar { display: none; }
  .gallery__grid li { flex: 0 0 86%; scroll-snap-align: start; }
  /* Shots off to the side are still in the strip; don't hold them back for the scroll reveal. */
  .js .gallery__grid li.reveal { opacity: 1; transform: none; }
}
@media (min-width: 700px) { .gallery__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) {
  .gallery__grid { grid-template-columns: repeat(6, 1fr); }
  .gallery__grid li { grid-column: span 2; }
  .gallery__grid li:nth-child(1) { grid-column: span 4; }
  /* Eight shots fill the rows as they are; these fill the last row of 9 or 10. */
  .gallery__grid li:nth-child(3n+3):nth-last-child(2) { grid-column: span 4; }
  .gallery__grid li:nth-child(3n+3):last-child { grid-column: span 6; }
}
.gallery__grid li { display: grid; overflow: hidden; border-radius: var(--radius-lg); }
.shot {
  display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in;
  border-radius: var(--radius-lg); text-align: left;
}
.shot:focus-visible { outline-offset: -3px; }
.shot picture { width: 100%; aspect-ratio: 16 / 9; min-height: 100%; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.shot:focus-visible img { transform: scale(1.03); }
@media (hover: hover) { .shot:hover img { transform: scale(1.03); } }
.feature__open {
  display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in;
  border-radius: var(--radius-lg); text-align: left; color: inherit;
}
.feature__open:focus-visible { outline-offset: 3px; }
.feature__open img { transition: transform 0.6s var(--ease); }
.feature__open:focus-visible img { transform: scale(1.02); }
@media (hover: hover) { .feature__open:hover img { transform: scale(1.02); } }
@media (prefers-reduced-motion: reduce) {
  .feature__open img { transition: none; }
}

/* ---------- Closer / ticket ---------- */
.closer { position: relative; isolation: isolate; padding: clamp(80px, 12vw, 180px) 0; overflow: hidden; }
.closer__bg { position: absolute; inset: 0; z-index: -2; }
.closer__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.closer::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, var(--bg) 0%, rgba(14, 18, 20, 0.5) 30%, rgba(14, 18, 20, 0.5) 70%, var(--bg) 100%);
}
.closer__inner { display: grid; justify-items: center; }

.ticket {
  display: grid; width: min(720px, 100%);
  background: var(--text); color: var(--on-accent);
  border-radius: var(--radius-lg);
  box-shadow: 0 60px 120px -40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(236, 232, 221, 0.2);
  overflow: hidden;
  position: relative;
}
@media (min-width: 640px) { .ticket { grid-template-columns: 72px 1fr; } }
.ticket__stub {
  position: relative;
  background: var(--accent);
  background-image: repeating-linear-gradient(90deg, rgba(26, 26, 20, 0.08) 0 1px, transparent 1px 7px);
  color: var(--on-accent);
  display: flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 16px 0 44px; overflow: hidden;
  border-bottom: 2px dashed rgba(26, 26, 20, 0.35);
}
@media (min-width: 640px) {
  .ticket__stub { padding: 0; border-bottom: 0; border-right: 2px dashed rgba(26, 26, 20, 0.35); }
}
.ticket__punch {
  position: absolute; width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6);
  left: 14px; top: 50%; margin-top: -9px;
}
@media (min-width: 640px) { .ticket__punch { left: 50%; top: 18px; margin: 0 0 0 -9px; } }
.ticket__vertical {
  font-family: var(--font-label); font-weight: 600; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
@media (min-width: 640px) {
  .ticket__vertical { writing-mode: vertical-rl; transform: rotate(180deg); }
}
.ticket__body { padding: clamp(28px, 4vw, 44px) clamp(22px, 4vw, 44px); }
.ticket .eyebrow { color: #5c5f55; }
.ticket__title { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.05; letter-spacing: -0.025em; }
.ticket__text { margin-top: 14px; font-size: 17px; color: #45483f; max-width: 48ch; text-wrap: pretty; }
.ticket .signup { margin-top: 22px; max-width: none; }
.ticket .signup__input { background: #fff; border-color: #b9bbb0; color: var(--on-accent); backdrop-filter: none; }
.ticket .signup__input::placeholder { color: #767a70; }
.ticket .signup__input:focus { border-color: var(--on-accent); background: #fff; }
.ticket .signup__input:focus-visible { outline-color: var(--on-accent); }
.ticket .btn--primary { background: var(--on-accent); color: var(--text); }
.ticket .btn--primary:hover { background: #2f3230; }
.ticket .btn--primary:focus-visible { outline-color: var(--on-accent); }
.ticket .signup__status { color: #45483f; }
.ticket .signup__status.is-ok { color: #2d7a4c; }
.ticket .signup__status.is-error { color: #b23a2e; }
.ticket__fine {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px;
  margin-top: 22px; padding-top: 16px; border-top: 1px dashed #b9bbb0; color: #5c5f55;
}
.ticket__fine .label { font-size: 12px; }
.ticket__discord {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px;
  font-weight: 600; font-size: 15px; color: #fff; text-decoration: none;
  background: #5865f2; border-radius: var(--radius); transition: background 0.15s;
}
.ticket__discord:hover { background: #4752c4; }
.ticket__discord:focus-visible { outline: 2px solid var(--on-accent); outline-offset: 2px; }

/* ---------- Signup confirmation / launch pass ---------- */
.signup-pass {
  width: min(460px, calc(100% - 32px));
  max-height: calc(100svh - 32px); max-height: calc(100dvh - 32px);
  padding: 0; border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  background: var(--text); color: var(--on-accent);
  box-shadow: 0 24px 100px rgba(0, 0, 0, 0.5);
  overflow: auto;
}
.signup-pass::backdrop { background: rgba(10, 13, 15, 0.78); backdrop-filter: blur(6px); }
.signup-pass__header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--accent); padding: 8px 12px 8px 24px;
  border-bottom: 2px dashed rgba(26, 26, 20, 0.35);
}
.signup-pass__close {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none;
  padding: 0; border: 0; background: transparent; color: inherit; font-size: 30px; cursor: pointer;
}
.signup-pass__body { padding: 24px clamp(24px, 5vw, 40px) 28px; text-align: center; }
.signup-pass__mountain { margin: 0 auto 16px; color: #45525a; }
.signup-pass h2 { font-size: clamp(30px, 6vw, 40px); text-wrap: balance; }
.signup-pass__body > p:not(.label) { margin-top: 18px; color: #45483f; font-size: 17px; line-height: 1.5; }
.signup-pass .btn { width: 100%; margin-top: 24px; background: var(--on-accent); color: var(--text); }
.signup-pass .btn:hover { background: #2f3230; }
.signup-pass :focus-visible { outline-color: var(--on-accent); }
body.has-signup-confirmation { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .signup-pass[open] { animation: pass-arrive 0.3s var(--ease) both; }
  @keyframes pass-arrive { from { opacity: 0; transform: translateY(16px) scale(0.97); } to { opacity: 1; transform: none; } }
}

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 36px 0 48px; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 32px; }
.footer__copy { font-size: 14px; color: var(--faint); }
.footer__link { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; transition: color 0.15s; }
.footer__link:hover { color: var(--text); }
@media (pointer: coarse) {
  .footer .brand, .footer__link { display: inline-flex; align-items: center; min-height: 44px; }
}

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; }
.lightbox[hidden] { display: none; }
.lightbox__backdrop { position: absolute; inset: 0; background: rgba(10, 13, 15, 0.92); backdrop-filter: blur(10px); }
.lightbox__panel {
  position: relative;
  width: min(1600px, 100vw);
  max-height: 100svh;
  display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; gap: 8px;
  padding: 16px;
}
.lightbox__figure { margin: 0; display: grid; justify-items: center; gap: 12px; min-width: 0; }
.lightbox__figure picture { max-width: 100%; }
.lightbox__figure img {
  width: auto; height: auto;
  max-width: 100%; max-height: calc(100svh - 120px);
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.9);
}
.lightbox__caption { font-size: 15px; color: var(--muted); text-align: center; display: flex; gap: 14px; align-items: baseline; }
.lightbox__count { color: var(--accent-soft); font-size: 12px; }
.lightbox__btn {
  display: inline-grid; place-items: center;
  width: 48px; height: 48px; border-radius: var(--radius);
  border: 1px solid var(--border-strong); background: rgba(21, 26, 29, 0.8); color: var(--text);
  cursor: pointer; transition: background-color 0.15s, border-color 0.15s;
}
.lightbox__btn:hover { background: var(--hover); border-color: var(--muted); }
.lightbox__close { position: absolute; top: 16px; right: 16px; z-index: 2; }
.lightbox__hint { display: none; }
@media (max-width: 700px) {
  .lightbox__panel {
    width: 100%; height: 100svh; max-height: none;
    grid-template-columns: 48px 1fr 48px;
    grid-template-rows: 1fr auto;
    grid-template-areas: "figure figure figure" "prev hint next";
    gap: 12px; padding: 72px 12px max(16px, env(safe-area-inset-bottom));
  }
  .lightbox__close { position: fixed; top: max(12px, env(safe-area-inset-top)); right: 12px; }
  .lightbox__figure { grid-area: figure; align-self: center; }
  .lightbox__prev { grid-area: prev; }
  .lightbox__next { grid-area: next; }
  .lightbox__hint { grid-area: hint; align-self: center; text-align: center; margin: 0; color: var(--faint); font-size: 11px; }
  .lightbox__figure img { max-height: calc(100svh - 200px); }
}
@media (max-width: 700px) and (orientation: portrait) {
  .lightbox__hint { display: block; }
}
/* Phone held sideways: let the picture take the height. */
@media (max-height: 500px) {
  .lightbox__panel { padding: 8px; gap: 4px; }
  .lightbox__figure { gap: 6px; }
  .lightbox__figure img { max-height: calc(100svh - 44px); }
  .lightbox__caption { font-size: 13px; }
  .lightbox__close { top: 8px; right: 8px; }
}
body.has-lightbox { overflow: hidden; }

/* ---------- Motion ---------- */
.reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .js .hero__content > * { animation: rise 1s var(--ease) both; }
  .js .hero__content > :nth-child(2) { animation-delay: 0.08s; }
  .js .hero__content > :nth-child(3) { animation-delay: 0.16s; }
  .js .hero__content > :nth-child(4) { animation-delay: 0.24s; }
  .js .hero__content > :nth-child(5) { animation-delay: 0.32s; }
  .js .hero__content > :nth-child(6) { animation-delay: 0.4s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .hero__video { display: none; }
}

/* ---------- Beta application (/testing-application) ---------- */
.apply-main {
  position: relative; isolation: isolate;
  min-height: 100svh;
  display: grid; justify-items: center; align-content: start; gap: 32px;
  padding: 28px var(--gutter) 64px;
}
.apply-main::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("/contours.svg"); background-size: 1440px auto; background-position: center top;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%);
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
}
.apply-main > .brand { justify-self: start; width: min(720px, 100%); margin-inline: auto; }
@media (pointer: coarse) {
  .apply-main > .brand { display: inline-flex; align-items: center; min-height: 44px; }
}
.apply-ticket { width: min(720px, 100%); color-scheme: light; }
.apply-ticket .ticket__body { min-width: 0; padding-inline: clamp(18px, 4vw, 44px); }
.apply-ticket h1.ticket__title { font-size: clamp(30px, 3.6vw, 46px); }
.apply { margin-top: 28px; display: grid; gap: 26px; }
.apply__notice { margin-top: 16px; padding: 12px 14px; border: 1px solid #b9bbb0; border-radius: var(--radius); color: #45483f; }

.field { margin: 0; padding: 0; border: 0; min-width: 0; }
.field__label { display: block; padding: 0; font-weight: 600; font-size: 17px; line-height: 1.3; color: var(--on-accent); }
.field__req, .field__opt {
  margin-left: 6px; font-family: var(--font-label); font-weight: 600;
  font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase; white-space: nowrap;
}
.field__req { color: #8a6a00; }
.field__opt { color: #767a70; }
.field__hint, .field__fine { margin-top: 4px; font-size: 15px; line-height: 1.45; color: #5c5f55; text-wrap: pretty; }
.field__fine { margin-top: 10px; padding-left: 38px; }
.field__input {
  display: block; width: 100%; margin-top: 8px;
  min-height: 48px; padding: 11px 14px;
  background: #fff; border: 1px solid #b9bbb0; border-radius: var(--radius);
  color: var(--on-accent); font: inherit; font-size: 16px; line-height: 1.4;
}
textarea.field__input { resize: vertical; min-height: 96px; }
.field__input:focus { outline: none; border-color: var(--on-accent); }
.field__input:focus-visible { outline: 2px solid var(--on-accent); outline-offset: 2px; }
.field__error { display: none; margin-top: 8px; font-size: 15px; font-weight: 500; color: #b23a2e; }
.field.is-invalid .field__error { display: block; }
.field.is-invalid .field__input { border-color: #b23a2e; }

.choices { display: grid; gap: 6px; margin-top: 8px; }
@media (min-width: 560px) {
  .choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.choice {
  display: flex; align-items: center; gap: 12px;
  min-height: 48px; padding: 6px 14px;
  background: #fff; border: 1px solid #b9bbb0; border-radius: var(--radius);
  font-size: 16px; line-height: 1.3; color: var(--on-accent); cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.choice:hover { border-color: var(--on-accent); }
.choice:has(input:checked) { border-color: var(--on-accent); background: #f5efd6; }
.choice input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--on-accent); cursor: pointer; }
.choice input:focus-visible { outline: 2px solid var(--on-accent); outline-offset: 2px; }
.choice--consent { background: transparent; border-color: transparent; padding-inline: 0; align-items: flex-start; padding-block: 10px 0; min-height: 44px; }
.choice--consent:hover { border-color: transparent; }
.choice--consent:has(input:checked) { background: transparent; border-color: transparent; }
.choice--consent input { margin-top: 1px; }
.choice--consent span { font-weight: 500; }

.apply__check { min-height: 65px; max-width: 100%; }
.apply__submit { background: var(--on-accent); color: var(--text); width: 100%; }
.apply__submit:hover { background: #2f3230; }
.apply__submit:focus-visible { outline-color: var(--on-accent); }
@media (min-width: 521px) { .apply__submit { width: auto; justify-self: start; } }
.apply .signup__status { margin-top: 0; color: #45483f; }
.apply .signup__status.is-error { color: #b23a2e; }
.apply__done:focus { outline: none; }
#apply-done-title:focus { outline: none; }
.apply__done .ticket__fine .btn { width: auto; background: var(--on-accent); color: var(--text); }
.apply__done .ticket__fine .btn:hover { background: #2f3230; }
@media (max-width: 520px) {
  .apply__done .ticket__fine .btn, .apply__done .ticket__discord { width: 100%; justify-content: center; }
}

/* ---------- 404 ---------- */
.notfound {
  position: relative; isolation: isolate;
  min-height: 100svh; display: grid; place-items: center; text-align: center; padding: var(--gutter);
}
.notfound::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("/contours.svg"); background-size: 1440px auto; background-position: center;
  -webkit-mask-image: radial-gradient(ellipse at center, transparent 18%, #000 60%);
  mask-image: radial-gradient(ellipse at center, transparent 18%, #000 60%);
}
.notfound .brand { display: block; margin-bottom: 44px; }
.notfound__code { display: inline-flex; align-items: center; gap: 10px; color: var(--accent-soft); margin-bottom: 16px; }
.notfound h1 { font-size: clamp(40px, 7vw, 88px); line-height: 1; letter-spacing: -0.03em; }
.notfound p { margin-top: 18px; color: var(--muted); max-width: 44ch; margin-inline: auto; font-size: 17px; }
.notfound .btn { margin-top: 32px; width: auto; }
