/* ============================================================
   TuitionDesk homepage — visual re-skin (index.html ONLY).
   This file is linked only from index.html, so every rule here,
   including the :root token overrides, affects index.html alone —
   styles.css / tbos-homepage.css (shared by other pages) are
   untouched. Loaded AFTER styles.css + tbos-homepage.css so it
   wins the cascade on equal-specificity selectors.
   Palette/fonts adapted from the tuitiondesk-redesign.html prototype.
   ============================================================ */

:root {
  /* -- fonts: swap Rubik → Plus Jakarta Sans everywhere it's referenced -- */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* -- redesign palette (tbos-homepage.css tokens) -- */
  --ink: #0b1533;
  --ink-muted: #47506b;
  --ink-faint: #7a839c;
  --surface: #f7f8fc;
  --surface-2: #eef2fb;
  --accent: #1e40af;        /* brand */
  --accent-dark: #16307a;
  --accent-light: #e6edff;
  --brand-2: #3b6cf6;
  --pink: #ff5d8f;
  --gold: #ff9f1c;          /* warm accent, replaces old mustard gold */
  --gold-light: #fff4e2;
  --green: #16a36a;
  --danger: #e24e78;
  --danger-light: #ffe3ec;
  --border: #e3e7f2;
  --radius: 20px;
  --radius-sm: 12px;

  /* -- shared sitewide tokens (styles.css) used by header/nav/footer markup -- */
  --primary-900: #0b1533;
  --primary-800: #16204a;
  --primary-700: #47506b;
  --primary-600: #5b6788;
  --accent-700: #16307a;
  --accent-600: #1e40af;
  --accent-500: #3b6cf6;
  --accent-50: #e6edff;
  --gray-200: #e3e7f2;
}

