/* Oasis Village landing — wood + parchment + dusk maps */

:root {
  --night: #0c1520;
  --night-soft: #152433;
  --wood: #3d2412;
  --wood-mid: #6b4423;
  --parchment: #f6e7c8;
  --parchment-deep: #e8d2a4;
  --ink: #2a1c12;
  --ink-soft: #5c4634;
  --gold: #e8b84b;
  --accent: #c45c26;
  --ok: #3d7a5a;
  --sky: #6eb6d9;
  --shadow: rgba(0, 0, 0, 0.35);
  --max: 1120px;
  --nav-h: 64px;
  --font-display: Georgia, "Palatino Linotype", "Times New Roman", serif;
  --font-body: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    system-ui, sans-serif;
  --radius: 10px;
  /* Hero logo sits on the panel top edge; EN copy is taller so pull it down. */
  --hero-logo-y: -50%;
  --hero-content-pt: 96px;
}

html[lang="en"] {
  --hero-logo-y: -32%;
  --hero-content-pt: 128px;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--parchment);
  background: var(--night);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 1000;
  background: var(--gold);
  color: var(--wood);
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

.pixel {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* ---------- Nav ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: linear-gradient(180deg, rgba(61, 36, 18, 0.96), rgba(28, 16, 8, 0.94));
  border-bottom: 1px solid rgba(232, 184, 75, 0.28);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.nav-inner {
  max-width: calc(var(--max) + 80px);
  margin: 0 auto;
  height: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nav-brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.35));
}

.nav-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.nav-brand-oasis {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.22em;
  color: var(--gold);
  text-shadow:
    0 1px 0 #2a1608,
    0 0 14px rgba(232, 184, 75, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  flex: 1;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: rgba(246, 231, 200, 0.88);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: rgba(232, 184, 75, 0.14);
  color: var(--gold);
  outline: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

/* ---------- Play Game CTA (leaf green + sweeping shine) ---------- */
.btn-play {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-decoration: none;
  color: #f4ffe8;
  border-radius: 999px;
  isolation: isolate;
  border: 2px solid rgba(200, 255, 180, 0.7);
  background:
    linear-gradient(180deg, #8fd66a 0%, #5fad45 28%, #3d8f3a 72%, #2a6b2c 100%);
  box-shadow:
    0 0 0 1px rgba(18, 48, 20, 0.45),
    0 6px 0 rgba(0, 0, 0, 0.28),
    0 10px 28px rgba(61, 138, 58, 0.4),
    inset 0 1px 0 rgba(230, 255, 210, 0.45);
  transition: transform 0.18s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-play:hover {
  transform: translateY(-2px);
  filter: brightness(1.07);
  box-shadow:
    0 0 0 1px rgba(18, 48, 20, 0.4),
    0 8px 0 rgba(0, 0, 0, 0.26),
    0 14px 34px rgba(90, 170, 80, 0.48),
    inset 0 1px 0 rgba(230, 255, 210, 0.55);
}

.btn-play:focus-visible {
  outline: 2px solid #8fd66a;
  outline-offset: 3px;
}

.btn-play:active {
  transform: translateY(1px);
  box-shadow:
    0 0 0 1px rgba(18, 48, 20, 0.45),
    0 3px 0 rgba(0, 0, 0, 0.3),
    0 6px 16px rgba(61, 138, 58, 0.35);
}

.btn-play-label {
  position: relative;
  z-index: 2;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.1em;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(18, 48, 20, 0.55), 0 0 12px rgba(230, 255, 210, 0.28);
}

/* periodic sweeping shine */
.btn-play-shine {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.08) 42%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(230, 255, 210, 0.22) 54%,
    transparent 62%
  );
  background-size: 220% 100%;
  background-repeat: no-repeat;
  animation: btn-play-shine 2.8s ease-in-out infinite;
  mix-blend-mode: screen;
}

@keyframes btn-play-shine {
  0%,
  55% {
    background-position: 160% 0;
    opacity: 0;
  }
  62% {
    opacity: 1;
  }
  88% {
    background-position: -60% 0;
    opacity: 0.9;
  }
  100% {
    background-position: -80% 0;
    opacity: 0;
  }
}

.btn-play-glow {
  position: absolute;
  inset: -3px;
  z-index: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse at 50% 80%, rgba(110, 190, 80, 0.45), transparent 65%);
  filter: blur(8px);
  opacity: 0.7;
  pointer-events: none;
  animation: btn-play-glow 2.8s ease-in-out infinite;
}

@keyframes btn-play-glow {
  0%,
  100% {
    opacity: 0.45;
  }
  70% {
    opacity: 0.95;
  }
  85% {
    opacity: 0.7;
  }
}

.btn-play-hero {
  margin: 18px auto 8px;
  min-width: 220px;
  padding: 16px 40px 15px;
}

.btn-play-hero .btn-play-label {
  font-size: 26px;
  letter-spacing: 0.08em;
}

.btn-play-nav {
  min-width: 0;
  margin-left: 4px;
  padding: 10px 18px 9px;
  flex-shrink: 0;
}

.btn-play-nav .btn-play-label {
  font-size: 15px;
  letter-spacing: 0.04em;
}

@media (prefers-reduced-motion: reduce) {
  .btn-play-shine,
  .btn-play-glow {
    animation: none;
  }
  .btn-play-shine {
    background-position: 40% 0;
    opacity: 0.35;
  }
}

.social-row {
  display: flex;
  gap: 4px;
}

.social-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: rgba(246, 231, 200, 0.8);
  transition: color 0.2s, background 0.2s;
}

