/* ---------- Tokens: Golden hour ---------- */
:root {
  --bg: #fff6ee;
  --bg-alt: #f8ecf4;
  --surface: #ffffff;
  --text: #2d2140;
  --muted: #64587a;
  --line: #ecdbe4;
  --pop: #d0507a;
  --peach: #f08a6a;
  --lilac: #9a7cb6;
  --glow: #ffcf6b;

  --accent-trail: #3f8a5a;
  --accent-river: #1f8796;
  --accent-snow: #4a78b8;
  --accent-dirt: #c0623a;
  --accent-sail: #3a56a0;
  --accent-surf: #cc4a74;
  --accent-wind: #7552b8;

  --sky: linear-gradient(#ffb38a 0%, #f7a1a8 38%, #c9a3d9 72%, #a9c9dc 100%);
  --sun: #ffe3a8;
  --ridge-fill-1: #9a7cb6;
  --ridge-fill-2: #6c6a9e;
  --ridge-fill-3: #45557f;

  --radius: 22px;
  --shadow: 0 1px 2px rgb(45 33 64 / .05), 0 12px 32px -14px rgb(45 33 64 / .18);
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: 1.05; margin: 0 0 .5em; letter-spacing: -.025em; }
h1 { font-size: clamp(2.6rem, 6.4vw, 4.8rem); }
h1 em { font-style: normal; color: var(--pop); }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: 1.45rem; letter-spacing: -.015em; }
p { margin: 0 0 1em; }

.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { max-width: 720px; }
.prose { max-width: 720px; }
.prose p:not(.eyebrow) { color: var(--muted); }
.center { text-align: center; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 101; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--pop); outline-offset: 3px; border-radius: 6px; }

.eyebrow { font-family: var(--font-display); font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--pop); margin-bottom: .75em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 14px 26px; border-radius: 999px;
  font-weight: 600; text-decoration: none; transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--peach); color: var(--text); }
.btn-primary:hover { box-shadow: 0 10px 26px -8px color-mix(in srgb, var(--peach) 75%, transparent); }
.btn-secondary { background: var(--lilac); color: #fff; }
.btn-secondary:hover { box-shadow: 0 10px 26px -8px color-mix(in srgb, var(--lilac) 75%, transparent); }

/* ---------- Header ---------- */
/* <site-header> and <site-footer> (js/components.js) only wrap the real header and footer */
site-header, site-footer { display: contents; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent; transition: background .35s, border-color .35s;
}
/* Clear over the sky at the top; a soft frosted bar once you scroll */
.site-header.scrolled {
  background: rgb(255 246 238 / .72);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: rgb(236 219 228 / .7);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em; }
.brand-name { line-height: 1; }
.brand-name small { display: block; margin-top: 3px; font-family: var(--font-body); font-size: .62rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.site-nav { display: flex; gap: 28px; }
.site-nav a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: .95rem; transition: color .2s; }
.site-nav a:hover { color: var(--pop); }

.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; padding: 12px 10px; cursor: pointer; flex-direction: column; justify-content: space-around; }
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px; display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 0; font-size: 1.05rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: min(88vh, 760px);
  margin-top: -65px;
  padding: calc(clamp(56px, 10vh, 120px) + 65px) 0 300px;
  background: var(--sky);
}
.hero-content { position: relative; z-index: 1; }
.hero .lede { max-width: 580px; font-size: 1.15rem; color: #4a3a5e; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* The sun sits outside the landscape SVG so it is never cropped by it */
.sun {
  position: absolute; right: 16%; bottom: calc(58% + 12px);
  width: clamp(72px, 9vw, 128px); aspect-ratio: 1; border-radius: 50%;
  background: var(--sun); box-shadow: 0 0 60px rgb(255 227 168 / .8);
}
.hero-art { position: absolute; inset: auto 0 0 0; width: 100%; height: 58%; }
.ridge-1 { fill: var(--ridge-fill-1); opacity: .75; }
.ridge-2 { fill: var(--ridge-fill-2); }
.ridge-3 { fill: var(--ridge-fill-3); }
.river { fill: none; stroke: var(--sun); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 2 9; }
.lamp-post { fill: var(--glow); stroke: var(--text); stroke-width: 2; stroke-linecap: round; }
.lamp-glow { fill: var(--glow); opacity: .4; animation: flicker 5s ease-in-out infinite; }
.lamp:nth-child(2) .lamp-glow { animation-delay: -1.7s; }
.lamp:nth-child(3) .lamp-glow { animation-delay: -3.1s; }
.lamp:nth-child(4) .lamp-glow { animation-delay: -.8s; }
.fog { fill: transparent; }
@keyframes flicker { 0%, 100% { opacity: .4; } 45% { opacity: .52; } 55% { opacity: .32; } }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 10vw, 120px) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head p:last-child, .narrow p { color: var(--muted); }

