/* Umlaut Hero — umlaut-hero.com
   One hero screen, built the way fevertilt.com is: the trailer front and
   center, a blurred mirror of it behind everything, the ways to play under
   it, and the studio's credit in the footer. The colours are the game's:
   the venue's dark violet, the gold of the logo, and the three lanes. */

@font-face {
  font-family: "Lilita One";
  src: url("/assets/fonts/LilitaOne-Regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Fredoka";
  src: url("/assets/fonts/Fredoka.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #0e091c;
  --gold: #ffd23f;
  --ae: #ff5b42;
  --oe: #34eb95;
  --ue: #9e66ff;
  --text: #f2eeff;
  --text-muted: #a79fc6;
  --trailer-inset: clamp(0.5rem, 2.4vw, 1.5rem);
  --display: "Lilita One", "Arial Black", system-ui, sans-serif;
  --body: "Fredoka", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html { overflow-x: clip; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 500 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ue); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════════════
   Home
   ══════════════════════════════════════════════════════════════════════ */

body.home {
  overflow-x: hidden;
  background:
    radial-gradient(1100px 520px at 50% -8%, rgba(155, 123, 255, 0.20), transparent 62%),
    radial-gradient(900px 480px at 82% 110%, rgba(255, 106, 84, 0.12), transparent 60%),
    var(--ink);
}

.bg-mirror {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  object-fit: cover;
  filter: blur(38px) saturate(1.35) brightness(0.5);
  transform: scale(1.18); /* hide the blur's edge */
  background: var(--ink);
}

.bg-vignette {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 42%, transparent 0%, rgba(14, 9, 28, 0.55) 72%, rgba(14, 9, 28, 0.92) 100%),
    linear-gradient(180deg, rgba(14, 9, 28, 0.35) 0%, transparent 18%, transparent 70%, rgba(14, 9, 28, 0.85) 100%);
}

.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Every rem spent here is a rem the player does not get: a hairline of inset,
   and gaps that collapse on short screens. */
.hero-trailer {
  container-type: inline-size;
  min-height: 100svh;
  gap: clamp(0.45rem, 1.5vh, 1rem);
  padding: clamp(0.6rem, 1.6vh, 1.1rem) var(--trailer-inset) clamp(0.6rem, 1.6vh, 1.2rem);
}

.hero-logo {
  width: auto;
  height: clamp(54px, 11svh, 118px);
  filter: drop-shadow(0 6px 22px rgba(14, 9, 28, 0.8));
}

/* ── The player ──────────────────────────────────────────────────────── */

/* The frame is the flexible member of the column: everything else takes its
   natural height and the player takes all the rest, as big as 16:9 allows. */
.trailer-frame {
  position: relative;
  --trailer-max-w: min(100cqw, 1280px);
  --trailer-max-h: calc(var(--trailer-max-w) * 9 / 16);
  flex: 1 1 0;
  min-height: min(28svh, 200px, var(--trailer-max-h));
  max-height: var(--trailer-max-h);
  max-width: var(--trailer-max-w);
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  isolation: isolate;
  line-height: 0;
}

/* The three lanes, running round the player, and their bloom. */
.trailer-frame::before {
  content: "";
  position: absolute;
  inset: -3px;
  z-index: -1;
  border-radius: 13px;
  background: linear-gradient(100deg, var(--ae), var(--oe), var(--ue), var(--gold), var(--ae));
  background-size: 220% 100%;
  animation: lane-ring 8s linear infinite;
}

.trailer-frame::after {
  content: "";
  position: absolute;
  inset: -3px;
  z-index: -2;
  border-radius: 13px;
  filter: blur(28px);
  opacity: 0.5;
  background: linear-gradient(100deg, var(--ae), var(--oe), var(--ue));
}

.trailer-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  background: #000;
  cursor: pointer;
}

.sound-toggle {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 0.5rem 0.95rem;
  font: 600 0.82rem/1 var(--body);
  letter-spacing: 0.08em;
  color: #fff;
  background: rgba(14, 9, 28, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: border-color 140ms ease, background 140ms ease;
}

.sound-toggle:hover,
.sound-toggle:focus-visible {
  border-color: var(--gold);
  background: rgba(14, 9, 28, 0.9);
}

.sound-toggle[hidden] { display: none; }

/* ── The words ───────────────────────────────────────────────────────── */

.hero-headline {
  margin: 0.2rem 0 0;
  font: 400 clamp(1.5rem, 4.6vw, 2.6rem)/1.1 var(--display);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-shadow: 0 2px 16px rgba(14, 9, 28, 0.9);
}

.hero-headline .lane-ae { color: var(--ae); }
.hero-headline .lane-oe { color: var(--oe); }
.hero-headline .lane-ue { color: var(--ue); }

.hero-line {
  margin: 0;
  max-width: 40rem;
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
  line-height: 1.35;
  color: var(--text);
  opacity: 0.86;
  text-shadow: 0 1px 10px rgba(14, 9, 28, 0.9);
}

.hero-line .lane-ae { color: var(--ae); font-weight: 700; }
.hero-line .lane-oe { color: var(--oe); font-weight: 700; }
.hero-line .lane-ue { color: var(--ue); font-weight: 700; }

/* ── The buttons ─────────────────────────────────────────────────────── */

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem 1.2rem;
  margin-top: 0.35rem;
}

.hero-btn {
  --btn-a: var(--gold);
  --btn-b: var(--ae);
  position: relative;
  display: inline-block;
  padding: 0.95rem clamp(1.4rem, 3.2vw, 2.9rem);
  font: 400 clamp(1.15rem, 2.9vw, 1.6rem)/1 var(--display);
  letter-spacing: 0.1em;
  text-align: center;
  white-space: nowrap;
  text-decoration: none;
  color: #fff;
  background: rgba(14, 9, 28, 0.76);
  border: 1px solid transparent;
  border-radius: 12px;
  background-clip: padding-box;
  isolation: isolate;
  transition: transform 140ms ease;
}

.hero-btn.play-btn {
  color: var(--ink);
  background: var(--gold);
}

.hero-btn.store-btn {
  --btn-a: var(--ue);
  --btn-b: var(--oe);
}

.hero-btn::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: 14px;
  background: linear-gradient(100deg, var(--btn-a), var(--btn-b), var(--btn-a));
  background-size: 220% 100%;
  animation: lane-ring 4s linear infinite;
}

