/* ==========================================================================
   GeoGuru — shared styles
   Playful / clean "Duolingo-ish" system: cream canvas, chunky 3D buttons,
   rounded cards, three game accent colors (blue / green / pink).
   ========================================================================== */

:root {
  --cream:      #FAF6EF;
  --cream-2:    #F3EDE1;
  --card:       #FFFFFF;
  --line:       #EAE3D6;

  --ink:        #1B1830;
  --muted:      #6E6A82;

  --purple:     #7C4DFF;
  --purple-dk:  #5B2CE0;
  --purple-lt:  #EFE9FF;

  --blue:       #4C7DF0;
  --blue-dk:    #3560CE;
  --blue-lt:    #E7EEFE;

  --green:      #22A45D;
  --green-dk:   #178046;
  --green-lt:   #E2F4EA;

  --pink:       #EF5573;
  --pink-dk:    #CF3757;
  --pink-lt:    #FDE7EC;

  --amber:      #F2A63B;
  --amber-lt:   #FDF0DC;

  --r-sm: 14px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-xl: 36px;

  --wrap: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Nunito", ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0 0 .4em;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h1 { font-size: clamp(2.3rem, 6vw, 4rem); }
h2 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em; }

a { color: var(--purple); text-decoration: none; font-weight: 700; }
a:hover { text-decoration: underline; }

/* height:auto is required — without it the width/height HTML attributes give the
   image a definite height, which makes `aspect-ratio` below a no-op. */
img { max-width: 100%; height: auto; display: block; }

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

.center { text-align: center; }

.eyebrow {
  display: inline-block;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.lead {
  font-size: clamp(1.05rem, 2.1vw, 1.28rem);
  color: var(--muted);
  font-weight: 600;
  max-width: 620px;
}
.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Chunky 3D buttons ------------------------------------------- */

.btn {
  --c:  var(--purple);
  --cd: var(--purple-dk);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 30px;
  border: 0;
  border-radius: 18px;
  background: var(--c);
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: 0 5px 0 var(--cd);
  transition: transform .08s ease, box-shadow .08s ease, filter .15s ease;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.05); text-decoration: none; }
.btn:active {
  transform: translateY(5px);
  box-shadow: 0 0 0 var(--cd);
}
.btn svg { flex: none; }

.btn--blue  { --c: var(--blue);  --cd: var(--blue-dk); }
.btn--green { --c: var(--green); --cd: #17804A; }
.btn--pink  { --c: var(--pink);  --cd: var(--pink-dk); }

.btn--ghost {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 5px 0 var(--line);
}
.btn--ghost:active { box-shadow: 0 0 0 var(--line); }

.btn--soft {
  background: var(--cream-2);
  color: var(--muted);
  box-shadow: 0 5px 0 #E2DACB;
  cursor: default;
}
.btn--soft:active { transform: none; box-shadow: 0 5px 0 #E2DACB; }
.btn--soft:hover  { filter: none; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.center .btn-row { justify-content: center; }

.store-btn { padding: 14px 26px; text-align: left; line-height: 1.15; }
.store-btn small {
  display: block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .8;
}
.store-btn strong { font-size: 1.12rem; font-weight: 900; }

/* ---------- Pills & chips ------------------------------------------------ */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--purple-lt);
  color: var(--purple-dk);
  font-size: .88rem;
  font-weight: 800;
}
.pill--green { background: var(--green-lt); color: var(--green); }
.pill--blue  { background: var(--blue-lt);  color: var(--blue-dk); }
.pill--pink  { background: var(--pink-lt);  color: var(--pink-dk); }
.pill--amber { background: var(--amber-lt); color: #B87413; }

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

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 239, .86);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-head.is-stuck { border-bottom-color: var(--line); }

.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--purple);
  letter-spacing: -0.03em;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand svg,
.brand img { width: 34px; height: 34px; flex: none; }
/* apple-touch-icon.png ships with opaque square corners (iOS masks it itself),
   so round it here to match how the icon reads on the stores. */
.brand img { border-radius: 22%; }

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 28px;
}
/* scoped to .nav-link, not `.nav a` — the latter is (0,1,1) and would beat
   `.btn`'s (0,1,0) white, turning the nav button's label muted grey. */
.nav .nav-link {
  color: var(--muted);
  font-weight: 800;
  font-size: .98rem;
}
.nav .nav-link:hover { color: var(--ink); text-decoration: none; }
.nav .btn { padding: 11px 20px; font-size: .95rem; border-radius: 14px; }

@media (max-width: 820px) {
  .nav .nav-link { display: none; }
}

/* ---------- Sections ----------------------------------------------------- */

