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

.main-nav {
  width: 100%;
  max-width: 100%;
  gap: 1rem;
  padding: 1rem 1.25rem;
  padding-right: 3.25rem;
  overflow: visible;
  transition: border-bottom-color 700ms ease, background-color 700ms ease;
}

.nav-brand {
  flex: 0 0 auto;
  letter-spacing: 0.2em;
  white-space: nowrap;
}

.main-nav ul {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
}

.main-nav li {
  flex: 0 0 auto;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-bottom-color: transparent;
  letter-spacing: 0.12em;
  white-space: nowrap;
  transition: color 180ms ease;
}

.main-nav a:hover {
  border-bottom-color: transparent;
}

.main-nav a.is-on {
  color: var(--color-fg);
}

.nav-pip {
  width: 8px;
  height: 9px;
  flex: 0 0 auto;
  position: relative;
}

.nav-pip::before {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  opacity: 0.38;
  transition: opacity 180ms ease, background-color 180ms ease;
}

.main-nav a:hover .nav-pip::before {
  opacity: 0.72;
}

.main-nav a.is-on .nav-pip::before {
  opacity: 1;
  background: var(--color-accent);
}

.vignette::after {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  transition: background-color 800ms ease;
}

@property --color-fg {
  syntax: "<color>";
  inherits: true;
  initial-value: #e8e2d6;
}
@property --color-muted {
  syntax: "<color>";
  inherits: true;
  initial-value: #8c8678;
}
@property --color-accent {
  syntax: "<color>";
  inherits: true;
  initial-value: #c45c26;
}
@property --color-line {
  syntax: "<color>";
  inherits: true;
  initial-value: rgba(232, 226, 214, 0.14);
}

html {
  transition:
    --color-fg 800ms ease,
    --color-muted 800ms ease,
    --color-accent 800ms ease,
    --color-line 800ms ease;
}

html[data-weather="marionette"] {
  --color-fg: #f0d4c0;
  --color-muted: #a07858;
  --color-accent: #e07030;
  --color-line: rgba(196, 92, 38, 0.28);
}
html[data-weather="marionette"] .vignette::after {
  background-color: rgba(40, 16, 8, 0.22);
}

html[data-weather="goals"] {
  --color-fg: #d8d6d0;
  --color-muted: #7a7870;
  --color-accent: #a06038;
  --color-line: rgba(232, 226, 214, 0.08);
}
html[data-weather="goals"] .vignette::after {
  background-color: rgba(8, 8, 10, 0.28);
}

html[data-weather="devs"] {
  --color-fg: #f2ece0;
  --color-muted: #a8a194;
  --color-accent: #d46828;
  --color-line: rgba(232, 226, 214, 0.22);
}

html[data-weather="contact"] {
  --color-fg: #e4ded2;
  --color-muted: #9a9488;
  --color-accent: #c45c26;
  --color-line: rgba(232, 226, 214, 0.14);
}
html[data-weather="contact"] .vignette::after {
  background-color: rgba(8, 7, 6, 0.14);
}
html[data-weather="contact"] .main-nav a.is-on .nav-pip::before {
  opacity: 0.85;
}

.ethos-card {
  box-shadow: inset 0 0 0 0 transparent;
  transition:
    box-shadow 200ms ease,
    transform 620ms cubic-bezier(0.2, 0, 0, 1),
    opacity 620ms ease;
}

.ethos-card.is-held {
  box-shadow: inset 2px 0 0 var(--color-accent);
}

.ethos-card.is-held .ethos-index {
  text-shadow: 0 0 14px color-mix(in srgb, var(--color-accent) 70%, transparent);
}

.ethos-index {
  transition: text-shadow 200ms ease;
}

.marionette-aperture {
  display: block;
  width: min(550px, 100%);
  max-width: 100%;
  background: #0c0b0a;
  overflow: hidden;
  clip-path: polygon(50% -60%, 160% 8%, 160% 92%, 50% 160%, -60% 92%, -60% 8%);
  transition: clip-path 1100ms cubic-bezier(0.2, 0, 0, 1);
}
.marionette-embed {
  width: 100%;
  max-width: none;
  background: transparent;
}
.section-marionette.is-armed .marionette-aperture {
  clip-path: polygon(50% 38%, 62% 44%, 62% 56%, 50% 62%, 38% 56%, 38% 44%);
}

