/* Gamma Nest — soft pastel, large readable type, no external fonts.
   Mobile-first. Breakpoints: 380px (narrow phones), 600px (large phone / small tablet),
   768px (tablet), 1000px (desktop header), 1024px (tablet landscape / desktop). No JS (CSP). */
:root {
  --bg: #fdf6e7; --card: #fffdf7; --ink: #2f3b33; --muted: #55625a;
  --green: #7cc488; --green-dark: #3f6b4c; --leaf: #b9e3b1;
  --peach: #f6c9a0; --sky: #cfe8f3; --link: #2d6a8a;
  --max: 1120px;                              /* page container */
  --read: 46rem;                              /* long-form column, ~70ch */
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2rem); /* 16px on phones → 32px */
  --radius: clamp(20px, 1rem + 1vw, 32px);
  --tap: 44px;                                /* minimum tap target */
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: clamp(1rem, 0.95rem + 0.3vw, 1.125rem)/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, sans-serif;
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--link); text-underline-offset: 3px; }
a:focus-visible { outline: 3px solid var(--green-dark); outline-offset: 2px; border-radius: 6px; }
code { font-size: .95em; }

/* ---- Type ---- */
h1 { font-size: clamp(1.75rem, 1.3rem + 2.2vw, 2.75rem); line-height: 1.15; margin: 0 0 .5rem; overflow-wrap: anywhere; hyphens: auto; }
h2 { font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.55rem); line-height: 1.25; margin: 0 0 .5rem; color: var(--green-dark); }
h3 { font-size: clamp(1.08rem, 1rem + 0.35vw, 1.2rem); line-height: 1.3; margin: 0 0 .4rem; color: var(--green-dark); }
.lead { font-size: clamp(1.06rem, 1rem + 0.45vw, 1.25rem); margin: 0; }

/* ---- Containers ---- */
main, footer { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
main { padding-bottom: 2rem; }

/* ---- Header: sticky, full-bleed bar; content aligned with the page container ----
   Phones/tablets (< 1000px): brand | ☰ Menu (details) | language (details) in the top-right.
   Desktop (>= 1000px): brand | nav | language, one line ~60px. Both dropdowns share
   name="hdr", so opening one closes the other (no JS). */
.top {
  position: sticky; top: 0; z-index: 50;
  display: flex; flex-wrap: nowrap; align-items: center; gap: .5rem;
  padding: .5rem max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  background: rgba(253, 246, 231, .94);
  border-bottom: 2px solid var(--leaf);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .top { background: rgba(253, 246, 231, .82); -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2); }
}
/* Shadow + border only once the page is scrolled (scroll-driven; static border elsewhere). */
@supports (animation-timeline: scroll()) {
  .top { border-bottom-color: transparent; animation: top-raise linear both; animation-timeline: scroll(root); animation-range: 0 64px; }
  @keyframes top-raise { to { border-bottom-color: var(--leaf); box-shadow: 0 6px 18px rgba(47, 59, 51, .10); } }
}
html { scroll-padding-top: 5.5rem; }
.brand {
  display: inline-flex; align-items: center; gap: .5rem; min-height: var(--tap); margin-right: auto; min-width: 0;
  font-weight: 800; font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem); color: var(--green-dark); text-decoration: none; white-space: nowrap;
}
.brand img { width: 36px; height: 36px; display: block; flex: none; }

