/* ==========================================================================
   Aeon Tempus — aeontempus.com
   An Ephesus Creative game. Night lapis from the key-art sky, logo gold,
   and portal azure reserved for anything that tells time.
   ========================================================================== */

@property --rot {
  syntax: "<angle>";
  inherits: true;
  initial-value: 0deg;
}

/* Self-hosted fonts (SIL Open Font License). Jost is variable, so one file covers 300–500.
   latin-ext carries the Turkish letters ş, ğ and İ; ı sits in latin. */
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url("../fonts/jost-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url("../fonts/jost-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Marcellus";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/marcellus-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Marcellus";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/marcellus-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --night: #0a1122;
  --night-2: #0d1529;
  --night-3: #17213b;
  --gold: #f2cf6b;
  --gold-hover: #ffe08f;
  --gold-deep: #c69a3c;
  --azure: #9edcff;
  --azure-pale: #e2f5ff;
  --burgundy: #7a1a22;
  --bone: #ece6d6;
  --bone-dim: rgba(236, 230, 214, 0.72);
  --bone-faint: rgba(236, 230, 214, 0.52);
  --rule: rgba(236, 230, 214, 0.13);
  --rule-strong: rgba(236, 230, 214, 0.3);
  --rule-gold: rgba(242, 207, 107, 0.38);

  --f-display: "Marcellus", "Trajan Pro", Georgia, serif;
  --f-body: "Jost", "Futura", "Century Gothic", "Avenir Next", sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);

  --container: 1320px;
  --gutter: clamp(1rem, 4.5vw, 4rem);
  --section: clamp(5.5rem, 11vw, 10rem);
  --header-h: 76px;
}

/* ---------- Base ---------- */

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--night);
  color: var(--bone);
  font-family: var(--f-body);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
p { margin: 0 0 1em; }
ul { margin: 0; }

::selection { background: var(--gold); color: var(--night); }

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

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

.skip {
  position: fixed;
  top: 0.75rem; left: 0.75rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--gold);
  color: var(--night);
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease);
}
.skip:focus { transform: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section); }

.h2 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(2.25rem, 4.8vw, 4.25rem);
  line-height: 1.06;
  letter-spacing: -0.005em;
  margin: 0 0 0.55em;
  text-wrap: balance;
}

.h3 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

.lead {
  font-size: clamp(1.2rem, 1.65vw, 1.45rem);
  line-height: 1.5;
  max-width: 34ch;
}

