/* Wormy's Descent — marketing site (wormy.cobaltforgegames.com)
   Palette matches the game's "Subterranean Glass" UI: warm dark earth + amber. */

:root {
  --bg: #151009;
  --bg2: #1e1710;
  --panel: #241b12;
  --line: #3a2d1e;
  --cream: #f5ebdc;
  --muted: #b9a88f;
  --amber: #f5a623;
  --amber-deep: #c97e12;
  --red: #e04a35;
  --radius: 18px;
  --display: "Baloo 2", system-ui, sans-serif;
  --body: "Nunito", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--amber); text-decoration: none; }

h1, h2, h3 { font-family: var(--display); line-height: 1.15; }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h3 { font-size: 1.25rem; }
p + p { margin-top: .8em; }
strong { color: var(--cream); }

.kicker {
  font-family: var(--display);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: .4rem;
}
.kicker.center { text-align: center; }
.lede { color: var(--muted); max-width: 720px; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: .7rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(21, 16, 9, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(245, 166, 35, .12);
}
.nav-brand {
  display: flex; align-items: center; gap: .55rem;
  font-family: var(--display); font-weight: 800; font-size: 1.15rem; color: var(--cream);
}
.nav-brand em { color: var(--amber); font-style: normal; }
.nav-brand img { border-radius: 8px; }
.nav-links { display: flex; align-items: center; gap: clamp(.7rem, 2vw, 1.5rem); }
.nav-links a { color: var(--muted); font-weight: 700; font-size: .95rem; transition: color .15s; }
.nav-links a:hover { color: var(--cream); }
.nav-links .nav-cta {
  background: var(--amber); color: #241500;
  padding: .35rem 1rem; border-radius: 999px;
}
.nav-links .nav-cta:hover { background: #ffc14e; color: #241500; }
.nav-burger { display: none; background: none; border: 0; cursor: pointer; padding: .4rem; }
.nav-burger span { display: block; width: 24px; height: 3px; margin: 5px 0; background: var(--cream); border-radius: 2px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 7rem 1.2rem 3rem;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background: url("../assets/img/hero_bg.jpg") center 30% / cover no-repeat;
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(21,16,9,.18) 0%, rgba(21,16,9,.78) 72%, var(--bg) 100%),
    linear-gradient(to bottom, rgba(21,16,9,.55), transparent 30%, transparent 60%, var(--bg) 98%);
}
.hero-art {
  position: relative; height: clamp(150px, 24vw, 230px); margin-bottom: .8rem;
  display: flex; justify-content: center; align-items: flex-end;
}
.hero-wormy { height: 100%; width: auto; filter: drop-shadow(0 14px 26px rgba(0,0,0,.55)); animation: bob 3.4s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-10px) } }
.hero h1 {
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  font-weight: 800;
  text-shadow: 0 4px 24px rgba(0,0,0,.6);
}
.hero h1 span { color: var(--amber); }
.tagline {
  margin-top: .6rem;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: #e9dcc6;
  text-shadow: 0 2px 10px rgba(0,0,0,.7);
}
.hero-ctas { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-top: 1.6rem; }
.btn {
  font-family: var(--display); font-weight: 700; font-size: 1.02rem;
  padding: .72rem 1.5rem; border-radius: 999px;
  transition: transform .12s, background .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(180deg, #ffc14e, var(--amber));
  color: #241500;
  box-shadow: 0 6px 18px rgba(245, 166, 35, .35);
}
.btn-ghost { border: 2px solid rgba(245, 235, 220, .5); color: var(--cream); background: rgba(0,0,0,.25); }
.btn-ghost:hover { border-color: var(--cream); }

.hero-stats {
  list-style: none;
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: clamp(1.2rem, 5vw, 3.5rem);
  margin-top: clamp(2rem, 6vh, 4rem);
  padding: 1rem 1.6rem;
  background: rgba(30, 23, 16, .72);
  border: 1px solid rgba(245, 166, 35, .18);
  border-radius: var(--radius);
  backdrop-filter: blur(6px);
}
.hero-stats li { display: flex; flex-direction: column; align-items: center; min-width: 88px; }
.hero-stats strong { font-family: var(--display); font-size: 1.6rem; color: var(--amber); }
.hero-stats span { font-size: .82rem; color: var(--muted); }

/* ---------- sections ---------- */
.section { padding: clamp(3.5rem, 9vw, 6.5rem) clamp(1.2rem, 5vw, 3rem); max-width: 1200px; margin: 0 auto; }
.section-dark {
  max-width: none;
  background: var(--bg2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-dark > * { max-width: 1200px; margin-left: auto; margin-right: auto; }
.section-head { margin-bottom: 2.4rem; }
.section-head .lede { margin-top: .7rem; }

/* story split */
.split { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.split-art img { border-radius: var(--radius); box-shadow: 0 18px 44px rgba(0,0,0,.5); border: 1px solid var(--line); }
.split-text p { color: var(--muted); }
.split-text p strong, .split-text p em { color: var(--cream); }
.split-text h2 { margin-bottom: .8rem; }

/* ---------- realms ---------- */
.realms { list-style: none; display: flex; flex-direction: column; gap: 1.4rem; }
.realm { display: grid; grid-template-columns: 84px 1fr; gap: 1rem; }
.realm-depth {
  display: flex; flex-direction: column; align-items: center;
  font-family: var(--display); font-size: .85rem; color: var(--muted);
}
.realm-depth i { flex: 1; width: 4px; margin: .4rem 0; border-radius: 2px; background: linear-gradient(to bottom, transparent, var(--rc)); }
.realm-depth span:last-child { color: var(--rc); font-weight: 700; }
.realm-card {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background-size: cover; background-position: center;
  min-height: 190px;
  display: flex; align-items: flex-end;
}
.realm-tile { background-size: 220px; image-rendering: auto; }
.realm-card::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(14,10,6,.92) 0%, rgba(14,10,6,.72) 55%, rgba(14,10,6,.25) 100%);
}
.realm-body { position: relative; padding: 1.4rem 1.6rem; max-width: 640px; }
.realm-body h3 { color: var(--rc); font-size: 1.35rem; }
.realm-body h3 small { display: block; color: var(--cream); font-size: .95rem; opacity: .85; }
.realm-body p { color: #d8cbb4; margin-top: .45rem; font-size: .98rem; }
.realm-meta { font-size: .85rem !important; color: var(--muted) !important; }

/* ---------- guides & bosses ---------- */
.cards.guides { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.1rem; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
  transition: transform .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 16px 34px rgba(0,0,0,.45); }
.card img { width: 100%; aspect-ratio: 1 / 1.05; object-fit: cover; }
.card figcaption { padding: .8rem .9rem 1rem; }
.card figcaption strong { font-family: var(--display); display: block; }
.card figcaption span { font-size: .85rem; color: var(--muted); line-height: 1.4; display: block; }

.bosses { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.bosses figure {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .18s;
}
.bosses figure:hover { transform: scale(1.035); }
.bosses img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.bosses figcaption {
  font-family: var(--display); font-weight: 700; font-size: .95rem;
  text-align: center; padding: .55rem .4rem .7rem;
}

/* ---------- features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.feature {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
}
.feature-icons { display: flex; gap: .45rem; margin-bottom: .9rem; }
.feature-icons img { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0,0,0,.4)); }
.feature h3 { margin-bottom: .4rem; color: var(--amber); }
.feature p { color: var(--muted); font-size: .97rem; }

.skins { margin-top: 3rem; }
.skins-row { display: flex; justify-content: center; gap: clamp(.4rem, 2vw, 1.4rem); margin-top: 1rem; flex-wrap: wrap; }
.skins-row img { width: clamp(100px, 16vw, 170px); filter: drop-shadow(0 10px 22px rgba(0,0,0,.5)); transition: transform .18s; }
.skins-row img:hover { transform: translateY(-8px) scale(1.05); }

/* ---------- how to play ---------- */
.steps { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; counter-reset: step; }
.step {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
}
.step-n {
  flex: 0 0 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(180deg, #ffc14e, var(--amber-deep));
  color: #241500; font-family: var(--display); font-weight: 800; font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(245, 166, 35, .3);
}
.step h3 { color: var(--cream); display: flex; align-items: center; gap: .5rem; }
.step p { color: var(--muted); font-size: .96rem; margin-top: .35rem; }
.inline-ic { width: 26px; height: 26px; object-fit: contain; display: inline-block; }

.fieldguide { margin-top: 2.6rem; }
.fieldguide h3 { color: var(--amber); margin-bottom: 1rem; font-size: 1.4rem; }
.fieldguide table {
  width: 100%; border-collapse: collapse;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; font-size: .95rem;
}
.fieldguide th, .fieldguide td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.fieldguide th { font-family: var(--display); color: var(--amber); background: rgba(245,166,35,.06); }
.fieldguide td:first-child { font-weight: 700; white-space: nowrap; }
.fieldguide td { color: var(--muted); }
.fieldguide tr:last-child td { border-bottom: 0; }
.fieldguide .ic { width: 22px; height: 22px; display: inline-block; vertical-align: -5px; }

/* ---------- finale ---------- */
.finale { padding-top: clamp(3rem, 8vw, 5rem); }
.finale-inner {
  display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
  background: radial-gradient(ellipse at 30% 40%, rgba(245,166,35,.12), transparent 65%), var(--panel);
  border: 1px solid var(--line); border-radius: calc(var(--radius) * 1.4);
  padding: clamp(1.6rem, 5vw, 3.5rem);
}
.finale-skin { max-height: 420px; width: auto; margin: 0 auto; filter: drop-shadow(0 0 42px rgba(245, 200, 90, .35)); }
.finale-text p { color: var(--muted); }
.finale-text h2 { margin-bottom: .7rem; }
.finale .hero-ctas { justify-content: flex-start; }

/* ---------- footer ---------- */
.footer {
  text-align: center; padding: 2.2rem 1rem 2.8rem;
  color: var(--muted); font-size: .9rem;
  border-top: 1px solid var(--line);
}
.footer p + p { margin-top: .3rem; }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-wormy { animation: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .cards.guides { grid-template-columns: repeat(3, 1fr); }
  .bosses { grid-template-columns: repeat(3, 1fr); }
  .features { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-links {
    position: fixed; top: 58px; right: 0; left: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(21, 16, 9, .97);
    border-bottom: 1px solid var(--line);
    display: none; padding: .6rem 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .8rem 1.6rem; }
  .nav-links .nav-cta { margin: .5rem 1.6rem; text-align: center; }
  .nav-burger { display: block; }
  .split { grid-template-columns: 1fr; }
  .split-art { order: -1; }
  .realm { grid-template-columns: 56px 1fr; }
  .steps { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .cards.guides { grid-template-columns: repeat(2, 1fr); }
  .bosses { grid-template-columns: repeat(2, 1fr); }
  .finale-inner { grid-template-columns: 1fr; text-align: center; }
  .finale-skin { max-height: 300px; }
  .finale .hero-ctas { justify-content: center; }
  .fieldguide { overflow-x: auto; }
  .fieldguide table { min-width: 560px; }
}
