/* planetsprite.com's home page (website/home/build.mjs, docs/WEBSITE.md). Live gameplay behind
   the hero, the game's own pictures large, soft layered depth instead of outlines, Baloo 2 for
   headings and Nunito for text (OFL, cut to the pages' letters by home/font.py; Chinese uses the
   reader's system font). The logo keeps square pixels at whole multiples of its size; pictures
   and clips that the page scales are smoothed, so they never shimmer. */
@font-face {
  font-family: "Baloo 2";
  src: url("fonts/baloo2.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: Nunito;
  src: url("fonts/nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --paper: #fffaf3;
  --paper-2: #f5ede1;
  --paper-3: #ece2d2;
  --ink: #261d3a;
  --ink-soft: #5d536f;
  --ink-faint: #8a8199;
  --leaf: #3dbb68;
  --leaf-2: #239552;
  --leaf-deep: #17703b;
  --sky: #5aaeff;
  --sun: #ffc94d;
  --berry: #ff7aa0;
  --night: #19132b;
  --night-2: #2a2045;
  --line: rgba(38, 29, 58, 0.1);
  --radius: 28px;
  --radius-sm: 18px;
  --shadow: 0 30px 70px -30px rgba(38, 29, 58, 0.45), 0 10px 24px -14px rgba(38, 29, 58, 0.3);
  --shadow-soft: 0 18px 40px -24px rgba(38, 29, 58, 0.35);
  --display: "Baloo 2", ui-rounded, "Trebuchet MS", system-ui, sans-serif;
  --text: Nunito, ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --nav-h: 72px;
  color-scheme: light;
}

:lang(zh-Hans) {
  --display:
    "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Hiragino Sans GB", system-ui, sans-serif;
  --text:
    "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Hiragino Sans GB", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 18px / 1.7 var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
video {
  max-width: 100%;
}

.nav-brand img,
.hero-logo img,
.finale-logo,
.foot-brand img {
  display: block;
  image-rendering: pixelated;
}

a {
  color: var(--leaf-deep);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--ink);
}

h2 {
  font-size: clamp(36px, 4.6vw, 60px);
}

h3 {
  font-size: clamp(24px, 2.2vw, 30px);
  line-height: 1.15;
}

p {
  margin: 0;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  top: -80px;
  left: 16px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
}

.skip:focus {
  top: 16px;
}

:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
}

.wrap {
  width: min(100% - 48px, 1200px);
  margin-inline: auto;
}

.lead {
  margin-top: 18px;
  font-size: 20px;
  color: var(--ink-soft);
}

.section-head {
  max-width: 760px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-head .lead {
  max-width: 640px;
  margin-inline: auto;
}

/* ── Buttons: pills with a soft glow ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  font: 800 18px / 1.15 var(--text);
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease,
    filter 0.18s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-play {
  color: #fff;
  background: linear-gradient(180deg, #5ad37f 0%, var(--leaf) 45%, var(--leaf-2) 100%);
  box-shadow:
    0 12px 28px -10px rgba(35, 149, 82, 0.75),
    inset 0 -3px 0 rgba(0, 0, 0, 0.14),
    inset 0 2px 0 rgba(255, 255, 255, 0.35);
}

.btn-play:hover {
  filter: brightness(1.05);
  box-shadow:
    0 18px 36px -12px rgba(35, 149, 82, 0.85),
    inset 0 -3px 0 rgba(0, 0, 0, 0.14),
    inset 0 2px 0 rgba(255, 255, 255, 0.35);
}

.btn-xl {
  min-height: 62px;
  padding: 0 34px;
  font-size: 20px;
}

.btn-nav {
  min-height: 44px;
  padding: 0 20px;
  font-size: 16px;
}

.btn-glass {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(10px);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.24);
}

.btn-discord {
  color: #fff;
  background: #5865f2;
  box-shadow: 0 12px 28px -12px rgba(88, 101, 242, 0.9);
}

.btn-youtube {
  color: #fff;
  background: #e5322d;
  box-shadow: 0 12px 28px -12px rgba(229, 50, 45, 0.9);
}

.btn-x {
  color: #fff;
  background: #0f0f12;
  box-shadow:
    0 12px 28px -12px rgba(0, 0, 0, 0.9),
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.2);
}

.icon-play {
  flex: 0 0 auto;
  width: 0;
  height: 0;
  margin-left: 2px;
  border-top: 7.5px solid transparent;
  border-bottom: 7.5px solid transparent;
  border-left: 12px solid currentColor;
}

.icon-circle-play {
  position: relative;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
}

.icon-circle-play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid var(--ink);
}

.text-link {
  font-weight: 800;
  color: var(--leaf-deep);
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

/* ── The top bar: clear over the hero, paper once the page scrolls ── */
.nav {
  --nav-ink: rgba(255, 255, 255, 0.92);
  --nav-ink-hover: #fff;
  --nav-hover: rgba(255, 255, 255, 0.14);
  --nav-ring: rgba(255, 255, 255, 0.4);
  --nav-strong: #fff;
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--nav-h);
  transition:
    background-color 0.25s ease,
    box-shadow 0.25s ease;
}

.nav::before {
  content: "";
  position: absolute;
  inset: 0 0 -40px;
  z-index: -1;
  background: linear-gradient(rgba(17, 12, 30, 0.55), rgba(17, 12, 30, 0));
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.nav.is-solid {
  --nav-ink: var(--ink-soft);
  --nav-ink-hover: var(--ink);
  --nav-hover: var(--paper-2);
  --nav-ring: var(--line);
  --nav-strong: var(--ink);
  background: rgba(255, 250, 243, 0.88);
  backdrop-filter: blur(14px) saturate(1.4);
  box-shadow:
    0 1px 0 var(--line),
    0 10px 30px -20px rgba(38, 29, 58, 0.4);
}

.nav.is-solid::before {
  opacity: 0;
}

.nav-in {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(100% - 48px, 1280px);
  height: 100%;
  margin-inline: auto;
}

.nav-brand {
  display: flex;
  flex: 0 0 auto;
  margin-right: auto;
}

.nav-brand .nav-planet {
  display: none;
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--nav-ink);
  font: 700 16px / 1 var(--text);
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.nav-link:hover {
  background: var(--nav-hover);
  color: var(--nav-ink-hover);
}

.lang {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--nav-strong);
  font: 700 15px / 1 var(--text);
  box-shadow: inset 0 0 0 1.5px var(--nav-ring);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.lang-btn::-webkit-details-marker {
  display: none;
}

.lang-btn::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.lang[open] .lang-btn::after {
  margin-top: 3px;
  transform: rotate(225deg);
}

.lang-code {
  display: none;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  margin: 0;
  padding: 8px;
  list-style: none;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}

.lang-link {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.lang-link:hover {
  background: var(--paper-2);
}

.lang-link[aria-current="page"] {
  background: var(--paper-2);
  color: var(--leaf-deep);
}

.lang-link[aria-current="page"]::after {
  content: "✓";
}

/* ── The hero: the game, live ── */
.hero {
  position: relative;
  display: grid;
  /* The scroll hint has a row of its own under the words, so it can never sit on the chips, whatever
     the window's height or the language's length (it did on every laptop under ~860 px). */
  grid-template-rows: 1fr auto;
  place-items: center;
  min-height: max(660px, 100svh);
  padding: calc(var(--nav-h) + 24px) 0 96px;
  overflow: hidden;
  isolation: isolate;
  background: var(--night);
  color: #fff;
  text-align: center;
}

.hero-video {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(
      60% 55% at 50% 48%,
      rgba(17, 12, 30, 0.68),
      rgba(17, 12, 30, 0.22) 70%,
      rgba(17, 12, 30, 0) 100%
    ),
    linear-gradient(
      to bottom,
      rgba(17, 12, 30, 0.42) 0%,
      rgba(17, 12, 30, 0.12) 30%,
      rgba(17, 12, 30, 0.2) 70%,
      rgba(17, 12, 30, 0.55) 100%
    );
}

.hero-in {
  width: min(100% - 40px, 880px);
}

.hero-logo img {
  display: block;
  width: 657px;
  height: auto;
  margin: 0 auto 26px;
  filter: drop-shadow(0 14px 24px rgba(10, 6, 20, 0.55));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  50% {
    transform: translateY(-8px);
  }
}

.hero-title {
  font: 800 clamp(40px, 6vw, 76px) / 1.02 var(--display);
  letter-spacing: -0.02em;
  text-shadow: 0 6px 30px rgba(10, 6, 20, 0.55);
}

.hero-text {
  max-width: 640px;
  margin: 20px auto 34px;
  font-size: 20px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 14px rgba(10, 6, 20, 0.8);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.hero-chips li {
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(17, 12, 30, 0.42);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  font: 700 14px / 1.2 var(--text);
  color: rgba(255, 255, 255, 0.92);
}

.hero-chips li::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: 0 8px 1px 0;
  border-radius: 50%;
  background: var(--leaf);
  box-shadow: 0 0 10px var(--leaf);
}

.hero-scroll {
  position: relative;
  width: 30px;
  height: 46px;
  margin-top: 24px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7);
}

.hero-scroll::after {
  content: "";
  position: absolute;
  top: 9px;
  left: 50%;
  width: 4px;
  height: 9px;
  margin-left: -2px;
  border-radius: 2px;
  background: #fff;
  animation: wheel 1.8s ease-in-out infinite;
}

@keyframes wheel {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(14px);
  }
}

.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 90px;
  fill: var(--paper);
}

