/* ==========================================================================
   English Adventure — marketing site styles (landing / contact / privacy /
   terms). Kept separate from css/styles.css (the game UI) so these public,
   crawlable pages stay light and fast for SEO — they do not load game code.
   ========================================================================== */
:root {
  --yellow: #ffb703;
  --orange: #fb8500;
  --blue: #219ebc;
  --deep-blue: #023047;
  --sky: #8ecae6;
  --green: #43aa8b;
  --red: #ef476f;
  --purple: #8338ec;
  --bg: #fff8ec;
  --card: #ffffff;
  --shadow: 0 8px 0 rgba(0, 0, 0, 0.08), 0 12px 24px rgba(0, 0, 0, 0.12);
  --radius: 26px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0; min-height: 100%;
  background: var(--bg); color: var(--deep-blue);
  font-family: 'Baloo 2', 'Comic Sans MS', 'Trebuchet MS', system-ui, sans-serif,
    'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
  font-size: clamp(16px, 1.1vw, 19px);
  scroll-behavior: smooth;
}

a { color: inherit; }
/* Safety net: every button/clickable element shows the hand cursor, even if a
   specific component class forgets to set one. */
button, [role="button"], a, label { cursor: pointer; }
button:disabled, [disabled] { cursor: not-allowed; }
.site-wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
img { max-width: 100%; }

/* ---------- Header --------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 248, 236, 0.92); backdrop-filter: blur(6px);
  border-bottom: 3px solid #ffe4b8;
}
.site-header .site-wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding-top: 12px; padding-bottom: 12px;
}
.site-logo { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 1.25rem; text-decoration: none; color: var(--deep-blue); white-space: nowrap; }
.site-logo-emoji { font-size: 1.6rem; }
.site-nav { display: flex; align-items: center; gap: 18px; }
.site-nav a:not(.btn) { text-decoration: none; font-weight: 800; color: var(--deep-blue); opacity: 0.85; }
.site-nav a:not(.btn):hover { opacity: 1; text-decoration: underline; }
.site-nav-links { display: flex; align-items: center; gap: 18px; }
.nav-toggle {
  display: none; background: none; border: none; font-size: 1.6rem; line-height: 1;
  cursor: pointer; color: var(--deep-blue); padding: 6px;
}
/* Extra .btn class bumps specificity to match ".btn" below, so this always wins. */
.nav-play-link.btn { display: none; }

