/* =========================================================================
   TAKE THE L — Web design system
   Matches the mobile game: warm sunburst, gold + brown, cream, chunky
   cartoon-sticker outlines, playful and bold.
   ========================================================================= */

:root {
  /* Sunburst / brand */
  --sun-gold: #f5a623;
  --sun-amber: #f47b1f;
  --sun-red: #e8531f;
  --sun-deep: #c33f16;

  /* Core game tokens */
  --gold: #ffdf83;
  --gold-deep: #ffc947;
  --brown: #8f5d0e;
  --brown-deep: #2c1810;
  --brown-darker: #1a1005;

  /* Neutrals */
  --cream: #fbf4e6;
  --cream-dim: #e9dcc4;
  --ink: #1a1109;
  --ink-soft: #2e2013;

  /* Surfaces on the warm dark theme */
  --bg-0: #23150a;
  --bg-1: #2c1810;
  --surface: #3a2415;
  --surface-2: #4a2f1b;
  --border: rgba(255, 223, 131, 0.18);
  --border-strong: rgba(255, 223, 131, 0.35);

  /* Text */
  --text-gradient: linear-gradient(120deg, var(--gold) 0%, var(--sun-gold) 45%, var(--sun-red) 100%);
  --text: #fbf4e6;
  --text-muted: #d7c3a1;
  --text-faint: #a68a63;

  /* Accents borrowed from in-game modes */
  --coins: #ffd700;
  --gems: #00e5ff;
  --xp: #69ff47;
  --danger: #ff5722;

  /* Effects */
  --outline: 3px;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --shadow-sticker: 0 6px 0 rgba(0, 0, 0, 0.35), 0 14px 30px rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 18px 50px rgba(0, 0, 0, 0.45);
  --maxw: 1120px;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ------------------------------------------------------------------ reset */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  background: var(--bg-0);
  background-image:
    radial-gradient(1200px 600px at 50% -200px, rgba(245, 166, 35, 0.22), transparent 60%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0));
  background-attachment: fixed;
  overflow-x: hidden;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-deep); }
img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ------------------------------------------------------------- typography */
h1, h2, h3, h4 { line-height: 1.05; font-weight: 900; letter-spacing: -0.5px; }

.display {
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 0.98;
  text-transform: uppercase;
}

/* Cartoon "sticker" heading: cream fill with a thick dark outline, like the logo */
.sticker-text {
  color: var(--cream);
  text-shadow:
    -2px -2px 0 var(--ink), 2px -2px 0 var(--ink),
    -2px 2px 0 var(--ink), 2px 2px 0 var(--ink),
    0 3px 0 var(--ink), 0 6px 0 rgba(0, 0, 0, 0.4),
    0 14px 26px rgba(0, 0, 0, 0.45);
}

.grad-text {
  display: inline-block;
  background: var(--text-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Gradient + sticker 3D outline — two stacked copies (filter/clip on one element breaks in Edge) */
.grad-sticker {
  position: relative;
  display: inline-block;
}

.grad-sticker__outline,
.grad-sticker__fill {
  display: block;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  line-height: inherit;
}

.grad-sticker__outline {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  color: transparent;
  pointer-events: none;
  user-select: none;
  text-shadow:
    -2px -2px 0 var(--ink), 2px -2px 0 var(--ink),
    -2px 2px 0 var(--ink), 2px 2px 0 var(--ink),
    0 3px 0 var(--ink), 0 6px 0 rgba(0, 0, 0, 0.4),
    0 14px 26px rgba(0, 0, 0, 0.45);
}

.grad-sticker__fill {
  position: relative;
  z-index: 1;
  background: var(--text-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--brown-deep);
  background: linear-gradient(120deg, var(--gold), var(--gold-deep));
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--ink);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
}

.muted { color: var(--text-muted); }
.center { text-align: center; }

/* ------------------------------------------------------------------ nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(35, 21, 10, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.nav__brand { display: flex; align-items: center; gap: 12px; font-weight: 900; }
.nav__brand img { height: 40px; width: auto; filter: drop-shadow(0 3px 4px rgba(0,0,0,0.5)); }
.nav__brand span { font-size: 17px; letter-spacing: 1px; text-transform: uppercase; }
.nav__links { display: flex; align-items: center; gap: 6px; }
.nav__links a.link {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 15px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  transition: color .15s ease, background .15s ease;
}
.nav__links a.link:hover { color: var(--text); background: rgba(255, 223, 131, 0.08); }
.nav__links a.link.active { color: var(--gold); background: rgba(255, 223, 131, 0.12); }
.nav__toggle {
  display: none;
  background: transparent;
  border: 2px solid var(--border-strong);
  color: var(--text);
  border-radius: 10px;
  width: 42px; height: 42px;
  font-size: 20px;
  cursor: pointer;
}

/* --------------------------------------------------------------- buttons */
.btn {
  --btn-a: var(--gold);
  --btn-b: var(--gold-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--btn-a), var(--btn-b));
  color: var(--brown-deep);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0.3px;
  border: var(--outline) solid var(--ink);
  box-shadow: var(--shadow-sticker);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
  text-transform: uppercase;
}
.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 0 rgba(0, 0, 0, 0.35), 0 20px 38px rgba(0, 0, 0, 0.4);
  color: var(--brown-deep);
}
.btn:active { transform: translateY(1px); box-shadow: 0 3px 0 rgba(0,0,0,0.35); }
.btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: none;
}
.btn.ghost:hover { background: rgba(255, 223, 131, 0.1); color: var(--text); }
.btn.orange { --btn-a: var(--sun-gold); --btn-b: var(--sun-red); color: var(--brown-deep); }
.btn.sm { padding: 10px 18px; font-size: 14px; }
.btn.lg { padding: 18px 36px; font-size: 18px; }
/* Ghost buttons that carry their identity in the text colour (used in the nav so
   the persistent CTAs stay quiet next to the solid in-page ones). */