/* ── Welcome: words, the trailer, a few numbers ── */
.intro {
  padding: 90px 0 110px;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 64px;
}

.intro-text .lead {
  margin-bottom: 30px;
}

.trailer-card {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  background: var(--night);
  box-shadow: var(--shadow);
  transform: rotate(1.2deg);
  transition: transform 0.35s ease;
}

.trailer-card:hover {
  transform: rotate(0deg) scale(1.015);
}

.trailer-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trailer-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(17, 12, 30, 0) 50%, rgba(17, 12, 30, 0.7));
}

.trailer-play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin: -48px 0 0 -48px;
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.95);
  box-shadow:
    0 0 0 12px rgba(255, 255, 255, 0.25),
    0 20px 40px -10px rgba(10, 6, 20, 0.6);
  transition: transform 0.25s ease;
}

.trailer-card:hover .trailer-play {
  transform: scale(1.08);
}

.trailer-play .icon-play {
  margin-left: 6px;
  border-top-width: 15px;
  border-bottom-width: 15px;
  border-left-width: 24px;
}

.trailer-label {
  position: absolute;
  bottom: 20px;
  left: 24px;
  z-index: 1;
  color: #fff;
  font: 800 20px / 1 var(--display);
}

.trailer-time {
  margin-left: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font: 700 13px / 1 var(--text);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 96px;
  margin-bottom: 0;
  padding: 0;
  list-style: none;
}