.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.section-head p { color: var(--bone-dim); max-width: 52ch; }
.section-head--split {
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 3rem;
}
.section-head--split .h2 { margin: 0; }
.section-head--split p { margin: 0; max-width: 34ch; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 52px;
  padding: 0.8em 1.6em;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--f-body);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.btn--gold { background: var(--gold); color: #1d1405; }
.btn--gold:hover { background: var(--gold-hover); }
.btn--ghost {
  border-color: var(--rule-strong);
  background: rgba(10, 17, 34, 0.35);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { border-color: var(--bone); background: rgba(10, 17, 34, 0.6); }
.btn--text { padding-inline: 0.75em; }
.btn--text:hover { color: var(--gold); }
.btn--small { min-height: 40px; padding: 0.5em 1.1em; font-size: 0.875rem; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 48px; height: 48px;
  padding: 0;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.icon-btn:hover { border-color: var(--gold); color: var(--gold); }

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--azure);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.site-header.is-solid {
  background: rgba(10, 17, 34, 0.84);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--rule);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: var(--header-h);
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  flex-shrink: 0;
}
.brand__mark { width: 32px; height: 32px; }
.brand__word {
  width: auto;
  height: 22px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.site-header.is-solid .brand__word { opacity: 1; transform: none; }

.nav { margin-left: auto; }
.nav ul {
  display: flex;
  gap: clamp(1.1rem, 2vw, 2rem);
  list-style: none;
  padding: 0;
}
.nav a {
  position: relative;
  display: block;
  padding: 0.5rem 0;
  font-size: 0.92rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--bone-dim);
  text-decoration: none;
  transition: color 0.3s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  inset: auto 0 0.2rem;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}
.nav a:hover,
.nav a[aria-current="true"] { color: var(--bone); }
.nav a:hover::after,
.nav a[aria-current="true"]::after { transform: scaleX(1); }

/* over the bright key art, before the header turns solid */
.site-header:not(.is-solid) .nav a,
.site-header:not(.is-solid) .lang button {
  text-shadow: 0 1px 10px rgba(10, 17, 34, 0.95), 0 0 2px rgba(10, 17, 34, 0.7);
}
.site-header:not(.is-solid) .nav a { color: var(--bone); }
.site-header:not(.is-solid) .lang button[aria-pressed="false"] { color: var(--bone-dim); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.lang {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.82rem;
  color: var(--bone-faint);
}
.lang button {
  padding: 0.35rem 0.3rem;
  border: 0;
  background: none;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--bone-faint);
  cursor: pointer;
}
.lang button[aria-pressed="true"] { color: var(--gold); }
.lang button:hover { color: var(--bone); }

.nav-toggle {
  display: none;
  position: relative;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  background: rgba(10, 17, 34, 0.4);
  cursor: pointer;
}
.nav-toggle__bar {
  position: absolute;
  left: 13px; right: 13px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.35s var(--ease);
}
.nav-toggle__bar--top { top: 18px; }
.nav-toggle__bar--bottom { top: 24px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar--top { transform: translateY(3px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar--bottom { transform: translateY(-3px) rotate(-45deg); }

@media (max-width: 959px) {
  .nav-toggle { display: inline-block; }
  .header-cta { display: none; }
  .nav {
    /* explicit height: the header's backdrop-filter makes it the containing block for this fixed panel */
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    margin: 0;
    padding: 2rem var(--gutter);
    background: var(--night);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.35s var(--ease), visibility 0s 0.35s;
  }
  .nav.is-open {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.35s var(--ease);
  }
  .nav ul { flex-direction: column; gap: 0; }
  .nav li { border-bottom: 1px solid var(--rule); }
  .nav a {
    padding: 1.1rem 0;
    font-family: var(--f-display);
    font-size: 1.75rem;
    color: var(--bone);
  }
  .nav a::after { display: none; }
  .site-header.menu-open { background: var(--night); border-bottom-color: var(--rule); }
  .site-header.menu-open .brand__word { opacity: 1; transform: none; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: max(100svh, 640px);
  overflow: hidden;
  isolation: isolate;
}

.hero__art {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* the logo sits at the left of the key art, so crop from the right */
  object-position: 0% 50%;
}
.hero__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 17, 34, 0.72) 0, rgba(10, 17, 34, 0) 140px),
    radial-gradient(ellipse 62% 58% at 0% 100%, rgba(10, 17, 34, 0.78), rgba(10, 17, 34, 0) 70%),
    linear-gradient(0deg, var(--night) 0%, rgba(10, 17, 34, 0.55) 14%, rgba(10, 17, 34, 0) 38%);
}

.hero__flash {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 63% 32%, #fff 0%, var(--azure-pale) 22%, rgba(158, 220, 255, 0.6) 44%, rgba(10, 17, 34, 0) 78%);
}

.hero__content {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding: 0 var(--gutter) clamp(2.5rem, 7vh, 5rem);
}

.hero__lead {
  max-width: 31ch;
  margin-bottom: 1.75rem;
  font-size: clamp(1.15rem, 1.55vw, 1.4rem);
  line-height: 1.5;
  text-shadow: 0 1px 24px rgba(10, 17, 34, 0.7);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.6rem;
  margin-top: 1.75rem;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  color: var(--bone-dim);
}

/* One orchestrated arrival: the page steps out of the portal light */
.js .hero__flash { animation: portal-flash 1.9s var(--ease) both; }
.js .hero__art img { animation: hero-arrive 2.6s var(--ease) both; }
.js .hero__content > * {
  animation: hero-rise 1.2s var(--ease) both;
  animation-delay: calc(1s + var(--i, 0) * 0.12s);
}

@keyframes portal-flash {
  0% { opacity: 1; }
  30% { opacity: 0.92; }
  100% { opacity: 0; }
}
@keyframes hero-arrive {
  from { transform: scale(1.07); filter: brightness(1.45) saturate(0.7); }
  to { transform: none; filter: none; }
}
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  .hero {
    display: block;
    min-height: 0;
  }
  .hero__art { position: relative; inset: auto; }
  .hero__flash { inset: 0 0 auto; aspect-ratio: 3 / 4; }
  .hero__art img { height: auto; object-position: 50% 50%; }
  .hero__art::after {
    background:
      linear-gradient(180deg, rgba(10, 17, 34, 0.7) 0, rgba(10, 17, 34, 0) 96px),
      linear-gradient(0deg, var(--night) 0%, rgba(10, 17, 34, 0.6) 18%, rgba(10, 17, 34, 0) 42%);
  }
  .hero__content {
    position: relative;
    margin-top: -4.5rem;
    padding-bottom: 3.5rem;
  }
  .hero__actions .btn { flex: 1 1 auto; }
  .hero__actions .btn--text { flex-basis: 100%; }
}

/* ---------- Premise ---------- */

.premise__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(3rem, 7vw, 7rem);
  align-items: start;
}
.premise__text p:not(.lead) { color: var(--bone-dim); max-width: 54ch; }

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 2rem;
  margin: 0.6rem 0 0;
  border-top: 1px solid var(--rule-gold);
}
.facts > div {
  padding: 1rem 0 1.05rem;
  border-bottom: 1px solid var(--rule);
}
.facts dt {
  margin-bottom: 0.15rem;
  font-size: 0.82rem;
  color: var(--bone-faint);
}
.facts dd {
  margin: 0;
  font-family: var(--f-display);
  font-size: 1.15rem;
  line-height: 1.35;
}
.facts a { text-decoration-color: var(--rule-gold); text-underline-offset: 0.2em; }
.facts a:hover { color: var(--gold); }

