/* ==========================================================================
   Master React Native — marketing site
   Plain CSS, no build step. Shared by the landing, Terms and Privacy pages.
   Brand: coral #F26A4A · coral-deep #D9532F · cream #F5EFE6 · ink #161311
   Fonts: Manrope (UI) + JetBrains Mono (labels / mono accents)
   ========================================================================== */

:root {
  --coral: #F26A4A;
  --coral-deep: #D9532F;
  --coral-soft: #FBD7C8;
  --cream: #F5EFE6;
  --card: #FBF6EE;
  --ink: #161311;
  --ink-soft: #3B342F;
  --yellow: #F5C24B;
  --mute: #8C8378;
  --rule: rgba(22, 19, 17, 0.08);
  --maxw: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

a { color: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

/* --- brand lockup (logo + wordmark) ----------------------------------- */
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand .mark { display: block; flex: none; }
.brand .word { font-size: 19px; font-weight: 800; letter-spacing: -0.5px; }
.brand .word .rn { color: var(--coral); }

/* ==========================================================================
   Top navigation
   ========================================================================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 239, 230, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }

/* Hamburger toggle (replaces the old horizontal nav links). */
.hamburger {
  background: transparent; border: none; padding: 10px;
  border-radius: 12px; cursor: pointer;
  color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.hamburger:hover { background: var(--rule); color: var(--coral-deep); }
.hamburger:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }

/* ==========================================================================
   Sidebar drawer
   ========================================================================== */
.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(22, 19, 17, 0.45);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 90;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(340px, 86vw);
  background: var(--cream);
  border-left: 1px solid var(--rule);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 100;
  display: flex; flex-direction: column;
  padding: 16px 22px 28px;
  box-shadow: -24px 0 50px rgba(22, 19, 17, 0.18);
}
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0 18px; margin-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}
.drawer-title {
  font-size: 11px; font-weight: 700; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--mute);
}
.drawer-close {
  background: transparent; border: none; padding: 8px;
  border-radius: 10px; cursor: pointer; color: var(--ink-soft);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.drawer-close:hover { background: var(--rule); color: var(--coral-deep); }
.drawer-close:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }

.drawer-links {
  display: flex; flex-direction: column; gap: 2px;
  margin: 0 -8px;
}
.drawer-links a {
  text-decoration: none; font-weight: 700; font-size: 15px;
  color: var(--ink); padding: 12px;
  border-radius: 12px;
  transition: background 0.15s ease, color 0.15s ease;
}
.drawer-links a:hover { background: var(--card); color: var(--coral-deep); }
.drawer-links a:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }

.drawer-cta {
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: auto;
  padding: 14px 18px;
  background: var(--ink); color: #fff;
  font-weight: 800; font-size: 15px; letter-spacing: -0.2px;
  text-decoration: none;
  border-radius: 14px;
  transition: background 0.15s ease, transform 0.15s ease;
}
.drawer-cta:hover { background: var(--coral-deep); transform: translateY(-1px); }
.drawer-cta:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }

body.drawer-open { overflow: hidden; }
body.drawer-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
body.drawer-open .drawer { transform: translateX(0); }

/* ==========================================================================
   Hero — dark ink panel with coral glow (echoes the app splash)
   ========================================================================== */
.hero {
  position: relative; overflow: hidden;
  background: var(--ink);
  color: #fff;
  text-align: center;
  padding: 96px 24px 104px;
}
.hero::before { /* coral radial glow */
  content: ''; position: absolute; top: 30%; left: 50%;
  width: 720px; height: 720px; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(242, 106, 74, 0.30) 0%, rgba(242, 106, 74, 0) 62%);
  filter: blur(10px); pointer-events: none;
}
.hero .inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }
.hero .mark { margin: 0 auto 22px; display: block; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6); margin-bottom: 20px;
}
.hero .eyebrow .acc { color: var(--coral); }
.hero h1 {
  font-size: clamp(34px, 6vw, 58px); font-weight: 800; letter-spacing: -1.4px;
  line-height: 1.04; margin: 0 0 18px;
}
.hero h1 .rn { color: var(--coral); }
.hero p.lede {
  font-size: clamp(16px, 2.4vw, 19px); color: rgba(255, 255, 255, 0.74);
  font-weight: 500; margin: 0 auto 34px; max-width: 560px;
}