.stat {
  padding: 26px 28px 28px;
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow:
    var(--shadow-soft),
    inset 0 0 0 1px var(--line);
}

.stat strong {
  display: block;
  color: var(--leaf-deep);
  font: 800 54px / 1 var(--display);
}

.stat span {
  display: block;
  margin-top: 8px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink-soft);
}

/* ── What you can do: tabs with a living picture ── */
.showcase {
  position: relative;
  padding: 110px 0;
  background: linear-gradient(
    to bottom,
    var(--paper),
    var(--paper-2) 20%,
    var(--paper-2) 70%,
    var(--paper)
  );
}

.tabs {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  align-items: start;
  gap: 36px;
}

.tab-list {
  display: grid;
  gap: 8px;
}

.tab {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 18px 20px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-soft);
  font: 800 22px / 1.1 var(--display);
  text-align: left;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.tab:hover {
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
}

.tab[aria-selected="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow:
    var(--shadow-soft),
    inset 0 0 0 1px var(--line);
}

.tab-n {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--paper-3);
  color: var(--ink-faint);
  font: 800 14px / 1 var(--text);
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.tab[aria-selected="true"] .tab-n {
  background: linear-gradient(135deg, var(--leaf), var(--leaf-2));
  color: #fff;
}

.panel {
  display: grid;
  gap: 26px;
}