/* ---------- Eras / dial ---------- */

.eras {
  background:
    radial-gradient(ellipse 55% 60% at 24% 62%, rgba(40, 66, 120, 0.28), rgba(40, 66, 120, 0) 70%),
    var(--night-2);
  border-block: 1px solid var(--rule);
}

.eras__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}

.dial {
  position: relative;
  width: min(100%, 540px);
  aspect-ratio: 1;
  justify-self: center;
  container-type: inline-size;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  transition: --rot 1.25s var(--ease-io);
}
.dial.is-dragging { cursor: grabbing; transition: none; }

.dial__face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.dial__disc { fill: url(#dial-disc); stroke: rgba(242, 207, 107, 0.2); stroke-width: 1; }
.dial__rotor {
  transform: rotate(var(--rot));
  transform-origin: 300px 300px;
  transform-box: view-box;
}
.dial__rim { fill: none; stroke: var(--gold-deep); stroke-width: 1.5; }
.dial__line { fill: none; stroke: rgba(242, 207, 107, 0.32); stroke-width: 1; }
.dial__ticks line { stroke: rgba(242, 207, 107, 0.38); stroke-width: 1; }
.dial__ticks line.is-five { stroke: rgba(242, 207, 107, 0.6); }
.dial__ticks line.is-month { stroke: var(--gold); stroke-width: 1.5; }
.dial__inscription {
  font-family: var(--f-display);
  font-size: 21px;
  letter-spacing: 0.34em;
  fill: var(--gold);
}
.dial__studs path { fill: var(--gold); }
.dial__hub { fill: var(--night); stroke: var(--gold-deep); stroke-width: 1.5; }
.dial__pointer { fill: var(--azure); }

.dial__labels {
  position: absolute;
  inset: 0;
  transform: rotate(var(--rot));
}

.dial__era {
  --size: 12cqi;
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: var(--size);
  height: var(--size);
  margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  font-family: var(--f-display);
  font-size: 5.4cqi;
  line-height: 1;
  color: var(--bone-faint);
  cursor: pointer;
  /* sit on the ring, then counter-rotate so numerals stay upright as the ring turns */
  transform: rotate(var(--a)) translateY(-27cqi) rotate(calc(-1 * var(--a) - var(--rot)));
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease), background-color 0.4s var(--ease);
}
.dial__era:hover { color: var(--bone); }
.dial__era[aria-selected="true"] {
  color: var(--gold);
  border-color: var(--rule-gold);
  background: rgba(10, 17, 34, 0.7);
}

.dial__hub-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.35em;
  text-align: center;
  pointer-events: none;
}
.dial__hub-name {
  font-family: var(--f-display);
  font-size: clamp(1.05rem, 5.4cqi, 1.9rem);
  line-height: 1.1;
  max-width: 34cqi;
}
.dial__hub-note {
  font-size: max(0.75rem, 2.6cqi);
  letter-spacing: 0.04em;
  color: var(--azure);
}