.btn.ghost.ghost-gold { color: var(--gold); border-color: rgba(255, 223, 131, 0.55); }
.btn.ghost.ghost-gold:hover { color: var(--gold); background: rgba(255, 223, 131, 0.12); }
.btn.ghost.ghost-orange { color: var(--sun-gold); border-color: rgba(245, 166, 35, 0.55); }
.btn.ghost.ghost-orange:hover { color: var(--sun-gold); background: rgba(245, 166, 35, 0.14); }

/* --------------------------------------------------------------- cards */
.card {
  background: linear-gradient(160deg, var(--surface), var(--bg-1));
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-soft);
  position: relative;
}
.card--outline { border: var(--outline) solid var(--ink); }
.card__icon {
  width: 60px; height: 60px;
  display: grid; place-items: center;
  font-size: 30px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  border: 3px solid var(--ink);
  box-shadow: 0 4px 0 rgba(0,0,0,0.3);
  margin-bottom: 16px;
}
.card h3 { font-size: 21px; margin-bottom: 8px; }
.card p { color: var(--text-muted); }

.grid { display: grid; gap: 22px; }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* --------------------------------------------------- mode carousel (rail) */
.mode-carousel { position: relative; }
.mode-rail {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* Generous top/bottom room so the card shadows aren't clipped into hard
     lines (overflow-x:auto also clips the y-axis). */
  padding: 16px 6px 24px;
  scroll-padding-inline: 8px;
  /* Fade the left/right edges so cards melt out of view instead of hard-
     clipping into a boxed-off look. */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 26px,
    #000 calc(100% - 26px),
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 26px,
    #000 calc(100% - 26px),
    transparent 100%
  );
}
.mode-rail::-webkit-scrollbar { display: none; }
.mode-rail > .mode-card {
  flex: 0 0 auto;
  width: min(340px, 82vw);
  scroll-snap-align: center;
  border-left-width: 5px;
  border-left-style: solid;
  border-color: var(--border-strong);
  border-left-color: currentColor; /* overridden inline per card */
  /* No drop shadow in the rail: overflow-x:auto clips the y-axis, which would
     chop .card's soft shadow into a hard rectangle. The mask fade + coloured
     left border give the cards their definition instead. */
  box-shadow: none;
  /* Column so the playability tag can pin to the bottom; cards stretch to an
     equal height in the flex rail, so the tags line up across the row. */
  display: flex;
  flex-direction: column;
}
.mode-card > p { margin-bottom: 18px; }
/* Playability label under each mode's description. */
.mode-tag {
  margin-top: auto; /* stick to the bottom of the equal-height card */
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
}
.mode-tag--both {
  color: var(--gold);
  border-color: var(--border-strong);
  background: rgba(255, 223, 131, 0.10);
}
.mode-tag--mobile {
  color: var(--text-faint);
  background: rgba(255, 255, 255, 0.03);
}
/* Rich mode cards on the dedicated /modes page (a normal grid, not the rail). */
.mode-list-card {
  border-left-width: 5px;
  border-left-style: solid;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mode-list-card h3 { font-size: 22px; }
.mode-list-card .mode-players {
  color: var(--text-faint);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin: -4px 0 0;
}
.mode-list-card p { color: var(--text-muted); margin: 0; }
.mode-list-card .mode-tag { margin-top: auto; } /* pin to the bottom, aligned across the row */
.mode-nav {
  position: absolute;
  top: calc(50% - 12px);
  transform: translateY(-50%);
  z-index: 2;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  font-size: 28px; line-height: 1; padding-bottom: 4px;
  color: var(--ink);
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform .15s ease, opacity .2s ease;
}
.mode-nav:hover { transform: translateY(-50%) scale(1.08); }
.mode-nav:disabled { opacity: 0; pointer-events: none; }
.mode-nav--prev { left: -8px; }
.mode-nav--next { right: -8px; }
@media (max-width: 720px) {
  .mode-nav { display: none; } /* touch users swipe the rail */
}
@media (prefers-reduced-motion: reduce) {
  .mode-rail { scroll-behavior: auto; }
}

/* --------------------------------------------------------------- sections */
.section { padding: 72px 0; }
.section__head { text-align: center; max-width: 680px; margin: 0 auto 44px; }
.section__head h2 { font-size: clamp(30px, 5vw, 46px); }
.section__head p { color: var(--text-muted); font-size: 18px; margin-top: 14px; }

/* --------------------------------------------------------------- hero */
.hero { position: relative; padding: 90px 0 80px; text-align: center; overflow: hidden; }
.sunburst {
  position: absolute;
  top: -40%; left: 50%;
  width: 160vmax; height: 160vmax;
  transform: translateX(-50%);
  z-index: -1;
  background: repeating-conic-gradient(
    from 0deg at 50% 50%,
    rgba(245, 166, 35, 0.16) 0deg 9deg,
    rgba(232, 83, 31, 0.05) 9deg 18deg
  );
  -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent 72%);
  mask-image: radial-gradient(closest-side, #000 30%, transparent 72%);
  animation: spin 90s linear infinite;
  opacity: 0.9;
}
@keyframes spin { to { transform: translateX(-50%) rotate(360deg); } }

.hero__logo {
  height: clamp(120px, 22vw, 190px);
  width: auto;
  margin: 0 auto 24px;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.55));
  animation: float 5s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

