/* Alice & Ody — marketing + support site.
   Palette values are lifted from the game (GrassPalette.swift, MenuScene.swift); see web/README.md.
   No JS, no build step. */

/* Fallback faces, self-hosted (SIL OFL). Apple devices use the real Noteworthy / Avenir Next the
   game itself uses, so these are only fetched by browsers that lack them. */
@font-face {
  font-family: "Caveat Brush";
  src: url("fonts/caveat-brush-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Nunito Sans";
  src: url("fonts/nunito-sans-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --font-display: "Noteworthy", "Bradley Hand", "Caveat Brush", "Segoe Print", cursive;
  --font-body: "Avenir Next", "Nunito Sans", -apple-system, system-ui, "Segoe UI", sans-serif;

  /* Story button / brand greens */
  --green-brand: #3b7d2b;   /* GrassPalette.day.gradientBottom (also LaunchBackground) */
  --green-light: #52993d;   /* day.gradientTop */
  --green-btn: #2e6b2e;
  --green-stroke: #59bf59;

  --gold: #ffd64d;
  --orange: #f29e1f;
  --purple: #9e85e6;
  --blue: #73b8d9;
  --panel: #1f1f24;

  --text: #fff;
  --text-soft: rgba(255, 255, 255, 0.82);
  --text-dim: rgba(255, 255, 255, 0.62);

  --card-fill: rgba(0, 0, 0, 0.28);
  --card-stroke: rgba(255, 255, 255, 0.15);

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

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--green-brand);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
  background: var(--green-brand);
  overflow-x: hidden;
}

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.18), 0 6px 18px rgba(0, 0, 0, 0.25);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(20, 50, 16, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.site-header .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.7rem;
  text-decoration: none;
  white-space: nowrap;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
}
.site-nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--text-soft);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.site-nav a:hover, .site-nav a:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
@media (max-width: 720px) {
  .wordmark { font-size: 1.4rem; }
  .site-nav a { padding: 6px 9px; font-size: 0.85rem; }
}

/* ---------- Bands: each section is one of the game's four real grass palettes ---------- */

.band {
  --top: #52993d;
  --bottom: #3b7d2b;
  --next: #52993d;
  --blade-light: rgba(102, 173, 77, 0.55);
  --blade-dark: rgba(43, 102, 33, 0.55);
  --fleck: rgba(255, 242, 140, 0.9);
  position: relative;
  isolation: isolate;
  padding: 96px 0 150px;
  background: linear-gradient(to bottom, var(--top), var(--bottom));
  scroll-margin-top: var(--header-h);
}
.band.golden {
  --top: #996b24; --bottom: #57421a; --next: #1a3838;
  --blade-light: rgba(219, 153, 51, 0.55);
  --blade-dark: rgba(51, 43, 26, 0.55);
  --fleck: rgba(255, 204, 102, 0.9);
}
.band.moonlit {
  --top: #1a3838; --bottom: #0f262b; --next: #1c214d;
  --blade-light: rgba(77, 128, 117, 0.55);
  --blade-dark: rgba(13, 41, 41, 0.55);
  --fleck: rgba(230, 237, 250, 0.9);
}
.band.aurora {
  --top: #1c214d; --bottom: #0f1230; --next: #52993d;
  --blade-light: rgba(71, 153, 133, 0.55);
  --blade-dark: rgba(23, 26, 61, 0.55);
  --fleck: rgba(204, 199, 250, 0.9);
}
.band.day-again { --next: #3b7d2b; }

/* Grass: slanted blades (light + dark) plus soft bokeh blobs, all CSS, echoing TextureFactory.drawGrass. */
.band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.07) 0 90px, transparent 91px),
    radial-gradient(circle at 82% 30%, rgba(0, 0, 0, 0.10) 0 130px, transparent 131px),
    radial-gradient(circle at 64% 74%, rgba(255, 255, 255, 0.06) 0 110px, transparent 111px),
    radial-gradient(circle at 24% 86%, rgba(0, 0, 0, 0.09) 0 80px, transparent 81px),
    radial-gradient(circle at 92% 88%, rgba(255, 255, 255, 0.05) 0 70px, transparent 71px),
    radial-gradient(circle at 18% 44%, var(--fleck) 0 3px, transparent 4px),
    radial-gradient(circle at 71% 12%, var(--fleck) 0 3px, transparent 4px),
    radial-gradient(circle at 46% 58%, var(--fleck) 0 2.5px, transparent 3.5px),
    radial-gradient(circle at 88% 64%, var(--fleck) 0 3px, transparent 4px),
    radial-gradient(circle at 33% 92%, var(--fleck) 0 2.5px, transparent 3.5px),
    repeating-linear-gradient(101deg, transparent 0 21px, var(--blade-light) 21px 22.5px, transparent 22.5px 47px),
    repeating-linear-gradient(79deg, transparent 0 33px, var(--blade-dark) 33px 34.5px, transparent 34.5px 71px);
}
/* Soft hand-off into the next band's top colour, so the day -> night arc reads as one long sky. */
.band::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 140px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--next));
}