section { position: relative; }

.sec {
  padding: clamp(64px, 9vw, 118px) 0;
}
.sec--tint { background: var(--cream-2); }

/* soft blobs in the background */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .5;
  pointer-events: none;
  z-index: 0;
}

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

.hero {
  position: relative;
  padding: clamp(40px, 6vw, 76px) 0 clamp(56px, 8vw, 96px);
  overflow: hidden;
}
.hero .wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: center;
}
.hero h1 span { color: var(--purple); }

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 0;
  list-style: none;
  padding: 0;
}
.hero-badges li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .95rem;
  font-weight: 700;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 15px;
}

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero .btn-row, .hero-badges { justify-content: center; }
  .hero .eyebrow { margin-inline: auto; }
}

/* ---------- Phone mockups ------------------------------------------------ */

.phone {
  position: relative;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  border-radius: 44px;
  padding: 10px;
  background: #191628;
  box-shadow:
    0 2px 0 rgba(255,255,255,.18) inset,
    0 30px 60px -22px rgba(27, 24, 48, .45),
    0 8px 20px -10px rgba(27, 24, 48, .3);
}
.phone::after {           /* speaker notch */
  content: "";
  position: absolute;
  top: 20px; left: 50%;
  transform: translateX(-50%);
  width: 86px; height: 22px;
  background: #191628;
  border-radius: 999px;
  z-index: 2;
}
.phone img {
  border-radius: 35px;
  width: 100%;
  aspect-ratio: 1179 / 2377;
  object-fit: cover;
  object-position: top center;
  background: var(--cream);
}
.phone--tall img { aspect-ratio: 1179 / 2520; }

.phone--float { animation: float 6s ease-in-out infinite; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

@media (prefers-reduced-motion: reduce) {
  .phone--float { animation: none; }
  html { scroll-behavior: auto; }
}

/* floating sticker chips around the hero phone.
   hero-art is clamped to the phone's own width so the chips' percentage
   offsets are relative to the phone, not to the (much wider) grid column —
   otherwise they drift into empty space and clip at narrow viewports. */
.hero-art {
  position: relative;
  width: 100%;
  max-width: 300px;
  margin-inline: auto;
}
.sticker {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #fff;
  border-radius: 16px;
  font-weight: 900;
  font-size: .95rem;
  box-shadow: 0 8px 20px -8px rgba(27,24,48,.28);
  z-index: 3;
  white-space: nowrap;
}
/* one chip per game, colour-matched, roughly level with its card on screen */
.sticker--1 { top: 25%; left:  -30%; color: var(--blue-dk); animation: float 5s   ease-in-out infinite; }
.sticker--2 { top: 50%; right: -30%; color: var(--green);   animation: float 6.5s ease-in-out .6s infinite; }
.sticker--3 { top: 75%; left:  -24%; color: var(--pink-dk); animation: float 5.6s ease-in-out .3s infinite; }
@media (prefers-reduced-motion: reduce) { .sticker { animation: none; } }
/* below this the phone has no side room left for chips to hang off */
@media (max-width: 700px) { .sticker { display: none; } }

/* ---------- Game cards --------------------------------------------------- */

.games {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-top: 52px;
}
@media (max-width: 900px) { .games { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; } }

.game {
  --c: var(--blue);
  --cl: var(--blue-lt);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 26px 30px;
  box-shadow: 0 6px 0 var(--line);
  transition: transform .18s ease, box-shadow .18s ease;
}
.game:hover { transform: translateY(-5px); box-shadow: 0 11px 0 var(--line); }
.game--green { --c: var(--green); --cl: var(--green-lt); }
.game--pink  { --c: var(--pink);  --cl: var(--pink-lt); }

.game-ico {
  width: 62px; height: 62px;
  display: grid; place-items: center;
  border-radius: 18px;
  background: var(--cl);
  font-size: 30px;
  margin-bottom: 18px;
}
.game h3 { color: var(--c); }
.game p { color: var(--muted); font-weight: 600; margin: 0 0 18px; font-size: 1rem; }
.game .shot {
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--cream);
}
.game .shot img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: top center;
}

/* ---------- Feature grid ------------------------------------------------- */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
  margin-top: 48px;
}
.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 26px 24px;
}
.feature .ico {
  width: 50px; height: 50px;
  display: grid; place-items: center;
  border-radius: 15px;
  font-size: 24px;
  margin-bottom: 14px;
  background: var(--purple-lt);
}
.feature h3 { font-size: 1.14rem; }
.feature p { color: var(--muted); font-weight: 600; font-size: .98rem; margin: 0; }

