/* ═══════════════════════════════════════════════════════════════
   BASE
═══════════════════════════════════════════════════════════════ */
* {
  box-sizing: border-box;
}

:focus-visible {
  outline: 3px solid #ff7f32;
  outline-offset: 2px;
  border-radius: 8px;
}

/* ═══════════════════════════════════════════════════════════════
   SHARED NAV COMPONENTS (all pages with nav)
═══════════════════════════════════════════════════════════════ */

/* Nav pill — privacy-policy & support pages */
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 18px;
  background: var(--nav-bg);
  backdrop-filter: blur(6px);
  border: 1px solid #ffffff99;
  box-shadow: 0 12px 30px #58a1b91f;
}

.logo {
  font-family: "Baloo 2", "Comic Sans MS", cursive;
  font-weight: 800;
  font-size: 2rem;
  color: #ffffff;
  background: linear-gradient(145deg, #ff8f43, #f56f1b);
  border-radius: 14px;
  padding: 6px 14px;
  box-shadow: 0 6px 0 #cf5b13;
  text-decoration: none;
}

.menu {
  display: flex;
  gap: 8px;
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu a {
  text-decoration: none;
  color: #173047;
  font-weight: 700;
  border-radius: 999px;
  padding: 10px 16px;
  background: #ffffff;
  border: 1px solid #bde6f6;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.menu a:hover {
  transform: translateY(-2px);
  background: #f6fdff;
}

.menu a[aria-current="page"] {
  background: #fff1cf;
}

.lang-select {
  appearance: none;
  -webkit-appearance: none;
  border-radius: 999px;
  border: 1px solid #bde6f6;
  background:
    #ffffff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath d='M2 2.25L7 7.25L12 2.25' stroke='%23173047' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    no-repeat right 12px center / 14px 10px;
  color: #173047;
  font-weight: 700;
  padding: 9px 40px 9px 12px;
  font-family: inherit;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-wrap {
    flex-direction: column;
    align-items: center;
    padding: 16px 12px;
  }

  .logo {
    align-self: center;
  }

  .menu {
    width: auto;
    justify-content: center;
    gap: 10px;
    margin-top: 0;
  }

  .nav-tools {
    width: 100%;
    margin-top: 20px;
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .menu {
    width: 100%;
    justify-content: center;
  }

  .nav-tools {
    margin-top: 20px;
  }

  .menu a {
    font-size: 0.9rem;
    line-height: 1.2;
    padding: 8px 12px;
  }

  .lang-select {
    font-size: 0.9rem;
    padding: 8px 34px 8px 10px;
    background-position: right 10px center;
  }
}

/* ═══════════════════════════════════════════════════════════════
   HOME PAGE  (.page-home on <body>)
═══════════════════════════════════════════════════════════════ */
body.page-home {
  --sky-top: #a5ecff;
  --sky-bottom: #dff7ff;
  --sun: #ffe076;
  --text-main: #173047;
  --text-soft: #406177;
  --brand: #ff7f32;
  --brand-dark: #e46617;
  --nav-bg: rgba(255, 255, 255, 0.86);
  --card: rgba(255, 255, 255, 0.94);

  margin: 0;
  min-height: 100vh;
  scrollbar-gutter: stable;
  color: var(--text-main);
  font-family: "Nunito", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(circle at 10% 15%, #ffffff 0, #ffffff80 10%, #0000 35%),
    radial-gradient(circle at 85% 20%, #fff4be 0, #fff4be66 15%, #0000 32%),
    linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 42%, #f2ffe0 100%);
  overflow-x: hidden;
}

.clouds {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.playful-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.playful-bg::before,
.playful-bg::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.2;
  animation: floatBlob 12s ease-in-out infinite;
}

.playful-bg::before {
  top: 12%;
  left: -120px;
  background: radial-gradient(circle, #ffd45f 0%, #ffd45f00 70%);
}

.playful-bg::after {
  right: -140px;
  bottom: 8%;
  background: radial-gradient(circle, #7fd8ff 0%, #7fd8ff00 70%);
  animation-delay: 2.5s;
}

.confetti {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  transform: rotate(45deg);
  opacity: 0.6;
  animation: floatConfetti linear infinite;
}

.c1 { left: 10%; top: 75%; background: #ff8f43; animation-duration: 12s; }
.c2 { left: 24%; top: 88%; background: #56b0ff; animation-duration: 15s; animation-delay: 1.2s; }
.c3 { left: 45%; top: 78%; background: #ffdb5d; animation-duration: 13s; animation-delay: 0.7s; }
.c4 { left: 66%; top: 86%; background: #64c94d; animation-duration: 14s; animation-delay: 2s; }
.c5 { left: 84%; top: 80%; background: #9857ff; animation-duration: 16s; animation-delay: 1.5s; }

.clouds::before,
.clouds::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 90px;
  border-radius: 90px;
  background: #ffffffa6;
  filter: blur(0.3px);
  animation: drift 20s linear infinite;
}

.clouds::before { top: 90px; left: -140px; }
.clouds::after  { top: 210px; left: -260px; animation-duration: 28s; }

@keyframes drift {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(100vw + 360px)); }
}

@keyframes floatBlob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-20px); }
}

@keyframes floatConfetti {
  from { transform: translateY(0) rotate(45deg); opacity: 0; }
  20%  { opacity: 0.7; }
  80%  { opacity: 0.5; }
  to   { transform: translateY(-95vh) rotate(405deg); opacity: 0; }
}

@keyframes blink {
  0%, 100% { opacity: 0.25; transform: rotate(45deg) scale(0.8); }
  50%       { opacity: 1;    transform: rotate(45deg) scale(1.2); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 16px 48px;
}

/* Nav pill on home — same visual as .nav-wrap but on .topbar */
.page-home .topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 18px;
  background: var(--nav-bg);
  backdrop-filter: blur(6px);
  border: 1px solid #ffffff99;
  box-shadow: 0 12px 30px #58a1b91f;
}

.hero {
  margin-top: 26px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 22px;
  align-items: center;
}

.download-ribbon {
  margin-top: 14px;
  background: linear-gradient(145deg, #ffffffed, #f5fbffea);
  border: 1px solid #ffffff;
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 12px 24px #4f8ea521;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.download-ribbon h2 {
  margin: 0;
  font-family: "Baloo 2", "Comic Sans MS", cursive;
  font-size: clamp(1.15rem, 2.2vw, 1.7rem);
  line-height: 1.1;
}

.download-ribbon p {
  margin: 2px 0 0;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.download-ribbon .store-grid {
  margin-top: 0;
  width: min(520px, 100%);
}

.hero-text {
  background: var(--card);
  border-radius: 24px;
  padding: 24px;
  border: 1px solid #ffffff;
  box-shadow: 0 18px 36px #4f8ea51f;
  animation: rise 0.7s ease both;
}

.hero-text h1 {
  margin: 0 0 14px;
  line-height: 1.05;
  font-family: "Baloo 2", "Comic Sans MS", cursive;
  font-weight: 800;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
}

.hero-text p {
  margin: 0 0 18px;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  font-weight: 700;
  color: #7d530d;
  background: #fff1cf;
  border: 1px solid #ffd280;
  border-radius: 999px;
  padding: 8px 12px;
}

.cta {
  margin-top: 18px;
  display: inline-block;
  text-decoration: none;
  font-weight: 800;
  color: white;
  background: linear-gradient(180deg, var(--brand), var(--brand-dark));
  border-radius: 14px;
  padding: 12px 18px;
  box-shadow: 0 8px 0 #b95012;
}

.hero-visual {
  position: relative;
  min-height: 400px;
  animation: rise 1s 0.15s ease both;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 42px 10px 16px 10px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 20% 25%, #ffec87 0%, #ffec8700 50%),
    linear-gradient(180deg, #6fd4ff 0%, #84ebff 50%, #7fd17d 100%);
}

.tablet {
  position: absolute;
  inset: 18px;
  border-radius: 30px;
  background: #121a27;
  padding: 14px;
  transform: rotate(-4deg);
  box-shadow: 0 24px 35px #1f2d4838;
}

.screen {
  position: relative;
  height: 100%;
  border-radius: 22px;
  overflow: hidden;
  background:
    url("/images/hero/cover_tablet.jpeg") center / cover no-repeat,
    radial-gradient(circle at 22% 15%, #fff59c 0%, #fff59c00 40%),
    linear-gradient(180deg, #76cbff 0%, #9ce8ff 52%, #9ae568 100%);
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.numbers {
  position: absolute;
  bottom: 18px;
  display: flex;
  gap: 8px;
  padding: 10px;
}

.num {
  width: clamp(34px, 3vw, 48px);
  height: clamp(34px, 3vw, 48px);
  border-radius: 12px;
  font-weight: 800;
  font-family: "Baloo 2", "Comic Sans MS", cursive;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 4px 0 #0000002e;
  border: 0;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.num:hover { transform: translateY(-2px); }

.num[aria-pressed="true"] {
  filter: brightness(1.08);
  box-shadow: 0 0 0 3px #ffffffcc, 0 4px 0 #0000002e;
}

.num:nth-child(1) { background: #ff5f4d; }
.num:nth-child(2) { background: #ffb300; }
.num:nth-child(3) { background: #56b0ff; }
.num:nth-child(4) { background: #64c94d; }
.num:nth-child(5) { background: #9857ff; }

.spark {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--sun);
  transform: rotate(45deg);
  border-radius: 2px;
  animation: blink 1.8s ease-in-out infinite;
}

.s1 { top: 50px; left: 36px; }
.s2 { top: 36px; right: 44px; animation-delay: 0.8s; }
.s3 { bottom: 56px; right: 20px; animation-delay: 1.2s; }

.features {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.feature {
  background: #ffffffd6;
  border: 1px solid #ffffff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 8px 20px #4f8ea519;
}

.feature strong {
  font-family: "Baloo 2", "Comic Sans MS", cursive;
  font-size: 1.15rem;
}

.feature p {
  margin: 4px 0 0;
  color: var(--text-soft);
}

.store-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.store-link {
  display: inline-block;
  border-radius: 16px;
  transition: transform 0.2s ease;
}

.store-link:hover { transform: translateY(-2px); }

.store-link img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ───── Exercises section ───── */
.page-home .exercises {
  padding: 40px 24px 8px;
  max-width: 1040px;
  margin: 0 auto;
  text-align: center;
}

.page-home .exercises h2 {
  font-family: "Baloo 2", cursive;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--text-main);
  margin: 0 0 8px;
}

.page-home .exercises > p {
  color: var(--text-soft);
  margin: 0 0 28px;
}

.exercises-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  text-align: left;
}

.exercise-card {
  background: var(--card);
  border-radius: 18px;
  padding: 24px 20px;
  box-shadow: 0 2px 12px rgba(60, 90, 140, 0.08);
}

.exercise-icon {
  display: block;
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.exercise-card strong {
  display: block;
  font-family: "Baloo 2", cursive;
  font-size: 1.05rem;
  color: var(--brand-dark);
  margin-bottom: 6px;
}

.exercise-card p {
  font-size: 0.88rem;
  color: var(--text-soft);
  margin: 0;
  line-height: 1.5;
}

/* ───── Rewards section ───── */
.page-home .rewards-section {
  padding: 32px 24px 40px;
  max-width: 1040px;
  margin: 0 auto;
  text-align: center;
}

.page-home .rewards-section h2 {
  font-family: "Baloo 2", cursive;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--text-main);
  margin: 0 0 8px;
}

.page-home .rewards-section > p {
  color: var(--text-soft);
  margin: 0 0 28px;
}

.rewards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  text-align: left;
}

.reward-item {
  background: var(--card);
  border-radius: 18px;
  padding: 24px 20px;
  box-shadow: 0 2px 12px rgba(60, 90, 140, 0.08);
}

.reward-icon {
  display: block;
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.reward-item strong {
  display: block;
  font-family: "Baloo 2", cursive;
  font-size: 1.05rem;
  color: var(--brand-dark);
  margin-bottom: 6px;
}

.reward-item p {
  font-size: 0.88rem;
  color: var(--text-soft);
  margin: 0;
  line-height: 1.5;
}

.showcase {
  margin-top: 20px;
  background: #ffffffdb;
  border: 1px solid #ffffff;
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 12px 24px #4f8ea521;
}

.showcase h2 {
  margin: 0;
  font-family: "Baloo 2", "Comic Sans MS", cursive;
  font-size: clamp(1.35rem, 2.8vw, 2rem);
}

.showcase p {
  margin: 4px 0 14px;
  color: var(--text-soft);
}

.showcase-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.showcase-toggle {
  display: inline-flex;
  border-radius: 999px;
  background: #e8f5ff;
  border: 1px solid #c9e9ff;
  padding: 4px;
}

.showcase-toggle button {
  border: 0;
  background: transparent;
  color: #20516d;
  font-weight: 700;
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
}

.showcase-toggle button[aria-pressed="true"] {
  background: #ffffff;
  box-shadow: 0 4px 10px #2b618314;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.shot {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  background: transparent;
  border: 0;
  box-shadow: 0 10px 24px #4f8ea51f;
}

.shot img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
  background: transparent;
  border-radius: 16px;
}

.showcase[data-preview="phone"] .shot img {
  aspect-ratio: 9 / 16;
  object-fit: contain;
}

.showcase[data-preview="phone"] .shot {
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

.page-home footer {
  margin-top: 20px;
  color: #4f7488;
  text-align: center;
  font-size: 0.92rem;
}

/* Home responsive */
@media (max-width: 860px) {
  .page-home .topbar {
    flex-direction: column;
    align-items: center;
    padding: 16px 12px;
  }

  .download-ribbon { flex-direction: column; align-items: flex-start; }
  .hero            { grid-template-columns: 1fr; }
  .hero-visual     { min-height: 320px; }
  .features        { grid-template-columns: 1fr; }
  .store-grid      { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .showcase-grid   { grid-template-columns: 1fr; }
  .showcase-top    { flex-direction: column; align-items: flex-start; }
  .showcase-toggle { margin-top: 4px; margin-bottom: 12px; }
}

@media (max-width: 560px) {
  .download-ribbon .store-grid { grid-template-columns: repeat(2, minmax(120px, 1fr)); }

  .screen {
    background:
      url("/images/hero/cover_phone.jpeg") center / cover no-repeat,
      radial-gradient(circle at 22% 15%, #fff59c 0%, #fff59c00 40%),
      linear-gradient(180deg, #76cbff 0%, #9ce8ff 52%, #9ae568 100%);
  }

  .showcase-toggle { margin-bottom: 16px; }
  .showcase[data-preview="phone"] .shot { max-width: 230px; }
}

@media (max-width: 500px) {
  .hero-visual { min-height: 590px; }

  .hero-visual::before { inset: 30px 18px 18px 18px; }

  .tablet {
    inset: auto;
    top: 18px;
    left: 50%;
    width: min(84vw, 320px);
    height: min(150vw, 540px);
    transform: translateX(-50%) rotate(-2deg);
    border-radius: 34px;
    padding: 12px;
  }

  .screen  { border-radius: 24px; }
  .numbers { bottom: 14px; gap: 6px; padding: 8px; }
  .num     { width: 42px; height: 42px; border-radius: 11px; }
}

/* ═══════════════════════════════════════════════════════════════
   PRIVACY POLICY PAGE  (.page-privacy on <body>)
═══════════════════════════════════════════════════════════════ */
body.page-privacy {
  --bg: #fff6e8;
  --card: #ffffff;
  --text: #2f1e0f;
  --muted: #6b5b4d;
  --accent: #f4b957;
  --nav-bg: rgba(255, 255, 255, 0.92);

  margin: 0;
  min-height: 100vh;
  scrollbar-gutter: stable;
  color: var(--text);
  font-family: "Nunito", "Trebuchet MS", sans-serif;
  line-height: 1.6;
  background:
    radial-gradient(circle at 15% 8%, #fff3be 0, #fff3be66 15%, #0000 36%),
    linear-gradient(180deg, #a5ecff 0%, #dff7ff 40%, #fff6e8 100%);
}

/* ═══════════════════════════════════════════════════════════════
   SUPPORT PAGE  (.page-support on <body>)
═══════════════════════════════════════════════════════════════ */
body.page-support {
  --bg: #fff6e8;
  --card: #ffffff;
  --text: #2f1e0f;
  --muted: #6b5b4d;
  --nav-bg: rgba(255, 255, 255, 0.92);

  margin: 0;
  min-height: 100vh;
  scrollbar-gutter: stable;
  color: var(--text);
  font-family: "Nunito", "Trebuchet MS", sans-serif;
  line-height: 1.6;
  background:
    radial-gradient(circle at 12% 10%, #fff3be 0, #fff3be66 15%, #0000 36%),
    linear-gradient(180deg, #a5ecff 0%, #dff7ff 40%, #fff6e8 100%);
}

/* Shared — privacy & support */
.page-privacy .topbar,
.page-support .topbar {
  max-width: 1120px;
  margin: 18px auto 8px;
  padding: 0 16px;
}

.page-privacy main,
.page-support main {
  margin: 20px auto 32px;
  padding: 0 16px;
}

.page-privacy main { max-width: 860px; }
.page-support main { max-width: 760px; }

.page-privacy article,
.page-support article {
  background: var(--card);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.page-privacy h1,
.page-support h1 {
  margin-top: 0;
}

.page-privacy main a,
.page-support main a {
  color: #0a66cc;
}

.page-privacy ul,
.page-support ul {
  padding-left: 20px;
}

/* Privacy-only */
.page-privacy h2 {
  margin-top: 24px;
}

.note {
  color: var(--muted);
}

.updated {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff2d6;
  border: 1px solid var(--accent);
  font-size: 13px;
}

.support-box {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #eef6ff;
  border: 1px solid #b6d8ff;
}

.support-box p {
  margin: 0;
}

/* Support-only */
.muted {
  color: var(--muted);
}

/* ═══════════════════════════════════════════════════════════════
   404 PAGE  (.page-404 on <body>)
═══════════════════════════════════════════════════════════════ */
body.page-404 {
  --sky-top: #a5ecff;
  --sky-bottom: #dff7ff;
  --text-main: #173047;
  --brand: #ff7f32;

  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: "Nunito", "Trebuchet MS", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 10% 15%, #ffffff 0, #ffffff80 10%, #0000 35%),
    linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 42%, #f2ffe0 100%);
  text-align: center;
  padding: 24px;
}

.card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #ffffff;
  border-radius: 24px;
  padding: 40px 32px;
  max-width: 420px;
  box-shadow: 0 18px 36px #4f8ea51f;
}

.code {
  font-family: "Baloo 2", "Comic Sans MS", cursive;
  font-weight: 800;
  font-size: 5rem;
  color: var(--brand);
  line-height: 1;
  margin: 0;
}

.page-404 h1 {
  font-family: "Baloo 2", "Comic Sans MS", cursive;
  font-weight: 800;
  font-size: 1.6rem;
  margin: 12px 0 8px;
}

.page-404 p {
  color: #406177;
  margin: 0 0 24px;
  line-height: 1.5;
}

.home-btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 800;
  color: white;
  background: linear-gradient(180deg, var(--brand), #e46617);
  border-radius: 14px;
  padding: 12px 24px;
  box-shadow: 0 6px 0 #b95012;
  transition: transform 0.2s ease;
}

.home-btn:hover {
  transform: translateY(-2px);
}