.section-head { margin-bottom: 40px; }
.section-head h2 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
}
.section-head p {
  margin: 12px 0 0;
  max-width: 640px;
  color: var(--text-soft);
  font-size: 1.15rem;
}

/* Hover-revealed permalink "#" on every section heading */
.section-head h2 a, .legal h2 a {
  color: inherit;
  text-decoration: none;
}
.section-head h2 a::after, .legal h2 a::after {
  content: "#";
  margin-left: 0.35em;
  font-size: 0.6em;
  color: var(--gold);
  opacity: 0;
  transition: opacity 0.15s;
}
.section-head h2:hover a::after,
.section-head h2 a:focus-visible::after,
.legal h2:hover a::after,
.legal h2 a:focus-visible::after { opacity: 0.9; }
@media (hover: none) {
  .section-head h2 a::after, .legal h2 a::after { opacity: 0.55; }
}
/* The section a link just jumped to announces itself. */
.band:target .section-head h2 a { color: var(--gold); }

/* ---------- Cards & buttons (the game's translucent-panel look) ---------- */

.card {
  background: var(--card-fill);
  border: 1px solid var(--card-stroke);
  border-radius: 22px;
  padding: 26px;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
  color: #fff;
  background: var(--green-btn);
  border: 2px solid var(--green-stroke);
  border-radius: 16px;
  padding: 12px 22px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}