body.tbos-home {
  background: var(--surface);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

body.tbos-home h1,
body.tbos-home h2,
body.tbos-home h3 {
  letter-spacing: -0.02em;
}

/* ---------- buttons: pill shape + lift, matches the redesign .btn ---------- */
body.tbos-home .btn-primary,
body.tbos-home .btn-secondary {
  font-family: var(--font-sans);
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
body.tbos-home .btn-primary {
  box-shadow: 0 10px 28px -8px rgba(30, 64, 175, 0.55);
}
body.tbos-home .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -8px rgba(30, 64, 175, 0.6);
}
body.tbos-home .btn-secondary:hover {
  transform: translateY(-2px);
}
body.tbos-home .nav-links a.btn-primary,
body.tbos-home .plan-cta,
body.tbos-home .plan-cta-featured {
  border-radius: 999px;
}
body.tbos-home .plan-cta-featured {
  background: linear-gradient(135deg, var(--accent), var(--brand-2));
}

/* ---------- eyebrow / pill labels ---------- */
body.tbos-home .section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-2);
}
body.tbos-home .section-eyebrow::before {
  content: "";
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

/* ---------- header / nav ---------- */
body.tbos-home .header {
  background-color: rgba(247, 248, 252, 0.82);
}

/* ---------- card family: shared rounded/shadow language ---------- */
body.tbos-home .outcome-card,
body.tbos-home .ai-native-card,
body.tbos-home .tilt-card,
body.tbos-home .trust-item,
body.tbos-home .device-card,
body.tbos-home .plan-card,
body.tbos-home .testi-card,
body.tbos-home .pain-item,
body.tbos-home .roi-box,
body.tbos-home .world-class-grid li,
body.tbos-home .os-stage,
body.tbos-home .feature-card,
body.tbos-home .td-accordion,
body.tbos-home .faq-item,
body.tbos-home .proof-stat {
  border-radius: var(--radius);
  box-shadow: 0 2px 10px -4px rgba(11, 21, 51, 0.08);
}
body.tbos-home .feature-card,
body.tbos-home .roi-box,
body.tbos-home .proof-stat {
  border-radius: var(--radius-sm);
}

/* ---------- hero: text + decorative visual side-by-side ---------- */
body.tbos-home .hero {
  position: relative;
  overflow: hidden;
}
body.tbos-home .hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 700px;
  height: 700px;
  background:
    radial-gradient(circle at 60% 40%, rgba(59, 108, 246, 0.18), transparent 60%),
    radial-gradient(circle at 30% 70%, rgba(255, 159, 28, 0.14), transparent 55%);
  pointer-events: none;
  z-index: 0;
}
body.tbos-home .hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 32px;
  align-items: center;
}
@media (min-width: 900px) {
  body.tbos-home .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    text-align: left;
  }
  body.tbos-home .hero-text {
    text-align: left;
  }
  body.tbos-home .hero-text .hero-cta-group,
  body.tbos-home .hero-text .hero-cta-links,
  body.tbos-home .hero-text .hero-stores {
    justify-content: flex-start;
    align-items: flex-start;
  }
  body.tbos-home .hero-text .hero-cta-group {
    flex-direction: row;
  }
}
body.tbos-home .hero-visual {
  position: relative;
  height: 360px;
  display: none;
}
@media (min-width: 900px) {
  body.tbos-home .hero-visual {
    display: block;
  }
}
body.tbos-home .hero-phone {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 220px;
  height: 440px;
  transform: translate(-50%, -50%) rotate(-6deg);
  border-radius: 36px;
  background: linear-gradient(160deg, #1b2550, #0b1533);
  box-shadow: 0 30px 60px -20px rgba(30, 64, 175, 0.45);
  transition: opacity 0.8s ease;
}
/* Lazy-loaded 3D hero (Three.js, loaded only once the browser is idle — see script at
   end of body). Starts invisible so the CSS fallback phone above is what paints first;
   once WebGL is ready, the canvas fades in and the fallback fades out. If the module
   fails to load (blocked, old browser, reduced motion), the fallback simply stays. */
body.tbos-home #hero3d {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease;
  z-index: 1;
}
body.tbos-home #hero3d.tbos-3d-ready {
  opacity: 1;
}
body.tbos-home .hero-visual.tbos-3d-loaded .hero-phone {
  opacity: 0;
}
body.tbos-home .hero-phone::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 28px;
  background: linear-gradient(180deg, #eef3ff, #ffffff);
}
body.tbos-home .hero-phone::after {
  content: "₹48,200 collected";
  position: absolute;
  left: 20px;
  top: 40px;
  right: 20px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-sans);
}
body.tbos-home .hero-float {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  padding: 10px 14px;
  box-shadow: 0 16px 34px -14px rgba(11, 21, 51, 0.32);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  animation: tbos-bob 6s ease-in-out infinite;
}
body.tbos-home .hero-float b { display: block; font-size: 13px; }
body.tbos-home .hero-float span { color: var(--ink-faint); font-size: 11px; font-weight: 500; }
body.tbos-home .hero-float .ic { font-size: 16px; }
body.tbos-home .hero-float-1 { top: 8%; left: 0; }
body.tbos-home .hero-float-2 { top: 32%; right: 0; animation-delay: -2s; }
body.tbos-home .hero-float-3 { bottom: 14%; left: 4%; animation-delay: -4s; }
body.tbos-home .hero-float-note {
  bottom: 2%;
  right: 6%;
  font-family: 'Caveat', cursive;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  background: #fff8e1;
  animation-delay: -1s;
}
@keyframes tbos-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@media (prefers-reduced-motion: reduce) {
  body.tbos-home .hero-float { animation: none; }
}

/* ---------- AI-native bento: give the grid uneven, bento-feel spans ---------- */
@media (min-width: 900px) {
  body.tbos-home .ai-native-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(150px, auto);
  }
  body.tbos-home .ai-native-card:first-child {
    grid-column: span 2;
    grid-row: span 2;
    background: linear-gradient(160deg, var(--accent), var(--brand-2));
    border: 0;
  }
  body.tbos-home .ai-native-card:first-child .ai-native-card-title,
  body.tbos-home .ai-native-card:first-child .ai-native-card-desc {
    color: #fff;
  }
  body.tbos-home .ai-native-card:nth-child(6) {
    grid-column: span 2;
  }
}