.panel + .panel {
  margin-top: 48px;
}

.js .panel + .panel {
  margin-top: 0;
}

.js .panel:not(.is-active) {
  display: none;
}

.js .panel.is-active {
  animation: panel-in 0.45s ease both;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.panel-media {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  background: var(--night);
  box-shadow: var(--shadow);
}

.panel-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.panel-text {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: 28px;
}

.panel-text p {
  font-size: 19px;
  color: var(--ink-soft);
}

/* ── Four seasons: panels that open as you look ── */
.seasons-band {
  padding: 110px 0;
}

.seasons {
  display: flex;
  gap: 14px;
  height: 460px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.season {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  outline-offset: 4px;
  transition: flex-grow 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.seasons:not(:hover) .season:first-child,
.season:hover {
  flex-grow: 2.6;
}

.seasons:hover .season:first-child:not(:hover) {
  flex-grow: 1;
}

.season img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.season::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(17, 12, 30, 0) 45%, rgba(17, 12, 30, 0.72));
}

.season-name {
  position: absolute;
  bottom: 20px;
  left: 24px;
  z-index: 1;
  color: #fff;
  font: 800 clamp(22px, 2.2vw, 30px) / 1 var(--display);
  text-shadow: 0 4px 16px rgba(10, 6, 20, 0.6);
}

.season-name::before {
  content: "";
  display: block;
  width: 34px;
  height: 6px;
  margin-bottom: 12px;
  border-radius: 3px;
}

.season-spring .season-name::before {
  background: var(--berry);
}

.season-summer .season-name::before {
  background: var(--leaf);
}

.season-autumn .season-name::before {
  background: #ff9a3d;
}

.season-winter .season-name::before {
  background: #a9dcff;
}

/* ── Screenshots: a bento of the game ── */
.gallery {
  padding: 110px 0;
  background: linear-gradient(
    to bottom,
    var(--paper),
    var(--paper-2) 35%,
    var(--paper-2) 65%,
    var(--paper)
  );
}

/* Four columns: the big tile takes two by two, the wide strip two by one, the small ones set the
   rows' height (build.mjs SHOTS orders them so the grid closes with no holes). */
.bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bento li {
  position: relative;
  min-height: 0;
}

.tile-small {
  aspect-ratio: 16 / 9;
}

.tile-big {
  grid-column: span 2;
  grid-row: span 2;
}

.tile-wide {
  grid-column: span 2;
}

.shot {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--night);
  box-shadow: var(--shadow-soft);
}

.shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* The Fair's stalls sit high in its frame: the strip keeps them. */
.tile-wide img {
  object-position: 50% 24%;
}

.shot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  transition: background-color 0.3s ease;
}

.shot:hover img {
  transform: scale(1.05);
}

.shot:hover::after {
  background: rgba(17, 12, 30, 0.08);
}

/* ── Play anywhere: the game in a browser window ── */
.anywhere {
  padding: 110px 0;
}

.anywhere-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 64px;
}

.anywhere-text .btn {
  margin-top: 30px;
}

.anywhere-note {
  margin-top: 16px;
  color: var(--ink-faint);
  font-size: 16px;
  font-weight: 700;
}

.browser {
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow:
    var(--shadow),
    0 0 0 1px var(--line);
  transform: perspective(1400px) rotateY(-8deg) rotateX(3deg);
  transition: transform 0.5s ease;
}

.browser:hover {
  transform: perspective(1400px) rotateY(-3deg) rotateX(1deg);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: var(--paper-2);
  box-shadow: inset 0 -1px 0 var(--line);
}

.browser-bar > span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ff6b6b;
}

.browser-bar > span:nth-child(2) {
  background: #ffc94d;
}

.browser-bar > span:nth-child(3) {
  background: #3dbb68;
}

.browser-url {
  flex: 1;
  max-width: 360px;
  margin: 0 auto;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-soft);
  font: 700 13px / 1 var(--text);
  text-align: center;
}