.hero h1 { font-size: clamp(42px, 9vw, 92px); }
.hero .sub {
  color: var(--text-muted);
  font-size: clamp(17px, 2.4vw, 22px);
  max-width: 620px;
  margin: 22px auto 0;
}
.hero .cta { margin-top: 36px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero__get-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 28px;
  width: 100%;
}

/* --------------------------------------------------------------- store */
.price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  justify-content: center;
  margin: 10px 0 4px;
}
.price .amt { font-size: 46px; font-weight: 900; color: var(--gold); }
.price .per { color: var(--text-faint); font-weight: 700; }
.feature-list { list-style: none; margin-top: 18px; display: grid; gap: 12px; }
.feature-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-muted); }
/* "Good" rows get a green W; "bad" rows (li.bad) get a red L. */
.feature-list li::before {
  content: "W";
  flex: none;
  width: 24px; height: 24px;
  display: grid; place-items: center;
  line-height: 1; /* don't inherit the list's 1.6 — it offsets the glyph */
  font-weight: 900;
  border-radius: 7px;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.45);
  background: linear-gradient(135deg, #3fae52, #217d34);
  border: 2px solid var(--ink);
  font-size: 13px;
}
.feature-list li.bad::before {
  content: "L";
  background: linear-gradient(135deg, #f0512a, #bf330f);
}
.ribbon {
  position: absolute; top: 18px; right: -40px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, var(--sun-gold), var(--sun-red));
  color: var(--cream);
  font-weight: 900; font-size: 12px; letter-spacing: 1.5px;
  padding: 6px 52px;
  border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  text-transform: uppercase;
}

.currency-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 800; font-size: 14px;
  padding: 6px 12px; border-radius: var(--radius-pill);
  border: 2px solid var(--ink);
  background: var(--surface-2);
}
.currency-chip .dot { width: 12px; height: 12px; border-radius: 50%; }

/* --------------------------------------------------------------- news */
.post-card {
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: transform .16s ease, border-color .16s ease;
  padding: 0;
}
.post-card:hover { transform: translateY(-5px); border-color: var(--border-strong); }
.post-card__banner {
  height: 150px;
  display: grid; place-items: center;
  font-size: 54px;
  border-bottom: 2px solid var(--border);
}
.post-card__body { padding: 22px 24px 26px; }
.post-card__meta { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--text-faint); margin-bottom: 10px; }
.tag {
  font-size: 11px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase;
  color: var(--brown-deep);
  background: linear-gradient(120deg, var(--gold), var(--gold-deep));
  padding: 3px 10px; border-radius: var(--radius-pill);
}