.social-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Discord/GitHub glyphs have more internal padding than X — render larger. */
.social-btn.social-boost svg {
  width: 20px;
  height: 20px;
}

.social-btn.social-discord svg {
  width: 26px;
  height: 26px;
  /* Optical align: Discord glyph sits high in its viewBox vs X/GitHub. */
  transform: translateY(2px);
}

.social-btn.social-x svg {
  width: 15px;
  height: 15px;
}

.social-btn:hover,
.social-btn:focus-visible {
  color: var(--gold);
  background: rgba(232, 184, 75, 0.12);
  outline: none;
}

.lang-toggle {
  min-width: 44px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(232, 184, 75, 0.45);
  color: var(--gold);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  transition: background 0.2s, border-color 0.2s;
}

.lang-toggle:hover,
.lang-toggle:focus-visible {
  background: rgba(232, 184, 75, 0.16);
  outline: none;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  place-items: center;
  border-radius: 8px;
  border: 1px solid rgba(232, 184, 75, 0.35);
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--gold);
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before {
  top: -6px;
}
.nav-toggle-bars::after {
  top: 6px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  border: 2px solid transparent;
  transition: transform 0.15s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

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

.btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.btn-primary {
  background: linear-gradient(180deg, #d96a32, var(--accent));
  color: #fff6e4;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.22), 0 12px 28px rgba(196, 92, 38, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #e4773c, #d0642c);
}

.btn-secondary {
  background: rgba(232, 184, 75, 0.12);
  border-color: rgba(232, 184, 75, 0.55);
  color: var(--gold);
}

.btn-secondary:hover {
  background: rgba(232, 184, 75, 0.2);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(61, 36, 18, 0.35);
  color: var(--ink);
}

.btn-ghost:hover {
  background: rgba(61, 36, 18, 0.08);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: calc(100svh - var(--nav-h));
  display: grid;
  place-items: center;
  padding: 72px 20px 88px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  transform: scale(1.04);
  filter: saturate(1.05) contrast(1.02);
  animation: hero-drift 36s ease-in-out infinite alternate;
}

@keyframes hero-drift {
  from {
    transform: scale(1.04) translate3d(-0.6%, 0, 0);
  }
  to {
    transform: scale(1.06) translate3d(0.8%, -0.5%, 0);
  }
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 45% at 78% 28%, rgba(232, 184, 75, 0.16) 0%, transparent 55%),
    radial-gradient(ellipse 72% 62% at 50% 46%, rgba(6, 28, 42, 0.08) 0%, rgba(4, 20, 32, 0.5) 52%, rgba(2, 12, 22, 0.88) 100%),
    linear-gradient(180deg, rgba(6, 28, 44, 0.45) 0%, transparent 26%, transparent 52%, rgba(4, 16, 28, 0.72) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  text-align: center;
  /* Top padding clears the logo that sits on the panel border. */
  padding: var(--hero-content-pt) 28px 28px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(20, 28, 38, 0.55), rgba(10, 18, 28, 0.72));
  border: 1px solid rgba(232, 184, 75, 0.22);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
}

.hero-logo {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, var(--hero-logo-y));
  z-index: 3;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.hero-logo img {
  width: 176px;
  height: 176px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5));
}

