/* CapyHaven marketing site — palette from art/STYLE_GUIDE.md */
:root {
  --grass-light: #8fbb45;
  --grass-mid: #5e9c2a;
  --grass-dark: #3d6b18;
  --grass-lush: #6ec832;
  --cream: #f7f2e7;
  --cream-deep: #f0e6d2;
  --wood-light: #d8a870;
  --wood-mid: #b87848;
  --wood-dark: #6a4020;
  --roof: #c05030;
  --roof-dark: #782818;
  --capy-mid: #a07040;
  --capy-dark: #502010;
  --ink: #2a1810;
  --water-light: #78c8e8;
  --water-mid: #4898c8;
  --water-deep: #2060a0;
  --night: #1c2340;
  --night-deep: #12162b;
  --pink: #e878a8;
  --yellow: #f0c838;
  --red: #e85548;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
}

.pixel-font { font-family: 'Pixelify Sans', 'Nunito', sans-serif; }
.pixelated { image-rendering: pixelated; }
img.sprite { image-rendering: pixelated; }

.container { max-width: 1060px; margin: 0 auto; padding: 0 24px; }

/* ---------- Pixel panel (game-UI style) ---------- */
.panel {
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 6px;
  box-shadow: 6px 6px 0 rgba(42, 24, 16, 0.28);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 1.25rem;
  text-decoration: none;
  padding: 12px 30px;
  border: 3px solid var(--ink);
  border-radius: 6px;
  box-shadow: 0 5px 0 var(--ink);
  transition: transform .1s, box-shadow .1s;
  cursor: pointer;
}
.btn:hover { transform: translateY(2px); box-shadow: 0 3px 0 var(--ink); }
.btn:active { transform: translateY(5px); box-shadow: 0 0 0 var(--ink); }
.btn-wishlist { background: var(--yellow); color: var(--ink); }
.btn-alt { background: var(--cream); color: var(--ink); }

/* ---------- Header ---------- */
header {
  position: sticky; top: 0; z-index: 100;
  background: var(--grass-dark);
  border-bottom: 3px solid var(--ink);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 66px;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 1.5rem; color: var(--cream); text-decoration: none;
  text-shadow: 2px 2px 0 var(--ink);
}
.nav-brand img { width: 34px; height: 34px; image-rendering: pixelated; }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a {
  color: var(--cream); text-decoration: none; font-weight: 700; font-size: 0.95rem;
  opacity: 0.9;
}
.nav-links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.nav-links .btn { font-size: 1rem; padding: 6px 16px; box-shadow: 0 3px 0 var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(180deg, #bfe08a 0%, var(--grass-light) 45%, var(--grass-mid) 100%);
  padding: 80px 0 0;
  text-align: center;
  overflow: hidden;
}
.hero h1 { line-height: 0; }
.hero-logo {
  width: min(720px, 88vw);
  filter: drop-shadow(0 6px 24px rgba(42,24,16,0.25));
}
.hero .tagline {
  margin: 18px auto 0;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  font-weight: 700;
  color: var(--ink);
  max-width: 34em;
}
.hero-actions { margin-top: 30px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 14px; font-size: 0.9rem; font-weight: 700; color: rgba(42,24,16,0.65); }

.hero-scene {
  position: relative;
  margin-top: 48px;
  height: 250px;
}
.hero-scene img { position: absolute; bottom: 34px; image-rendering: pixelated; }
.hs-town   { left: 50%; transform: translateX(-50%); height: 190px; z-index: 2; }
.hs-tree-l { left: 6%;  height: 130px; z-index: 1; }
.hs-tree-r { right: 5%; height: 145px; z-index: 1; }
.hs-hut    { left: 20%; height: 105px; z-index: 2; }
.hs-farm   { right: 19%; height: 100px; z-index: 2; }
.hs-bush   { left: 36%; height: 55px; z-index: 3; }
.hs-crystal{ right: 36%; height: 55px; z-index: 3; }

/* walking capybara */
#walker {
  position: absolute; bottom: 6px; left: -80px; height: 60px; z-index: 4;
  image-rendering: pixelated;
}

.hero-ground {
  position: absolute; bottom: 0; left: 0; right: 0; height: 40px;
  background: var(--grass-dark);
  border-top: 4px solid var(--ink);
}
.hero-ground::before {
  content: "";
  position: absolute; top: -10px; left: 0; right: 0; height: 6px;
  background:
    repeating-linear-gradient(90deg, var(--grass-lush) 0 14px, transparent 14px 34px);
}

/* ---------- Sections ---------- */
section { padding: 84px 0; }
.section-title {
  font-family: 'Pixelify Sans', sans-serif;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  text-align: center;
  color: var(--ink);
  line-height: 1.15;
}
.section-title .accent { color: var(--roof); }
.section-lead {
  margin: 16px auto 0; text-align: center; max-width: 40em;
  font-size: 1.08rem; font-weight: 600; color: rgba(42,24,16,0.75);
}

/* ---------- Feature cards ---------- */
.features { background: var(--cream); }
.feature-grid {
  margin-top: 48px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 28px;
}
.feature { padding: 30px 26px; text-align: center; transition: transform .15s; }
.feature:hover { transform: translateY(-4px); }
.feature img { height: 84px; image-rendering: pixelated; margin-bottom: 16px; }
.feature h3 {
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 1.45rem; margin-bottom: 10px; color: var(--capy-dark);
}
.feature p { font-weight: 600; color: rgba(42,24,16,0.75); font-size: 0.98rem; }

