@font-face {
  font-family: "Grenze";
  src: url("/fonts/grenze.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #f4f0e5;
  --ink: #08100d;
  --glass: rgb(8 16 13 / 76%);
  --glass-strong: rgb(8 16 13 / 90%);
  --line: rgb(244 240 229 / 26%);
  --line-strong: rgb(244 240 229 / 54%);
  --muted: rgb(244 240 229 / 68%);
  --focus: #e6f787;
  --scene-fade-duration: 550ms;
  color-scheme: dark;
  font-family: "Segoe UI", Aptos, system-ui, -apple-system, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  height: 100%;
  background: var(--ink);
}

body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--ink);
  color: var(--paper);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  font: inherit;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: max(0.75rem, env(safe-area-inset-top));
  left: max(0.75rem, env(safe-area-inset-left));
  padding: 0.7rem 0.9rem;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 750;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.scene-frame {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  background: #17341d;
  opacity: 1;
  transition: opacity var(--scene-fade-duration) ease-in-out;
}

.scene-frame.is-veiled {
  opacity: 0;
}

.scene-poster,
.scene-video,
.scene-shade,
.scene-grain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scene-poster,
.scene-video {
  object-fit: cover;
  object-position: center;
}

.scene-poster {
  z-index: 0;
}

.scene-video {
  z-index: 1;
  opacity: 0;
  transition: opacity 220ms ease;
}

.scene-frame.has-video .scene-video {
  opacity: 1;
}

.scene-shade {
  z-index: 2;
  background:
    radial-gradient(
      circle at 8% 7%,
      rgb(4 10 7 / 68%) 0,
      rgb(4 10 7 / 34%) 18rem,
      transparent 44rem
    ),
    linear-gradient(
      to top,
      rgb(4 9 7 / 76%) 0,
      rgb(4 9 7 / 24%) 13rem,
      transparent 34rem
    );
  pointer-events: none;
}

.scene-grain {
  z-index: 3;
  background-image: repeating-linear-gradient(
    112deg,
    rgb(255 255 255 / 3%) 0,
    transparent 1px,
    transparent 4px
  );
  mix-blend-mode: soft-light;
  opacity: 0.28;
  pointer-events: none;
}

.page {
  position: relative;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100svh;
  padding:
    max(4.25rem, env(safe-area-inset-top))
    max(clamp(1.3rem, 4vw, 4rem), env(safe-area-inset-right))
    max(4.25rem, env(safe-area-inset-bottom))
    max(clamp(1.3rem, 4vw, 4rem), env(safe-area-inset-left));
}

.centerpiece {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.9rem, 2vh, 1.35rem);
  width: min(100%, 42rem);
  text-align: center;
}

h1 {
  width: fit-content;
  margin: 0;
  font-family: "Grenze", Georgia, serif;
  font-size: clamp(3.25rem, 7.2vw, 7.4rem);
  font-weight: 570;
  letter-spacing: 0.005em;
  line-height: 0.82;
  text-shadow:
    0 0.08em 0 rgb(0 0 0 / 60%),
    0 0.22em 0.8em rgb(0 0 0 / 46%);
}

.official-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  width: fit-content;
}

.official-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.6rem;
  min-height: 3.15rem;
  padding: 0.78rem 0.9rem 0.78rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 0.2rem;
  background: var(--glass);
  box-shadow: 0 0.8rem 2.5rem rgb(0 0 0 / 18%);
  font-size: 0.92rem;
  font-weight: 720;
  line-height: 1;
  text-decoration: none;
  backdrop-filter: blur(0.65rem);
  transition:
    border-color 150ms ease,
    background-color 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}

.official-link-primary {
  min-width: 12.6rem;
  border-color: var(--paper);
  background: var(--paper);
  color: var(--ink);
}

.official-link-disabled {
  cursor: default;
  opacity: 1;
}

