/* Downhill Revived. Archivo (SIL OFL), self-hosted. */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("/assets/fonts/archivo-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Archivo";
  font-style: italic;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("/assets/fonts/archivo-italic-latin.woff2") format("woff2");
}

:root {
  --night: #1b1530;   /* page: the sky after the sun is gone */
  --dusk: #2e2248;    /* raised surfaces */
  --haze: #8a4a82;    /* far ridges, mauve */
  --ember: #f07c3a;   /* sunset band */
  --gold: #ffc65a;    /* the one action colour */
  --snow: #f5eff8;    /* text */
  --lilac: #bcaed4;   /* secondary text */
  --line: rgba(188, 174, 212, .22);

  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --font: "Archivo", "Arial Narrow", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--night);
  color: var(--snow);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 100%;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--gold); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: .9em;
  background: rgba(188, 174, 212, .12);
  padding: .08em .35em;
  border-radius: 3px;
  white-space: nowrap;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--gold); color: var(--night); padding: .5rem 1rem; font-weight: 700;
}
.skip:focus { top: 1rem; }

/* ---------- Top bar ---------- */
.bar {
  position: absolute; inset: 0 0 auto 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem var(--gutter);
}
.mark {
  display: inline-flex; align-items: center; gap: .55rem;
  color: var(--snow); text-decoration: none;
  font-style: italic; font-weight: 900; font-stretch: 125%;
  text-transform: uppercase; letter-spacing: .01em; font-size: .95rem;
}
.mark-glyph { width: 2rem; height: auto; color: var(--gold); }
.bar nav { display: flex; gap: clamp(.9rem, 2vw, 1.8rem); font-size: .95rem; font-stretch: 87%; font-weight: 600; }
.bar nav a { color: var(--snow); text-decoration: none; opacity: .88; }
.bar nav a:hover { opacity: 1; text-decoration: underline; }
@media (max-width: 720px) { .nav-hide { display: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: min(100svh, 62rem);
  display: flex; flex-direction: column; justify-content: center;
  padding: 7rem var(--gutter) clamp(12rem, 26vw, 22rem);
  background:
    linear-gradient(180deg,
      #1b1530 0%,
      #2f2050 22%,
      #5a2c66 42%,
      #a3476f 60%,
      #e0693f 76%,
      #ffb15a 88%,
      #ffd08a 100%);
}
.sun {
  position: absolute; z-index: -1;
  width: clamp(12rem, 24vw, 22rem); aspect-ratio: 1;
  right: 12%; bottom: clamp(6rem, 15vw, 14rem);
  border-radius: 50%;
  background: radial-gradient(circle, #fff4cf 0, #ffe09a 30%, #ffc76a 40%, rgba(255, 170, 90, .38) 42%, rgba(255, 150, 80, .12) 58%, rgba(255, 140, 70, 0) 70%);
}
.ridges {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: -1;
  width: 100%; height: clamp(15rem, 30vw, 27rem);
}
.r-far   { fill: #8a4a82; opacity: .72; }
.r-mid   { fill: #4f2c60; }
.r-near  { fill: #2c1f45; }
.r-front { fill: var(--night); }
.trail   { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-dasharray: 3 11; stroke-linecap: round; opacity: .75; }

.hero-inner { width: 100%; max-width: var(--wrap); margin: 0 auto; }

.wordmark {
  margin: 0 0 1.4rem;
  font-style: italic; font-weight: 900; font-stretch: 125%;
  text-transform: uppercase;
  font-size: clamp(3rem, 11.2vw, 10rem);
  line-height: .86;
  letter-spacing: -.025em;
  color: var(--snow);
}
.wordmark span { display: block; }
/* The name runs downhill: the second word starts further right and lower. */
.wordmark .w2 { padding-left: .9em; }

.subtitle {
  margin: 0 0 .9rem;
  font-size: clamp(1.15rem, 2.2vw, 1.6rem);
  font-weight: 700; font-stretch: 112%; font-style: italic;
}
.pitch { margin: 0 0 2rem; max-width: 36rem; color: #f2e4f0; font-size: clamp(1rem, 1.5vw, 1.15rem); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; }

.btn {
  display: inline-block;
  padding: 1.05rem 2.1rem;
  background: var(--gold);
  color: var(--night);
  text-decoration: none;
  font-weight: 900; font-style: italic; font-stretch: 118%;
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  text-transform: uppercase; letter-spacing: .01em;
  transform: skewX(-12deg);
  box-shadow: 6px 6px 0 var(--night);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn span { display: inline-block; transform: skewX(12deg); }
.btn:hover { transform: skewX(-12deg) translate(-2px, -2px); box-shadow: 8px 8px 0 var(--night); text-decoration: none; }
.btn:active { transform: skewX(-12deg) translate(3px, 3px); box-shadow: 2px 2px 0 var(--night); }
.btn:focus-visible { outline-color: var(--snow); outline-offset: 5px; }

@media (max-width: 480px) {
  .btn { padding: .95rem 1.4rem; font-stretch: 104%; font-size: 1.02rem; margin-left: .45rem; white-space: nowrap; }
  .actions { flex-direction: column; align-items: flex-start; gap: 1.1rem; }
}

.link-src { color: var(--snow); font-weight: 700; font-stretch: 112%; font-size: 1.05rem; text-decoration-thickness: 2px; }

.needs { margin: 1.3rem 0 0; font-size: .95rem; color: #f8e6ee; }

/* One moment of motion: the name slides down the slope on load. */
@media (prefers-reduced-motion: no-preference) {
  .wordmark .w1, .wordmark .w2 { animation: descend .9s cubic-bezier(.2, .7, .2, 1) both; }
  .wordmark .w2 { animation-delay: .12s; }
  @keyframes descend {
    from { opacity: 0; transform: translate(-1.2em, -.35em); }
    to   { opacity: 1; transform: none; }
  }
  .btn { transition: transform .15s ease, box-shadow .15s ease; }
}
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

/* ---------- Sections ---------- */
.section {
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 7rem) var(--gutter) 0;
}
.section h2 {
  margin: 0 0 2.4rem;
  font-style: italic; font-weight: 900; font-stretch: 125%;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1; letter-spacing: -.02em;
}
.section h3 {
  margin: 0 0 .5rem;
  font-style: italic; font-weight: 800; font-stretch: 115%;
  font-size: 1.2rem; line-height: 1.2;
}
.section p { margin: 0; }

/* Features: an even grid of spec entries (4x2, 2x4, 1x8), no boxes. A sunset-coloured tick on each. */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2.6rem clamp(1.5rem, 2.6vw, 2.6rem);
}
.feature {
  position: relative;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  color: var(--lilac);
}
.feature::before {
  content: ""; position: absolute; left: 0; top: -2px;
  width: 3.2rem; height: 3px;
  background: linear-gradient(90deg, var(--ember), var(--gold));
  transform: skewX(-24deg); transform-origin: left;
}
.feature h3 { color: var(--snow); }
.feature p { max-width: 34rem; font-size: 1rem; }

@media (max-width: 1000px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* Screens */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.75rem, 1.6vw, 1.25rem);
}
.shot { margin: 0; }
.shot.big { grid-column: span 2; grid-row: span 2; }
.shot a { display: block; border-radius: 4px; overflow: hidden; background: var(--dusk); }
.shot img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.shot a:hover img { filter: brightness(1.08); }
.shot figcaption {
  margin-top: .5rem;
  font-size: .9rem; font-stretch: 90%;
  color: var(--lilac);
}
.shot.big figcaption { font-size: 1rem; }
/* Keep the big shot's caption from stretching the grid row heights. */
.shot.big { display: flex; flex-direction: column; }

@media (min-width: 901px) {
  .shot.big a { flex: 1; }
  .shot.big img { height: 100%; aspect-ratio: auto; }
}
@media (max-width: 900px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shot.big { grid-column: 1 / -1; grid-row: auto; }
}
@media (max-width: 480px) {
  .gallery { grid-template-columns: 1fr; gap: 1.4rem; }
}

/* How to play: a real sequence, so it is numbered. */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem clamp(1.5rem, 3vw, 3rem);
  counter-reset: step;
}
.steps li { counter-increment: step; color: var(--lilac); }
.steps li::before {
  content: counter(step);
  display: block;
  font-style: italic; font-weight: 900; font-stretch: 125%;
  font-size: clamp(4.5rem, 9vw, 7rem); line-height: .9;
  color: transparent;
  -webkit-text-stroke: 2px var(--ember);
  margin-bottom: .6rem;
}
.steps h3 { color: var(--snow); }
.play-more { margin-top: 2.6rem !important; color: var(--lilac); max-width: 44rem; }

@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; }
  .steps li { display: grid; grid-template-columns: 4.2rem 1fr; column-gap: 1rem; }
  .steps li::before { grid-row: span 2; font-size: 4.2rem; margin: 0; }
}

/* FAQ */
.faq-list { max-width: 48rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 1.15rem 0;
  font-weight: 700; font-stretch: 108%; font-size: 1.12rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  font-weight: 900; font-stretch: 125%; font-size: 1.5rem; line-height: 1;
  color: var(--ember);
}
.faq details[open] summary::after { content: "\2212"; }
.faq summary:hover { color: var(--gold); }
.faq details p { padding: 0 0 1.4rem; color: var(--lilac); max-width: 42rem; }

/* Footer */
.foot {
  margin-top: clamp(5rem, 10vw, 8rem);
  background: #140f25;
  border-top: 1px solid var(--line);
}
.foot-inner {
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 3rem var(--gutter) 3.5rem;
  color: var(--lilac);
  font-size: .95rem;
}
.foot-inner p { margin: 0 0 .7rem; max-width: 46rem; }
.foot-mark {
  font-style: italic; font-weight: 900; font-stretch: 125%;
  text-transform: uppercase; font-size: 1.1rem; color: var(--snow);
}
.foot-links { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; margin-top: 1.2rem !important; font-weight: 600; }
.foot-small { font-size: .85rem; opacity: .8; margin-top: 1.4rem !important; }

/* 404 */
.lost { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; }
.lost p { color: var(--lilac); }
