/* Lanterns marketing site styles. Sections: tokens → base → primitives → nav → hero → demo → about → features → biomes → keepers → aux → footer → responsive. */

/* === DESIGN TOKENS === */
:root {
  /* Palette (mapped from game's palette.gd) */
  --c-parchment: #f4ead8;
  --c-parchment-deep: #e9dcc4;
  --c-ink: #131734;
  --c-stone: #4a4f63;
  --c-lantern-edge: #c97e3a;
  --c-lantern-warm: #f6c177;
  --c-firefly-glow: #f2f7b0;

  /* Type */
  --font-display: "Fraunces", ui-serif, "Cormorant Garamond", Georgia, serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;

  /* Rhythm */
  --section-pad-y: 5rem;
  --section-pad-x: 2rem;
  --content-max: 64rem;
  --measure: 36rem;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (max-width: 720px) {
  :root {
    --section-pad-y: 3rem;
    --section-pad-x: 1.25rem;
  }
}

/* === BASE === */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--c-parchment);
  color: var(--c-ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--c-lantern-edge); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* === TYPOGRAPHY === */
.display {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.0;
  letter-spacing: -0.015em;
  color: var(--c-ink);
}
.display em { font-style: italic; font-weight: 400; color: var(--c-lantern-edge); }

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--c-lantern-edge);
  font-weight: 600;
}

.subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--c-stone);
}

.body { font-family: var(--font-display); font-size: 1.05rem; line-height: 1.7; color: var(--c-stone); }

/* === LAYOUT === */
.section {
  padding: var(--section-pad-y) var(--section-pad-x);
}
.section--inverse { background: var(--c-ink); color: var(--c-parchment); }
.section--inverse .display { color: var(--c-parchment); }
.section--inverse .body { color: rgba(244, 234, 216, 0.78); }
.section--tinted { background: var(--c-parchment-deep); }

.container {
  max-width: var(--content-max);
  margin: 0 auto;
}
.container--narrow { max-width: var(--measure); }
.text-center { text-align: center; }

/* === BUTTONS === */
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.15s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
  text-decoration: none;
}
.button:hover { transform: translateY(-1px); text-decoration: none; }
.button:focus-visible { outline: 2px solid var(--c-lantern-warm); outline-offset: 3px; }

.button-primary {
  background: var(--c-ink);
  color: var(--c-lantern-warm);
}
.button-primary:hover { background: #1f2549; }

.button-ghost {
  background: transparent;
  color: var(--c-ink);
  border-color: var(--c-ink);
}
.button-ghost:hover { background: rgba(19, 23, 52, 0.06); }

.button[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; pointer-events: none; }

/* === CARDS === */
.card {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(19, 23, 52, 0.08);
  border-radius: 12px;
  padding: 1.5rem;
}

/* === NAV === */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 234, 216, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(19, 23, 52, 0.08);
}
.site-nav__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0.85rem var(--section-pad-x);
  display: flex;
  align-items: center;
  gap: 2rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--c-ink);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.site-nav__links {
  display: flex;
  gap: 1.75rem;
  margin-left: auto;
  font-size: 0.9rem;
}
.site-nav__links a {
  color: var(--c-ink);
  font-weight: 500;
  text-decoration: none;
  position: relative;
}
.site-nav__links a:hover { color: var(--c-lantern-edge); }
.site-nav__wishlist { padding: 0.55rem 1.1rem; font-size: 0.7rem; }

.site-nav__menu {
  display: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  width: 32px;
  height: 32px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  margin-left: auto;
}
.site-nav__menu span { display: block; height: 2px; background: var(--c-ink); border-radius: 2px; }

.site-nav__mobile {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 var(--section-pad-x) 1rem;
  border-top: 1px solid rgba(19, 23, 52, 0.08);
}
.site-nav__mobile a {
  padding: 0.6rem 0;
  color: var(--c-ink);
  font-weight: 500;
}

@media (max-width: 720px) {
  .site-nav__links, .site-nav__wishlist { display: none; }
  .site-nav__menu { display: flex; }
  .site-nav__mobile[aria-expanded="true"], .site-nav__mobile:not([hidden]) { display: flex; }
}