.era-stage__frame {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 2px;
  background: var(--night-3);
}
.era-stage__frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 1s var(--ease), transform 1.8s var(--ease);
}
.era-stage__frame img.is-active { opacity: 1; transform: none; }

.era-stage__text {
  min-height: 12.5rem;
  padding-top: 1.75rem;
}
.era-stage__text:focus-visible { outline-offset: 6px; }
.era-stage__text p:last-child { color: var(--bone-dim); max-width: 52ch; }
.era-stage__meta {
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  color: var(--azure);
}

.era-stage__controls {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}
.era-stage__count {
  min-width: 4.5rem;
  font-family: var(--f-display);
  font-size: 1.05rem;
  text-align: center;
  color: var(--bone-dim);
}

/* ---------- Features + sky ---------- */

.features__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(3rem, 7vw, 7rem);
  align-items: start;
}

.sky {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
  margin: 0;
}
.sky__frame {
  position: relative;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  border-radius: 2px;
  background: var(--night-3);
}
.sky__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
}
.sky__tint {
  position: absolute;
  inset: 0;
  background: var(--sky, transparent);
  mix-blend-mode: screen;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 28%, transparent 64%);
  mask-image: linear-gradient(180deg, #000 0%, #000 28%, transparent 64%);
  pointer-events: none;
}

.sky__caption { padding-top: 1.25rem; }
.sky__readout {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  margin-bottom: 0.9rem;
}
.sky__time {
  font-family: var(--f-display);
  font-size: 2rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--azure);
}
.sky__phase { color: var(--bone-dim); }
.sky__label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: var(--bone-faint);
}
.sky__note {
  margin-top: 0.9rem;
  font-size: 0.9rem;
  color: var(--bone-faint);
}
.sky__note .link-btn { margin-left: 0.4rem; }

/* 24-hour range: the track is the day itself */
.sky__range {
  --track: linear-gradient(90deg, #0c1530 0%, #0c1530 20.8%, #c9786f 27.1%, #84abe0 35.4%, #84abe0 72.9%, #de7f45 79.2%, #0c1530 85.4%, #0c1530 100%);
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.sky__range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: var(--track);
  box-shadow: inset 0 0 0 1px var(--rule);
}
.sky__range::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: var(--track);
}
.sky__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  margin-top: -7px;
  border: 2px solid var(--night);
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}
.sky__range::-moz-range-thumb {
  width: 16px; height: 16px;
  border: 2px solid var(--night);
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}
.sky__range:focus-visible { outline-offset: 4px; }

.feature-list {
  margin-top: 2.25rem;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule-gold);
}
.feature-list li {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
  gap: 0.35rem 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
}
.feature-list h3 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 1.3rem;
  line-height: 1.3;
}
.feature-list p { margin: 0; color: var(--bone-dim); }

/* ---------- Epitaph ---------- */