.wordmark {
  margin: 4px 0 6px;
}

.wordmark-ribbon {
  display: none;
}

.wordmark-latin {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(42px, 8vw, 64px);
  letter-spacing: 0.22em;
  line-height: 1;
  color: var(--gold);
  text-shadow:
    0 2px 0 #2a1608,
    0 4px 0 rgba(0, 0, 0, 0.35),
    0 0 24px rgba(232, 184, 75, 0.35);
}

.wordmark-sub {
  margin-top: 4px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(14px, 2.4vw, 18px);
  letter-spacing: 0.55em;
  color: #f0d27a;
  text-shadow: 0 1px 0 #2a1608;
}

.hero-tagline {
  margin: 18px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(18px, 2.6vw, 22px);
  color: #ffe9b0;
  letter-spacing: 0.04em;
}

.hero-intro {
  margin: 0 auto 24px;
  max-width: 34em;
  color: rgba(246, 231, 200, 0.88);
  font-size: 15px;
}

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

/* In-place walk animations — 8-frame side sheets facing right by default.
   Explicit keyframes (same as in-game) so every frame is hit reliably. */
.hero-cast {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 22px;
  margin-top: 28px;
  min-height: 78px;
  padding: 10px 8px 6px;
}

.walk-sprite {
  flex: 0 0 auto;
  background-repeat: no-repeat;
  background-size: 800% 100%;
  background-position: 0% 50%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 5px 0 rgba(0, 0, 0, 0.28));
  transform-origin: center bottom;
  animation:
    walk-frames 0.88s step-end infinite,
    walk-bob 0.44s ease-in-out infinite alternate;
}

.walk-player {
  width: 72px;
  height: 72px;
  background-image: url("../assets/cast/walk/player-walk.webp");
}

.walk-cat {
  width: 58px;
  height: 58px;
  background-image: url("../assets/cast/walk/cat-walk.webp");
  animation-duration: 0.78s, 0.39s;
}

.walk-dog {
  width: 66px;
  height: 54px;
  background-image: url("../assets/cast/walk/dog-walk.webp");
  animation-duration: 0.92s, 0.46s;
}

.walk-duck {
  width: 54px;
  height: 54px;
  background-image: url("../assets/cast/walk/duck-walk.webp");
  animation-duration: 0.84s, 0.42s;
}

.walk-bird {
  width: 50px;
  height: 48px;
  background-image: url("../assets/cast/walk/bird-walk.webp");
  animation-duration: 0.7s, 0.35s;
}

/* 8-frame strip: frame k at k/(N-1) → 0 / 14.2857% / … / 100% */
@keyframes walk-frames {
  0%,
  12.49% {
    background-position: 0% 50%;
  }
  12.5%,
  24.99% {
    background-position: 14.2857% 50%;
  }
  25%,
  37.49% {
    background-position: 28.5714% 50%;
  }
  37.5%,
  49.99% {
    background-position: 42.8571% 50%;
  }
  50%,
  62.49% {
    background-position: 57.1429% 50%;
  }
  62.5%,
  74.99% {
    background-position: 71.4286% 50%;
  }
  75%,
  87.49% {
    background-position: 85.7143% 50%;
  }
  87.5%,
  99.99% {
    background-position: 100% 50%;
  }
}

@keyframes walk-bob {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .walk-sprite {
    animation: none;
    background-position: 0% 50%;
  }
}

.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  width: 28px;
  height: 44px;
  border: 2px solid rgba(232, 184, 75, 0.55);
  border-radius: 16px;
  display: grid;
  place-items: start center;
  padding-top: 8px;
  z-index: 1;
}

.hero-scroll span {
  width: 4px;
  height: 8px;
  border-radius: 4px;
  background: var(--gold);
  animation: scroll-dot 1.6s ease-in-out infinite;
}

@keyframes scroll-dot {
  0%,
  100% {
    transform: translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateY(10px);
    opacity: 0.4;
  }
}

/* ---------- Sections ---------- */

.section {
  padding: 96px 20px;
  scroll-margin-top: calc(var(--nav-h) + 8px);
}