.section-hero .hero-kicker,
.section-hero .hero-title,
.section-hero .hero-quote,
.section-hero .hero-btn,
.section-marionette .marionette-kicker,
.section-marionette .marionette-content h2,
.section-goals h2,
.section-devs h2,
.section-devs .devs-brief,
.section-contact h2,
.section-contact .contact-link,
.section-contact .site-foot {
  transition:
    opacity 700ms cubic-bezier(0.2, 0, 0, 1),
    transform 700ms cubic-bezier(0.2, 0, 0, 1),
    letter-spacing 640ms cubic-bezier(0.2, 0, 0, 1);
}

.section-hero.is-armed .hero-kicker { opacity: 0; transform: translate3d(0, 14px, 0); }
.section-hero.is-armed .hero-title { opacity: 0; transform: translate3d(0, 28px, 0); transition-delay: 70ms; }
.section-hero.is-armed .hero-quote { opacity: 0; transform: translate3d(0, 16px, 0); transition-delay: 160ms; }
.section-hero.is-armed .hero-btn { opacity: 0; transform: translate3d(0, 12px, 0); transition-delay: 240ms; }
.section-hero.is-played .hero-kicker,
.section-hero.is-played .hero-title,
.section-hero.is-played .hero-quote,
.section-hero.is-played .hero-btn { opacity: 1; transform: none; }

.section-marionette.is-armed .marionette-kicker,
.section-marionette.is-armed .marionette-content h2 {
  opacity: 0;
  transform: translate3d(-22px, 0, 0);
}
.section-marionette.is-armed .marionette-content h2 { transition-delay: 80ms; }
.section-marionette.is-played .marionette-kicker,
.section-marionette.is-played .marionette-content h2 { opacity: 1; transform: none; }

.section-goals.is-armed h2 { opacity: 0.2; letter-spacing: 0.28em; }
.section-goals.is-played h2 { opacity: 1; letter-spacing: 0.08em; }

.section-goals.is-armed .ethos-card {
  opacity: 0.62;
  transform: translate3d(var(--lock-x, 0), 10px, 0);
}
.ethos-grid {
  overflow: hidden;
}
.section-goals.is-armed .ethos-card:nth-child(1) { --lock-x: -14px; transition-delay: 0ms; }
.section-goals.is-armed .ethos-card:nth-child(2) { --lock-x: 14px; transition-delay: 70ms; }
.section-goals.is-armed .ethos-card:nth-child(3) { --lock-x: -14px; transition-delay: 140ms; }
.section-goals.is-armed .ethos-card:nth-child(4) { --lock-x: 14px; transition-delay: 210ms; }
.section-goals.is-played .ethos-card {
  opacity: 1;
  transform: none;
}

.devs-boot-veil {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background: #141210;
  transform: scaleY(0);
  transform-origin: bottom center;
  transition: transform 1100ms cubic-bezier(0.2, 0, 0, 1);
}
.devs-boot-veil::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -2px;
  height: 2px;
  background: var(--color-accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--color-accent) 70%, transparent);
}
.section-devs.is-armed .devs-boot-veil {
  transform: scaleY(1);
}
.section-devs.is-armed h2,
.section-devs.is-armed .devs-brief {
  opacity: 0;
  transform: translate3d(0, -14px, 0);
}
.section-devs.is-armed .devs-brief { transition-delay: 70ms; }
.section-devs.is-played h2,
.section-devs.is-played .devs-brief { opacity: 1; transform: none; }

.section-contact.is-armed h2,
.section-contact.is-armed .contact-link,
.section-contact.is-armed .site-foot {
  opacity: 0.15;
  transform: translate3d(0, 20px, 0);
}
.section-contact.is-armed .contact-link:nth-child(1) { transition-delay: 70ms; }
.section-contact.is-armed .contact-link:nth-child(2) { transition-delay: 140ms; }
.section-contact.is-armed .site-foot { transition-delay: 210ms; }
.section-contact.is-played h2,
.section-contact.is-played .contact-link,
.section-contact.is-played .site-foot { opacity: 1; transform: none; }

