/* Tagda Fun website — one stylesheet for every page.
   Colours come from the app (constants/theme.ts) and the store screenshots. */

:root {
  --orange: #ff6b00;
  --orange-2: #ff8c42;
  --orange-deep: #e55a00;
  --navy: #0d1b45;
  --navy-2: #16295e;
  --cream: #fff8f3;

  --bg: #fff8f3;
  --surface: #ffffff;
  --surface-2: #fff1e6;
  --text: #1a1a1a;
  --muted: #5f6670;
  --border: #ffe0c4;
  --link: #d45200;
  --shadow: 0 10px 30px rgba(13, 27, 69, 0.08);

  --radius: 20px;
  --font-display: "Baloo 2", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1433;
    --surface: #12204a;
    --surface-2: #172a5c;
    --text: #f3f5fb;
    --muted: #a9b3cc;
    --border: #233a74;
    --link: #ff9a52;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a1433;
  --surface: #12204a;
  --surface-2: #172a5c;
  --text: #f3f5fb;
  --muted: #a9b3cc;
  --border: #233a74;
  --link: #ff9a52;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(2.3rem, 6vw, 4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--orange); color: #fff; padding: 8px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

/* ── Header ─────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(13, 27, 69, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; letter-spacing: .02em; }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { color: #dfe5f5; text-decoration: none; font-weight: 700; font-size: .95rem; padding: 8px 12px; border-radius: 999px; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, 0.1); }
.nav .btn-nav { background: var(--orange); color: #fff; }
.nav .btn-nav:hover { background: var(--orange-deep); }
.menu-toggle { display: none; margin-left: auto; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; border-radius: 10px; }
.menu-toggle svg { width: 28px; height: 28px; }

@media (max-width: 760px) {
  .menu-toggle { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 10px 16px 16px; background: var(--navy); border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; border-radius: 12px; }
}

/* ── Buttons & Play badge ───────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; text-decoration: none; padding: 12px 22px; border-radius: 999px; font-size: 1rem; }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 8px 20px rgba(255, 107, 0, 0.35); }
.btn-primary:hover { background: var(--orange-deep); }
.btn-ghost { color: #fff; border: 2px solid rgba(255, 255, 255, 0.35); }
.btn-ghost:hover { border-color: #fff; }

.play-badge {
  display: inline-flex; align-items: center; gap: 12px;
  background: #000; color: #fff; text-decoration: none;
  padding: 10px 20px 10px 16px; border-radius: 12px;
  border: 1px solid #a6a6a6; min-height: 60px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.play-badge:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35); }
.play-badge svg { width: 30px; height: 33px; flex: none; }
.play-badge span { display: flex; flex-direction: column; line-height: 1.1; }
.play-badge small { font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.play-badge strong { font-family: "Nunito", system-ui, sans-serif; font-size: 1.4rem; font-weight: 700; letter-spacing: -.01em; }

/* ── Hero ───────────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(600px 420px at 8% 0%, rgba(255, 107, 0, 0.28), transparent 70%),
    radial-gradient(520px 380px at 100% 100%, rgba(255, 140, 66, 0.16), transparent 70%),
    var(--navy);
  padding: 64px 0 72px;
}
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: var(--orange-2); margin-bottom: 14px; }
.hero h1 .hl { color: var(--orange); }
.hero p.lead { font-size: 1.2rem; color: #d5dcef; max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 26px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; padding: 0; list-style: none; }
.hero-facts li { background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.12); padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: .9rem; color: #e8ecf8; }
.phones { position: relative; height: 520px; }
.phone { position: absolute; width: min(250px, 54%); border-radius: 28px; overflow: hidden; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45); border: 6px solid #0a1230; }
.phone img { width: 100%; }
.phone.p1 { left: 4%; top: 30px; transform: rotate(-6deg); }
.phone.p2 { right: 2%; top: 0; transform: rotate(5deg); }

@media (max-width: 960px) {
  .hero { padding: 44px 0 52px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .phones { height: 430px; max-width: 440px; width: 100%; margin: 0 auto; }
  .phone { width: min(210px, 48%); }
}
@media (max-width: 420px) {
  .phones { height: 340px; }
}

/* ── Sections ───────────────────────────────────────────────────────── */
.section { padding: 72px 0; }
.section-alt { background: var(--surface-2); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.section-head p { color: var(--muted); font-size: 1.1rem; }

.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.game {
  position: relative; overflow: hidden; color: #fff; border-radius: var(--radius);
  padding: 22px 20px 20px; min-height: 170px;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  box-shadow: var(--shadow);
}
.game::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); }
.game .icon { font-size: 2rem; line-height: 1; width: 56px; height: 56px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.2); border-radius: 16px; margin-bottom: 14px; }
.game h3 { margin: 0 0 4px; color: #fff; }
.game p { margin: 0; color: rgba(255, 255, 255, 0.92); font-size: .97rem; position: relative; z-index: 1; }
.tag { display: inline-block; margin-top: 12px; font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: rgba(0, 0, 0, 0.18); padding: 4px 10px; border-radius: 999px; position: relative; z-index: 1; }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .features { grid-template-columns: 1fr; } }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.feature .ficon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--orange); color: #fff; font-size: 1.5rem; margin-bottom: 14px; }
.feature p { color: var(--muted); margin: 0; }