.browser-shot {
  display: block;
  width: 100%;
  height: auto;
}

/* ── Community: a night sky ── */
.community {
  position: relative;
  padding: 110px 0;
  overflow: hidden;
  background:
    radial-gradient(800px 400px at 85% 10%, rgba(90, 174, 255, 0.28), transparent 70%),
    radial-gradient(700px 420px at 10% 100%, rgba(61, 187, 104, 0.22), transparent 70%),
    linear-gradient(to bottom, var(--night), var(--night-2));
  color: #fff;
}

.community::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 12% 22%, rgba(255, 255, 255, 0.8), transparent 60%),
    radial-gradient(2px 2px at 32% 70%, rgba(255, 255, 255, 0.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 58% 18%, rgba(255, 255, 255, 0.7), transparent 60%),
    radial-gradient(2px 2px at 76% 58%, rgba(255, 255, 255, 0.55), transparent 60%),
    radial-gradient(1.5px 1.5px at 90% 30%, rgba(255, 255, 255, 0.75), transparent 60%),
    radial-gradient(1.5px 1.5px at 46% 88%, rgba(255, 255, 255, 0.5), transparent 60%);
  pointer-events: none;
}

.community h2,
.community h3 {
  color: #fff;
}

.community .lead {
  color: rgba(255, 255, 255, 0.78);
}

.community-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 64px;
}

.community-side {
  position: relative;
}

.community-art {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow:
    0 40px 80px -30px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  transform: rotate(-1.5deg);
}

.community-img {
  display: block;
  width: 100%;
  height: auto;
}

.social {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.safe {
  position: relative;
  margin: -88px 32px 0 -40px;
  padding: 28px 30px 30px;
  border-radius: var(--radius);
  background: rgba(42, 32, 69, 0.86);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 30px 60px -28px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
}

.safe h3 {
  font-size: 26px;
}

.safe p {
  margin: 10px 0 18px;
  color: rgba(255, 255, 255, 0.78);
}

.safe .text-link {
  color: #8fe3ad;
}

/* ── Questions ── */
.faq-band {
  padding: 110px 0;
}

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: 64px;
}

.faq {
  border-top: 1px solid var(--line);
}

.q {
  border-bottom: 1px solid var(--line);
}

.q summary {
  position: relative;
  padding: 24px 56px 24px 0;
  font: 800 22px / 1.3 var(--display);
  cursor: pointer;
  list-style: none;
}

.q summary::-webkit-details-marker {
  display: none;
}

.q summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 4px;
  width: 34px;
  height: 34px;
  margin-top: -17px;
  border-radius: 50%;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 12px 2.5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2.5px 12px no-repeat,
    var(--paper-2);
  transition: transform 0.25s ease;
}

.q[open] summary::after {
  transform: rotate(45deg);
}

.q p {
  padding: 0 56px 26px 0;
  color: var(--ink-soft);
}

/* ── The last call ── */
.finale {
  padding: 0 0 110px;
}

.finale-card {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100% - 48px, 1280px);
  min-height: 520px;
  margin-inline: auto;
  overflow: hidden;
  border-radius: 40px;
  isolation: isolate;
  box-shadow: var(--shadow);
  color: #fff;
  text-align: center;
}

.finale-art {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.finale-veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 70% at 50% 50%, rgba(17, 12, 30, 0.62), rgba(17, 12, 30, 0.25)),
    linear-gradient(to bottom, rgba(17, 12, 30, 0.2), rgba(17, 12, 30, 0.5));
}

.finale-in {
  padding: 64px 24px;
}

.finale-logo {
  display: block;
  width: 438px;
  height: auto;
  margin: 0 auto 18px;
  filter: drop-shadow(0 10px 20px rgba(10, 6, 20, 0.5));
}

.finale h2 {
  color: #fff;
  text-shadow: 0 6px 30px rgba(10, 6, 20, 0.6);
}

.finale p {
  max-width: 560px;
  margin: 14px auto 30px;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.92);
}