.availability {
  font-size: 0.63rem;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.official-link:hover:not(.official-link-disabled) {
  border-color: var(--line-strong);
  background: var(--glass-strong);
  transform: translateY(-2px);
}

.official-link-primary:hover:not(.official-link-disabled) {
  border-color: #fffdf4;
  background: #fffdf4;
}

.outbound {
  color: currentColor;
  font-size: 1.1rem;
  font-weight: 500;
  transition: transform 150ms ease;
}

.official-link:hover:not(.official-link-disabled) .outbound {
  transform: translate(0.12rem, -0.12rem);
}

.scene-controls {
  position: fixed;
  z-index: 5;
  bottom: max(0.7rem, env(safe-area-inset-bottom));
  left: 50%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: max-content;
  max-width: calc(100% - 1.5rem);
  padding: 0.42rem 0.48rem;
  border: 1px solid var(--line);
  border-radius: 0.2rem;
  background: var(--glass);
  box-shadow: 0 0.55rem 1.8rem rgb(0 0 0 / 20%);
  transform: translateX(-50%);
  backdrop-filter: blur(0.65rem);
}

.scene-progress {
  position: absolute;
  top: -1px;
  right: -1px;
  left: -1px;
  height: 2px;
  overflow: hidden;
  background: rgb(244 240 229 / 12%);
}

.scene-progress::after {
  position: absolute;
  inset: 0;
  background: var(--paper);
  content: "";
  transform: scaleX(0);
  transform-origin: left center;
}

.scene-progress.is-running::after {
  animation: scene-progress var(--scene-cadence) linear forwards;
}

.scene-caption {
  display: flex;
  align-items: baseline;
  gap: 0.42rem;
  margin: 0;
  white-space: nowrap;
  font-family: Georgia, serif;
  font-size: 0.82rem;
  line-height: 1;
}

.scene-caption-key {
  color: var(--muted);
  font-family: "Segoe UI", Aptos, system-ui, sans-serif;
  font-size: 0.56rem;
  font-weight: 760;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.scene-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.32rem;
}

.scene-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  min-height: 2.15rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0.15rem;
  background: rgb(244 240 229 / 4%);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 710;
  transition:
    border-color 150ms ease,
    background-color 150ms ease,
    transform 150ms ease;
}

.scene-action:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: rgb(244 240 229 / 10%);
  transform: translateY(-1px);
}

.scene-action:disabled {
  cursor: default;
  opacity: 0.46;
}

.motion-glyph {
  position: relative;
  width: 0.65rem;
  height: 0.7rem;
}

.motion-glyph::before,
.motion-glyph::after {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0.17rem;
  background: currentColor;
  content: "";
}

.motion-glyph::before {
  left: 0.07rem;
}

.motion-glyph::after {
  right: 0.07rem;
}

.motion-toggle[data-state="play"] .motion-glyph::before {
  inset: 0.02rem 0 0.02rem 0.1rem;
  width: auto;
  background: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.motion-toggle[data-state="play"] .motion-glyph::after {
  display: none;
}

.next-scene {
  padding-left: 0.62rem;
}

.next-glyph {
  position: relative;
  width: 1.25rem;
  height: 1.25rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  transition: transform 180ms ease;
}

.next-glyph::before {
  position: absolute;
  top: 0.35rem;
  left: 0.33rem;
  width: 0.34rem;
  height: 0.34rem;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  content: "";
  transform: rotate(45deg);
}

.next-glyph::after {
  position: absolute;
  top: 0.57rem;
  left: 0.29rem;
  width: 0.54rem;
  height: 1px;
  background: currentColor;
  content: "";
}

.next-scene:hover:not(:disabled) .next-glyph {
  transform: translateX(0.12rem);
}

.official-link:focus-visible,
.scene-action:focus-visible,
.skip-link:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

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

@keyframes scene-progress {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .scene-frame,
  .scene-video,
  .official-link,
  .outbound,
  .scene-action,
  .next-glyph,
  .skip-link {
    transition: none;
  }

  .scene-progress.is-running::after {
    animation: none;
  }
}

@media (forced-colors: active) {
  .scene-frame {
    display: none;
  }

  .official-link,
  .official-link-primary,
  .scene-controls,
  .scene-action {
    border-color: ButtonText;
    background: Canvas;
    color: CanvasText;
    box-shadow: none;
    backdrop-filter: none;
  }

  .next-glyph {
    border-color: ButtonText;
  }
}