/* ---------- ecosystem "loop" orbit diagram (decorative, aria-hidden) ---------- */
body.tbos-home .ecosystem-orbit {
  position: relative;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1;
  margin: 0 auto 32px;
}
body.tbos-home .ecosystem-orbit svg { position: absolute; inset: 0; width: 100%; height: 100%; }
body.tbos-home .ecosystem-orbit-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #7da2ff, var(--accent) 70%);
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 0 0 10px rgba(59, 108, 246, 0.12), 0 14px 34px -10px rgba(30, 64, 175, 0.55);
}
body.tbos-home .ecosystem-orbit-node {
  position: absolute;
  transform: translate(-50%, -50%);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  box-shadow: 0 10px 22px -10px rgba(11, 21, 51, 0.25);
}
body.tbos-home .eco-owner { top: 6%; left: 50%; }
body.tbos-home .eco-teacher { top: 72%; left: 85%; }
body.tbos-home .eco-parent { top: 72%; left: 15%; }

/* ---------- pricing calculator ---------- */
body.tbos-home .price-calc {
  max-width: 100%;
  margin: 0 0 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  box-shadow: 0 2px 10px -4px rgba(11, 21, 51, 0.08);
}
body.tbos-home .price-calc label {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}
body.tbos-home .price-calc label output { color: var(--accent); font-size: 18px; }
body.tbos-home .price-calc input[type="range"] {
  width: 100%;
  margin: 14px 0 10px;
  accent-color: var(--accent);
}
body.tbos-home .price-calc-result {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--accent-light);
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink);
}
body.tbos-home .price-calc-result b { color: var(--accent); }

/* ---------- FAQ accordion (+ / −), surfaces all FAQPage Q&As ---------- */
body.tbos-home .faq-section { padding: 56px var(--tbos-page-gutter) 48px; max-width: var(--tbos-content-max); margin: 0 auto; }
body.tbos-home .faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
body.tbos-home .faq-item {
  border: 1px solid var(--border);
  background: #fff;
  padding: 2px 20px;
}
body.tbos-home .faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 0;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
body.tbos-home .faq-item summary::-webkit-details-marker { display: none; }
body.tbos-home .faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  font-size: 20px;
  line-height: 1;
  color: var(--brand-2);
  font-weight: 400;
}
body.tbos-home .faq-item[open] summary::after { content: "–"; }
body.tbos-home .faq-item p {
  margin: 0 0 18px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-muted);
}

/* ---------- testimonials: dark gradient panel + marquee ---------- */
body.tbos-home .testimonials {
  background: linear-gradient(160deg, #0b1533, #1e2a5e);
}
body.tbos-home .testi-marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
body.tbos-home .testi-marquee .testi-list.testi-track {
  flex-direction: row;
  width: max-content;
  animation: tbos-marquee 36s linear infinite;
}
body.tbos-home .testi-marquee:hover .testi-track {
  animation-play-state: paused;
}
body.tbos-home .testi-marquee .testi-card {
  width: 320px;
  flex-shrink: 0;
}
@keyframes tbos-marquee {
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  body.tbos-home .testi-marquee .testi-track { animation: none; }
}

/* ---------- final CTA: gradient band like the redesign ---------- */
body.tbos-home .final-cta {
  background: linear-gradient(135deg, #1e40af, #3b6cf6 55%, #7b5cff);
  border-radius: 36px;
  margin: 0 var(--tbos-page-gutter) 0;
  color: #fff;
  position: relative;
  overflow: hidden;
}
body.tbos-home .final-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 120%, rgba(255, 159, 28, 0.35), transparent 50%);
  pointer-events: none;
}
body.tbos-home .final-cta > * { position: relative; z-index: 1; }
body.tbos-home .final-cta h2,
body.tbos-home .final-cta h2 em { color: #fff; }
body.tbos-home .final-cta-sub { color: #dbe5ff; }
body.tbos-home .final-cta .btn-primary { background: #fff; color: var(--accent); }
body.tbos-home .final-cta .perk { color: #dbe5ff; }
body.tbos-home .final-cta .perk::before { color: #9ff0c8; }

/* ---------- scroll reveal (progressive enhancement — see js/homepage-fx.js) ---------- */
/* Default state is fully visible — if JS never runs, nothing is hidden.
   JS adds .tbos-pending right before observing, then swaps to .tbos-in
   once the element scrolls into view. */
body.tbos-home .tbos-reveal.tbos-pending {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
body.tbos-home .tbos-reveal.tbos-pending.tbos-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  body.tbos-home .tbos-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