.epitaph {
  padding-block: var(--section);
  text-align: center;
  background: linear-gradient(180deg, var(--night) 0%, #150d17 50%, var(--night) 100%);
}
.epitaph__inner { display: grid; justify-items: center; }
.epitaph__inscription {
  margin: 0 0 2.25rem;
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 3.6vw, 3rem);
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: var(--gold);
}
.epitaph__quote { margin: 0 0 1.5rem; }
.epitaph__quote p {
  max-width: 36ch;
  margin: 0;
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  line-height: 1.5;
}
.epitaph__note {
  max-width: 56ch;
  margin: 0;
  font-size: 0.95rem;
  color: var(--bone-faint);
}

/* ---------- Media ---------- */

.media__privacy {
  max-width: 34ch;
  margin: 0;
  font-size: 0.875rem;
  color: var(--bone-faint);
}

.media__grid {
  display: grid;
  grid-template-columns: minmax(0, 2.3fr) minmax(0, 1fr);
  gap: 1.25rem;
}

.player {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 2px;
  background: #000;
}
.player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.player__facade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: #000;
  cursor: pointer;
}
.player__facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
  transition: opacity 0.4s var(--ease), transform 1.2s var(--ease);
}
.player__facade:hover img { opacity: 1; transform: scale(1.015); }
.player__play {
  position: absolute;
  left: 50%; top: 50%;
  display: grid;
  place-items: center;
  width: 84px; height: 84px;
  margin: -42px 0 0 -42px;
  padding-left: 4px;
  border: 1px solid rgba(242, 207, 107, 0.75);
  border-radius: 50%;
  background: rgba(10, 17, 34, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--gold);
  transition: background-color 0.3s var(--ease);
}
.player__facade:hover .player__play { background: rgba(10, 17, 34, 0.8); }
.player__label {
  position: absolute;
  left: 1.25rem; bottom: 1rem;
  font-size: 0.95rem;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8);
}

.playlist {
  display: grid;
  align-content: start;
  gap: 0.75rem;
  padding: 0;
  list-style: none;
}
.playlist__item {
  display: grid;
  grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.playlist__item img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.playlist__item:hover { border-color: var(--rule-strong); }
.playlist__item[aria-pressed="true"] { border-color: var(--rule-gold); background: rgba(242, 207, 107, 0.06); }
.playlist__title { display: block; font-family: var(--f-display); font-size: 1.1rem; line-height: 1.25; }
.playlist__sub { display: block; font-size: 0.85rem; color: var(--bone-faint); }

.gallery__title {
  margin: clamp(3.5rem, 7vw, 6rem) 0 1.25rem;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 1.5rem;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0;
  list-style: none;
}
.gallery__item { grid-column: span 3; aspect-ratio: 16 / 10; }
.gallery__item--lead { grid-column: span 8; grid-row: span 2; aspect-ratio: auto; }
.gallery__item--side { grid-column: span 4; }
.gallery button {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 2px;
  overflow: hidden;
  background: var(--night-3);
  cursor: zoom-in;
}
.gallery picture,
.gallery img { width: 100%; height: 100%; }
.gallery img { object-fit: cover; transition: transform 1.2s var(--ease), filter 0.4s var(--ease); }
.gallery button:hover img { transform: scale(1.03); filter: brightness(1.08); }

/* ---------- Buy ---------- */

.buy {
  border-top: 1px solid var(--rule);
  background:
    radial-gradient(ellipse 50% 70% at 15% 30%, rgba(122, 26, 34, 0.22), rgba(122, 26, 34, 0) 70%),
    var(--night);
}
.buy__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(3rem, 7vw, 7rem);
  align-items: start;
}
.buy__logo { width: min(100%, 460px); margin: 0 0 2rem -0.5%; }
.buy__title { font-size: clamp(1.9rem, 3.4vw, 3rem); }
.buy__pitch > p { color: var(--bone-dim); }
.buy__price {
  margin: 1.75rem 0 1.5rem;
  font-family: var(--f-display);
  font-size: 3rem;
  line-height: 1;
  color: var(--bone) !important;
}
.buy__price span { font-family: var(--f-body); font-size: 0.9rem; color: var(--bone-faint); }
.buy__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.reqs__title { font-size: 1.6rem; }
.reqs {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.reqs th,
.reqs td {
  padding: 0.9rem 1rem 0.9rem 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}
.reqs thead th {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 1.1rem;
  color: var(--gold);
  border-bottom-color: var(--rule-gold);
}
.reqs thead td { border-bottom-color: var(--rule-gold); }
.reqs tbody th { width: 28%; font-weight: 400; color: var(--bone-faint); }
.reqs td { color: var(--bone-dim); }

/* ---------- Footer ---------- */

.site-footer {
  padding-block: clamp(3.5rem, 7vw, 5.5rem) 2rem;
  border-top: 1px solid var(--rule);
  background: #070c19;
  font-size: 0.95rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem;
}
.footer__mark {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1rem;
  font-family: var(--f-display);
  font-size: 1.35rem;
  text-decoration: none;
}
.footer__mark img { width: 56px; height: 56px; }
.footer__studio p { max-width: 40ch; color: var(--bone-dim); }
.footer__links { display: grid; align-content: start; gap: 0.55rem; }
.footer__links a {
  justify-self: start;
  color: var(--bone-dim);
  text-decoration: none;
  transition: color 0.3s var(--ease);
}
.footer__links a:hover,
.footer__mark:hover { color: var(--gold); }
.footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--bone-faint);
}
.footer__base p { margin: 0; }
.footer__base a { color: inherit; }
.footer__base a:hover { color: var(--bone); }