/* ── Footer ── */
.foot {
  padding: 72px 0 40px;
  background: var(--night);
  color: rgba(255, 255, 255, 0.7);
}

.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
}

.foot-about p {
  max-width: 340px;
  margin-top: 16px;
  font-size: 16px;
}

.foot nav {
  display: grid;
  align-content: start;
  gap: 10px;
}

.foot h3 {
  margin-bottom: 6px;
  color: #fff;
  font: 800 13px / 1.2 var(--text);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.foot a {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
  text-decoration: none;
}

.foot a:hover {
  color: #fff;
}

.foot-copy {
  grid-column: 1 / -1;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.45);
}

/* ── The trailer's window and the screenshot viewer ── */
.modal,
.viewer {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
}

.modal::backdrop,
.viewer::backdrop {
  background: rgba(12, 8, 22, 0.88);
  backdrop-filter: blur(8px);
}

.modal[open],
.viewer[open] {
  display: grid;
  place-items: center;
}

.modal-frame {
  width: min(92vw, 1280px, calc(82vh * 16 / 9));
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.8);
}

.modal-frame video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

.modal-close,
.viewer-btn {
  position: absolute;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.modal-close:hover,
.viewer-btn:hover {
  background: rgba(255, 255, 255, 0.26);
}

.modal-close,
.viewer-close {
  top: 24px;
  right: 24px;
}

.modal-close::before,
.modal-close::after,
.viewer-close::before,
.viewer-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 2.5px;
  margin: -1.25px 0 0 -10px;
  border-radius: 2px;
  background: #fff;
  transform: rotate(45deg);
}

.modal-close::after,
.viewer-close::after {
  transform: rotate(-45deg);
}

.viewer-img {
  max-width: min(90vw, 1920px);
  max-height: 80vh;
  border-radius: 18px;
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.8);
}

.viewer-cap {
  position: absolute;
  bottom: 4vh;
  left: 50%;
  width: min(90vw, 860px);
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.85);
  font-size: 16px;
  text-align: center;
}

.viewer-prev,
.viewer-next {
  top: 50%;
  margin-top: -26px;
}

.viewer-prev {
  left: 24px;
}

.viewer-next {
  right: 24px;
}

.viewer-prev::before,
.viewer-next::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  border-top: 2.5px solid #fff;
  border-left: 2.5px solid #fff;
}

.viewer-prev::before {
  transform: translate(-30%, -50%) rotate(-45deg);
}

.viewer-next::before {
  transform: translate(-70%, -50%) rotate(135deg);
}