/* App Store badge — clean white pill, real link to the App Store. */
.appstore-badge {
  display: inline-flex; align-items: center; gap: 12px;
  background: #fff; color: var(--ink);
  padding: 13px 22px 13px 18px; border-radius: 16px;
  text-decoration: none; cursor: pointer;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.appstore-badge:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34); }
.appstore-badge:focus-visible { outline: 2px solid var(--coral); outline-offset: 4px; }
.appstore-badge .apple { flex: none; }
.appstore-badge .txt { text-align: left; line-height: 1.15; }
.appstore-badge .txt .small { font-size: 11px; font-weight: 600; color: var(--mute); }
.appstore-badge .txt .big { font-size: 18px; font-weight: 800; letter-spacing: -0.3px; }
.hero .note { margin-top: 16px; font-size: 12px; color: rgba(255, 255, 255, 0.45); font-weight: 600; }

/* ==========================================================================
   Section scaffolding
   ========================================================================== */
section { padding: 86px 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 52px; }
.section-head .label {
  font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--coral-deep); margin-bottom: 10px;
}
.section-head h2 { font-size: clamp(28px, 4vw, 38px); font-weight: 800; letter-spacing: -0.8px; margin: 0 0 12px; }
.section-head p { color: var(--mute); font-weight: 500; font-size: 16px; margin: 0; }

/* --- features grid ---------------------------------------------------- */
.features { background: var(--cream); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  background: var(--card); border: 1px solid var(--rule); border-radius: 22px;
  padding: 28px 26px; transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(22, 19, 17, 0.08); }
.feature .ico {
  width: 50px; height: 50px; border-radius: 15px;
  background: var(--coral-soft); color: var(--coral-deep);
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
}
.feature h3 { font-size: 18px; font-weight: 800; letter-spacing: -0.3px; margin: 0 0 8px; }
.feature p { color: var(--ink-soft); font-size: 14.5px; margin: 0; opacity: 0.82; }

/* --- screenshots gallery ---------------------------------------------- */
.shots { background: var(--ink); color: #fff; }
.shots .section-head h2 { color: #fff; }
.shots .section-head p { color: rgba(255, 255, 255, 0.6); }
/* Horizontal slider ---------------------------------------------------- */
.slider { max-width: 1000px; margin: 0 auto; }
.slider-viewport { position: relative; }
.slider-track {
  display: flex; gap: 26px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  /* room so the phone shadow isn't clipped + breathing space at the edges */
  padding: 10px 28px 16px;
  scrollbar-width: none;            /* Firefox */
  -ms-overflow-style: none;         /* old Edge */
}
.slider-track::-webkit-scrollbar { display: none; } /* WebKit */
.slider-track .phone {
  flex: 0 0 auto;
  width: clamp(200px, 22vw, 240px);
  scroll-snap-align: center;
}

/* arrow buttons */
.slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--coral); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(217, 83, 47, 0.45);
  transition: background 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}
.slider-arrow:hover { background: var(--coral-deep); }
.slider-arrow:active { transform: translateY(-50%) scale(0.94); }
.slider-arrow.prev { left: -10px; }
.slider-arrow.next { right: -10px; }
.slider-arrow:disabled { opacity: 0.28; cursor: default; box-shadow: none; }
.slider-arrow:disabled:hover { background: var(--coral); }

/* dot indicators */
.slider-dots { display: flex; justify-content: center; gap: 9px; margin-top: 28px; }
.slider-dots button {
  width: 8px; height: 8px; padding: 0; border: none; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, 0.25);
  transition: background 0.2s ease, transform 0.2s ease;
}
.slider-dots button:hover { background: rgba(255, 255, 255, 0.45); }
.slider-dots button.active { background: var(--coral); transform: scale(1.35); }

