/* ==========================================================================
   Oasis Bloom — site stylesheet
   ========================================================================== */

/* ---- Self-hosted fonts (no external requests) ---- */
@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/fredoka-latin.woff2") format("woff2");
}

/* ---- Design tokens ---- */
:root {
  --navy-900: #14243d;
  --navy-800: #1e3350;
  --navy-700: #2a4468;
  --ink: #22334d;
  --ink-soft: #4a5d7a;

  --ice-100: #eaf4ff;
  --ice-200: #cfe6fb;

  --frost-1: #eef6fd;
  --frost-2: #dcecfa;

  --grass-600: #4da53f;
  --grass-700: #37812f;
  --meadow: #e6f2da;
  --meadow-2: #d9ecc6;

  --sun-300: #ffe45c;
  --sun-500: #ffab2e;
  --sun-600: #ff8c42;

  --bg: #f3f8ff;
  --sky: #dcebfb;
  --line: #dbe7f5;

  --font-body: "Fredoka", "Segoe UI", sans-serif;
  --font-display: "Fredoka", "Segoe UI", sans-serif;

  --header-h: 64px;
  --wrap: 1080px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding-top: var(--header-h);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

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

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.15;
  color: var(--navy-800);
  margin: 0 0 0.5em;
}

h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--grass-700);
}

p { margin: 0 0 1em; }

a { color: var(--grass-600); }
a:hover { color: var(--sun-500); }

.wrap {
  width: min(var(--wrap), 100% - 2.5rem);
  margin-inline: auto;
}

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

.section { padding: 2.5rem 0; }

section[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

.section-sub {
  max-width: 640px;
  margin: 0 auto 1.75rem;
  text-align: center;
  color: var(--ink-soft);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 12px;
  padding: 0.7rem 1.6rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.btn-icon {
  width: 1.1em;
  height: 1.1em;
  vertical-align: -0.16em;
  margin-right: 0.45em;
}
.btn-primary {
  flex-direction: column;
  gap: 0;
  padding: 0.5rem 2.1rem 0.6rem;
  font-size: 1.2rem;
  line-height: 1.15;
  color: #5b3305;
  background: linear-gradient(180deg, #ffd94d, #ffb52e);
  border: 2px solid #9a6414;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.55), 0 4px 0 #9a6414;
}
.btn-primary:hover {
  color: #5b3305;
  transform: translateY(-2px);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.55), 0 6px 0 #9a6414;
}
.btn-primary:active {
  transform: translateY(2px);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.55), 0 1px 0 #9a6414;
}
.btn-primary .soon-tag {
  background: none;
  border-radius: 0;
  padding: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: #7c4a08;
}

.btn-navy {
  background: var(--navy-800);
  color: #fff;
  border: 2px solid #0d1728;
  box-shadow: 0 3px 0 #0d1728;
}
.btn-navy:hover { color: #fff; background: var(--navy-700); transform: translateY(-1px); }

.btn.is-disabled {
  opacity: 0.9;
  pointer-events: none;
  filter: saturate(0.8);
}
.btn .soon-tag {
  font-size: 0.72rem;
  font-weight: 400;
  background: rgba(255, 255, 255, 0.85);
  color: var(--navy-800);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
}

/* ---- Header / nav ---- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(243, 248, 255, 0.94);
  backdrop-filter: blur(10px);
  transition: box-shadow 0.25s ease;
}
.site-header.is-scrolled {
  box-shadow: 0 2px 14px rgba(30, 51, 80, 0.12);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--navy-800);
}
.brand:hover { color: var(--grass-600); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a:not(.btn) {
  text-decoration: none;
  color: var(--navy-800);
}
.nav-links a:not(.btn):hover { color: var(--sun-500); }
.nav-links .btn { padding: 0.45rem 1.1rem; font-size: 0.92rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.4rem;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  border-radius: 2px;
  background: var(--navy-800);
  margin: 5px 0;
}

/* ---- Hero: the key art full-width, logo already part of the artwork ---- */
.hero {
  height: clamp(360px, 62vh, 640px);
  /* 55% keeps the in-art logo in frame when narrow screens crop the sides */
  background: url("../Steam%20Assets/library_hero_with_logo.png") 55% top / cover no-repeat;
}
@media (max-width: 720px) {
  .hero {
    /* Vertical capsule art; height follows the image ratio so nothing crops */
    height: auto;
    aspect-ratio: 748 / 896;
    background: url("../Steam%20Assets/vert_store_capsule_vertical.png") center top / cover no-repeat;
  }
}

/* ---- Story ---- */
.story {
  padding-top: 1.5rem;
  background: linear-gradient(180deg, var(--frost-2), var(--frost-1));
}
.story-head {
  text-align: center;
  padding: 0 1.25rem;
  margin-bottom: 1rem;
}
.story-head h2 {
  margin-bottom: 0.1em;
  line-height: 1.1;
}
.tagline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(0.95rem, 1.55vw, 1.3rem);
  color: var(--navy-700);
  text-align: center;
  margin: 0 auto 1.1rem;
}
@media (min-width: 900px) {
  .tagline { white-space: nowrap; }
}
.story .wrap { max-width: 680px; text-align: center; }
.story .wrap p { text-align: left; }
.alpha-note {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 0;
}

/* ---- Features: the page thaws from frost into meadow here ---- */
.features { background: linear-gradient(180deg, var(--frost-1), var(--meadow)); }
.features h2 { text-align: center; margin-bottom: 0.9em; }
.features-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.8rem 3rem;
}
.features-list li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.ficon {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
}
.features-list p { margin: 0; }

