/*
 * Landing page v2 styles (public#home, layout "home").
 * Clean, light, content-first template (KiddiKash-style structure).
 * Design rules learned from the mobile bugs of the previous cinematic page:
 *   - No content starts hidden: nothing here (or in any future edit) may set
 *     content to opacity:0 pending a JS reveal — sections must render fully
 *     with JavaScript disabled.
 *   - Text is never overlaid on screenshots; images are shown whole.
 *   - Consistent section rhythm; flat/soft backgrounds for readable text.
 * RTL-aware via logical properties + [dir="rtl"] font swap.
 */

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

:root {
  --bg: #faf8f4;
  --bg-tint: #f3efe7;
  --surface: #ffffff;
  --accent: #4f46e5;
  --accent-glow: #6366f1;
  --gold: #b8860b;
  --purple: #7c3aed;
  --text: #1a1a1f;
  --muted: #5f5f68;
  --radius: 16px;
  --shadow-card: 0 1px 2px rgba(26,26,31,0.04), 0 8px 24px rgba(26,26,31,0.06);
}

html { scroll-behavior: smooth; font-size: 106.25%; }

body {
  font-family: 'Outfit', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

[dir="rtl"] body { font-family: 'Heebo', system-ui, sans-serif; }

a { color: inherit; }

/* ─── NAVIGATION (always solid — readable without any JS) ─── */
.nav {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

/* .scrolled kept as a no-op alias so nothing breaks if re-added later */
.nav.scrolled { background: rgba(250, 248, 244, 0.96); }

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.3s;
}

.nav-links a:hover { color: var(--accent); }

.nav-cta {
  background: var(--accent);
  color: white !important;
  padding: 0.6rem 1.5rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s, background 0.3s;
  display: inline-block;
}

.nav-cta:hover { transform: translateY(-1px); background: var(--accent-glow); }
.nav-cta:active { transform: scale(0.97); }

.nav-utility { display: flex; align-items: center; gap: 1rem; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  padding: 0.25rem;
}

.mobile-menu {
  position: fixed;
  top: 0; inset-inline: 0;
  z-index: 99;
  background: var(--surface);
  padding: 5rem 2rem 2rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  gap: 0.25rem;
}
/* Toggled via the mobile-menu Stimulus controller (adds/removes `hidden`).
   :not(.hidden) so the Tailwind `hidden` utility wins regardless of order. */
.mobile-menu:not(.hidden) { display: flex; flex-direction: column; }
.mobile-menu a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.mobile-menu .nav-cta { margin-top: 1rem; text-align: center; border-bottom: none; }

/* ─── HERO (flat warm gradient — no imagery behind text) ─── */
.hero {
  padding: 9rem 2rem 4rem;
  background:
    radial-gradient(60rem 30rem at 80% -10%, rgba(99,102,241,0.10), transparent 60%),
    radial-gradient(50rem 26rem at 10% 10%, rgba(212,160,23,0.08), transparent 60%),
    var(--bg);
  text-align: center;
}

.hero-inner { max-width: 46rem; margin: 0 auto; }

.hero-badge {
  display: inline-block;
  padding: 0.45rem 1.1rem;
  border: 1px solid rgba(79,70,229,0.25);
  background: rgba(79,70,229,0.06);
  color: var(--accent);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.hero-title span { display: block; }

.gradient-text {
  background: linear-gradient(100deg, var(--accent) 10%, var(--purple) 55%, var(--gold) 110%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.65;
  max-width: 40rem;
  margin: 0 auto 2rem;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 0.9rem 2.2rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.2s, background 0.3s, box-shadow 0.3s;
  box-shadow: 0 8px 20px rgba(79,70,229,0.25);
}
.btn-primary:hover { background: var(--accent-glow); transform: translateY(-2px); }
.btn-primary:active { transform: scale(0.98); }
.btn-large { padding: 1rem 2.6rem; font-size: 1.1rem; }

.btn-outline {
  border: 1.5px solid rgba(26,26,31,0.18);
  color: var(--text);
  background: var(--surface);
  padding: 0.9rem 2.2rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  display: inline-block;
  transition: border-color 0.3s, transform 0.2s;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.hero-note {
  margin-top: 1.1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ─── TRUST STRIP ─── */
.trust-strip {
  background: rgba(255,255,255,0.6);
  border-top: 1px solid rgba(0,0,0,0.05);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  padding: 3rem 2rem;
}

.trust-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  text-align: center;
}

.trust-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.9rem;
}

.trust-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.4rem; }
.trust-desc { font-size: 0.925rem; color: var(--muted); line-height: 1.55; max-width: 30ch; margin: 0 auto; }

/* ─── SECTION RHYTHM ─── */
.section { padding: 5rem 2rem; max-width: 1200px; margin: 0 auto; }

.section-tinted {
  max-width: none;
  background: var(--bg-tint);
}
.section-tinted > * { max-width: 1200px; margin-inline: auto; }

.section-head { text-align: center; margin-bottom: 3rem; }

.section-label {
  display: inline-block;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 0.9rem;
}

[dir="rtl"] .section-label { letter-spacing: 0.05em; }

.section-title {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.9rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 44rem;
  margin: 0 auto;
}

/* ─── FEATURES (text above, screenshot shown whole below — never overlaid) ─── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.feature-card-body { padding: 1.75rem 1.75rem 1.25rem; flex: 1; }

.feature-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.feature-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.5rem; }
.feature-desc { font-size: 0.95rem; color: var(--muted); line-height: 1.6; }

.feature-shot {
  display: block;
  width: 100%;
  height: auto;
  border-top: 1px solid rgba(0,0,0,0.05);
}

/* ─── HOW IT WORKS ─── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.step-card {
  background: var(--surface);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 1.75rem 1.5rem;
  text-align: center;
}

.step-number {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(79,70,229,0.08);
  color: var(--accent);
  font-weight: 800;
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.step-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; }
.step-desc { font-size: 0.9rem; color: var(--muted); line-height: 1.6; }

/* ─── PARENTS / KIDS SPLIT ─── */
.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.split-card {
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: var(--shadow-card);
}

.split-card.parents { background: linear-gradient(160deg, #eef2ff 0%, #ffffff 70%); }
.split-card.kids { background: linear-gradient(160deg, #fdf3e0 0%, #ffffff 70%); }

.split-card-title { font-size: 1.25rem; font-weight: 800; margin-bottom: 1.1rem; }

.split-list { list-style: none; display: flex; flex-direction: column; gap: 0.7rem; }

.split-list li {
  position: relative;
  padding-inline-start: 1.6rem;
  font-size: 0.975rem;
  color: var(--text);
  line-height: 1.55;
}

.split-list li::before {
  content: '✓';
  position: absolute;
  inset-inline-start: 0;
  color: var(--accent);
  font-weight: 800;
}

.split-card.kids .split-list li::before { color: var(--gold); }

/* ─── FINAL CTA ─── */
.cta-section {
  text-align: center;
  padding: 5rem 2rem 6rem;
  background:
    radial-gradient(40rem 20rem at 50% 100%, rgba(99,102,241,0.08), transparent 70%),
    var(--bg);
}

.cta-title { max-width: 18ch; margin-inline: auto; }
.cta-section .section-subtitle { margin-bottom: 2.25rem; }
.cta-actions { display: flex; justify-content: center; }

/* ─── FOOTER ─── */
.site-footer {
  background: #1a1a1f;
  color: #a0a0a6;
  padding: 4rem 2rem 2rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}

.footer-brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #eae7e2;
}

.footer-brand-name span { color: #818cf8; }

.footer-tagline {
  font-size: 0.95rem;
  color: #b4b4bb;
  line-height: 1.6;
  max-width: 35ch;
}

.footer-heading {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #eae7e2;
  margin-bottom: 1rem;
}

[dir="rtl"] .footer-heading { letter-spacing: 0.05em; }

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: #b4b4bb;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s;
}

.footer-links a:hover { color: #eae7e2; }

.footer-bottom {
  max-width: 1200px;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
  font-size: 0.8rem;
  color: #a0a0a6;
}

/* ─── TABLET ─── */
@media (max-width: 900px) {
  /* Single column, text above image — the image is always shown WHOLE
     (no object-fit: cover — cropped screenshots were one of the mobile
     bugs this redesign fixes). */
  .feature-grid { grid-template-columns: 1fr; max-width: 34rem; margin-inline: auto; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
}

/* ─── MOBILE ─── */
@media (max-width: 768px) {
  .nav { padding: 0.9rem 1.25rem; }
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }

  .hero { padding: 7rem 1.5rem 3.25rem; }
  .hero-subtitle { font-size: 1rem; }

  .trust-strip { padding: 2.5rem 1.5rem; }
  .trust-inner { grid-template-columns: 1fr; gap: 2rem; }

  .section { padding: 3.5rem 1.5rem; }
  .section-head { margin-bottom: 2.25rem; }

  /* Screenshots stack below their text at full card width — always whole,
     never a background, never under text. */
  .feature-card { flex-direction: column; }
  .feature-shot { border-inline-start: none; border-top: 1px solid rgba(0,0,0,0.05); }

  .split-grid { grid-template-columns: 1fr; }

  .cta-section { padding: 3.5rem 1.5rem 4.5rem; }

  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 480px) {
  .steps-grid { grid-template-columns: 1fr; }
  .hero-buttons { flex-direction: column; align-items: stretch; }
  .btn-primary, .btn-outline { text-align: center; }
}

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn-primary, .btn-outline, .nav-cta { transition: none; }
}
