/* ============================================================
   Groupings — site styles
   ============================================================ */

/* ---- Design tokens ---- */
:root {
  /* Brand (from app icon) */
  --orange: #efa230;
  --green:  #1e9e6e;
  --blue:   #3b86de;
  --purple: #8370d8;
  --indigo: #5b4fd9;   /* primary accent / links / "honest" */
  --indigo-ink: #4a3fc4;

  /* Light theme surfaces */
  --bg:        #ffffff;
  --bg-soft:   #f5f4fd;
  --bg-hero:   linear-gradient(180deg, #eeebfb 0%, #f7f6fe 60%, #ffffff 100%);
  --card:      #ffffff;
  --border:    #e8e6f3;
  --fg:        #1a1b25;
  --fg-muted:  #5b5f70;
  --shadow:    0 10px 30px rgba(44, 38, 92, 0.10);
  --shadow-sm: 0 4px 14px rgba(44, 38, 92, 0.08);

  --radius:    18px;
  --radius-lg: 28px;
  --maxw:      1100px;

  --font-head: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

:root:not([data-theme="light"]) {
  @media (prefers-color-scheme: dark) {
    --bg:        #0f1016;
    --bg-soft:   #16172099;
    --bg-hero:   linear-gradient(180deg, #191a2e 0%, #121320 60%, #0f1016 100%);
    --card:      #171826;
    --border:    #272842;
    --fg:        #f2f3f9;
    --fg-muted:  #a7adc2;
    --shadow:    0 12px 34px rgba(0, 0, 0, 0.45);
    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.4);
    --indigo:    #8b82f0;
    --indigo-ink:#a79fff;
  }
}
:root[data-theme="dark"] {
  --bg:        #0f1016;
  --bg-soft:   #16172099;
  --bg-hero:   linear-gradient(180deg, #191a2e 0%, #121320 60%, #0f1016 100%);
  --card:      #171826;
  --border:    #272842;
  --fg:        #f2f3f9;
  --fg-muted:  #a7adc2;
  --shadow:    0 12px 34px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.4);
  --indigo:    #8b82f0;
  --indigo-ink:#a79fff;
}

/* ---- Base ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { font-family: var(--font-head); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 .4em; }
h1 { font-size: clamp(2.3rem, 6vw, 3.8rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
p  { margin: 0 0 1rem; color: var(--fg-muted); }
a  { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.accent { color: var(--indigo); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: clamp(40px, 6vw, 76px) 0; }
.section-soft { background: var(--bg-soft); }
.center { text-align: center; }
.eyebrow {
  font-family: var(--font-head); font-weight: 600; text-transform: uppercase;
  letter-spacing: .14em; font-size: .78rem; color: var(--indigo); margin-bottom: .6rem;
}
.lead { font-size: 1.18rem; max-width: 640px; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  padding: .85rem 1.5rem; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--indigo); color: #fff; transition: transform .15s ease, box-shadow .15s ease;
  box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translateY(-2px); text-decoration: none; box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--fg); border: 1.5px solid var(--border); box-shadow: none; }

/* App Store badge */
.badge-appstore { display: inline-block; transition: transform .15s ease; }
.badge-appstore:hover { transform: translateY(-2px); text-decoration: none; }
.badge-appstore img { height: 56px; width: auto; }

/* ---- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav .wrap { display: flex; align-items: center; gap: 18px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--fg); }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav-links { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--fg-muted); font-weight: 500; font-size: .96rem; }
.nav-links a:hover, .nav-links a.active { color: var(--fg); text-decoration: none; }
.lang-toggle {
  font-family: var(--font-head); font-weight: 600; font-size: .85rem;
  border: 1.5px solid var(--border); border-radius: 999px; padding: .35rem .8rem; color: var(--fg);
}
.lang-toggle:hover { text-decoration: none; border-color: var(--indigo); color: var(--indigo); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; margin-left: auto; padding: 8px; color: var(--fg); }
.nav-toggle svg { width: 26px; height: 26px; }

/* ---- Hero ---- */
.hero { background: var(--bg-hero); padding: clamp(40px, 7vw, 76px) 0 clamp(28px, 5vw, 52px); text-align: center; }
.hero-icon { width: 80px; height: 80px; border-radius: 20px; margin: 0 auto 22px; box-shadow: var(--shadow); }
.hero h1 { max-width: 14ch; margin-left: auto; margin-right: auto; }
.hero .lead { margin: 1rem auto 1.6rem; }
.hero-cta { display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap; }
.hero-shot { margin: 30px auto 0; max-width: 288px; }
.hero-shot img { border-radius: 26px; }

/* ---- Feature rows ---- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 4vw, 52px); align-items: center; }
.feature + .feature { margin-top: clamp(28px, 4vw, 52px); }
.feature.reverse .feature-media { order: 2; }
.feature-media { display: flex; justify-content: center; }
.feature-media img { max-width: 258px; border-radius: 24px; filter: drop-shadow(0 16px 34px rgba(44,38,92,.16)); }
.feature-body .tag { display: inline-block; font-family: var(--font-head); font-weight: 600; font-size: .8rem; padding: .3rem .7rem; border-radius: 999px; margin-bottom: .9rem; }
.tag-daily   { color: var(--indigo); background: color-mix(in srgb, var(--indigo) 14%, transparent); }
.tag-levels  { color: var(--green);  background: color-mix(in srgb, var(--green) 15%, transparent); }
.tag-blitz   { color: var(--orange); background: color-mix(in srgb, var(--orange) 18%, transparent); }
.tag-endless { color: var(--blue);   background: color-mix(in srgb, var(--blue) 15%, transparent); }
.tag-sudden  { color: #d93636;       background: color-mix(in srgb, #d93636 14%, transparent); }
.tag-gauntlet{ color: var(--purple); background: color-mix(in srgb, var(--purple) 16%, transparent); }
.tag-board   { color: var(--purple); background: color-mix(in srgb, var(--purple) 16%, transparent); }

/* CSS phone frame (for raw JA screenshots) */
.phone { position: relative; width: 300px; max-width: 78vw; border-radius: 42px; padding: 11px; background: #0c0c12; box-shadow: var(--shadow); }
.phone::before { content:""; position:absolute; top:13px; left:50%; transform:translateX(-50%); width:95px; height:26px; background:#0c0c12; border-radius:0 0 16px 16px; z-index:2; }
.phone img { border-radius: 32px; display:block; }

/* ---- Modes grid ---- */
.grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.grid > * { flex: 0 1 300px; max-width: 340px; }
.mode-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.mode-card .dot { width: 14px; height: 14px; border-radius: 5px; display: inline-block; margin-bottom: 12px; }
.mode-card h3 { margin-bottom: .3rem; }
.mode-card p { margin: 0; font-size: .96rem; }

/* ---- Plus section ---- */
.plus { background: linear-gradient(135deg, var(--indigo) 0%, var(--purple) 100%); color: #fff; border-radius: var(--radius-lg); padding: clamp(32px, 6vw, 60px); text-align: center; box-shadow: var(--shadow); }
.plus h2, .plus p { color: #fff; }
.plus p { opacity: .92; }
.plus-perks { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; margin: 22px 0 6px; }
.plus-perks span { font-family: var(--font-head); font-weight: 600; display: inline-flex; align-items: center; gap: .5rem; }

/* ---- Gallery ---- */
.gallery { display: flex; gap: 18px; overflow-x: auto; padding: 8px 20px 24px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.gallery::-webkit-scrollbar { height: 8px; }
.gallery::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
.gallery img { height: 480px; width: auto; border-radius: 22px; scroll-snap-align: center; flex: 0 0 auto; box-shadow: var(--shadow-sm); }
.gallery .phone { flex: 0 0 auto; scroll-snap-align: center; }

/* ---- CTA band ---- */
.cta-band { text-align: center; }

/* ---- Footer ---- */
.footer { background: var(--bg-soft); border-top: 1px solid var(--border); padding: 48px 0 40px; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-start; }
.footer .brand { margin-bottom: 10px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.footer-links a { color: var(--fg-muted); font-size: .95rem; }
.footer small { color: var(--fg-muted); display: block; margin-top: 14px; font-size: .86rem; }

/* ---- Legal (terms / privacy) ---- */
.legal { max-width: 800px; margin: 0 auto; padding: clamp(48px, 7vw, 86px) 20px; }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); }
.legal .updated { color: var(--fg-muted); font-size: .95rem; margin-top: -.4rem; margin-bottom: 2rem; }
.legal h2 { font-size: 1.4rem; margin-top: 2.2rem; }
.legal p, .legal li { color: var(--fg-muted); }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: .5rem; }
.legal a { word-break: break-word; }

/* ---- Contact ---- */
.contact-card { max-width: 560px; margin: 0 auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(28px, 5vw, 48px); box-shadow: var(--shadow); text-align: center; }
.contact-email { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; margin: 18px 0; word-break: break-word; }

/* ---- Responsive ---- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav-links { position: fixed; inset: 66px 0 auto 0; flex-direction: column; align-items: flex-start; gap: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: 8px 20px 18px; transform: translateY(-120%); transition: transform .25s ease; box-shadow: var(--shadow); }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 12px 0; width: 100%; font-size: 1.05rem; }
  .nav-links .lang-toggle { margin-top: 8px; display: inline-block; width: auto; }
  .nav-toggle { display: inline-flex; }
  .feature { grid-template-columns: 1fr; gap: 14px; text-align: center; }
  .feature.reverse .feature-media { order: 0; }
  .feature-media img { max-width: 220px; margin-left: auto; margin-right: auto; }
  .feature-body .tag { margin-left: auto; margin-right: auto; }
  .feature-body { display: flex; flex-direction: column; align-items: center; }
  .feature-body p { max-width: 42ch; }
  .plus-perks { gap: 10px 20px; }
  .grid > * { flex: 1 1 100%; max-width: 420px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; transition: none !important; } }

/* ---- Press kit ---- */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 22px; margin: 0 0 1.5rem; }
.facts dt { font-family: var(--font-head); font-weight: 600; color: var(--fg); }
.facts dd { margin: 0; color: var(--fg-muted); }
.press-assets { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; margin: 1rem 0 1.5rem; }
.press-assets img { width: 100%; border-radius: 14px; box-shadow: var(--shadow-sm); }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr; gap: 2px; } .facts dd { margin-bottom: 10px; } }

/* ---- What's new banner + sheet ---- */
.whatsnew-bar { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 11px 16px; border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: .94rem; color: #fff; background: linear-gradient(90deg, #4a3fc4, #7a63e8); }
.whatsnew-bar:hover { filter: brightness(1.06); }
.whatsnew-bar .pill { background: rgba(255,255,255,.22); border-radius: 999px; padding: 2px 10px; font-size: .78rem; letter-spacing: .02em; }
.whatsnew-bar .chev { opacity: .85; }
.whatsnew-sheet { border: 0; padding: 0; width: min(560px, calc(100% - 32px)); max-height: min(86vh, 760px); border-radius: 24px; background: var(--card); color: var(--fg); box-shadow: 0 30px 80px rgba(0,0,0,.35); overflow: hidden; }
.whatsnew-sheet::backdrop { background: rgba(14, 12, 39, .55); backdrop-filter: blur(3px); }
.whatsnew-sheet[open] { display: flex; flex-direction: column; animation: sheet-in .28s ease; }
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.whatsnew-head { display: flex; align-items: flex-start; gap: 12px; padding: 22px 24px 14px; border-bottom: 1px solid var(--border); }
.whatsnew-head h2 { margin: 0; font-size: 1.35rem; }
.whatsnew-head p { margin: 4px 0 0; color: var(--fg-muted); font-size: .92rem; }
.whatsnew-close { margin-left: auto; background: var(--bg-soft); border: 0; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; color: var(--fg); font-size: 1.1rem; line-height: 1; flex: none; }
.whatsnew-body { overflow-y: auto; padding: 8px 24px 24px; }
.whatsnew-body h3 { margin: 18px 0 6px; font-size: 1rem; color: var(--indigo); }
.whatsnew-body ul { margin: 0; padding-left: 1.1rem; }
.whatsnew-body li { margin: 6px 0; color: var(--fg-muted); font-size: .96rem; }
.whatsnew-body li strong { color: var(--fg); }
@media (max-width: 640px) {
  .whatsnew-bar { font-size: .88rem; padding: 10px 12px; }
  .whatsnew-sheet { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 24px 24px 0 0; max-height: 88vh; }
  .whatsnew-sheet[open] { animation: sheet-up .3s ease; }
  @keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
}

/* Weekend double-coins banner (Saturdays and Sundays only) */
.weekend-bar { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 10px 16px; font-weight: 700; font-size: .94rem; color: #3b2a00; background: linear-gradient(90deg, #f6b73c, #f9d36b); text-align: center; }
.weekend-bar[hidden] { display: none; }
@media (max-width: 640px) { .weekend-bar { font-size: .88rem; padding: 9px 12px; } }