.hero-btn.play-btn::before { z-index: -2; }

.hero-btn::after {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -3;
  border-radius: 14px;
  filter: blur(18px);
  background: linear-gradient(100deg, var(--btn-a), var(--btn-b));
  animation: lane-pulse 2.4s ease-in-out infinite;
}

.hero-btn:hover,
.hero-btn:focus-visible { transform: translateY(-2px) scale(1.03); }

.hero-btn:hover::after,
.hero-btn:focus-visible::after { opacity: 0.9; }

@keyframes lane-ring {
  to { background-position: 220% 0; }
}

@keyframes lane-pulse {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 0.75; }
}

.drop-line {
  margin: 0.15rem 0 0;
  font-size: clamp(0.9rem, 2.1vw, 1.05rem);
  color: var(--text);
  text-shadow: 0 1px 10px rgba(14, 9, 28, 0.9);
}

.drop-badge {
  display: inline-block;
  margin-right: 0.35rem;
  padding: 0.16rem 0.55rem 0.12rem;
  font: 400 0.85em/1.2 var(--display);
  letter-spacing: 0.1em;
  color: var(--ink);
  background: linear-gradient(100deg, var(--oe), var(--gold));
  border-radius: 6px;
}

/* ── Where to play ───────────────────────────────────────────────────── */

.stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem 0.55rem;
  margin: 0.2rem 0 0;
  padding: 0;
  list-style: none;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.34rem 0.8rem 0.3rem;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
  text-decoration: none;
  background: rgba(14, 9, 28, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.store img {
  width: 16px;
  height: 16px;
  opacity: 0.9;
}

a.store { transition: border-color 140ms ease, transform 140ms ease; }

a.store:hover,
a.store:focus-visible {
  border-color: var(--gold);
  transform: translateY(-1px);
}

/* Not open yet: said plainly, and not a link to nowhere. */
.store.soon {
  color: var(--text-muted);
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.16);
}

.store.soon img { opacity: 0.5; }

.store .soon-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.85;
}

/* ══════════════════════════════════════════════════════════════════════
   The five pillars
   ══════════════════════════════════════════════════════════════════════ */

.pillars {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: clamp(2.4rem, 7vw, 5rem);
  width: min(100% - 2rem, 68rem);
  margin: 0 auto;
  padding: clamp(2.5rem, 8vw, 6rem) 0 clamp(1.5rem, 4vw, 3rem);
}

.pillar {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.2rem, 4vw, 3rem);
  width: 100%;
}