/* --------------------------------------------------------------- article */
.article { max-width: 760px; margin: 0 auto; padding: 56px 24px; }
.article h1 { font-size: clamp(32px, 6vw, 52px); margin-bottom: 16px; }
.article .article__meta { color: var(--text-faint); margin-bottom: 34px; font-weight: 600; }
.article h2 { font-size: 28px; margin: 40px 0 14px; color: var(--gold); }
.article h3 { font-size: 21px; margin: 28px 0 10px; }
.article p, .article li { color: var(--cream); opacity: 0.92; margin-bottom: 16px; font-size: 17px; }
.article ul, .article ol { padding-left: 26px; margin-bottom: 16px; }
.article li { margin-bottom: 8px; }
.article table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 15px; }
.article th, .article td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.article th { color: var(--gold); }
.article blockquote {
  border-left: 4px solid var(--gold);
  padding: 6px 18px; margin: 20px 0;
  color: var(--text-muted); font-style: italic;
  background: rgba(255,255,255,0.03);
  border-radius: 0 10px 10px 0;
}
.article hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }
.article code { background: var(--surface); padding: 2px 7px; border-radius: 6px; font-size: 14px; }

.back-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 24px; }

/* --------------------------------------------------------------- footer */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 54px 0 40px;
  background: rgba(0, 0, 0, 0.2);
}
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer__brand img { height: 56px; margin-bottom: 14px; }
.footer__brand p { color: var(--text-faint); max-width: 320px; font-size: 15px; }
.footer h4 { font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-faint); margin-bottom: 14px; }
.footer ul { list-style: none; display: grid; gap: 10px; }
.footer ul a { color: var(--text-muted); font-weight: 600; }
.footer ul a:hover { color: var(--gold); }
.footer__bottom {
  text-align: center; margin-top: 40px; padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-faint); font-size: 14px;
}
.footer__brand .store-badges { margin-top: 18px; }

/* ---------------------------------------------------------- store badges */
.hero__play-note {
  margin-top: 0;
  font-size: 15px;
  color: var(--text-muted);
  max-width: 420px;
  text-align: center;
}
.hero__play-note a { color: var(--gold); font-weight: 700; }
.hero__play-note a:hover { color: var(--gold-deep); }

.hero__get-app .store-badges {
  justify-content: center;
  margin-top: 16px;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
}
.store-badges--sm { margin-top: 0; }
.store-badges--sm .store-badge { min-width: 0; padding: 8px 14px; }
.store-badges--sm .store-badge__big { font-size: 14px; }
.store-badges--sm .store-badge__small { font-size: 9px; }
.store-badges--sm .store-badge__icon { font-size: 22px; }

.store-badges__soon {
  margin-top: 10px;
  font-size: 13px;
  text-align: center;
}
.hero__get-app .store-badges__soon { width: auto; }

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 168px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 2px solid var(--ink);
  background: var(--ink-soft);
  color: var(--cream);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
  transition: transform .12s ease, box-shadow .12s ease;
}
.store-badge:hover { color: var(--cream); transform: translateY(-1px); }
.store-badge--soon {
  cursor: default;
  opacity: 0.88;
}
.store-badge--soon:hover {
  transform: none;
  color: var(--cream);
}
.store-badge__icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}
.store-badge__icon--play {
  font-size: 22px;
  width: 28px;
  text-align: center;
  color: var(--gold);
}
.store-badge__label {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: left;
}
.store-badge__small {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.85;
}
.store-badge__big {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* --------------------------------------------------------------- reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* --------------------------------------------------------------- responsive */
@media (max-width: 820px) {
  .nav__links {
    position: fixed;
    inset: 64px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: rgba(28, 17, 8, 0.98);
    padding: 16px 24px 24px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-140%);
    transition: transform .25s ease;
  }
  .nav__links.open { transform: none; }
  .nav__links a.link { padding: 14px 12px; font-size: 17px; }
  .nav__links .btn { margin-top: 8px; }
  .nav__toggle { display: block; }
  .footer__grid { grid-template-columns: 1fr; gap: 26px; }
  .section { padding: 54px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .sunburst, .hero__logo { animation: none; }
  .reveal { transition: none; opacity: 1; transform: none; }
}