@media (max-width: 768px) {
  .main-nav {
    gap: 0.45rem;
    padding: 0.7rem 0.75rem;
    padding-right: 2.75rem;
  }
  .nav-brand {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
  }
  .main-nav ul { gap: 0.45rem; }
  .main-nav a {
    font-size: 0.58rem;
    letter-spacing: 0.06em;
    gap: 0.28rem;
  }
  .nav-pip { width: 7px; height: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html {
    transition: none;
  }
  .main-nav,
  .main-nav a,
  .nav-pip::before,
  .ethos-card,
  .ethos-index,
  .marionette-aperture,
  .devs-boot-veil,
  .vignette::after {
    transition: none;
  }
  .section-hero.is-armed .hero-kicker,
  .section-hero.is-armed .hero-title,
  .section-hero.is-armed .hero-quote,
  .section-hero.is-armed .hero-btn,
  .section-marionette.is-armed .marionette-aperture,
  .section-marionette.is-armed .marionette-kicker,
  .section-marionette.is-armed .marionette-content h2,
  .section-goals.is-armed h2,
  .section-goals.is-armed .ethos-card,
  .section-devs.is-armed .devs-boot-veil,
  .section-devs.is-armed h2,
  .section-devs.is-armed .devs-brief,
  .section-contact.is-armed h2,
  .section-contact.is-armed .contact-link,
  .section-contact.is-armed .site-foot {
    clip-path: none;
    transform: none;
    opacity: 1;
    letter-spacing: inherit;
  }
}

.devs-rack {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 172px;
  pointer-events: none;
}
.devs-minimap {
  display: block;
  width: 172px;
  height: 132px;
  background: color-mix(in srgb, var(--color-bg) 90%, transparent);
  border: 1px solid var(--color-line);
  cursor: crosshair;
  pointer-events: auto;
}
.devs-hud {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.38rem 0.55rem;
  font-size: 0.56rem;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .devs-rack {
    right: 8px;
    bottom: 8px;
    width: 112px;
    gap: 4px;
  }
  .devs-minimap {
    width: 112px;
    height: 90px;
  }
  .devs-hud {
    font-size: 0.5rem;
    letter-spacing: 0.08em;
    padding: 0.3rem 0.4rem;
  }
}

:root {
  --font-display: "Orbitron", "Arial Black", sans-serif;
  --color-brand-orange: #f5a018;
  --color-brand-cyan: #00e2f0;
  --color-brand-white: #f4f6f8;
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--color-brand-white);
}
.nav-brand span {
  color: var(--color-brand-orange);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 10vw, 6.4rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: 0.01em;
  text-shadow: none;
}

.title-orange {
  color: var(--color-brand-orange);
  text-shadow:
    0 0 18px rgba(245, 160, 24, 0.55),
    0 0 42px rgba(245, 160, 24, 0.22);
}

.title-white {
  color: var(--color-brand-white);
  text-shadow: 0 0 16px rgba(244, 246, 248, 0.28);
}

.title-cyan {
  display: block;
  margin-top: 0.02em;
  font-size: 0.94em;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--color-brand-cyan);
  text-shadow:
    0 0 18px rgba(0, 226, 240, 0.5),
    0 0 44px rgba(0, 226, 240, 0.22);
}

.marionette-content h2,
.section-goals h2,
.section-devs h2,
.section-contact h2,
.ethos-title,
.legal-card h1,
.legal-card h2 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.06em;
}

.hero-kicker {
  color: color-mix(in srgb, var(--color-brand-orange) 72%, var(--color-muted));
}

.hero-btn,
.hero-btn:visited {
  color: var(--color-brand-cyan);
  border-color: color-mix(in srgb, var(--color-brand-cyan) 62%, transparent);
}
.hero-btn:hover {
  background: var(--color-brand-cyan);
  border-color: var(--color-brand-cyan);
  color: #071315;
}

.marionette-kicker {
  color: var(--color-brand-orange);
}

.marionette-reel figcaption a:hover,
.contact-link:hover,
.site-foot a:hover,
.back-link:hover {
  color: var(--color-brand-cyan);
  border-bottom-color: var(--color-brand-cyan);
}

.ability-btn.is-hot {
  border-color: var(--color-brand-cyan);
  color: var(--color-brand-cyan);
  background: color-mix(in srgb, var(--color-brand-cyan) 12%, transparent);
}

html[data-weather="devs"] .vignette::after {
  background-color: rgba(0, 18, 22, 0.05);
}

.devs-map-container {
  background: rgba(22, 20, 18, 0.28);
}

@media (max-width: 768px) {
  .nav-brand {
    font-size: 0.72rem;
    letter-spacing: 0.06em;
  }
}