/* === HERO === */
.hero { padding-top: calc(var(--section-pad-y) + 1rem); padding-bottom: calc(var(--section-pad-y) + 1rem); }
.hero__moon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.5rem;
  filter: drop-shadow(0 0 24px rgba(246, 193, 119, 0.35));
  animation: glow-pulse 6s ease-in-out infinite;
}
.hero__title {
  font-size: clamp(2.4rem, 6.5vw, 4.2rem);
  margin: 0.75rem 0 1.25rem;
}
.hero__tagline {
  margin: 0 auto 2.25rem;
  max-width: 32rem;
}
.hero__ctas {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}
.hero__hint {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--c-stone);
}

@keyframes glow-pulse {
  0%, 100% { filter: drop-shadow(0 0 18px rgba(246, 193, 119, 0.25)); }
  50% { filter: drop-shadow(0 0 32px rgba(246, 193, 119, 0.5)); }
}

/* === DEMO === */
.demo__head { text-align: center; margin-bottom: 2.5rem; }
.demo__title { font-size: clamp(2rem, 4.5vw, 3rem); margin: 0.6rem auto 1rem; }
.demo__hint {
  max-width: 36rem;
  margin: 0 auto;
  color: rgba(244, 234, 216, 0.78);
}
.demo__hint kbd {
  display: inline-block;
  background: rgba(246, 193, 119, 0.15);
  color: var(--c-lantern-warm);
  border: 1px solid rgba(246, 193, 119, 0.4);
  border-radius: 4px;
  padding: 0.05rem 0.4rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
}
.demo__frame {
  position: relative;
  max-width: 56rem;
  margin: 0 auto;
  border: 2px solid var(--c-lantern-warm);
  border-radius: 10px;
  overflow: hidden;
  background: #0a0d22;
  box-shadow: 0 30px 60px -30px rgba(246, 193, 119, 0.4);
}
.demo__frame iframe {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 0;
}
.demo__pop {
  display: block;
  text-align: right;
  padding: 0.55rem 0.85rem;
  font-size: 0.75rem;
  color: var(--c-lantern-warm);
  text-decoration: none;
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(246, 193, 119, 0.3);
}
.demo__pop:hover { color: var(--c-firefly-glow); text-decoration: none; }

/* === ABOUT === */
.about__title { font-size: clamp(2rem, 4.5vw, 3rem); margin: 0.5rem 0 2rem; }
.about__body { display: flex; flex-direction: column; gap: 1.1rem; max-width: 36rem; margin: 0 auto; }
.about__clip {
  margin: 3rem 0 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(19, 23, 52, 0.1);
  background: var(--c-parchment-deep);
}
.about__clip-placeholder {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  color: var(--c-stone);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
}
.about__caption {
  padding: 0.6rem 0.9rem;
  font-size: 0.75rem;
  color: var(--c-stone);
  background: rgba(19, 23, 52, 0.04);
  text-align: right;
}

/* === FEATURES === */
.features__head { text-align: center; margin-bottom: 3rem; }
.features__title { font-size: clamp(2rem, 4.5vw, 3rem); margin: 0.5rem 0 0; }
.features__grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.feature {
  background: var(--c-parchment);
  border-color: rgba(19, 23, 52, 0.1);
}
.feature__icon { color: var(--c-lantern-edge); margin-bottom: 0.85rem; }
.feature__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.2rem;
  margin: 0 0 0.4rem;
  color: var(--c-ink);
}
.feature__copy { margin: 0; font-size: 0.95rem; color: var(--c-stone); line-height: 1.55; }

@media (max-width: 960px) {
  .features__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .features__grid { grid-template-columns: 1fr; }
}

