/* =============================================================================
   Azulize — style.css
   A small design system for a calm, kid-friendly, professional site.
   ========================================================================== */

:root {
  /* Brand palette (from the Azulize "A" mark) */
  --sky:        #55B7E8;
  --sky-deep:   #3E8FD0;
  --periwinkle: #5B6BB8;
  --blue-deep:  #123F92;
  --blue-ink:   #0E2E63;

  /* Accents */
  --sunny:  #F4B740;
  --coral:  #EF7E7E;
  --mint:   #4FC0A8;

  /* Neutrals */
  --ink:      #16233d;
  --body:     #3d4a63;
  --muted:    #6b7893;
  --line:     #e6ebf3;
  --surface:  #ffffff;
  --surface-2:#f4f7fc;
  --surface-3:#eaf1fb;

  /* Effects */
  --radius:   18px;
  --radius-lg:28px;
  --shadow-sm: 0 2px 8px rgba(18, 63, 146, 0.06);
  --shadow:    0 12px 30px rgba(18, 63, 146, 0.10);
  --shadow-lg: 0 24px 60px rgba(18, 63, 146, 0.16);

  --container: 1140px;
  --gutter: clamp(20px, 5vw, 40px);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

/* Reset ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  font-family: var(--font);
  color: var(--body);
  background: var(--surface);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; letter-spacing: -0.02em; font-weight: 800; }

a { color: var(--blue-deep); text-decoration-color: rgba(18,63,146,0.28); text-underline-offset: 2px; }
a:hover { text-decoration-color: currentColor; }

:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 6px; }

/* Layout helpers ---------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-alt { background: var(--surface-2); }

.eyebrow {
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--periwinkle); margin-bottom: 12px;
}

.section-head { max-width: 720px; margin: 0 auto clamp(36px, 5vw, 56px); text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
.section-lead { margin-top: 14px; font-size: 1.08rem; color: var(--muted); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--blue-deep); color: #fff; padding: 10px 16px; border-radius: 10px;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

/* Buttons ----------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 0.98rem; line-height: 1;
  padding: 14px 22px; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; text-decoration: none; transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--blue-deep); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--blue-ink); color: #fff; }

.btn-ghost { background: #fff; color: var(--blue-deep); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--sky); }

.btn-appstore { background: var(--ink); color: #fff; padding: 11px 18px; font-size: 0.9rem; }
.btn-appstore:hover { background: #000; color: #fff; }

/* Header ------------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 20px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-logo { width: 34px; height: 34px; }
.brand-name { font-weight: 800; font-size: 1.25rem; color: var(--ink); letter-spacing: -0.02em; }

.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a {
  color: var(--body); text-decoration: none; font-weight: 600; font-size: 0.96rem;
  padding: 9px 14px; border-radius: 999px; transition: background 0.15s ease, color 0.15s ease;
}
.site-nav a:hover { background: var(--surface-3); color: var(--blue-ink); }
.site-nav .nav-cta { background: var(--blue-deep); color: #fff; margin-left: 6px; }
.site-nav .nav-cta:hover { background: var(--blue-ink); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle .bar { width: 24px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* Hero -------------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(85,183,232,0.20), transparent 60%),
    radial-gradient(800px 500px at 0% 110%, rgba(91,107,184,0.16), transparent 55%),
    var(--surface);
}
.hero-inner {
  display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 40px;
  padding: clamp(48px, 7vw, 90px) 0 clamp(56px, 8vw, 96px);
}
.hero-title { font-size: clamp(2.1rem, 5.2vw, 3.6rem); font-weight: 800; }
.hero-title .accent {
  background: linear-gradient(120deg, var(--sky), var(--periwinkle));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { margin-top: 18px; font-size: clamp(1.05rem, 2vw, 1.22rem); color: var(--body); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero-badges { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px 20px; }
.hero-badges li { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.92rem; color: var(--muted); }
.hero-badges span { font-size: 1.05rem; }

.hero-art { position: relative; display: grid; place-items: center; min-height: 300px; }
.hero-blob {
  position: absolute; inset: 0; margin: auto; width: min(360px, 80%); aspect-ratio: 1;
  background: conic-gradient(from 120deg, var(--sky), var(--periwinkle), var(--mint), var(--sky));
  filter: blur(6px); opacity: 0.20;
  border-radius: 47% 53% 44% 56% / 55% 44% 56% 45%;
  animation: blob 14s ease-in-out infinite;
}
@keyframes blob {
  0%, 100% { border-radius: 47% 53% 44% 56% / 55% 44% 56% 45%; transform: rotate(0deg); }
  50%      { border-radius: 55% 45% 56% 44% / 44% 56% 44% 56%; transform: rotate(10deg); }
}
.milo { position: relative; width: min(280px, 70%); filter: drop-shadow(0 20px 30px rgba(18,63,146,0.18)); animation: float 6s ease-in-out infinite; }
.hero-milo { position: relative; display: block; margin: 0 auto; width: auto; height: auto; max-width: min(287px, 77%); max-height: 331px; filter: drop-shadow(0 22px 32px rgba(18,63,146,0.22)); animation: float 6s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.hero-art-caption { position: relative; margin-top: 10px; font-weight: 600; color: var(--muted); }

/* Trust strip ------------------------------------------------------------- */
.trust-strip { background: var(--blue-deep); color: #dbe7ff; }
.trust-inner { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 30px; padding: 16px 0; font-weight: 600; font-size: 0.92rem; }
.trust-inner span { white-space: nowrap; }

/* Games ------------------------------------------------------------------- */
.tier { margin-top: clamp(36px, 5vw, 56px); }
.tier:first-of-type { margin-top: 0; }
.tier-head { margin-bottom: 20px; }
.tier-title {
  font-size: 1.35rem; display: inline-flex; align-items: center; gap: 12px;
}
.tier-title::before {
  content: ""; width: 26px; height: 5px; border-radius: 999px;
  background: linear-gradient(90deg, var(--sky), var(--periwinkle));
}
.tier-blurb { margin-top: 6px; color: var(--muted); font-size: 1rem; }

.games-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px;
}
.game-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm); transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.game-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }

.game-tile {
  position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--from), var(--to));
}
.game-icon { width: 92px; height: 92px; border-radius: 20px; object-fit: cover; box-shadow: 0 8px 18px rgba(0,0,0,0.22); }

.badge {
  position: absolute; top: 12px; right: 12px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.03em;
  padding: 5px 11px; border-radius: 999px; background: rgba(255,255,255,0.92); color: var(--ink);
  backdrop-filter: blur(4px);
}
.badge-available   { background: #eafaef; color: #1c7a3e; }
.badge-coming-soon { background: #fff4e2; color: #a5641a; }
.badge-planned     { background: #eef1f8; color: #55627e; }

.game-info { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.game-info h3 { font-size: 1.22rem; }
.game-mechanic { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--periwinkle); }
.game-desc { color: var(--muted); font-size: 0.96rem; flex: 1; }
.game-info .btn-appstore { align-self: flex-start; margin-top: 8px; }

/* Values ------------------------------------------------------------------ */
.values-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.value {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow-sm); transition: transform 0.18s ease, box-shadow 0.2s ease;
}
.value:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.value-icon {
  display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px;
  background: var(--surface-3); font-size: 1.5rem; margin-bottom: 14px;
}
.value h3 { font-size: 1.15rem; margin-bottom: 6px; }
.value p { color: var(--muted); font-size: 0.98rem; }

/* About ------------------------------------------------------------------- */
.about-grid { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 40px; align-items: start; }
.about-text h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); margin-bottom: 16px; }
.about-text p { margin-top: 14px; color: var(--body); font-size: 1.05rem; }

.about-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow); }
.about-card h3 { font-size: 1.1rem; margin-bottom: 16px; }
.facts { display: grid; gap: 0; }
.facts > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.facts > div:first-child { border-top: 0; }
.facts dt { color: var(--muted); font-size: 0.95rem; }
.facts dd { font-weight: 700; color: var(--ink); text-align: right; }