/* ── Things that rise into view as the page scrolls (home.js) ── */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.js .trailer-card[data-reveal] {
  transform: translateY(28px) rotate(1.2deg);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

.js .trailer-card[data-reveal].is-in {
  transform: rotate(1.2deg);
  transition:
    opacity 0.8s ease,
    transform 0.35s ease;
}

.js .trailer-card[data-reveal].is-in:hover {
  transform: rotate(0deg) scale(1.015);
}

/* Chinese headings: the system font's own spacing, room for its taller characters. */
:lang(zh-Hans) h2,
:lang(zh-Hans) h3,
:lang(zh-Hans) .hero-title {
  letter-spacing: 0;
  line-height: 1.25;
  /* Lines break at the commas, not mid-phrase; a line too long still breaks rather than spill. */
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* ── Smaller screens ── */
@media (max-width: 1100px) {
  .nav-links {
    display: none;
  }
  .tabs {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .tab-list {
    display: flex;
    gap: 8px;
    margin: -4px -4px 0;
    padding: 4px 4px 10px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .tab {
    flex: 0 0 auto;
    width: auto;
    padding: 12px 18px 12px 12px;
    font-size: 19px;
  }
  .tab-n {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 880px) {
  .intro-grid,
  .anywhere-grid,
  .community-grid,
  .faq-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }
  .panel-text {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .seasons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    height: auto;
  }
  .season {
    aspect-ratio: 1;
  }
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tile-big,
  .tile-wide {
    grid-row: auto;
    aspect-ratio: 16 / 9;
  }
  .safe {
    margin: -64px 20px 0;
  }
  .browser,
  .browser:hover {
    transform: none;
  }
  .foot-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .foot-about {
    grid-column: 1 / -1;
  }
  .hero-logo img {
    width: 438px;
  }
}

/* The bar's small form: the planet for the logo and the language's code for its name, so the Play
   button fits in every language down to the narrowest phone. */
@media (max-width: 720px) {
  .nav-in {
    width: calc(100% - 24px);
    gap: 8px;
  }
  .nav-brand .nav-logo,
  .lang-now {
    display: none;
  }
  .nav-brand .nav-planet {
    display: block;
  }
  .lang-code {
    display: inline;
  }
  .hero {
    padding-bottom: 120px;
  }
  .hero-scroll {
    display: none;
  }
}

/* A short window shows the hero's words to its bottom edge: the hint would be cut in half there. */
@media (max-height: 750px) {
  .hero {
    padding-bottom: 120px;
  }
  .hero-scroll {
    display: none;
  }
}

/* Vietnamese's heading takes three lines on a laptop, so its hint reached the window's foot up to
   about 815 px (2026-11-18 shots at 1280×760/790/820; the other languages fit at 760). */
@media (max-height: 830px) {
  :lang(vi) .hero {
    padding-bottom: 120px;
  }
  :lang(vi) .hero-scroll {
    display: none;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 17px;
  }
  .wrap {
    width: min(100% - 32px, 1200px);
  }
  .hero {
    padding-bottom: 110px;
  }
  .hero-in {
    width: calc(100% - 32px);
  }
  /* One and a half times the logo: three device pixels to each of its pixels on most phones. */
  .hero-logo img {
    width: 328.5px;
    max-width: 100%;
  }
  .hero-text,
  .lead,
  .finale p {
    font-size: 18px;
  }
  .btn {
    white-space: normal;
    text-align: center;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .btn-xl {
    padding: 12px 20px;
    font-size: 18px;
  }
  /* The language list opens the bar's full width, wherever the button sits. */
  .lang {
    position: static;
  }
  .lang-menu {
    top: calc(100% - 6px);
    right: 12px;
    left: 12px;
  }
  .intro,
  .showcase,
  .seasons-band,
  .gallery,
  .anywhere,
  .community,
  .faq-band {
    padding: 72px 0;
  }
  .section-head {
    margin-bottom: 36px;
  }
  .stats {
    gap: 12px;
    margin-top: 56px;
  }
  .stat {
    padding: 20px;
  }
  .stat strong {
    font-size: 42px;
  }
  .trailer-play {
    width: 72px;
    height: 72px;
    margin: -36px 0 0 -36px;
  }
  .seasons {
    gap: 10px;
  }
  .season-name {
    bottom: 14px;
    left: 16px;
    font-size: 22px;
  }
  .bento {
    gap: 10px;
  }
  .safe {
    margin: -40px 8px 0;
    padding: 24px;
  }
  .q summary {
    font-size: 20px;
  }
  .finale {
    padding-bottom: 72px;
  }
  .finale-card {
    width: calc(100% - 24px);
    border-radius: 28px;
  }
  .finale-logo {
    width: 219px;
  }
  .foot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .viewer-prev,
  .viewer-next {
    top: auto;
    bottom: 12vh;
    margin-top: 0;
  }
}

/* Asked for less motion: nothing floats, slides, grows or tilts (home.js also keeps the clips still). */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hero-logo img,
  .hero-scroll::after,
  .js .panel.is-active {
    animation: none;
  }
  .btn,
  .trailer-card,
  .trailer-play,
  .season,
  .shot img,
  .browser {
    transition: none;
  }
  .btn:hover,
  .shot:hover img,
  .trailer-card:hover .trailer-play {
    transform: none;
  }
  .js [data-reveal],
  .js .trailer-card[data-reveal],
  .js [data-reveal].is-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .trailer-card,
  .trailer-card:hover,
  .js .trailer-card[data-reveal].is-in:hover,
  .browser,
  .browser:hover {
    transform: none;
  }
}