/* ---------- Life section (split) ---------- */
.life { background: linear-gradient(180deg, var(--grass-light), var(--grass-mid)); }
.split { display: flex; gap: 48px; align-items: center; }
.split .text { flex: 1.2; }
.split .art { flex: 1; display: flex; justify-content: center; align-items: flex-end; gap: 18px; }
.split .art img { image-rendering: pixelated; }
.life .section-title, .life .section-lead { text-align: left; margin-left: 0; }
.life ul { margin-top: 22px; list-style: none; }
.life li {
  font-weight: 700; margin-bottom: 12px; padding-left: 34px; position: relative;
}
.life li::before {
  content: ""; position: absolute; left: 0; top: 4px;
  width: 18px; height: 18px; background: var(--yellow);
  border: 3px solid var(--ink); border-radius: 3px;
}
.life li::after {
  content: "✓"; position: absolute; left: 4px; top: 1px;
  font-weight: 900; font-size: 0.9rem; color: var(--ink);
}
.capy-family { background: rgba(247,242,231,0.55); padding: 30px 34px 20px; }
.capy-family img.big { height: 130px; }
.capy-family img.small { height: 80px; }
.capy-family .caption {
  text-align: center; font-family: 'Pixelify Sans', sans-serif;
  margin-top: 10px; font-size: 1.05rem; color: var(--ink);
}

/* ---------- Buildings gallery ---------- */
.buildings { background: var(--cream-deep); }
.building-grid {
  margin-top: 48px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 22px;
}
.building {
  padding: 22px 14px 16px; text-align: center;
  background: linear-gradient(180deg, #cfe6a0, #a8cc6a);
}
.building img { height: 92px; image-rendering: pixelated; transition: transform .15s; }
.building:hover img { transform: scale(1.08); }
.building span {
  display: block; margin-top: 10px;
  font-family: 'Pixelify Sans', sans-serif; font-size: 1.05rem; color: var(--ink);
}

/* ---------- Night section ---------- */
.night {
  background: linear-gradient(180deg, var(--night) 0%, var(--night-deep) 100%);
  color: var(--cream);
  position: relative; overflow: hidden;
}
.night .section-title { color: var(--cream); text-shadow: 3px 3px 0 rgba(0,0,0,0.5); }
.night .section-title .accent { color: var(--yellow); }
.night .section-lead { color: rgba(247,242,231,0.8); }
.night-cards {
  margin-top: 46px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 26px;
}
.night-card {
  background: rgba(247,242,231,0.07);
  border: 3px solid rgba(247,242,231,0.35);
  border-radius: 6px;
  padding: 26px; text-align: center;
}
.night-card .emoji { font-size: 2rem; }
.night-card h3 { font-family: 'Pixelify Sans', sans-serif; font-size: 1.3rem; margin: 10px 0 8px; color: var(--yellow); }
.night-card p { font-weight: 600; font-size: 0.95rem; color: rgba(247,242,231,0.85); }
.star { position: absolute; background: var(--cream); width: 4px; height: 4px; opacity: 0.8; }

/* ---------- Seasons strip ---------- */
.seasons { background: var(--cream); }
.season-grid {
  margin-top: 46px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px;
}
.season { padding: 24px; text-align: center; border-top-width: 10px; }
.season.spring { border-top-color: var(--grass-lush); }
.season.summer { border-top-color: var(--yellow); }
.season.autumn { border-top-color: #c06820; }
.season.winter { border-top-color: #9ab8c8; }
.season h3 { font-family: 'Pixelify Sans', sans-serif; font-size: 1.35rem; margin-bottom: 6px; }
.season p { font-weight: 600; font-size: 0.93rem; color: rgba(42,24,16,0.72); }

/* ---------- CTA ---------- */
.cta {
  background: linear-gradient(180deg, var(--grass-mid), var(--grass-dark));
  text-align: center;
}
.cta .panel {
  display: inline-block; padding: 50px 60px;
}
.cta h2 { font-family: 'Pixelify Sans', sans-serif; font-size: clamp(1.8rem, 4vw, 2.5rem); }
.cta p { margin: 12px 0 26px; font-weight: 700; color: rgba(42,24,16,0.75); }
.cta img { height: 90px; image-rendering: pixelated; margin-bottom: 14px; }

/* ---------- Footer ---------- */
footer {
  background: var(--ink); color: rgba(247,242,231,0.75);
  padding: 36px 0; text-align: center; font-weight: 600; font-size: 0.9rem;
}
footer a { color: var(--yellow); text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer .foot-brand {
  font-family: 'Pixelify Sans', sans-serif; font-size: 1.2rem; color: var(--cream);
  margin-bottom: 8px;
}
footer .foot-meta { margin-top: 8px; font-size: 0.8rem; opacity: 0.7; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 820px) {
  .nav-links a:not(.btn) { display: none; }
  .split { flex-direction: column; }
  .life .section-title, .life .section-lead { text-align: center; }
  .hero-scene { height: 200px; }
  .hs-town { height: 150px; }
  .hs-hut, .hs-farm { display: none; }
  .cta .panel { padding: 38px 26px; }
}