/* Contact ----------------------------------------------------------------- */
.contact-card {
  max-width: 720px; margin: 0 auto; text-align: center;
  background: linear-gradient(135deg, var(--blue-deep), var(--periwinkle));
  color: #fff; border-radius: var(--radius-lg); padding: clamp(36px, 6vw, 64px);
  box-shadow: var(--shadow-lg);
}
.contact-card h2 { color: #fff; font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.contact-card p { margin-top: 12px; color: #dbe7ff; font-size: 1.08rem; }
.contact-card .btn { margin-top: 24px; background: #fff; color: var(--blue-deep); }
.contact-card .btn:hover { background: #f0f5ff; }
.contact-legal { font-size: 0.9rem; margin-top: 22px; }
.contact-legal a { color: #fff; font-weight: 600; }

/* Footer ------------------------------------------------------------------ */
.site-footer { background: var(--blue-ink); color: #b9c6e6; padding-top: clamp(48px, 6vw, 72px); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 36px; padding-bottom: 40px; }
.site-footer .brand-name { color: #fff; }
.site-footer .brand-logo { filter: drop-shadow(0 0 0 transparent); }
.footer-tagline { margin-top: 12px; color: #cdd8f0; font-weight: 600; }
.footer-note { margin-top: 8px; color: #8394bd; font-size: 0.9rem; }
.footer-heading { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; color: #7f90bb; margin-bottom: 14px; font-weight: 700; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: #cdd8f0; text-decoration: none; font-size: 0.96rem; width: fit-content; }
.footer-col a:hover { color: #fff; }
.footer-mail { font-weight: 700; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 22px 0; border-top: 1px solid rgba(255,255,255,0.08); color: #7f90bb; }

/* Legal pages ------------------------------------------------------------- */
.legal { padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); background: var(--surface-2); }
.legal-container { max-width: 820px; }
.legal-head { text-align: center; margin-bottom: 28px; }
.legal-head h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
.legal-summary { max-width: 620px; margin: 14px auto 0; color: var(--muted); font-size: 1.05rem; }
.legal-meta { margin-top: 14px; font-size: 0.9rem; color: var(--muted); }

.legal-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.legal-tabs a {
  text-decoration: none; font-weight: 600; font-size: 0.95rem; color: var(--body);
  padding: 9px 18px; border-radius: 999px; background: #fff; border: 1px solid var(--line);
}
.legal-tabs a:hover { border-color: var(--sky); }
.legal-tabs a.is-active { background: var(--blue-deep); color: #fff; border-color: var(--blue-deep); }

.legal-body {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(26px, 4vw, 48px); box-shadow: var(--shadow-sm);
}
.legal-foot { text-align: center; margin-top: 24px; color: var(--muted); font-size: 0.95rem; }

/* Prose ------------------------------------------------------------------- */
.prose { color: var(--body); }
.prose h2 { font-size: 1.4rem; margin: 34px 0 12px; padding-top: 8px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.12rem; margin: 24px 0 8px; }
.prose p { margin: 12px 0; }
.prose ul, .prose ol { margin: 12px 0; padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose strong { color: var(--ink); }
.prose a { font-weight: 600; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }

/* 404 --------------------------------------------------------------------- */
.error-page { text-align: center; }
.error-inner { max-width: 560px; margin: 0 auto; display: grid; justify-items: center; gap: 8px; }
.error-inner .milo { width: 180px; margin-bottom: 8px; animation: none; }
.error-inner h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.error-inner .btn { margin-top: 18px; }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { order: 2; }
  .hero-art { order: 1; min-height: 240px; }
  .hero-sub { margin-inline: auto; }
  .hero-actions, .hero-badges { justify-content: center; }
  .about-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed; inset: 70px 0 auto 0; flex-direction: column; align-items: stretch;
    gap: 4px; padding: 16px var(--gutter) 24px; background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); transform: translateY(-120%); transition: transform 0.25s ease; visibility: hidden;
  }
  .site-nav.is-open { transform: translateY(0); visibility: visible; }
  .site-nav a { padding: 12px 14px; font-size: 1rem; }
  .site-nav .nav-cta { margin: 6px 0 0; text-align: center; }
}

@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}

/* JS-off fallback: never hide the nav when there's no script to toggle it */
.no-js .site-nav { position: static; transform: none; visibility: visible; }