.btn:hover, .btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.3);
  background: #367a36;
}
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3); }
.btn.gold { background: #6b571a; border-color: var(--gold); }
.btn.gold:hover, .btn.gold:focus-visible { background: #7d651e; }
.btn.orange { background: var(--orange); border-color: #ffe080; color: #2a1a00; text-shadow: none; }
.btn.orange:hover, .btn.orange:focus-visible { background: #f7ab37; }

.pill {
  display: inline-block;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  color: #14300f;
  background: var(--gold);
}

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* ---------- Phone frame ---------- */

.phone {
  position: relative;
  width: 100%;
  aspect-ratio: 1320 / 2868;
  border-radius: 13% / 6%;
  padding: 3.2%;
  background: linear-gradient(145deg, #3a3a40, #101013 45%, #2a2a2f);
  box-shadow:
    0 0 0 1.5px rgba(255, 255, 255, 0.18) inset,
    0 24px 50px rgba(0, 0, 0, 0.45),
    0 6px 14px rgba(0, 0, 0, 0.3);
}
.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10.5% / 4.9%;
  background: #000;
}

/* ---------- Hero ---------- */

.hero { padding-top: 72px; padding-bottom: 170px; }
.hero .wrap > * { min-width: 0; }
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(3.6rem, 9vw, 6.6rem);
  letter-spacing: -0.01em;
}
.hero .tagline {
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  font-weight: 800;
  margin: 26px 0 6px;
}
.hero .subtitle {
  color: var(--gold);
  font-weight: 800;
  font-size: 1.15rem;
  margin: 0 0 22px;
}
.hero .promo {
  max-width: 520px;
  color: var(--text-soft);
  margin: 0 0 30px;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.store-soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 16px;
  background: #000;
  border: 2px solid rgba(255, 255, 255, 0.35);
  font-weight: 800;
}
.store-soon small { display: block; font-weight: 600; font-size: 0.72rem; opacity: 0.75; line-height: 1.1; }
.store-soon span { line-height: 1.15; }

.hero-phones {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 10px 0;
}
.hero-phones .phone { width: min(280px, 58%); }
.hero-phones .phone:nth-child(1) { transform: rotate(-5deg) translateX(14%); z-index: 2; }
.hero-phones .phone:nth-child(2) { transform: rotate(6deg) translate(-14%, 8%); }

@media (max-width: 860px) {
  .hero { padding-top: 40px; padding-bottom: 140px; }
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero h1 { font-size: clamp(2.6rem, 12.5vw, 5rem); }
  .hero .promo { margin-left: auto; margin-right: auto; }
  .cta-row { justify-content: center; }
  .hero-phones { order: 2; margin-top: 12px; }
}

/* ---------- Cast ---------- */

.cast-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.cast-card { text-align: center; padding-top: 18px; }
.cast-card img.portrait {
  width: 150px;
  margin: 0 auto 6px;
  filter: drop-shadow(0 12px 8px rgba(0, 0, 0, 0.3));
  transition: transform 0.25s cubic-bezier(.3, 1.6, .5, 1);
}
.cast-card:hover img.portrait { transform: translateY(-6px) rotate(-3deg); }
.cast-card h3 { font-size: 2rem; margin: 6px 0 8px; }
.cast-card .pill { margin-bottom: 12px; }
.cast-card p { margin: 0; color: var(--text-soft); font-size: 1rem; }

.raccoon-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 26px;
  align-items: center;
  margin-top: 4px;
  background: rgba(0, 0, 0, 0.36);
}
.raccoon-card img { width: 130px; filter: drop-shadow(0 10px 8px rgba(0, 0, 0, 0.3)); }
.raccoon-card h3 { font-size: 1.9rem; margin-bottom: 6px; }
.raccoon-card p { margin: 0; color: var(--text-soft); }

@media (max-width: 860px) {
  .cast-grid { grid-template-columns: 1fr; }
  .cast-card { display: grid; grid-template-columns: 110px 1fr; gap: 6px 20px; text-align: left; align-items: center; }
  .cast-card img.portrait { width: 110px; grid-row: 1 / span 3; margin: 0; }
  .cast-card h3 { margin: 0; }
  .cast-card .pill { justify-self: start; margin: 0; }
}
@media (max-width: 520px) {
  .raccoon-card { grid-template-columns: 1fr; text-align: center; }
  .raccoon-card img { margin: 0 auto; }
}

/* ---------- Features ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.feature-grid li { padding: 22px 22px 22px 68px; position: relative; font-size: 1.02rem; }
.feature-grid li strong { display: block; font-size: 1.12rem; margin-bottom: 2px; }
.feature-grid li span { color: var(--text-soft); }
.feature-grid li::before {
  content: "";
  position: absolute;
  left: 20px; top: 22px;
  width: 32px; height: 32px;
  background: linear-gradient(to bottom, #ffe05c, #f2a81f);
  /* the game's 5-point star (TextureFactory.starTexture) */
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

/* ---------- Screenshots ---------- */

.shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px 34px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.shots li { margin: 0; }
.shots li:nth-child(3n + 2) { margin-top: 48px; }
.shots figure { margin: 0; }
.shots .phone { max-width: 300px; margin: 0 auto; }
.shots figcaption {
  max-width: 300px;
  margin: 18px auto 0;
  text-align: center;
  color: var(--text-soft);
  font-size: 0.98rem;
  line-height: 1.4;
}
.shots figcaption strong { display: block; color: #fff; font-size: 1.05rem; }

@media (max-width: 900px) {
  /* one swipeable rail */
  .shots {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 6px 24px 22px;
    margin: 0 -24px;
    -webkit-overflow-scrolling: touch;
  }
  .shots li, .shots li:nth-child(3n + 2) { flex: 0 0 min(72vw, 270px); margin-top: 0; scroll-snap-align: center; }
}

/* ---------- Parents ---------- */

.promise-badges {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 34px;
}
.promise-badges div {
  text-align: center;
  padding: 22px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.07);
  border: 2px solid var(--gold);
}
.promise-badges b {
  display: block;
  font-family: var(--font-display);
  font-size: 2.3rem;
  line-height: 1;
  color: var(--gold);
}
.promise-badges span { display: block; margin-top: 6px; font-weight: 800; letter-spacing: 0.02em; }
.promise-copy { max-width: 720px; }
.promise-copy p { margin: 0 0 16px; color: var(--text-soft); }
.promise-copy p:first-child { color: #fff; font-size: 1.25rem; font-weight: 700; }
.coins-note { margin-top: 30px; max-width: 720px; font-size: 0.98rem; }
.coins-note h3 { font-size: 1.5rem; margin-bottom: 6px; }
.coins-note p { margin: 0; color: var(--text-soft); }
@media (max-width: 720px) { .promise-badges { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Support / Privacy ---------- */

.support-card {
  max-width: 720px;
  padding: 34px;
  background: rgba(0, 0, 0, 0.34);
  border: 2px solid var(--green-stroke);
  border-radius: 26px;
}
.support-card p { margin: 0 0 20px; color: var(--text-soft); }
.support-card .email {
  display: inline-block;
  margin-top: 4px;
  font-weight: 800;
  word-break: break-all;
}
#support:target .support-card {
  border-color: var(--gold);
  box-shadow: 0 0 0 5px rgba(255, 214, 77, 0.28);
}
.privacy-blurb { max-width: 720px; }
.privacy-blurb .lead { font-family: var(--font-display); font-weight: 700; font-size: 2rem; line-height: 1.15; margin: 0 0 12px; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.2); }
.privacy-blurb p { margin: 0 0 22px; color: var(--text-soft); }
#privacy:target .card { border-color: var(--gold); box-shadow: 0 0 0 5px rgba(255, 214, 77, 0.28); }

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  background: linear-gradient(to bottom, #3b7d2b, #24501b);
  padding: 56px 0 44px;
  text-align: center;
}
.site-footer .mouse {
  width: 64px;
  margin: 0 auto 10px;
  filter: drop-shadow(0 6px 5px rgba(0, 0, 0, 0.3));
}
.site-footer p { margin: 0 0 8px; color: var(--text-soft); }
.site-footer .made {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: #fff;
  max-width: 560px;
  margin: 0 auto 16px;
  line-height: 1.25;
}
.footer-links { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin: 18px 0; }
.footer-links a { font-weight: 700; }
.site-footer small { color: var(--text-dim); }

/* ---------- Legal page (privacy.html) ---------- */

.legal { padding: 72px 0 110px; min-height: calc(100vh - var(--header-h)); }
.legal .doc { max-width: 720px; }
.legal h1 { font-size: clamp(2.6rem, 6vw, 4rem); margin-bottom: 8px; }
.legal .effective { color: var(--text-dim); margin: 0 0 30px; }
.legal h2 { font-size: 2rem; margin: 40px 0 10px; scroll-margin-top: calc(var(--header-h) + 12px); }
.legal p, .legal li { color: var(--text-soft); }
.legal p { margin: 0 0 14px; }
.legal ul { padding-left: 1.2em; margin: 0 0 14px; }
.legal li { margin-bottom: 8px; }
.legal strong { color: #fff; }
.legal .lead { font-size: 1.3rem; color: #fff; }
.legal .doc { background: var(--card-fill); border: 1px solid var(--card-stroke); border-radius: 26px; padding: 36px 40px 28px; }
.legal .doc h1 + .effective + .lead { margin-top: 0; }
@media (max-width: 600px) { .legal .doc { padding: 26px 22px 18px; } }

/* ---------- Layout utilities (kept out of inline style="…" so the CSP needs no 'unsafe-inline') ---------- */

.mt-28 { margin-top: 28px; }
#support.band { padding-bottom: 60px; }
.day-again#privacy { padding-top: 24px; }

/* ---------- Scroll-driven reveal (progressive enhancement; everything is visible without it) ---------- */

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 45%;
    }
    @keyframes rise {
      from { opacity: 0; transform: translateY(34px); }
      to { opacity: 1; transform: none; }
    }
  }
}