/* ---------- Split showcase ---------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 76px);
  align-items: center;
}
.split + .split { margin-top: clamp(56px, 8vw, 100px); }
.split--flip .split-art { order: -1; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; text-align: center; }
  .split .lead { margin-inline: auto; }
  .split--flip .split-art { order: 0; }
  .split ul { text-align: left; max-width: 420px; margin-inline: auto; }
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 12px;
}
.check-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-weight: 700;
  color: var(--ink);
}
.check-list li::before {
  content: "✓";
  flex: none;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--green-lt);
  color: var(--green);
  font-size: .85rem;
  font-weight: 900;
  margin-top: 2px;
}

/* ---------- Stat strip --------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 18px;
  margin-top: 44px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 24px 18px;
  text-align: center;
}
.stat b {
  display: block;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 900;
  color: var(--purple);
  line-height: 1;
  margin-bottom: 6px;
}
.stat span { color: var(--muted); font-weight: 700; font-size: .92rem; }

/* ---------- FAQ ---------------------------------------------------------- */

.faq { max-width: 760px; margin: 44px auto 0; display: grid; gap: 14px; }
.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 4px 24px;
}
.faq summary {
  list-style: none;
  cursor: pointer;
  font-weight: 800;
  font-size: 1.06rem;
  padding: 18px 34px 18px 0;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--purple-lt);
  color: var(--purple);
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--muted); font-weight: 600; margin: 0 0 18px; font-size: 1rem; }

/* ---------- Final CTA ---------------------------------------------------- */

.cta {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--purple) 0%, #5B76FF 100%);
  color: #fff;
  border-radius: var(--r-xl);
  padding: clamp(48px, 7vw, 78px) 28px;
  text-align: center;
  margin: 0 auto;
}
.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,.86); font-weight: 600; max-width: 560px; margin: 0 auto 28px; }
.cta .btn { --c: #fff; --cd: rgba(0,0,0,.22); color: var(--purple-dk); }
.cta .btn--soft {
  --c: rgba(255,255,255,.16);
  background: rgba(255,255,255,.16);
  color: rgba(255,255,255,.9);
  box-shadow: 0 5px 0 rgba(0,0,0,.14);
}
.cta-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.22) 1.6px, transparent 1.6px);
  background-size: 26px 26px;
  opacity: .5;
  pointer-events: none;
}
.cta .wrap-inner { position: relative; z-index: 1; }

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

.site-foot {
  padding: 56px 0 44px;
  border-top: 1px solid var(--line);
  margin-top: clamp(64px, 9vw, 110px);
}
.foot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  align-items: flex-start;
  justify-content: space-between;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}
.foot-links a { color: var(--muted); font-weight: 700; font-size: .96rem; }
.foot-links a:hover { color: var(--purple); }
.foot-note { color: var(--muted); font-size: .9rem; font-weight: 600; margin: 26px 0 0; }

/* ---------- Legal / policy pages ---------------------------------------- */

.legal { padding: clamp(40px, 6vw, 72px) 0 0; }
.legal .wrap { max-width: 820px; }

.legal-head {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(28px, 4vw, 44px);
  box-shadow: 0 6px 0 var(--line);
}
.legal-head h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 12px; }
.legal-meta { color: var(--muted); font-weight: 700; font-size: .95rem; margin: 0; }

.legal-body { margin-top: 40px; }
.legal-body h2 {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  margin-top: 48px;
  scroll-margin-top: 100px;
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body h3 { font-size: 1.12rem; margin-top: 28px; }
.legal-body p, .legal-body li { color: #3B374F; font-weight: 500; }
.legal-body ul { padding-left: 22px; margin: 0 0 1em; }
.legal-body li { margin-bottom: .5em; }
.legal-body strong { font-weight: 800; color: var(--ink); }

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: .88em;
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 1px 7px;
  word-break: break-all;
}

.note {
  background: var(--purple-lt);
  border-radius: var(--r-md);
  padding: 22px 26px;
  margin: 26px 0;
}
.note p:last-child { margin-bottom: 0; }
.note--green { background: var(--green-lt); }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--card);
  margin: 24px 0;
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .96rem;
  min-width: 560px;
}
th, td {
  text-align: left;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  background: var(--cream-2);
  font-weight: 800;
  font-size: .8rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}
tbody tr:last-child td { border-bottom: 0; }
td strong { display: block; }

.toc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 24px 28px;
  margin-top: 32px;
}
.toc h2 {
  font-size: .82rem !important;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px !important;
}
.toc ol { margin: 0; padding-left: 20px; display: grid; gap: 7px; }
.toc a { font-weight: 700; }
