:root {
  color-scheme: dark;
  --bg: #151914;
  --panel: #1e231c;
  --line: #535b4d;
  --surface: rgba(17, 21, 17, .79);
  --surface-border: rgba(183, 190, 169, .28);
  --ink: #edeade;
  --muted: #b9baad;
  --accent: #e2c684;
  --body: "Segoe UI", Arial, sans-serif;
  --display: Bahnschrift, "Arial Narrow", "Segoe UI", sans-serif;
  --mono: "Cascadia Mono", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body {
  margin: 0;
  isolation: isolate;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--body);
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
figure, h1, h2, h3, p, dl, dd { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[aria-hidden="true"] { user-select: none; }

.site-backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.site-backdrop img { width: 100%; height: 100%; object-fit: cover; object-position: 77% center; }
.site-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 20, 15, .44), rgba(15, 20, 15, .13) 64%),
    linear-gradient(0deg, rgba(15, 20, 15, .2), transparent 49%);
}

.wrap { width: min(1280px, calc(100% - 104px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 4; top: 10px; left: 10px; padding: 10px 14px; transform: translateY(-150%); background: var(--accent); color: var(--bg); }
.skip-link:focus { transform: none; }
.header { background: rgba(15, 20, 16, .78); border-bottom: 1px solid var(--surface-border); }
.header-inner { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; white-space: nowrap; font: 700 24px/1 var(--display); letter-spacing: .07em; }
.brand b { color: var(--accent); font-weight: inherit; }
.brand-logo { flex: none; width: 56px; height: 56px; object-fit: contain; }
.nav { display: flex; align-items: center; gap: clamp(16px, 2.6vw, 38px); font-size: 14px; }
.nav a { display: inline-flex; align-items: center; gap: 11px; min-height: 44px; color: var(--muted); white-space: nowrap; }
.nav a:hover, .text-link:hover { color: var(--ink); }
.nav .nav-play { color: var(--accent); border: 1px solid #655c44; padding: 0 15px; }
.nav-play:hover { border-color: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav .nav-vk { display: grid; flex: none; place-items: center; width: 44px; height: 44px; border: 1px solid var(--surface-border); }
.nav-vk:hover { border-color: var(--accent); }

.hero {
  min-height: 590px;
  display: grid;
  align-items: center;
  position: relative;
  background: linear-gradient(90deg, rgba(15, 20, 16, .88), rgba(15, 20, 16, .77) 33%, rgba(15, 20, 16, .27) 59%, transparent 82%);
  border: 1px solid var(--surface-border);
  margin-top: 16px;
}
.hero-content { width: fit-content; max-width: 100%; position: relative; padding: 65px clamp(28px, 4.5vw, 65px) 76px; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: var(--accent); font: 500 12px/1.45 var(--mono); text-transform: uppercase; letter-spacing: .14em; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; }
h1 { font-size: clamp(57px, 6.45vw, 96px); letter-spacing: -.056em; line-height: .98; text-wrap: balance; }
.hero-description { max-width: 450px; margin-top: 23px; color: #e0e0d5; font-size: clamp(16px, 1.4vw, 19px); }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 31px; }
.button {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 49px; padding: 0 17px;
  font-size: 14px; font-weight: 650; white-space: nowrap; border: 1px solid transparent;
  transition: background .18s ease, border-color .18s ease;
}
.button span { font-size: 17px; line-height: 1; }
.button-primary { color: #201c10; background: var(--accent); }
.button-primary:hover { background: #f3dba3; }
.button-secondary { color: var(--ink); background: #1c2019; border-color: #5c5e4e; }
.button-secondary:hover { background: #2e3227; border-color: var(--accent); }

.section {
  margin-top: 64px;
  padding: clamp(21px, 3.2vw, 43px);
  border: 1px solid var(--surface-border);
  background: var(--surface);
}
.section-intro { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 24px; }
.section-intro .eyebrow { margin-bottom: 8px; }
h2 { font-size: clamp(36px, 4.2vw, 62px); line-height: 1.03; letter-spacing: -.044em; }
.section-intro > p, .world-intro > p, .play p:not(.eyebrow) { max-width: 435px; color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.gallery-item { background: var(--panel); border: 1px solid var(--line); }
.gallery-button { display: block; padding: 0; width: 100%; aspect-ratio: 1.74; position: relative; overflow: hidden; background: #33372b; border: 0; cursor: zoom-in; }
.gallery-button:focus-visible { z-index: 1; }
.gallery-button img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1.74; transition: transform .22s ease; }
.gallery-button:hover img { transform: scale(1.045); }
.gallery-arrow {
  position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; display: grid; place-items: center;
  color: var(--ink); background: rgba(23, 25, 19, .89); border: 1px solid #8a8b77; font-size: 17px;
}
.gallery-button:hover .gallery-arrow { color: var(--accent); border-color: var(--accent); }
.gallery-item figcaption { padding: 12px 15px 14px; font-weight: 600; }

.world { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(26px, 7vw, 100px); }
.world-intro > p { margin-top: 18px; }
.world-list { border-top: 1px solid var(--line); }
.world-list > div { padding: 16px 2px 17px; border-bottom: 1px solid var(--line); }
.world-list dt { font: 650 23px/1.2 var(--display); }
.world-list dd { margin-top: 6px; color: var(--muted); }
.updates h2 { margin-bottom: 22px; font-size: clamp(32px, 3.2vw, 47px); }
.update {
  display: grid; grid-template-columns: minmax(130px, .28fr) minmax(0, 1fr) auto; align-items: start; column-gap: 26px;
  padding: 22px 0; border-block: 1px solid var(--line);
}
.update h3 { font-size: 23px; line-height: 1.22; }
.update time { padding-top: 4px; color: var(--accent); font: 500 13px/1.45 var(--mono); }
.update p { margin-top: 7px; color: var(--muted); }
.text-link { display: inline-flex; gap: 10px; align-items: center; width: fit-content; color: var(--accent); font-size: 14px; white-space: nowrap; }
.update .text-link { margin-top: 6px; }
.play { display: flex; justify-content: space-between; gap: 24px; align-items: end; border-color: rgba(226, 198, 132, .4); }
.play-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 10px; }
.play .eyebrow { margin-bottom: 10px; }
.status-dot { width: 7px; height: 7px; background: var(--accent); border-radius: 50%; }
.play p:not(.eyebrow) { margin-top: 14px; }
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 42px;
  padding: 15px clamp(21px, 3.2vw, 43px);
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-bottom: 0;
}
.footer .brand { opacity: .8; font-size: 18px; }
.footer .brand-logo { width: 34px; height: 34px; }
.footer .text-link { min-height: 44px; }

.lightbox { margin: auto; max-width: min(1200px, calc(100% - 32px)); max-height: calc(100% - 32px); border: 1px solid #777862; background: #171913; padding: 12px; color: var(--ink); }
.lightbox::backdrop { background: rgba(7, 9, 6, .91); }
.lightbox figure { width: fit-content; }
.lightbox-image { max-height: 74dvh; width: auto; object-fit: contain; }
.lightbox figcaption { padding: 12px 4px 0; font-weight: 600; }
.lightbox-controls { display: flex; gap: 8px; margin-top: 12px; }
.icon-button { width: 46px; height: 44px; display: grid; place-items: center; border: 1px solid #666857; background: var(--panel); color: var(--ink); font-size: 22px; cursor: pointer; }
.icon-button:hover { border-color: var(--accent); color: var(--accent); }
.lightbox-close { margin-left: auto; }
body:has(.lightbox[open]) { overflow: hidden; }

@media (max-width: 1020px) {
  .wrap { width: calc(100% - 64px); }
  .hero {
    min-height: 500px;
    background: linear-gradient(90deg, rgba(15, 20, 16, .91), rgba(15, 20, 16, .72) 48%, transparent 95%);
  }
  .hero-content { padding-inline: 48px; }
  .section { margin-top: 53px; }
  .play-actions { flex-direction: column; align-items: end; }
}
@media (max-width: 720px) {
  .wrap { width: calc(100% - 36px); }
  .header-inner { flex-direction: column; align-items: stretch; gap: 0; min-height: auto; padding-block: 0 10px; }
  .header .brand { min-height: 64px; align-self: flex-start; font-size: 22px; }
  .header .brand-logo { width: 50px; height: 50px; }
  .nav { border-top: 1px solid var(--line); justify-content: space-between; gap: 5px; font-size: 13px; min-height: 47px; }
  .nav .nav-play { border: 0; padding: 0; gap: 4px; }
  .nav-actions { gap: 6px; }
  .site-backdrop img { object-position: 91% center; }
  .hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    padding-top: clamp(255px, 77vw, 370px);
    background: none;
  }
  .hero-content { width: 100%; padding: 25px 20px 27px; background: var(--surface); }
  h1 { font-size: clamp(36px, 10.75vw, 68px); }
  .hero-description { margin-top: 14px; }
  .hero-actions { margin-top: 20px; gap: 8px; }
  .button { padding-inline: 11px; gap: 8px; font-size: 13px; min-height: 46px; }
  .section { margin-top: 38px; padding: 19px; }
  .section-intro { display: grid; gap: 10px; margin-bottom: 17px; }
  .gallery { grid-template-columns: 1fr; gap: 13px; }
  .world { grid-template-columns: 1fr; gap: 22px; }
  .desktop-break { display: none; }
  .world-intro > p { margin-top: 13px; }
  .world-list dt { font-size: 21px; }
  .update { grid-template-columns: 1fr; gap: 10px; padding: 17px 0 20px; }
  .play { display: grid; gap: 18px; }
  .play-actions { align-items: start; }
  .play-actions .button { white-space: normal; }
  .footer { margin-top: 32px; padding: 12px 18px; }
}
@media (max-width: 360px) {
  .nav { font-size: 12px; gap: 3px; }
  .nav-actions { gap: 3px; }
  .nav-play span { display: none; }
  .hero-actions { align-items: stretch; }
  .hero-actions .button { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* Happiness for Free: the approved project layout, adapted to account access. */
.brand-title { display:flex; flex-direction:column; gap:.4rem; font-size:clamp(.82rem,1.4vw,1.2rem); letter-spacing:.055em; }
.brand-title small { font-family:var(--body); font-size:.75rem; font-weight:400; letter-spacing:.02em; color:var(--muted); }
.start-steps { margin:1.3rem 0 0; padding-left:1.35rem; max-width:43rem; }
.start-steps li + li { margin-top:.65rem; }
.start-steps code { white-space:nowrap; font-size:.93em; }
.build-note, .release-note { color:var(--muted); font-size:.9rem; line-height:1.55; }
.build-note { margin-top:1rem; }
.play-actions .release-note { max-width:21rem; padding:1rem; border:1px solid var(--surface-border); }
@media (max-width: 1100px) { .header-inner { flex-wrap:wrap; padding-block:1rem; gap:1rem; } .nav { margin-left:auto; } }
@media (max-width: 600px) { .header-inner { align-items:flex-start; } .nav { margin-left:0; width:100%; flex-wrap:wrap; } .brand-title { font-size:.9rem; } .brand-title small { font-size:.75rem; } .start-steps code { white-space:normal; overflow-wrap:anywhere; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior:auto; } *, *::before, *::after { transition:none !important; } }