[id] {
  scroll-margin-top: calc(var(--nav-h) + 8px);
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}

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

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.section h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.section-lead {
  margin: 0;
  font-size: 16px;
  opacity: 0.88;
}

.section-parchment {
  background:
    linear-gradient(180deg, rgba(246, 231, 200, 0.97), rgba(232, 210, 164, 0.98));
  color: var(--ink);
}

.section-parchment .eyebrow {
  color: var(--accent);
}

.section-parchment .section-lead {
  color: var(--ink-soft);
  opacity: 1;
}

.section-night {
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(232, 184, 75, 0.08), transparent 55%),
    linear-gradient(180deg, var(--night-soft), var(--night));
}

.section-carousel {
  background: linear-gradient(180deg, var(--night), #102030 40%, var(--night-soft));
  padding-bottom: 72px;
}

.section-gallery {
  background:
    linear-gradient(180deg, var(--night-soft), #1a2a24 40%, var(--night));
}

/* ---------- Carousel ---------- */

.carousel {
  max-width: 1200px;
  margin: 0 auto;
}

.carousel-viewport {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 2px solid rgba(232, 184, 75, 0.28);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
  background: #0a1218;
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
}

.carousel-viewport.is-dragging {
  cursor: grabbing;
}

.carousel-track {
  display: flex;
  transition: transform 0.55s ease;
  will-change: transform;
}

.carousel-track.is-instant {
  transition: none;
}

.carousel-track.is-dragging {
  transition: none;
}

.carousel-slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 100%;
  aspect-ratio: 16 / 9;
  background: #0a1218;
  pointer-events: none;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
  user-select: none;
}

.carousel-caption {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  max-width: 420px;
  padding: 14px 18px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(246, 231, 200, 0.96), rgba(232, 210, 164, 0.95));
  border: 2px solid var(--wood-mid);
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

.carousel-caption strong {
  display: block;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--wood);
  margin-bottom: 4px;
}

.carousel-caption span {
  display: block;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.45;
}

.carousel-caption em {
  display: inline-block;
  margin-top: 8px;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-transform: uppercase;
}

/* Side arrows — visible on hover/focus over the viewport */
.carousel-side-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(232, 184, 75, 0.55);
  background: rgba(12, 21, 32, 0.55);
  color: var(--gold);
  font-size: 32px;
  line-height: 1;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, background 0.2s, transform 0.2s;
  backdrop-filter: blur(4px);
}

.carousel-side-prev {
  left: 14px;
}

.carousel-side-next {
  right: 14px;
}

.carousel-viewport:hover .carousel-side-btn,
.carousel-viewport:focus-within .carousel-side-btn,
.carousel-side-btn:focus-visible {
  opacity: 1;
  pointer-events: auto;
}

.carousel-side-btn:hover,
.carousel-side-btn:focus-visible {
  background: rgba(232, 184, 75, 0.2);
  outline: none;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 18px;
}

.carousel-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(232, 184, 75, 0.4);
  color: var(--gold);
  font-size: 28px;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: background 0.2s;
}

.carousel-btn:hover,
.carousel-btn:focus-visible {
  background: rgba(232, 184, 75, 0.14);
  outline: none;
}

.carousel-dots {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(246, 231, 200, 0.28);
  border: none;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}

.carousel-dot.is-active {
  background: var(--gold);
  transform: scale(1.2);
}

.carousel-dot:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Carousel side-button mobile overrides live in css/mobile.css (kept separate). */

/* ---------- Feature grid ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.feature-card {
  background: linear-gradient(180deg, #fff6df, var(--parchment));
  border: 2px solid var(--wood-mid);
  border-radius: var(--radius);
  padding: 20px 16px 18px;
  box-shadow: 0 8px 0 rgba(61, 36, 18, 0.08);
}

.feature-card h3 {
  margin: 10px 0 6px;
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--wood);
}

.feature-card p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
}

.feature-icon {
  height: 72px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  background:
    radial-gradient(circle at 50% 80%, rgba(232, 184, 75, 0.25), transparent 60%),
    rgba(61, 36, 18, 0.04);
  border-radius: 8px;
  padding: 8px;
}

.feature-icon img.pixel {
  max-height: 56px;
  width: auto;
}

.feature-icon img.pixel.tall {
  max-height: 64px;
}

.feature-icon img.contain {
  max-height: 60px;
  width: auto;
  object-fit: contain;
}

/* ---------- Gameplay marquee ---------- */