/* Desktop nav */
.top > nav { display: none; }
.top > nav a, .menu-panel a { color: var(--green-dark); text-decoration: none; font-weight: 700; }
.top > nav a {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 1rem;
  border-radius: 999px; white-space: nowrap; border: 2px solid transparent;
}
.top > nav a:hover { background: rgba(207, 232, 243, .75); }
.top > nav a:focus-visible, .menu-panel a:focus-visible { outline: 3px solid var(--green-dark); outline-offset: 2px; }
.top > nav a[aria-current="page"] { background: #e6f4e2; border-color: var(--leaf); color: #2c5238; }

/* Shared look of the two header buttons (<summary>) */
.menu summary, .langs summary {
  list-style: none; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; cursor: pointer;
  min-height: var(--tap); min-width: var(--tap); background: var(--card); border: 2px solid var(--leaf); border-radius: 999px;
  padding: .35rem .75rem; font-weight: 700; font-size: 1rem; color: var(--green-dark); user-select: none; -webkit-user-select: none; white-space: nowrap;
}
.menu summary::-webkit-details-marker, .langs summary::-webkit-details-marker { display: none; }
.menu summary:hover, .langs summary:hover { border-color: var(--green); }
.menu summary:focus-visible, .langs summary:focus-visible { outline: 3px solid var(--green-dark); outline-offset: 2px; }
.menu[open] summary, .langs[open] summary { background: var(--sky); border-color: var(--green); }
.menu .burger, .langs .globe, .langs .chev { width: 1.15rem; height: 1.15rem; flex: none; }

/* Dropdown panels */
.lang-menu {
  position: absolute; z-index: 60; top: calc(100% + .35rem); margin: 0; padding: .35rem;
  background: var(--card); border: 2px solid var(--leaf); border-radius: 18px; box-shadow: 0 12px 28px rgba(47, 59, 51, .16);
}
/* Phone/tablet menu (< 1000px): a full-screen overlay, still pure <details>.
   The overlay is fixed to the viewport and painted inside the header's stacking context
   (z-index -1), so the header's brand, ✕ and language button stay on top of it. */
.menu { position: static; }
.menu .m-open, .menu .m-close { display: inline-flex; align-items: center; gap: .4rem; }
.menu .m-close, .menu[open] .m-open { display: none; }
.menu[open] .m-close { display: inline-flex; }
.menu .xmark { width: 1.35rem; height: 1.35rem; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.menu-panel {
  position: fixed; inset: 0; z-index: -1; top: 0; left: 0; right: 0; bottom: 0;
  width: auto; height: 100vh; height: 100dvh; margin: 0;
  display: flex; flex-direction: column; gap: 1.5rem;
  padding: calc(62px + 1.25rem) var(--gutter) max(1.5rem, env(safe-area-inset-bottom));
  background: var(--bg); border: 0; border-radius: 0; box-shadow: none;
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  animation: menu-in .18s ease-out;
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.menu-panel nav { width: 100%; max-width: 32rem; }
.menu-panel ul { list-style: none; margin: 0; padding: 0; }
.menu-panel nav li + li { margin-top: .35rem; }
.menu-panel nav a {
  display: flex; align-items: center; min-height: 60px; padding: .4rem 1rem; border-radius: 18px;
  font-size: clamp(1.45rem, 1.2rem + 1.4vw, 1.8rem); font-weight: 800; line-height: 1.2;
}
.menu-panel nav a:hover { background: var(--sky); }
.menu-panel nav a[aria-current="page"] { background: #e6f4e2; box-shadow: inset 6px 0 0 var(--green); }
.menu-foot { margin-top: auto; padding: 1rem 1rem 0; border-top: 2px solid var(--leaf); max-width: 32rem; width: 100%; color: var(--muted); }
.menu-foot p { margin: .5rem 0 0; }
.menu-foot p a { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 600; text-decoration: underline; color: var(--link); }
/* While the menu is open: solid header (backdrop-filter would make it the containing block
   of the fixed overlay), no page scroll behind it, close button shown as "pressed". */
.top:has(.menu[open]) { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; animation: none; border-bottom-color: var(--leaf); }
@media (max-width: 999px) {
  html:has(.menu[open]) { overflow: hidden; }
}
/* Landscape phones: tighter rows so links and the footer fit, the overlay scrolls if not. */
@media (max-height: 480px) {
  .menu-panel { gap: .75rem; padding-top: calc(62px + .5rem); }
  .menu-panel nav ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem .75rem; }
  .menu-panel nav li + li { margin-top: 0; }
  .menu-panel nav a { min-height: 56px; font-size: 1.4rem; }
  .menu-panel nav { max-width: 40rem; }
  .menu-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; max-width: 40rem; padding-top: .5rem; }
  .menu-foot p { margin: 0; }
}

/* Language dropdown (no JS: <details>) */
.langs { position: relative; }
.langs .cur-name, .langs .chev { display: none; }
.langs .cur-code { letter-spacing: .03em; }
.langs .chev { transition: transform .15s ease; }
.langs[open] .chev { transform: rotate(180deg); }
.lang-menu { right: 0; list-style: none; min-width: 11rem; max-width: calc(100vw - 2 * var(--gutter)); font-size: 1rem; }
.lang-menu a { display: flex; align-items: center; gap: .6rem; min-height: var(--tap); padding: .45rem .7rem; border-radius: 12px;
  color: var(--ink); text-decoration: none; font-weight: 600; }
.lang-menu a:hover, .lang-menu a:focus-visible { background: var(--sky); outline: none; }
.lang-menu a[aria-current="page"] { background: #eaf6e8; color: var(--green-dark); }
.lang-menu .code { display: inline-grid; place-items: center; min-width: 2.1rem; padding: .1rem .3rem; border-radius: 8px;
  background: var(--leaf); color: var(--green-dark); font-size: .8rem; font-weight: 800; letter-spacing: .03em; }
.lang-menu .tick { margin-left: auto; color: var(--green-dark); font-weight: 800; }

/* Narrow phones: no chevron on the language button (the globe already says it), tighter gaps. */
@media (max-width: 399px) {
  .top { gap: .35rem; }
  .brand { gap: .35rem; font-size: 1rem; }
  .menu summary, .langs summary { padding: .35rem .6rem; gap: .3rem; }
}
@media (min-width: 600px) {
  .langs .cur-name { display: inline; }
  .langs .chev { display: block; }
  .langs .cur-code { display: none; }
}
@media (min-width: 1000px) {
  .top { gap: 1rem; }
  .brand { margin-right: 0; }
  .brand img { width: 40px; height: 40px; }
  .top > nav { display: flex; flex: 1 1 auto; justify-content: center; gap: .35rem; }
  .menu { display: none; }
}

/* ---- Hero ---- */
.hero {
  display: grid; grid-template-columns: 1fr; justify-items: center; text-align: center;
  gap: 1rem; align-items: center; background: var(--sky); border-radius: var(--radius);
  padding: clamp(1.1rem, .6rem + 2.5vw, 2.25rem); margin: 1rem 0 1.25rem;
}
.mascot, img.mascot { display: block; width: 100%; max-width: 150px; height: auto; }
.hero > div { min-width: 0; }

/* ---- Cards and bits ---- */
.card {
  background: var(--card); border: 3px solid var(--leaf); border-radius: var(--radius);
  padding: clamp(1rem, .7rem + 1.5vw, 1.5rem) clamp(1rem, .6rem + 2vw, 1.75rem); margin: 0 0 1.25rem;
}
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card > p, .card > ul { max-width: 72ch; }
.pill { display: inline-flex; align-items: center; min-height: var(--tap); background: var(--green); color: #18301f; font-weight: 700; text-decoration: none; padding: .5rem 1.2rem; border-radius: 999px; }
.pill:hover { background: #6db87a; }
.badge { display: inline-block; background: var(--peach); border-radius: 999px; padding: .4rem .9rem; font-weight: 600; margin: .25rem 0; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.checks, .islands, .contacts { padding-left: 1.25rem; }
.checks li, .contacts li { margin: .25rem 0; }
.checks li::marker { content: "✓  "; color: var(--green-dark); font-weight: 700; }
.highlight { background: #f1f9ee; }

/* ---- Long-form pages: privacy, terms, support, press ---- */
.policy, .doc { max-width: var(--read); margin: 0 auto; }
.policy h1 { margin-top: .75rem; }
.policy .meta { color: var(--muted); margin-bottom: 1.25rem; }
.doc h1 { margin-top: .75rem; }
.doc .lead { margin-bottom: 1.25rem; }
.policy ul { padding-left: 1.25rem; }
.policy li { margin: .35rem 0; }
/* Tables (none yet): wrap in <div class="table-wrap"> to scroll inside the card. */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1rem; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; vertical-align: top; padding: .5rem .6rem; border-bottom: 1px solid var(--leaf); }

/* ---- Islands ---- */
.islands-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin: 1rem 0; }
.island { border-radius: 22px; padding: 1rem 1.1rem; border: 2px solid rgba(63, 107, 76, .15); min-width: 0; }
.isl1 { background: #fde7cf; } .isl2 { background: #e3f6dc; } .isl3 { background: #dff3fa; }
.isl4 { background: #ece6fb; } .isl5 { background: #fbe3f1; } .isl-night { background: #e4e8f6; margin-top: .25rem; }
.games { list-style: none; margin: 0; padding: 0; }
.games li { padding: .45rem 0; border-top: 1px dashed rgba(63, 107, 76, .25); }
.games li:first-child { border-top: 0; }
.skill { color: var(--muted); font-size: .95em; }
.free { display: inline-block; background: var(--green); color: #18301f; font-size: .8rem; font-weight: 800; border-radius: 999px; padding: .05rem .55rem; margin-left: .35rem; vertical-align: .1em; text-transform: uppercase; letter-spacing: .03em; }

/* ---- Screenshots: 1 column on phones, 2 on tablets, 3 on desktop ---- */
.shots { display: grid; grid-template-columns: 1fr; gap: .75rem; }
.shots img { width: 100%; height: auto; display: block; border-radius: 14px; border: 2px solid var(--leaf); }

/* ---- FAQ ---- */
.faq-list { padding-top: .25rem; padding-bottom: .25rem; }
.faq { border-bottom: 2px dashed var(--leaf); }
.faq:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; font-weight: 700; min-height: var(--tap); padding: .8rem 2.25rem .8rem .2rem; position: relative; list-style: none; color: var(--green-dark); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .3rem; top: 50%; transform: translateY(-50%); font-size: 1.5rem; line-height: 1; color: var(--green-dark); }
.faq[open] summary::after { content: "−"; }
.faq summary:focus-visible { outline: 3px solid var(--green-dark); outline-offset: 2px; border-radius: 8px; }
.faq p { margin: 0 .2rem 1rem; }

/* ---- Press ---- */
.logo-row img { width: 128px; height: 128px; }
.swatches { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .75rem 1.25rem; }
.swatches li { display: flex; align-items: center; gap: .5rem; }
.swatch { width: 2.2rem; height: 2.2rem; flex: none; border-radius: 10px; border: 2px solid rgba(47, 59, 51, .2); display: inline-block; }
.sw-green { background: #7cc488; } .sw-green-dark { background: #3f6b4c; } .sw-leaf { background: #b9e3b1; }
.sw-peach { background: #f6c9a0; } .sw-sky { background: #cfe8f3; } .sw-cream { background: #fdf6e7; }

/* ---- Footer: stacked on phones, two columns from 768px ---- */
footer {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem;
  margin-top: 1rem; padding-top: 1rem; padding-bottom: 2.5rem;
  /* top rule aligned with the content, not the gutters */
  background: linear-gradient(var(--leaf), var(--leaf)) top center / calc(100% - 2 * var(--gutter)) 2px no-repeat;
  color: var(--muted); font-size: .95rem;
}
footer p { margin: 0; }
.foot-links, .foot-mail { display: flex; flex-wrap: wrap; gap: 0 .25rem; margin-left: -.5rem; }
.foot-links a, .foot-mail a { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 .5rem; border-radius: 10px; }
.foot-links a { font-weight: 600; }
.foot-mail { flex-direction: column; align-items: flex-start; }

/* ================= Breakpoints ================= */
@media (min-width: 600px) {
  .hero { grid-template-columns: minmax(130px, 200px) minmax(0, 1fr); justify-items: start; text-align: left; gap: 1.5rem; }
  .mascot, img.mascot { max-width: 200px; }
  .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logo-row img { width: 160px; height: 160px; }
}
@media (min-width: 768px) {
  .islands-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  footer { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); column-gap: 2.5rem; }
  .foot-links, .foot-copy { grid-column: 1 / -1; }
  .foot-org { grid-column: 1; }
  .foot-mail { grid-column: 2; grid-row: 2; }
}
@media (min-width: 1024px) {
  .islands-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { grid-template-columns: 220px minmax(0, 1fr); gap: 2.25rem; }
  .mascot, img.mascot { max-width: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  *, .langs .chev { transition: none !important; }
  .menu-panel { animation: none; }
}