/* ---------- Lightbox ---------- */

.lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--bone);
}
.lightbox::backdrop {
  background: rgba(5, 9, 19, 0.94);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.lightbox[open] { animation: fade-in 0.35s var(--ease); }
.lightbox__figure {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  height: 100%;
  margin: 0;
  padding: 4.5rem clamp(1rem, 7vw, 6rem) 1.5rem;
}
.lightbox__picture {
  display: contents;
}
.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.lightbox__caption {
  padding-top: 1rem;
  font-size: 0.95rem;
  color: var(--bone-dim);
  text-align: center;
}
.lightbox__count { margin-left: 0.75rem; color: var(--bone-faint); }
.lightbox .icon-btn { position: absolute; background: rgba(10, 17, 34, 0.6); }
.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__prev { left: 1rem; top: 50%; margin-top: -24px; }
.lightbox__next { right: 1rem; top: 50%; margin-top: -24px; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Responsive ---------- */

@media (max-width: 999px) {
  .premise__grid,
  .eras__grid,
  .features__grid,
  .buy__grid { grid-template-columns: minmax(0, 1fr); }

  .dial { width: min(100%, 420px); }
  .sky { position: static; }
  .media__grid { grid-template-columns: minmax(0, 1fr); }
  .playlist { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .playlist__item { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .footer__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer__studio { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .facts { column-gap: 1.25rem; }
  .facts dd { font-size: 1.05rem; }
  .feature-list li { grid-template-columns: minmax(0, 1fr); }
  .playlist { grid-template-columns: minmax(0, 1fr); }
  .playlist__item { grid-template-columns: minmax(0, 6.5rem) minmax(0, 1fr); align-items: center; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
  .gallery__item,
  .gallery__item--side { grid-column: span 1; }
  .gallery__item--lead { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 16 / 10; }
  .buy__actions .btn { flex: 1 1 auto; }
  .lightbox__prev,
  .lightbox__next { top: auto; bottom: 1rem; margin-top: 0; }

  /* stack each requirement: label, then minimum and recommended side by side */
  .reqs thead { display: none; }
  .reqs tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.35rem 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--rule);
  }
  .reqs th,
  .reqs td { padding: 0; border: 0; }
  .reqs tbody th { grid-column: 1 / -1; width: auto; }
  .reqs td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.8rem;
    color: var(--gold);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