/* Every other one the other way round, so the eye walks down the page. */
.pillar:nth-of-type(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
.pillar:nth-of-type(even) img { order: 2; }

.pillar img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: clamp(10px, 1.6vw, 20px);
  box-shadow: 0 18px 60px rgba(14, 9, 28, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.pillar h2 {
  margin: 0 0 0.7rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.7rem, 4vw, 2.7rem);
  line-height: 1.04;
  text-transform: uppercase;
  text-wrap: balance;
  text-shadow: 0 3px 18px rgba(14, 9, 28, 0.8);
}

.pillar h2 .lane-ae { color: var(--ae); }
.pillar h2 .lane-oe { color: var(--oe); }
.pillar h2 .lane-ue { color: var(--ue); }

.pillar-sub {
  margin: 0 0 0.7rem;
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}

.pillar-body {
  margin: 0;
  line-height: 1.6;
  color: var(--text-muted);
}

@media (max-width: 760px) {
  .pillar,
  .pillar:nth-of-type(even) { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .pillar:nth-of-type(even) img { order: 0; }
}

/* ══════════════════════════════════════════════════════════════════════
   Footer
   ══════════════════════════════════════════════════════════════════════ */

.site-footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.6rem 1rem 2.2rem;
  text-align: center;
}

.made-with {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 2.2rem;
  text-decoration: none;
}

.made-with-text {
  opacity: 0.3;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  white-space: nowrap;
  transition: opacity 180ms ease;
}

.made-with-heart { color: var(--ae); }

.made-with-lockup {
  width: clamp(112px, 24vw, 148px);
  height: auto;
  opacity: 0.3;
  transition: opacity 180ms ease;
}

.made-with:hover .made-with-lockup,
.made-with:focus-visible .made-with-lockup,
.made-with:hover .made-with-text,
.made-with:focus-visible .made-with-text { opacity: 0.75; }

.footer-social {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 1.3rem;
}

.footer-social a {
  display: inline-flex;
  color: var(--text-muted);
  transition: color 140ms ease;
}

.footer-social a:hover,
.footer-social a:focus-visible { color: #fff; }

.footer-social svg {
  width: 24px;
  height: 24px;
}

.footer-links {
  display: flex;
  gap: 1.4rem;
  font-size: 0.9rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible { color: #fff; }

/* ══════════════════════════════════════════════════════════════════════
   Privacy, terms, support
   ══════════════════════════════════════════════════════════════════════ */

.site-header {
  display: flex;
  justify-content: center;
  padding: 1.6rem 1rem 0;
}

.site-header img {
  width: auto;
  height: 64px;
}

.legal-page {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.6rem 1.25rem 1rem;
}

.legal-page h1 {
  margin: 0 0 0.25rem;
  font: 400 2.2rem/1.15 var(--display);
  letter-spacing: 0.02em;
}

.legal-page h2 {
  margin: 2.2rem 0 0.4rem;
  font-size: 1.15rem;
  color: var(--gold);
}

.legal-page p,
.legal-page li { color: #d6cff0; }

.legal-page small { color: var(--text-muted); }

/* ══════════════════════════════════════════════════════════════════════
   The journal: the same column, for reading
   ══════════════════════════════════════════════════════════════════════ */

.journal .lane-ae { color: var(--ae); }
.journal .lane-oe { color: var(--oe); }
.journal .lane-ue { color: var(--ue); }

.journal-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.journal-kicker a {
  color: var(--gold);
  text-decoration: none;
}

.journal .journal-summary {
  margin: 0.6rem 0 1.4rem;
  font-size: 1.15rem;
  line-height: 1.45;
  color: var(--text);
}

.journal h3 {
  margin: 1.6rem 0 0.3rem;
  font-size: 1rem;
  color: var(--text);
}

.journal li { margin: 0.3rem 0; }

.journal blockquote {
  margin: 1.4rem 0;
  padding: 0.1rem 0 0.1rem 1.1rem;
  border-left: 3px solid var(--ue);
}

.journal blockquote p { color: var(--text); }

.journal-figure { margin: 1.6rem 0; }

.journal-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: #1a1230;
}

/* The index: every entry, newest first. */
.journal-list {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.journal-list li {
  margin: 0;
  padding: 1.2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.journal-list time {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.journal-list h2 {
  margin: 0.15rem 0 0.2rem;
  font: 400 1.45rem/1.2 var(--display);
  letter-spacing: 0.02em;
}

.journal-list h2 a {
  color: var(--text);
  text-decoration: none;
}

.journal-list h2 a:hover,
.journal-list h2 a:focus-visible { color: var(--gold); }

.journal-list p { margin: 0; }

.journal .journal-empty {
  margin: 2rem 0 0;
  padding: 1.2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
}

/* Where every entry ends: the game. */
.journal-play {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin: 3rem 0 0;
  padding: 2rem 0 0.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

.journal-play p { margin: 0; }

.journal-back {
  margin: 2rem 0 0;
  text-align: center;
  font-size: 0.9rem;
}

.journal-back a {
  color: var(--text-muted);
  text-decoration: none;
}

.journal-back a:hover,
.journal-back a:focus-visible { color: #fff; }

/* ── Small screens, short screens ────────────────────────────────────── */

@media (max-width: 520px) {
  .hero-btn { width: 100%; }
  .hero-ctas { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .trailer-frame::before,
  .hero-btn::before,
  .hero-btn::after { animation: none; }
  .hero-btn::after { opacity: 0.5; }
  .hero-btn:hover,
  .hero-btn:focus-visible,
  a.store:hover,
  a.store:focus-visible { transform: none; }
}
