/* Toys Tycoon — shared stylesheet. Mobile-first, no JavaScript. */

:root {
  --gold: #F2B233;
  --gold-deep: #D9951A;
  --gold-soft: #FFF3D6;
  --navy: #0F2F66;
  --navy-deep: #0A2148;
  --navy-ink: #13284F;
  --sky: #5CC6F2;
  --sky-soft: #E6F6FD;
  --cream: #FFFBF2;
  --paper: #FFFFFF;
  --text: #1B2A44;
  --muted: #4A5872;
  --line: #E7E1D2;
  --coral: #F26B4E;
  --mint: #3CC19A;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 10px 30px rgba(15, 47, 102, .10), 0 2px 6px rgba(15, 47, 102, .06);
  --shadow-lift: 0 18px 40px rgba(15, 47, 102, .16), 0 4px 10px rgba(15, 47, 102, .08);
  --font-display: "Fredoka", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --font-body: "Nunito", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --wrap: 1120px;
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
a { color: var(--navy); text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: rgba(242, 178, 51, .9); }
a:hover { color: #1A4FA3; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--font-display); color: var(--navy); line-height: 1.15; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 8vw, 4.2rem); }
h2 { font-size: clamp(1.7rem, 4.6vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--gold); color: var(--navy); padding: 10px 16px; border-radius: 10px; font-weight: 800;
}
.skip-link:focus { top: 12px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(15, 47, 102, .96);
  border-bottom: 3px solid var(--gold);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; white-space: nowrap; }
.brand:hover { color: #fff; }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand b { color: var(--gold); font-weight: 600; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.site-nav a { display: block; color: #fff; text-decoration: none; font-weight: 700; font-size: .95rem; padding: 8px 12px; border-radius: 999px; }
.site-nav a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.site-nav a[aria-current="page"] { background: var(--gold); color: var(--navy); }
.site-nav .nav-hide-sm { display: none; }
@media (min-width: 720px) { .site-nav .nav-hide-sm { display: block; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; justify-content: center;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  padding: 13px 22px; border-radius: 999px; text-decoration: none; border: 0; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: var(--gold); color: var(--navy); box-shadow: 0 5px 0 var(--gold-deep), 0 10px 22px rgba(0, 0, 0, .18); }
.btn-gold:hover { color: var(--navy); }
.btn-ghost { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .45); }
.btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, .18); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:hover { transform: none; } }

.store-badge {
  display: inline-flex; align-items: center; gap: 12px;
  background: #0B0F17; color: #fff; text-decoration: none;
  padding: 10px 20px 10px 14px; border-radius: 14px;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .35), 0 10px 24px rgba(0, 0, 0, .25);
  line-height: 1.15;
}
.store-badge:hover { color: #fff; background: #151B27; }
.store-badge svg { width: 30px; height: 30px; flex: none; }
.store-badge small { display: block; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: #FFE3A3; font-weight: 800; }
.store-badge span { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; }
.store-note { font-size: .9rem; color: #D6E4FA; margin: 10px 0 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  /* Optional photo (/assets/hero.jpg) sits between a navy tint and a navy-to-blue base, so the hero looks complete without it. */
  background-color: var(--navy);
  background-image:
    linear-gradient(160deg, rgba(10, 33, 72, .92) 0%, rgba(15, 47, 102, .80) 55%, rgba(26, 91, 168, .70) 100%),
    url("/assets/hero.jpg"),
    linear-gradient(160deg, #0A2148 0%, #0F2F66 50%, #1D5FB0 100%);
  background-size: cover, cover, cover;
  background-position: center;
}
.hero::before {
  /* sunburst glow */
  content: ""; position: absolute; inset: -40% -20% auto auto; width: 680px; height: 680px; border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 178, 51, .40) 0%, rgba(242, 178, 51, .10) 45%, rgba(242, 178, 51, 0) 70%);
  pointer-events: none;
}
.hero::after {
  /* dotted blueprint grid */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .18;
  background-image: radial-gradient(rgba(255, 255, 255, .7) 1px, transparent 1.4px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
}
.hero .wrap { position: relative; z-index: 1; display: grid; gap: 28px; padding-top: 44px; padding-bottom: 72px; }
.hero h1 { color: #fff; margin-bottom: .2em; }
.hero h1 .gold { color: var(--gold); }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px; padding: 6px 14px 6px 8px; font-weight: 800; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase;
}
.hero-eyebrow .dot { width: 22px; height: 22px; border-radius: 50%; background: var(--gold); display: inline-grid; place-items: center; color: var(--navy); font-size: .8rem; }
.hero-pitch { font-size: clamp(1.15rem, 3.6vw, 1.45rem); color: #EAF2FF; max-width: 34ch; margin-bottom: 26px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.hero-art { position: relative; max-width: 520px; width: 100%; margin: 0 auto; }
.hero-art svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .28)); }