.gameplay-marquee {
  margin-top: 28px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.marquee-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: gameplay-marquee-scroll 42s linear infinite;
}

.gameplay-marquee:hover .marquee-track,
.gameplay-marquee:focus-within .marquee-track {
  animation-play-state: paused;
}

.marquee-slide {
  position: relative;
  flex: 0 0 auto;
  width: min(420px, 72vw);
  margin: 0;
  border: 2px solid var(--wood-mid);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--parchment-deep);
  box-shadow: 0 10px 0 rgba(61, 36, 18, 0.08);
}

.marquee-slide img {
  display: block;
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.marquee-slide figcaption {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(246, 231, 200, 0.92);
  border: 1px solid rgba(61, 36, 18, 0.25);
  color: var(--wood);
  font-family: var(--font-display);
  font-size: 14px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(12, 21, 32, 0.18);
}

@keyframes gameplay-marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
    flex-wrap: wrap;
    width: auto;
    justify-content: center;
  }

  .gameplay-marquee {
    mask-image: none;
    -webkit-mask-image: none;
  }
}

/* ---------- Element grid ---------- */

.element-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.element-card {
  margin: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(232, 184, 75, 0.22);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.element-card:hover {
  transform: translateY(-3px);
  border-color: rgba(232, 184, 75, 0.5);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
}

.element-card.featured {
  grid-column: span 2;
  grid-row: span 2;
}

.element-art {
  height: auto;
  min-height: 200px;
  display: grid;
  place-items: center;
  overflow: visible;
  background:
    radial-gradient(circle at 50% 70%, rgba(110, 182, 217, 0.18), transparent 55%),
    linear-gradient(180deg, #1a3040, #0e1c28);
  padding: 20px 18px 8px;
}

.element-card.featured .element-art {
  min-height: 300px;
}

.element-art img {
  max-height: none;
  width: 100%;
  max-width: 280px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.35));
}

.element-card.featured .element-art img {
  max-width: 420px;
}

.element-card figcaption {
  padding: 14px 16px 16px;
  background: linear-gradient(180deg, rgba(12, 21, 32, 0.2), rgba(12, 21, 32, 0.55));
}

.element-card strong {
  display: block;
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 16px;
  margin-bottom: 4px;
}

.element-card span {
  display: block;
  color: rgba(246, 231, 200, 0.75);
  font-size: 13px;
  line-height: 1.5;
}

/* ---------- Editor ---------- */

.editor-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}

.editor-marquee {
  margin-top: 32px;
}

.editor-marquee .marquee-track {
  animation-duration: 48s;
}

.editor-copy .btn {
  margin-top: 4px;
}

.editor-steps {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: grid;
  gap: 14px;
}

.editor-steps li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: start;
}

.step-num {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
  padding-top: 2px;
}

.editor-steps strong {
  display: block;
  font-family: var(--font-display);
  color: var(--wood);
  margin-bottom: 2px;
}

.editor-steps p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.editor-board {
  background: #121a22;
  border: 2px solid var(--wood-mid);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
}

.editor-board-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: var(--wood);
  color: rgba(246, 231, 200, 0.85);
  font-size: 12px;
}

.editor-board-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(246, 231, 200, 0.25);
}

.editor-board-bar span:nth-child(1) {
  background: #c45c26;
}
.editor-board-bar span:nth-child(2) {
  background: #e8b84b;
}
.editor-board-bar span:nth-child(3) {
  background: #3d7a5a;
}

.editor-board-bar em {
  margin-left: 8px;
  font-style: normal;
  letter-spacing: 0.04em;
  opacity: 0.9;
}

.editor-canvas {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0a1218;
}

.editor-shot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}

.editor-board-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.25);
}

.badge {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(232, 184, 75, 0.12);
  color: var(--gold);
  border: 1px solid rgba(232, 184, 75, 0.28);
}

.badge.ok {
  background: rgba(61, 122, 90, 0.2);
  color: #8fd3b0;
  border-color: rgba(61, 122, 90, 0.45);
}

/* ---------- Gallery ---------- */

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

.gallery-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid rgba(232, 184, 75, 0.25);
  background: #0f1a22;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.gallery-card:hover {
  transform: translateY(-3px);
  border-color: rgba(232, 184, 75, 0.55);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
}

