:root {
  color-scheme: dark;
  --background: #0b101c;
  --surface: #121a2a;
  --text: #f5f7fc;
  --muted: #b1bed1;
  --mint: #8df8d9;
  --line: #293449;
  --display: system-ui, 'Microsoft JhengHei', 'PingFang TC', sans-serif;
  --shell: 75rem;
  --gutter: clamp(1.25rem, 4.4vw, 4.5rem);
  font-family: var(--display);
  background: var(--background);
  color: var(--text);
  scroll-behavior: smooth;
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, dl, dd { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 5px; }
[id] { scroll-margin-top: 6.25rem; }

.shell {
  width: min(calc(100% - var(--gutter) * 2), var(--shell));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 10;
  inset: 0.75rem auto auto 1rem;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  background: var(--mint);
  color: var(--background);
  transform: translateY(-180%);
}

.skip-link:focus { transform: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid #283246;
  background: rgb(11 16 28 / 92%);
  backdrop-filter: blur(16px);
}

.header-inner {
  min-height: 4.625rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  justify-self: start;
  font-size: 1.08rem;
  font-weight: 760;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.brand-mark {
  position: relative;
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: 0.66rem;
  background: var(--mint);
  color: #102823;
}

.brand-mark::before {
  position: absolute;
  top: 0.53rem;
  left: 0.49rem;
  width: 0.39rem;
  height: 0.42rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0.87rem 0 currentColor;
  content: '';
}

.otter-face {
  position: relative;
  width: 1.36rem;
  height: 1.11rem;
  border-radius: 52% 52% 47% 47%;
  background: currentColor;
}

.otter-face::before, .otter-face::after {
  position: absolute;
  border-radius: 50%;
  background: var(--mint);
  content: '';
}

.otter-face::before {
  width: 0.18rem;
  height: 0.18rem;
  top: 0.35rem;
  left: 0.31rem;
  box-shadow: 0.56rem 0 var(--mint);
}

.otter-face::after { width: 0.39rem; height: 0.22rem; top: 0.65rem; left: 0.49rem; }

.nav-links { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.5rem); }
.nav-links a, .back-link { color: var(--muted); font-size: 0.9rem; font-weight: 650; }
.nav-links a:hover, .back-link:hover { color: var(--mint); }

.language-picker {
  display: flex;
  justify-self: end;
  gap: 0.16rem;
  padding: 0.19rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
}

.language-picker button {
  min-width: 2.6rem;
  min-height: 2.25rem;
  padding: 0.2rem 0.42rem;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 750;
}

.language-picker button[aria-pressed='true'] { background: #24334a; color: var(--text); }
.language-picker button:hover { color: var(--mint); }

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: clamp(35rem, 46vw, 43.5rem);
  padding-block: clamp(4.5rem, 7.5vw, 7.25rem) 5rem;
  overflow: hidden;
}

.hero-art {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(0deg, var(--background), transparent 23%),
    linear-gradient(90deg, #0b101c 0%, rgb(11 16 28 / 88%) 18%, rgb(11 16 28 / 30%) 49%, transparent 74%),
    url('assets/arcade-hero.png') center 47% / cover no-repeat,
    #151f38;
}

.hero-content { padding-bottom: 0.15rem; }

.eyebrow {
  color: var(--mint);
  font-size: 0.79rem;
  font-weight: 750;
  letter-spacing: 0.13em;
  line-height: 1.5;
}

.hero-kicker { display: flex; align-items: center; gap: 0.66rem; }

.hero-kicker::before {
  flex: none;
  width: 0.47rem;
  height: 0.47rem;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 11px rgb(141 248 217 / 60%);
  content: '';
}

.hero h1 {
  margin-top: 1.05rem;
  font-size: clamp(4rem, 7.55vw, 7rem);
  line-height: 1.02;
  letter-spacing: -0.081em;
  font-weight: 850;
}

.hero h1 span { display: block; }
.hero-accent { color: var(--mint); }
html[lang='zh-Hant'] .hero h1 { letter-spacing: -0.035em; }
html[lang='en'] .hero h1 { font-size: clamp(3.7rem, 6.5vw, 6.6rem); }

.hero-description {
  max-width: 27rem;
  margin-top: 1.45rem;
  color: #c0cde0;
  font-size: clamp(1rem, 1.25vw, 1.115rem);
  line-height: 1.85;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.7rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 3.1rem;
  padding: 0.7rem 1.12rem;
  border: 1px solid transparent;
  border-radius: 0.73rem;
  font-size: 0.91rem;
  font-weight: 760;
  transition: background-color 150ms, border-color 150ms;
}

.button-primary { background: var(--mint); color: #10241f; }
.button-primary:hover { background: #b7ffe9; }
.button-secondary { background: rgb(13 22 40 / 76%); border-color: #36445c; }
.button-secondary:hover { border-color: #9bc7c4; background: #1c2d43; }

.games-section { padding-block: 2rem 4.35rem; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 0.85rem 2rem; margin-bottom: 1.4rem; }
.section-heading h2, .platform-summary h2 { font-size: clamp(1.85rem, 3.4vw, 3rem); line-height: 1.14; letter-spacing: -0.035em; }
.section-heading p, .platform-summary > p:last-child { color: var(--muted); font-size: 0.9rem; line-height: 1.7; }

.game-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(0.85rem, 2vw, 1.25rem); }
.game-card { overflow: hidden; border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); }
.game-art { aspect-ratio: 3 / 2; background-image: url('assets/game-art.png'); background-size: 200% 200%; background-repeat: no-repeat; }
.game-art-puzzle { background-position: left top; background-color: #403995; }
.game-art-adventure { background-position: right top; background-color: #255941; }
.game-art-arcade { background-position: left bottom; background-color: #69365f; }
.game-copy { padding: 1.05rem 1.15rem 1.25rem; }
.game-copy h3 { font-size: 1.14rem; letter-spacing: -0.024em; }
.game-copy p { margin-top: 0.4rem; color: var(--muted); font-size: 0.88rem; line-height: 1.65; }

.platform-section { padding-bottom: 4.65rem; }

.platform-panel {
  display: grid;
  grid-template-columns: 1fr 0.98fr;
  align-items: center;
  gap: clamp(1.75rem, 5vw, 4.5rem);
  padding: clamp(1.5rem, 4.4vw, 3.45rem);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: radial-gradient(ellipse at left bottom, rgb(47 111 116 / 18%), transparent 60%), #121a2a;
}

.platform-summary h2 { max-width: 30rem; margin-block: 0.7rem 0.85rem; text-wrap: balance; }
.platform-features { display: grid; gap: 1.05rem; }
.feature { display: grid; grid-template-columns: 2.65rem minmax(0, 1fr); align-items: start; gap: 0.85rem; }
.feature + .feature { padding-top: 1.05rem; border-top: 1px solid var(--line); }
.feature dt { font-weight: 740; }
.feature dd { margin-top: 0.32rem; color: var(--muted); font-size: 0.88rem; line-height: 1.65; }

.feature-icon {
  position: relative;
  display: grid;
  place-items: center;
  height: 2.65rem;
  border: 1px solid #316c6e;
  border-radius: 0.68rem;
  background: #17343c;
  color: var(--mint);
}

.icon-grid::before {
  width: 0.33rem;
  height: 0.33rem;
  margin: -0.49rem 0 0 -0.49rem;
  border: 1px solid currentColor;
  border-radius: 0.1rem;
  background: currentColor;
  box-shadow: 0.49rem 0 currentColor, 0 0.49rem currentColor, 0.49rem 0.49rem currentColor;
  content: '';
}

.icon-save::before {
  width: 1.04rem;
  height: 1.04rem;
  border: 1.5px solid currentColor;
  border-radius: 0.22rem;
  content: '';
}

.icon-save::after {
  position: absolute;
  width: 0.43rem;
  height: 0.55rem;
  margin-top: -0.16rem;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  content: '';
}

.site-footer { border-top: 1px solid var(--line); background: #0d1421; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; padding-block: 2.2rem 2.55rem; }
.footer-inner h2 { margin-bottom: 0.75rem; color: var(--muted); font-size: 0.8rem; }
.company-name { max-width: 100%; font-weight: 680; line-height: 1.7; }
.company-name-en { margin-top: 0.32rem; color: var(--muted); font-size: 0.88rem; line-height: 1.6; }
.back-link { flex: none; display: inline-flex; align-items: center; gap: 0.5rem; }
.back-link span:last-child { font-size: 1.2rem; }

@media (max-width: 50rem) {
  .header-inner { grid-template-columns: auto 1fr auto; }
  .brand { font-size: 0.96rem; gap: 0.55rem; }
  .nav-links { justify-content: center; gap: 1rem; }
  .nav-links a { font-size: 0.8rem; }
  .hero-art { background-position: center, center, 58% center, center; }
  .game-copy { padding: 0.85rem 0.85rem 1rem; }
}

@media (max-width: 45rem) {
  [id] { scroll-margin-top: 1rem; }
  .site-header { position: relative; }
  .header-inner { grid-template-columns: 1fr auto; min-height: 0; gap: 0; padding-top: 0.75rem; }
  .nav-links { grid-row: 2; grid-column: 1 / -1; justify-content: flex-start; gap: 1.4rem; padding-block: 0.7rem; }
  .language-picker { grid-row: 1; grid-column: 2; }
  .hero { display: block; min-height: 0; padding-block: clamp(13rem, 46vw, 17rem) 2.15rem; }
  .hero-art {
    height: clamp(17rem, 63vw, 23rem);
    background:
      linear-gradient(0deg, var(--background) 1%, rgb(11 16 28 / 55%) 24%, transparent 46%),
      url('assets/arcade-hero.png') 72% 44% / cover no-repeat,
      #151f38;
  }
  .hero h1, html[lang='en'] .hero h1 { font-size: clamp(2.9rem, 11.4vw, 4.6rem); letter-spacing: -0.06em; }
  .hero-description { margin-top: 1.05rem; font-size: 0.96rem; line-height: 1.75; }
  .hero-actions { margin-top: 1.25rem; }
}

@media (max-width: 39rem) {
  .games-section { padding-block: 1.2rem 2.65rem; }
  .section-heading { flex-direction: column; gap: 0.36rem; margin-bottom: 1.1rem; }
  .game-grid, .platform-panel { grid-template-columns: 1fr; }
  .platform-section { padding-bottom: 2.9rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; padding-block: 1.65rem 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  .button { transition: none; }
}