.app-icon {
  position: absolute; right: 4%; top: 2%; width: 26%; aspect-ratio: 1; border-radius: 24%;
  /* /assets/icon.png when present, otherwise the vector mark. */
  background:
    url("/assets/icon.png") center / cover no-repeat,
    url("/favicon.svg") center / 74% no-repeat,
    linear-gradient(145deg, #FFD166, var(--gold) 55%, var(--gold-deep));
  box-shadow: 0 12px 26px rgba(0, 0, 0, .3), inset 0 0 0 3px rgba(255, 255, 255, .55);
  transform: rotate(8deg);
}

.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; height: 48px; width: 100%; z-index: 1; display: block; }

@media (min-width: 900px) {
  .hero .wrap { grid-template-columns: 1.05fr .95fr; align-items: center; padding-top: 72px; padding-bottom: 110px; }
}

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-head { max-width: 680px; margin-bottom: 34px; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.kicker { display: inline-block; font-weight: 800; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: #8A5A00; background: var(--gold-soft); border-radius: 999px; padding: 4px 12px; margin-bottom: 12px; }

.stats { list-style: none; padding: 0; margin-bottom: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: -40px; position: relative; z-index: 2; }
.stat { background: var(--paper); border-radius: var(--radius-sm); padding: 16px; box-shadow: var(--shadow); text-align: center; }
.stat strong { display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--navy); line-height: 1.1; }
.stat span { color: var(--muted); font-size: .92rem; font-weight: 700; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.features { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); list-style: none; margin: 0; padding: 0; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .features { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card {
  background: var(--paper); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
  border: 1px solid rgba(15, 47, 102, .06); transition: transform .2s ease, box-shadow .2s ease;
}
.features .card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
@media (prefers-reduced-motion: reduce) { .card { transition: none; } .features .card:hover { transform: none; } }
.card h3 { margin: 14px 0 6px; }
.card p { margin: 0; color: var(--muted); }
.icon-tile { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; }
.icon-tile svg { width: 34px; height: 34px; }
.tile-gold { background: var(--gold-soft); }
.tile-sky { background: var(--sky-soft); }
.tile-coral { background: #FFE9E3; }
.tile-mint { background: #E2F7EF; }
.tile-navy { background: #E4EAF6; }
.tile-violet { background: #EEE8FB; }

/* Story */
.story { background: linear-gradient(180deg, var(--sky-soft) 0%, #F3FBFF 100%); position: relative; overflow: hidden; }
.story-grid { display: grid; gap: 30px; align-items: center; }
@media (min-width: 900px) { .story-grid { grid-template-columns: .9fr 1.1fr; gap: 56px; } }
.story-card { background: var(--paper); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); position: relative; }
.story-card::before { content: "\201C"; position: absolute; top: -18px; left: 22px; font-family: Georgia, serif; font-size: 5rem; line-height: 1; color: var(--gold); }
.story-card p:last-child { margin-bottom: 0; }
.story-art svg { width: 100%; height: auto; display: block; max-width: 460px; margin: 0 auto; }
.timeline { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.timeline li { display: flex; gap: 12px; align-items: flex-start; }
.timeline .step { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: var(--gold); font-weight: 800; display: grid; place-items: center; font-size: .9rem; margin-top: 2px; }

/* Community */
.community { display: grid; gap: 18px; }
@media (min-width: 860px) { .community { grid-template-columns: 1.2fr .8fr; } }
.socials { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
@media (min-width: 480px) { .socials { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.socials li { display: flex; align-items: center; gap: 10px; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; min-width: 0; }
.socials svg { width: 26px; height: 26px; flex: none; }
.socials .net { font-weight: 800; color: var(--navy); font-size: .95rem; display: block; line-height: 1.2; }
.socials .handle { color: var(--muted); font-size: .82rem; display: block; overflow-wrap: anywhere; line-height: 1.3; }
.pill { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; background: var(--gold-soft); color: #7A4F00; border-radius: 999px; padding: 2px 8px; vertical-align: middle; }
.contact-card { background: var(--navy); color: #EAF2FF; }
.card.contact-card p { color: #D6E4FA; margin-bottom: 1em; }
.contact-card h2, .contact-card h3 { color: #fff; }
.contact-card a { color: var(--gold); }
.contact-card a:hover { color: #FFD77F; }
.contact-card .big-mail { font-family: var(--font-display); font-size: clamp(1.2rem, 4.6vw, 1.5rem); font-weight: 600; overflow-wrap: anywhere; }

/* CTA band */
.cta-band { background: var(--gold); position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .14) 0 18px, transparent 18px 36px); }
.cta-band .wrap { position: relative; display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; padding-top: 40px; padding-bottom: 40px; }
.cta-band h2 { margin: 0; color: var(--navy); }
.cta-band p { margin: 4px 0 0; color: var(--navy-ink); font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: #C9D6EE; padding: 48px 0 28px; font-size: .97rem; }
.site-footer a { color: #fff; text-decoration-color: rgba(242, 178, 51, .7); }
.site-footer a:hover { color: var(--gold); }
.footer-grid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h2 { color: #fff; font-size: 1.05rem; margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer .brand { margin-bottom: 10px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .14); margin-top: 32px; padding-top: 18px; font-size: .88rem; color: #AFC0DE; display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; }

/* ---------- Document pages (legal / support) ---------- */
.page-hero { background: linear-gradient(160deg, #0A2148 0%, #0F2F66 60%, #1D5FB0 100%); color: #EAF2FF; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; inset: 0; opacity: .14; pointer-events: none; background-image: radial-gradient(rgba(255, 255, 255, .8) 1px, transparent 1.4px); background-size: 24px 24px; }
.page-hero .wrap { position: relative; z-index: 1; padding-top: 40px; padding-bottom: 56px; }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 6.4vw, 3.1rem); }
.page-hero p { margin: 0; max-width: 60ch; font-size: 1.08rem; }
.page-hero .meta { display: inline-block; margin-top: 16px; background: rgba(242, 178, 51, .18); border: 1px solid rgba(242, 178, 51, .5); color: #FFE3A3; border-radius: 999px; padding: 4px 14px; font-weight: 800; font-size: .88rem; }

.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: -28px; position: relative; z-index: 2; padding-bottom: 64px; }
@media (min-width: 980px) { .doc-layout { grid-template-columns: 260px minmax(0, 1fr); align-items: start; } }
.toc { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; }
@media (min-width: 980px) { .toc { position: sticky; top: 88px; } }
.toc h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; font-size: .95rem; }
.toc a { text-decoration: none; color: var(--navy); font-weight: 700; }
.toc a:hover { text-decoration: underline; }
.doc { overflow-wrap: anywhere; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 22px; min-width: 0; }
@media (min-width: 640px) { .doc { padding: 40px 44px; } }
.doc h2 { font-size: clamp(1.35rem, 3.6vw, 1.7rem); margin-top: 1.8em; padding-top: .2em; scroll-margin-top: 90px; }
.doc h2:first-child { margin-top: 0; }
.doc h3 { margin-top: 1.4em; font-size: 1.12rem; }
.doc ul, .doc ol { padding-left: 1.25em; margin: 0 0 1em; }
.doc li { margin-bottom: .4em; }
.doc li::marker { color: var(--gold-deep); }
.callout { border-radius: var(--radius-sm); padding: 16px 18px; margin: 0 0 1.2em; background: var(--sky-soft); border-left: 5px solid var(--sky); }
.callout.gold { background: var(--gold-soft); border-left-color: var(--gold); }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout strong { color: var(--navy); }

.table-wrap { overflow-x: auto; margin: 0 0 1.2em; border-radius: var(--radius-sm); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 560px; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
th { background: #F6F1E4; color: var(--navy); font-family: var(--font-display); font-weight: 600; }
tr:last-child td { border-bottom: 0; }

.steps { list-style: none; counter-reset: s; padding: 0 !important; display: grid; gap: 12px; }
.steps li { counter-increment: s; position: relative; padding: 14px 16px 14px 60px; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 0; }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 12px; width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: var(--gold); font-weight: 800; display: grid; place-items: center; }

.split { display: grid; gap: 16px; margin-bottom: 1.2em; }
@media (min-width: 720px) { .split { grid-template-columns: 1fr 1fr; } }
.split .box { border-radius: var(--radius-sm); padding: 18px 20px; border: 1px solid var(--line); }
.split .box h3 { margin-top: 0; }
.box.del { background: #FFF1ED; border-color: #F7C7B9; }
.box.keep { background: #EEF4FF; border-color: #C9D8F5; }
.box ul { margin-bottom: 0; }

/* FAQ */
.faq { display: grid; gap: 12px; margin-bottom: 1.4em; }
.faq details { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 18px; }
.faq details[open] { background: #fff; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; list-style: none; font-family: var(--font-display); font-weight: 600; color: var(--navy); font-size: 1.1rem; padding: 16px 32px 16px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: var(--navy); display: grid; place-items: center; font-weight: 800; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq .answer { padding-bottom: 16px; }
.faq .answer p:last-child, .faq .answer ul:last-child, .faq .answer ol:last-child { margin-bottom: 0; }

.contact-grid { display: grid; gap: 14px; }
@media (min-width: 720px) { .contact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.contact-grid .box { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; }
.contact-grid .box h3 { margin: 0 0 4px; font-size: 1.05rem; }
.contact-grid .box p { margin: 0; font-size: .95rem; color: var(--muted); }
.contact-grid .box a { font-weight: 800; overflow-wrap: anywhere; }

/* 404 */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 60px 0; }
.notfound .big { font-family: var(--font-display); font-size: clamp(5rem, 24vw, 9rem); line-height: 1; color: var(--gold); text-shadow: 0 6px 0 var(--navy); margin: 0 0 10px; font-weight: 600; }
.notfound svg { width: 180px; height: auto; margin-bottom: 10px; }