/* ---------- Buttons --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 999px; font-weight: 900; font-size: 1rem;
  padding: 14px 26px; cursor: pointer; text-decoration: none; white-space: nowrap;
  box-shadow: var(--shadow); transition: transform 0.12s ease;
}
.btn:active { transform: translateY(3px); }
.btn--primary { background: linear-gradient(180deg, var(--orange), #f4712e); color: #fff; }
.btn--big { font-size: 1.25rem; padding: 18px 34px; }
.btn--ghost { background: #fff; color: var(--deep-blue); border: 3px solid #ffd79a; }

/* ---------- Hero ------------------------------------------------------------ */
.hero { padding: 48px 0 36px; }
.hero .site-wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 36px; align-items: center; }
.hero-kicker { display: inline-block; background: #eafff4; color: var(--green); font-weight: 900; padding: 6px 14px; border-radius: 999px; margin-bottom: 14px; }
.hero h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.08; margin: 0 0 14px; color: var(--deep-blue); }
.hero h1 span { color: var(--orange); }
.hero p.lead { font-size: 1.2rem; font-weight: 700; color: #3a536b; margin: 0 0 24px; max-width: 46ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-art { display: flex; justify-content: center; }
.hero-art img { width: 100%; max-width: 420px; height: auto; filter: drop-shadow(0 14px 24px rgba(0,0,0,.12)); }
.trust-row { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 26px; font-weight: 800; color: #3a536b; }
.trust-row span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Sections --------------------------------------------------------- */
section.site-section { padding-top: 44px; padding-bottom: 44px; }
.site-section h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); text-align: center; margin: 0 0 8px; }
.site-section .section-sub { text-align: center; color: #3a536b; font-weight: 700; margin: 0 auto 32px; max-width: 60ch; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.feature-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; text-align: center; }
.feature-card .emoji { font-size: 2.6rem; margin-bottom: 10px; }
.feature-card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.feature-card p { margin: 0; color: #3a536b; font-weight: 600; font-size: 0.95rem; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; counter-reset: step; }
.step { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; position: relative; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: -14px; left: -14px; width: 38px; height: 38px;
  border-radius: 50%; background: var(--orange); color: #fff; font-weight: 900;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow);
}
.step h3 { margin: 6px 0 6px; }
.step p { margin: 0; color: #3a536b; font-weight: 600; font-size: 0.95rem; }

.level-grid-site { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.level-card { background: var(--card); border-radius: 20px; box-shadow: var(--shadow); padding: 18px; }
.level-card .emoji { font-size: 1.8rem; }
.level-card h4 { margin: 6px 0 4px; }
.level-card p { margin: 0; color: #3a536b; font-weight: 600; font-size: 0.9rem; }

.safety-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; max-width: 760px; margin: 0 auto; }
.safety-card ul { margin: 12px 0 0; padding-left: 20px; }
.safety-card li { margin-bottom: 8px; font-weight: 600; color: #3a536b; }

.cta-banner {
  background: linear-gradient(135deg, var(--orange), var(--yellow));
  border-radius: var(--radius); padding: 40px 24px; text-align: center; color: #fff;
}
.cta-banner h2 { color: #fff; }
.cta-banner .btn--ghost { background: #fff; color: var(--orange); border: none; }

/* ---------- Footer ------------------------------------------------------------ */
.site-footer { border-top: 3px solid #ffe4b8; margin-top: 40px; padding: 36px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
.footer-grid h4 { margin: 0 0 10px; }
.footer-grid p { color: #3a536b; font-weight: 600; margin: 0; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { text-decoration: none; font-weight: 700; }
.footer-links a:hover { text-decoration: underline; }
.footer-bottom { text-align: center; color: #7a8ca0; font-weight: 700; font-size: 0.85rem; margin-top: 24px; }

/* ---------- Simple content pages (Contact / Privacy / Terms) ------------------ */
.page-hero { padding: 40px 0 10px; text-align: center; }
.page-hero h1 { margin: 0 0 8px; font-size: clamp(1.8rem, 4vw, 2.4rem); }
.page-hero p { color: #3a536b; font-weight: 700; }
.content-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; max-width: 760px; margin: 24px auto; }
.content-card h2 { font-size: 1.2rem; margin: 22px 0 8px; text-align: left; }
.content-card h2:first-child { margin-top: 0; }
.content-card p, .content-card li { color: #34495e; line-height: 1.6; }
.content-card .updated { color: #7a8ca0; font-weight: 700; font-size: 0.85rem; margin-top: 26px; }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; max-width: 760px; margin: 0 auto; }
.contact-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; text-align: center; }
.contact-card .emoji { font-size: 2.2rem; margin-bottom: 8px; }

/* Fixed bottom Play button — hidden by default, shown only on mobile below. */
.mobile-play-fab { display: none; }

@media (max-width: 820px) {
  .hero .site-wrap { grid-template-columns: 1fr; text-align: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero-ctas, .trust-row { justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .footer-links { align-items: center; }

  .nav-toggle { display: block; }
  .site-nav { gap: 10px; }
  .site-nav-links {
    display: none; position: absolute; top: 100%; right: 20px; z-index: 30;
    flex-direction: column; align-items: stretch; gap: 2px; min-width: 200px;
    background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 10px;
    margin-top: 8px;
  }
  .site-nav-links.is-open { display: flex; }
  .site-nav-links a:not(.btn) { padding: 10px 12px; border-radius: 10px; }
  .site-nav-links a:not(.btn):hover { background: #fff3de; text-decoration: none; }

  /* The header's own Play button is replaced by the one inside the menu, so the
     hamburger sits alone in the top-right corner. Dropdown anchors to the whole
     sticky header (not the collapsing nav) so it always sits flush under it. */
  .site-nav > .btn--primary { display: none; }
  .nav-play-link.btn { display: flex; margin-top: 6px; justify-content: center; }

  /* Always-visible Play action, so kids never lose the CTA behind the menu. */
  .mobile-play-fab {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom));
    transform: translateX(-50%); z-index: 40;
    padding: 20px 46px; border-radius: 999px; text-decoration: none;
    background: linear-gradient(180deg, var(--orange), #f4712e); color: #fff;
    font-weight: 900; font-size: 1.2rem; white-space: nowrap;
    box-shadow: 0 10px 0 rgba(0, 0, 0, 0.12), 0 14px 26px rgba(0, 0, 0, 0.22);
    animation: fab-pulse 2.2s ease-in-out infinite;
  }
  .mobile-play-fab:active { transform: translateX(-50%) translateY(3px); }
  body { padding-bottom: 96px; }
}

@media (max-width: 480px) {
  .hero { padding: 32px 0 26px; }
  .hero-ctas .btn, .cta-banner .btn { width: 100%; }
  .steps, .feature-grid, .level-grid-site, .contact-grid { grid-template-columns: 1fr; }
  .content-card, .safety-card { padding: 20px; }
}

/* Shrink the logo (not the rest of the header) only on very narrow screens,
   so "English Adventure" always stays on one line instead of wrapping. */
@media (max-width: 380px) {
  .site-logo { font-size: 1rem; gap: 6px; }
  .site-logo-emoji { font-size: 1.3rem; }
}

@keyframes fab-pulse {
  0%, 100% {
    box-shadow: 0 10px 0 rgba(0, 0, 0, 0.12), 0 14px 26px rgba(0, 0, 0, 0.22), 0 0 0 0 rgba(251, 133, 0, 0.45);
  }
  50% {
    box-shadow: 0 10px 0 rgba(0, 0, 0, 0.12), 0 14px 26px rgba(0, 0, 0, 0.22), 0 0 0 14px rgba(251, 133, 0, 0);
  }
}