.phone {
  position: relative; aspect-ratio: 9 / 19;
  background: #221c18; border: 6px solid #2c2620; border-radius: 30px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4); overflow: hidden;
}
.phone::after { /* notch */
  content: ''; position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 42%; height: 16px; background: #2c2620; border-radius: 0 0 12px 12px; z-index: 2;
}
.phone img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ==========================================================================
   Curriculum grid (17 modules)
   ========================================================================== */
.curriculum { background: var(--cream); }
.curriculum-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  counter-reset: none;
}
.curriculum-grid li {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--rule); border-radius: 16px;
  padding: 18px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.curriculum-grid li:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(22, 19, 17, 0.07);
  border-color: rgba(242, 106, 74, 0.3);
}
.curriculum-grid .num {
  flex: none;
  font-size: 12px; font-weight: 700; letter-spacing: 1px;
  color: var(--coral-deep);
  background: var(--coral-soft);
  padding: 6px 9px; border-radius: 10px;
}
.curriculum-grid .title { font-size: 15px; font-weight: 700; color: var(--ink); }

/* ==========================================================================
   AI tutor section
   ========================================================================== */
.ai-tutor {
  background: var(--ink); color: #fff;
  position: relative; overflow: hidden;
}
.ai-tutor::before {
  content: ''; position: absolute; top: -120px; left: -120px;
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(242, 106, 74, 0.20) 0%, rgba(242, 106, 74, 0) 65%);
  pointer-events: none;
}
.ai-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px;
  align-items: center; position: relative; z-index: 1;
}
.ai-copy .label { color: var(--coral); margin-bottom: 12px; }
.ai-copy h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; letter-spacing: -0.7px; margin: 0 0 16px; }
.ai-copy > p { color: rgba(255, 255, 255, 0.72); font-size: 16px; margin: 0 0 22px; max-width: 480px; }
.ai-bullets { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.ai-bullets li { display: flex; gap: 12px; align-items: flex-start; color: rgba(255, 255, 255, 0.82); font-size: 15px; font-weight: 500; }
.ai-bullets .dot {
  flex: none; width: 8px; height: 8px; border-radius: 50%;
  background: var(--coral); margin-top: 7px;
}
.ai-chat {
  display: flex; flex-direction: column; gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px; padding: 22px;
}
.chat-bubble { border-radius: 14px; padding: 14px 16px; font-size: 14.5px; line-height: 1.55; }
.chat-bubble.user {
  align-self: flex-end; max-width: 80%;
  background: var(--coral); color: #fff;
  border-bottom-right-radius: 6px;
  font-weight: 600;
}
.chat-bubble.user code { background: rgba(0, 0, 0, 0.18); padding: 1px 6px; border-radius: 5px; font-size: 13.5px; }
.chat-bubble.ai {
  align-self: flex-start; max-width: 94%;
  background: rgba(255, 255, 255, 0.94); color: var(--ink);
  border-bottom-left-radius: 6px;
}
.chat-bubble.ai p { margin: 0 0 10px; }
.chat-bubble.ai pre {
  margin: 0; background: var(--ink); color: #f5efe6;
  padding: 12px 14px; border-radius: 10px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12.5px; line-height: 1.55;
  overflow-x: auto;
}
.chat-bubble code { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* ==========================================================================
   FAQ accordion (native <details>)
   ========================================================================== */
.faq { background: var(--cream); }
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--card); border: 1px solid var(--rule); border-radius: 16px;
  padding: 0 22px;
  transition: border-color 0.15s ease;
}
.faq-item[open] { border-color: rgba(242, 106, 74, 0.25); }
.faq-item summary {
  list-style: none; cursor: pointer;
  padding: 18px 0; font-size: 16px; font-weight: 800; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ''; flex: none;
  width: 22px; height: 22px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23161311' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: center;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(180deg); }
.faq-item p {
  margin: 0 0 18px;
  color: var(--ink-soft); font-size: 15px; line-height: 1.7;
}
.faq-item summary:focus-visible { outline: 2px solid var(--coral); outline-offset: 4px; border-radius: 8px; }

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta { background: var(--coral); color: #fff; text-align: center; }
.cta h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; letter-spacing: -0.7px; margin: 0 0 14px; }
.cta p { font-size: 17px; opacity: 0.92; margin: 0 0 30px; font-weight: 500; max-width: 540px; margin-left: auto; margin-right: auto; }
.cta .appstore-badge { box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22); }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { background: var(--ink); color: rgba(255, 255, 255, 0.62); padding: 54px 0 40px; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.footer .brand .word { color: #fff; }
.footer-links { display: flex; gap: 26px; }
.footer-links a {
  text-decoration: none; font-weight: 700; font-size: 14px; color: rgba(255, 255, 255, 0.7);
  transition: color 0.15s ease;
}
.footer-links a:hover { color: var(--coral); }
.footer .copy { font-size: 13px; color: rgba(255, 255, 255, 0.4); width: 100%; font-weight: 500; }

/* ==========================================================================
   Legal pages (Terms / Privacy)
   ========================================================================== */
.legal-hero { background: var(--ink); color: #fff; padding: 64px 24px 56px; text-align: center; }
.legal-hero .label {
  font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--coral); margin-bottom: 10px;
}
.legal-hero h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 800; letter-spacing: -1px; margin: 0; }
.legal-hero .updated { margin-top: 12px; font-size: 13px; color: rgba(255, 255, 255, 0.5); font-weight: 600; }

.legal-body { max-width: 760px; margin: 0 auto; padding: 56px 24px 90px; }
/* Admin-authored content is injected here as HTML (same trusted, admin-only
   source the mobile app renders). Sensible defaults so raw text or rich HTML
   both read well. */
.legal-content { font-size: 16px; color: var(--ink-soft); }
.legal-content h1, .legal-content h2, .legal-content h3 {
  color: var(--ink); font-weight: 800; letter-spacing: -0.4px; line-height: 1.25;
  margin: 32px 0 12px;
}
.legal-content h1 { font-size: 26px; }
.legal-content h2 { font-size: 21px; }
.legal-content h3 { font-size: 18px; }
.legal-content p { margin: 0 0 16px; }
.legal-content ul, .legal-content ol { margin: 0 0 16px; padding-left: 22px; }
.legal-content li { margin-bottom: 8px; }
.legal-content a { color: var(--coral-deep); font-weight: 700; }
.legal-content strong { color: var(--ink); }

/* loading / empty state */
.legal-state { text-align: center; color: var(--mute); padding: 40px 0; }
.legal-state .spinner {
  width: 26px; height: 26px; margin: 0 auto 16px; border-radius: 50%;
  border: 3px solid var(--rule); border-top-color: var(--coral);
  animation: spin 0.8s linear infinite;
}
.legal-state h2 { color: var(--ink); font-weight: 800; font-size: 20px; margin: 0 0 6px; }
.legal-state p { margin: 0; font-weight: 500; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 880px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .curriculum-grid { grid-template-columns: repeat(2, 1fr); }
  .ai-grid { grid-template-columns: 1fr; gap: 36px; }
  .slider-arrow { width: 40px; height: 40px; }
}
@media (max-width: 620px) {
  section { padding: 64px 0; }
  .hero { padding: 72px 20px 80px; }
  .feature-grid { grid-template-columns: 1fr; }
  .curriculum-grid { grid-template-columns: 1fr; }
  /* Touch swipe + dots are enough on phones, hide the arrows. */
  .slider-arrow { display: none; }
  .slider-track { gap: 16px; padding: 10px 18px 14px; }
  .footer .wrap { flex-direction: column; align-items: flex-start; }
  .ai-chat { padding: 16px; }
}