.gallery-card figure {
  margin: 0;
}

.gallery-card .gallery-art {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.gallery-card .gallery-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-card:hover .gallery-art img {
  transform: scale(1.04);
}

.gallery-meta {
  padding: 14px 14px 16px;
  background: linear-gradient(180deg, rgba(246, 231, 200, 0.04), rgba(0, 0, 0, 0.18));
}

.gallery-meta strong {
  display: block;
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 17px;
  margin-bottom: 4px;
}

.gallery-meta p {
  margin: 0 0 10px;
  color: rgba(246, 231, 200, 0.78);
  font-size: 13px;
  line-height: 1.5;
}

.gallery-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.gallery-tags span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(246, 231, 200, 0.2);
  color: rgba(246, 231, 200, 0.75);
}

.gallery-tags span.author {
  border-color: rgba(232, 184, 75, 0.35);
  color: var(--gold);
}

.gallery-note {
  margin-top: 28px;
  padding: 20px 22px;
  border-radius: 12px;
  border: 1px dashed rgba(232, 184, 75, 0.35);
  background: rgba(232, 184, 75, 0.06);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.gallery-note p {
  margin: 0;
  max-width: 52em;
  color: rgba(246, 231, 200, 0.82);
  font-size: 14px;
}

.gallery-note .btn-ghost {
  border-color: rgba(232, 184, 75, 0.4);
  color: var(--gold);
}

.gallery-note .btn-ghost:hover {
  background: rgba(232, 184, 75, 0.12);
}

/* ---------- Community ---------- */

.community-inner {
  display: grid;
  gap: 28px;
}

.community-copy {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.community-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.community-card {
  display: grid;
  gap: 8px;
  padding: 24px 20px;
  border-radius: 14px;
  border: 1px solid rgba(232, 184, 75, 0.22);
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}

.community-card:hover,
.community-card:focus-visible {
  border-color: rgba(232, 184, 75, 0.55);
  background: rgba(232, 184, 75, 0.08);
  transform: translateY(-2px);
  outline: none;
}

.community-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 4px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(232, 184, 75, 0.12);
  color: var(--gold);
}

.community-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.community-icon svg.icon-x {
  width: 20px;
  height: 20px;
}

.community-icon svg.icon-boost {
  width: 28px;
  height: 28px;
}

.community-icon svg.icon-discord {
  width: 34px;
  height: 34px;
  transform: translateY(2px);
}

.community-card strong {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 18px;
}

.community-card > span:last-child {
  color: rgba(246, 231, 200, 0.75);
  font-size: 13px;
}

/* ---------- Footer ---------- */

.site-footer {
  background: #0a100e;
  border-top: 1px solid rgba(232, 184, 75, 0.18);
  padding: 40px 20px 28px;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: 18px;
  justify-items: center;
  text-align: center;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-brand img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

.footer-brand-text {
  display: grid;
  gap: 6px;
  justify-items: center;
}

.footer-oasis {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34px;
  letter-spacing: 0.28em;
  color: var(--gold);
  text-shadow:
    0 2px 0 #2a1608,
    0 0 18px rgba(232, 184, 75, 0.35);
}

.footer-brand p {
  margin: 0;
  color: rgba(246, 231, 200, 0.65);
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.footer-links a {
  color: rgba(246, 231, 200, 0.75);
  font-size: 14px;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--gold);
  outline: none;
}

.footer-copy {
  margin: 0;
  color: rgba(246, 231, 200, 0.45);
  font-size: 12px;
}

/* ---------- Reveal ----------
   Progressive enhancement:
   - Default (no html.js): content fully visible — survives JS 404 / failed deploy.
   - main.js adds html.js only after i18n loads, then hides .reveal for animation. */
.reveal {
  opacity: 1;
  transform: none;
}

html.js .reveal:not(.is-visible) {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: reduce) {
  html.js .reveal:not(.is-visible),
  html.js .reveal.is-visible,
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-bg img {
    animation: none;
  }
}


/* ==========================================================================
   Responsive / mobile overrides — MOVED to css/mobile.css
   ---------------------------------------------------------------------------
   styles.css is the desktop/base layer only.
   All max-width adaptations live in css/mobile.css (loaded after this file).
   ========================================================================== */