/* ---------- Game cards ---------- */
/* Columns always divide the number of featured cards, so no card sits alone
   on its last row: 4 cards go 2 x 2, 6 go 3 x 2 or 2 x 3. Cards stay wide
   enough that their text never feels cramped. */
.games-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 600px) {
  .games-grid:is(.count-2, .count-4, .count-6, .count-8) { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .games-grid:is(.count-3, .count-6, .count-9) { grid-template-columns: repeat(3, 1fr); }
}
.game-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.game-art {
  width: 76px; height: 76px; border-radius: 18px; padding: 12px; margin-bottom: 20px;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.badge {
  position: absolute; top: 28px; right: 28px;
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.game-tag { font-size: .85rem; font-weight: 600; color: var(--accent); margin-top: -.3em; }
.game-desc { color: var(--muted); flex: 1; }
.store-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.store {
  font-size: .85rem; font-weight: 600; text-decoration: none; padding: 9px 16px; border-radius: 999px;
  background: var(--accent); color: #fff;
  transition: box-shadow .25s, transform .25s;
}
.store:hover { transform: translateY(-1px); box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 60%, transparent); }
.store-quiet { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.store-quiet:hover { box-shadow: none; background: color-mix(in srgb, var(--accent) 22%, transparent); }
.card-link { text-decoration: none; }
.card-link:hover { color: var(--accent); }

.more-card { grid-column: 1 / -1; background: transparent; border-style: dashed; box-shadow: none; }
.more-card p { color: var(--muted); }
.more-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.more-list li { display: flex; align-items: center; gap: 12px; }
.more-art { flex: none; width: 44px; height: 44px; padding: 8px; border-radius: 12px; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.more-list strong { display: block; font-size: .95rem; line-height: 1.2; }
.more-list small { display: block; font-size: .8rem; color: var(--muted); line-height: 1.3; }

/* ---------- Approach ---------- */
.zen-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: center; }
.zen-grid > div > p { color: var(--muted); }
.principles { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; }
.principles li { padding-left: 28px; position: relative; color: var(--muted); }
.principles li::before { content: ""; position: absolute; left: 0; top: .55em; width: 12px; height: 12px; border-radius: 50%; background: var(--pop); }
.principles strong { color: var(--text); }

.breathe { position: relative; aspect-ratio: 1; max-width: 360px; width: 100%; margin-inline: auto; display: grid; place-items: center; }
.breathe-core { position: absolute; border-radius: 50%; }
.breathe-core {
  inset: 22%;
  background: radial-gradient(circle at 35% 30%, #ffe3a8, #f7a1a8 55%, #c9a3d9);
  box-shadow: 0 0 70px rgb(247 161 168 / .55);
  animation: breathe 10s ease-in-out infinite;
}
.breathe-label { position: relative; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; margin: 0; }
.breathe-label span { position: absolute; left: 50%; transform: translate(-50%, -50%); white-space: nowrap; animation: fade 10s ease-in-out infinite; }
.breathe-label .out { animation-delay: -5s; }
@keyframes breathe { 0%, 100% { transform: scale(.7); } 50% { transform: scale(1.25); } }
@keyframes fade { 0%, 45% { opacity: 1; } 50%, 95% { opacity: 0; } 100% { opacity: 1; } }

@media (max-width: 860px) {
  .zen-grid { grid-template-columns: 1fr; gap: 40px; }
  .breathe { max-width: 260px; }
}
/* ---------- Visual snippets (cropped moments) ---------- */
.snippets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (min-width: 760px) { .snippets { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.snippet { margin: 0; position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 4 / 5; }
.snippet img { width: 100%; height: 100%; object-fit: cover; object-position: center 70%; }
.snippet figcaption {
  position: absolute; left: 10px; bottom: 10px; padding: 5px 11px; border-radius: 999px;
  font-size: .8rem; font-weight: 600; background: rgb(255 255 255 / .88); color: var(--text);
}
/* ---------- Text pages (privacy) ---------- */
/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: center; }
.about-art { width: 100%; max-width: 360px; height: auto; margin-inline: auto; }
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
}

.page { padding: clamp(56px, 8vw, 96px) 0; }
.page h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.page h2 { font-size: 1.5rem; margin-top: 2em; }
.page p, .page li { color: var(--muted); }
.page ul { padding-left: 1.2em; }
.page .updated { font-size: .9rem; }
.support-contact { margin: 28px 0 8px; padding: 24px 26px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.support-contact h2 { margin-top: 0; }
.page-links { margin-top: 20px; font-size: .92rem; color: var(--muted); }
.page-links a { color: inherit; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0; font-size: .9rem; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-inner p { margin: 0; }
.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { color: var(--pop); }

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

@media (max-width: 600px) {
  .hero { min-height: 0; padding-bottom: 230px; }
  .hero-art { height: 200px; }
  .sun { right: 10%; bottom: 150px; width: 64px; }
  .badge { position: static; align-self: flex-start; order: -1; margin-bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .breathe-label .out { display: none; }
}