/* === BIOMES === */
.biomes__head { text-align: center; margin-bottom: 3rem; }
.biomes__title { font-size: clamp(2rem, 4.5vw, 3rem); margin: 0.5rem 0 0; }
.biomes__row {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.biome {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(19, 23, 52, 0.08);
  background: var(--c-ink);
}
.biome__art {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
.biome__body {
  padding: 0.85rem 1rem 1rem;
  background: var(--c-ink);
  color: var(--c-parchment);
}
.biome__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  margin: 0 0 0.25rem;
  color: var(--c-lantern-warm);
}
.biome__copy { margin: 0; font-size: 0.85rem; color: rgba(244, 234, 216, 0.75); line-height: 1.5; }

@media (max-width: 960px) {
  .biomes__row {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 70%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.5rem;
  }
  .biome { scroll-snap-align: start; }
}

/* === KEEPERS === */
.keepers__head { text-align: center; margin-bottom: 3rem; }
.keepers__title { font-size: clamp(2rem, 4.5vw, 3rem); margin: 0.5rem 0 1rem; }
.keepers__lede { max-width: 30rem; margin: 0 auto; }
.keepers__row {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}
.keeper {
  text-align: center;
  background: var(--c-parchment);
  border: 1px solid rgba(19, 23, 52, 0.08);
  border-radius: 12px;
  padding: 1.25rem 1rem 1rem;
}
.keeper img {
  width: 100%;
  max-width: 120px;
  margin: 0 auto 0.85rem;
  aspect-ratio: 1;
  object-fit: contain;
}
.keeper__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1rem;
  margin: 0 0 0.25rem;
  color: var(--c-ink);
}
.keeper__copy { margin: 0; font-size: 0.85rem; color: var(--c-stone); line-height: 1.5; }

@media (max-width: 960px) {
  .keepers__row {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 50%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.5rem;
  }
  .keeper { scroll-snap-align: start; }
}
@media (max-width: 600px) {
  .keepers__row { grid-auto-columns: 70%; }
}

/* === STATUS === */
.status__title { font-size: clamp(1.8rem, 3.6vw, 2.4rem); margin: 0.5rem 0 1.25rem; }
.status__copy { margin: 0 auto 1.5rem; max-width: 36rem; }
.status__copy strong { color: var(--c-ink); font-weight: 600; }
.status__links a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* === PRESS === */
.press__head { margin-bottom: 2.5rem; }
.press__title { font-size: clamp(1.8rem, 3.6vw, 2.4rem); margin: 0.5rem 0 0; }
.press__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.press__h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
}
.press__copy { margin: 0; font-size: 0.92rem; color: var(--c-stone); line-height: 1.6; }
.press__copy em { color: var(--c-stone); font-style: italic; }
@media (max-width: 720px) { .press__grid { grid-template-columns: 1fr; } }

/* === FEEDBACK === */
.feedback__head { margin-bottom: 2rem; }
.feedback__title { font-size: clamp(1.8rem, 3.6vw, 2.4rem); margin: 0.5rem 0 1rem; }
.feedback__lede { max-width: 32rem; margin: 0 auto; }
.feedback__placeholder {
  margin: 2rem auto;
  max-width: 36rem;
  padding: 1.25rem 1.5rem;
  background: var(--c-parchment-deep);
  border-left: 3px solid var(--c-lantern-edge);
  border-radius: 4px;
  text-align: center;
  color: var(--c-stone);
  font-size: 0.95rem;
}
.feedback__fallback { font-size: 0.9rem; color: var(--c-stone); }

/* === FOOTER === */
.site-footer {
  background: var(--c-ink);
  color: rgba(244, 234, 216, 0.7);
  padding: 2rem var(--section-pad-x);
  font-size: 0.85rem;
}
.site-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  color: var(--c-parchment);
}
.site-footer__links { margin: 0; display: inline-flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.site-footer__links a { color: var(--c-lantern-warm); }
.site-footer__made { color: rgba(244, 234, 216, 0.55); font-style: italic; }

/* === MOTION === */
.section--will-fade { opacity: 0; transform: translateY(12px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.section--faded-in { opacity: 1; transform: none; }

/* === A11Y === */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--c-ink);
  color: var(--c-lantern-warm);
  padding: 0.6rem 1rem;
  border-radius: 4px;
  z-index: 100;
  font-size: 0.85rem;
  font-weight: 600;
}
.skip-link:focus { top: 0.75rem; }

:focus-visible { outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }

@media (prefers-contrast: more) {
  body { color: #000; }
  .button-ghost { border-width: 2px; }
}