.shots { display: flex; gap: 18px; overflow-x: auto; padding: 6px 4px 18px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.shots figure { margin: 0; flex: 0 0 230px; scroll-snap-align: center; }
.shots img { border-radius: 22px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.shots figcaption { text-align: center; font-weight: 700; color: var(--muted); margin-top: 10px; font-size: .95rem; }
@media (min-width: 1000px) { .shots { justify-content: center; overflow: visible; } }

.cta {
  text-align: center; color: #fff; border-radius: 28px; padding: 56px 24px;
  background:
    radial-gradient(400px 260px at 0% 0%, rgba(255, 255, 255, 0.18), transparent 70%),
    linear-gradient(135deg, var(--orange-2), var(--orange-deep));
}
.cta h2 { color: #fff; }
.cta p { color: #fff3e8; font-size: 1.1rem; max-width: 560px; margin: 0 auto 24px; }

.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 4px 20px; }
.faq summary { cursor: pointer; font-weight: 800; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--orange); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); }

/* ── Document pages (privacy, terms, contact) ───────────────────────── */
.page-hero { background: var(--navy); color: #fff; padding: 48px 0 40px; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: .2em; }
.page-hero p { color: #c9d2ea; margin: 0; }
.doc { padding: 48px 0 72px; }
.doc h2 { font-size: 1.6rem; margin-top: 2em; padding-top: .2em; scroll-margin-top: 84px; }
.doc h3 { margin-top: 1.5em; scroll-margin-top: 84px; }
.doc ul { padding-left: 1.3em; }
.doc li { margin-bottom: .35em; }
.doc .summary { background: var(--surface); border: 1px solid var(--border); border-left: 6px solid var(--orange); border-radius: 16px; padding: 20px 22px; box-shadow: var(--shadow); }
.doc .summary p:last-child { margin: 0; }
.doc .note { background: var(--surface-2); border-radius: 14px; padding: 16px 18px; border: 1px dashed var(--border); }
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px 22px; margin: 28px 0; }
.toc strong { display: block; margin-bottom: 6px; }
.toc ol { margin: 0; padding-left: 1.3em; columns: 2; column-gap: 32px; }
@media (max-width: 600px) { .toc ol { columns: 1; } }
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; border: 1px solid var(--border); border-radius: 14px; }
table { border-collapse: collapse; width: 100%; font-size: .96rem; background: var(--surface); }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface-2); font-weight: 800; }
tr:last-child td { border-bottom: 0; }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; margin: 8px 0 32px; }
.contact-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.contact-card .ficon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--navy); color: #fff; font-size: 1.4rem; margin-bottom: 12px; }
.contact-card p { color: var(--muted); }
.contact-card .big { font-weight: 800; font-size: 1.05rem; word-break: break-all; }

/* ── Footer ─────────────────────────────────────────────────────────── */
.site-footer { background: var(--navy); color: #c9d2ea; padding: 48px 0 28px; }
.footer-top { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: flex-start; }
.footer-top .brand { margin-bottom: 10px; }
.footer-top p { max-width: 340px; font-size: .95rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 0; }
.footer-links a { color: #fff; text-decoration: none; font-weight: 700; }
.footer-links a:hover { color: var(--orange-2); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); margin-top: 32px; padding-top: 20px; font-size: .88rem; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.footer-bottom a { color: #c9d2ea; }

/* ── 404 ───────────────────────────────────────────────────────────── */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 64px 0; }
.notfound .num { font-family: var(--font-display); font-weight: 800; font-size: clamp(5rem, 18vw, 9rem); line-height: 1; color: var(--orange); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .play-badge { transition: none; }
}