/* ---- Colonists (dark section) ---- */
.section-dark {
  position: relative;
  color: var(--ice-100);
  background: var(--navy-800) url("../Steam%20Assets/store_page_background.png") center / cover no-repeat;
  padding: 2.75rem 0;
}
.section-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(20, 36, 61, 0.55);
}
.section-dark > .wrap { position: relative; }
.section-dark h2 { color: #fff; text-align: center; }
.section-dark .section-sub { color: var(--ice-200); }

.colonist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.2rem;
}
.colonist { margin: 0; }
.colonist img { border-radius: 14px; width: 100%; }
.colonist figcaption { padding-top: 0.9rem; }
.colonist h3 {
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: 0;
  text-align: center;
}
.colonist .role {
  display: block;
  font-size: 0.88rem;
  color: var(--sun-300);
  margin-bottom: 0.5rem;
  text-align: center;
}
.colonist p { color: var(--ice-200); font-size: 0.95rem; margin: 0; }

.credit-line {
  text-align: center;
  margin: 1.5rem 0 0;
  font-size: 0.9rem;
  color: var(--ice-200);
}

/* ---- Creatures ---- */
.creatures { background: linear-gradient(180deg, var(--meadow), var(--meadow-2)); }
.creatures h2 { text-align: center; }
.creature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}
.creature {
  margin: 0;
  text-align: center;
}
.creature img {
  box-sizing: content-box;
  padding: 1.4rem;
  border-radius: 50%;
  margin: 0 auto 1rem;
  filter: drop-shadow(0 6px 8px rgba(30, 51, 80, 0.2));
}
.creature.is-meadow img {
  background: radial-gradient(circle at 50% 35%, #f4fbe9, #cbe6ae);
  /* Cottolope sprite is 144px vs the others' 192px; pad the difference so all discs match */
  padding: calc(1.4rem + 24px);
}
.creature.is-frost img { background: radial-gradient(circle at 50% 35%, #f2f9ff, #c6e1f8); }
.creature.is-night img { background: radial-gradient(circle at 50% 35%, #efedff, #cfcbee); }
.creature h3 { font-size: 1.2rem; margin-bottom: 0.25rem; }
.creature p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

.creature-more {
  max-width: 700px;
  margin: 1.75rem auto 0;
  text-align: center;
  color: var(--ink-soft);
}
.creature-more strong { color: var(--navy-800); }

/* ---- The CAVE ---- */
.section-cave {
  color: var(--ice-200);
  background: linear-gradient(180deg, #241f3d, #14243d);
  padding: 2.75rem 0;
}
.section-cave h2 { color: #cfcbee; margin-bottom: 0.1em; }
.cave-fullname {
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: #a99fd6;
  margin-bottom: 1.2em;
}
.cave-wrap {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  max-width: 880px;
}
.cave-icon {
  flex-shrink: 0;
  filter: drop-shadow(0 0 18px rgba(160, 140, 255, 0.4));
}
.section-cave p:last-child { margin-bottom: 0; }

@media (max-width: 720px) {
  .cave-wrap { flex-direction: column; gap: 1.25rem; text-align: center; }
  .cave-icon { width: 120px; height: 144px; }
}

/* ---- Legal pages ---- */
.legal-main { padding: 3rem 0 4rem; }
.legal-main .wrap { max-width: 760px; }
.legal-main h1 { font-size: clamp(1.9rem, 5vw, 2.5rem); }
.legal-main h2 { font-size: 1.3rem; margin-top: 2em; }
.legal-main address { font-style: normal; }
mark.todo {
  background: #ffe9a8;
  border-radius: 4px;
  padding: 0.05em 0.35em;
  font-weight: 700;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--navy-900);
  color: var(--ice-200);
  padding: 2.6rem 0 2rem;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.8rem;
}
.site-footer .brand { color: #fff; }
.site-footer .brand:hover { color: var(--sun-300); }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-links a { color: var(--ice-200); text-decoration: none; }
.footer-links a:hover { color: var(--sun-300); }
.footer-fine {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 1.3rem;
  font-size: 0.86rem;
  color: #93a9c8;
}
.footer-fine p { margin: 0 0 0.3rem; }
.footer-legal { margin-top: 0.8rem; }
.footer-fine a { color: var(--ice-200); }
.footer-fine a:hover { color: var(--sun-300); }

/* ---- Reveal animation ---- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
}

/* ---- Responsive ---- */
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(243, 248, 255, 0.98);
    box-shadow: 0 14px 30px rgba(30, 51, 80, 0.18);
    display: none;
    padding: 0.5rem 1.25rem 1rem;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a:not(.btn) {
    display: block;
    padding: 0.8rem 0.3rem;
    border-bottom: 1px solid var(--line);
  }
  .nav-links li:last-child { margin-top: 0.8rem; }
}
