/* =========================================================
   Balo — HOME (Front Page)
   Cleaned + Single-Scroll + Day/Night Safe
   ========================================================= */

/* ------------------------------
   0) SHELL → Always transparent
------------------------------ */
body.home .wrap,
body.home .container,
body.home .section,
body.home .hero,
body.home .hero-wrap {
  background: transparent !important;
}

/* Remove inline white backgrounds from builders */
body.home [style*="background:#fff"],
body.home [style*="background: #fff"],
body.home [style*="background:white"],
body.home [style*="background: white"],
body.home [style*="background:#ffffff"],
body.home [style*="background: #ffffff"] {
  background: transparent !important;
}

/* ------------------------------
   1) TOKENS (HOME ONLY)
------------------------------ */
:root {
  --home-max: 1200px;
  --gap: clamp(18px, 2.2vw, 28px);
  --radius: 18px;

  --ink: var(--zen-ink);
  --text: var(--zen-text);
  --muted: var(--zen-muted);

  --card-bg: var(--zen-card-bg);
  --card-bd: var(--zen-card-bd);
  --shadow: var(--zen-shadow);
}

/* =========================================================
   2) HERO
========================================================= */
.hero-wrap {
  position: relative;
  text-align: center;
  padding: clamp(56px, 9vw, 120px) 16px clamp(28px, 5vw, 56px);
  isolation: isolate;
}

.hero-wrap .shimmer {
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero-text {
  max-width: 900px;
  margin: 0 auto;
}

.hero-title {
  color: var(--text);
  font-size: clamp(30px, 5.8vw, 60px);
  line-height: 1.05;
  margin: 0 0 .6rem;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .45);
}

.hero-subtitle {
  color: var(--text);
  opacity: 0.92;
  font-size: clamp(16px, 2.4vw, 20px);
  margin: 0 auto clamp(18px, 3vw, 28px);
  max-width: 70ch;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* Home CTA buttons inherit global zen glow */
.hero-wrap .btn {
  padding: 12px 18px;
}

/* Ghost button */
.hero-wrap .btn.btn--ghost {
  background: transparent;
  border-color: rgba(148, 163, 184, .34);
  color: var(--text);
}

/* Keep header clickable above shimmer */
body.zen-calm .site-header {
  position: relative;
  z-index: 10;
}

/* =========================================================
   3) FEATURES (3 sections)
========================================================= */
.section {
  padding: clamp(32px, 5.5vw, 72px) 16px;
}

.feature {
  max-width: var(--home-max);
  margin: 0 auto;
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1.08fr .92fr;
  align-items: center;
}

@media (max-width: 1000px) {
  .feature {
    grid-template-columns: 1fr;
  }
}

.feature--alt {
  grid-template-columns: .92fr 1.08fr;
}

@media (max-width: 1000px) {
  .feature--alt {
    grid-template-columns: 1fr;
  }
}

/* Feature media (video/images) */
.feature-media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--card-bd);
  background: var(--card-bg);
  aspect-ratio: 16 / 10;
}

.feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Feature text container */
.feature-text {
  background: var(--card-bg);
  border: 1px solid var(--card-bd);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: clamp(16px, 2.2vw, 22px);
}

/* Typography */
.h2 {
  color: var(--text);
  font-size: clamp(22px, 3.2vw, 32px);
  line-height: 1.15;
  margin: 0 0 .4rem;
  text-wrap: balance;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}

.lead {
  color: var(--text);
  opacity: .9;
  font-size: clamp(16px, 2.2vw, 19px);
  margin: 0 0 .8rem;
}

.bullets {
  margin: 0 0 1rem 0;
  padding: 0 0 0 1.1em;
  color: var(--muted);
}

.bullets li {
  margin: .25rem 0;
}

/* CTA inside features */
.feature .btn {
  margin-top: .4rem;
}

/* =========================================================
   4) ACCESSIBILITY / LINKS
========================================================= */

.home a {
  color: #c7d2fe;
  text-decoration: none;
}

.home a:hover {
  text-decoration: underline;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .feature-media,
  .feature-text {
    transition: none !important;
  }
}

/* =========================================================
   5) DAY MODE OVERRIDES
========================================================= */

body.balo-day.home .hero-title,
body.balo-day.home .h2 {
  color: #111827;
  text-shadow: none;
}

body.balo-day.home .hero-subtitle,
body.balo-day.home .lead {
  color: #374151;
  opacity: .88;
}

body.balo-day.home .feature-media,
body.balo-day.home .feature-text {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .06);
  color: #1e293b;
}

body.balo-day.home .bullets {
  color: #6b7280;
}

body.balo-day.home .btn--ghost {
  background: rgba(255, 255, 255, .85);
  border: 1px solid rgba(148, 163, 184, .4);
  color: #1f2937;
}

/* =========================================================
   6) HOMEPAGE — PARALLAX BACKGROUND
========================================================= */

/* Parallax container: DO NOT touch overflow-y here */
body.home {
  position: relative;
}

/* Layer container (auto-spawned via JS) */
.home-parallax-layer {
  position: fixed;
  inset: -20vh -20vw;
  z-index: -2;
  pointer-events: none;
  will-change: transform;
  transition: opacity 0.4s ease;
}

/* DAY MODE — Soft pastels */
body.balo-day.home .home-parallax-layer {
  background:
    radial-gradient(900px 700px at 20% 20%, rgba(135,170,255,0.22), transparent 70%),
    radial-gradient(700px 500px at 80% 30%, rgba(255,205,240,0.20), transparent 70%),
    linear-gradient(180deg, rgba(240,245,255,0.4), rgba(255,255,255,0.5));
  opacity: 0.55;
}

/* NIGHT MODE — Deep blues + violets */
body.balo-night.home .home-parallax-layer {
  background:
    radial-gradient(900px 700px at 20% 20%, rgba(80,120,255,0.22), transparent 70%),
    radial-gradient(700px 500px at 80% 30%, rgba(150,80,255,0.20), transparent 70%),
    linear-gradient(180deg, rgba(15,18,38,0.8), rgba(9,14,25,0.8));
  opacity: 0.42;
}

/* Extra depth layer */
.home-parallax-layer.layer-back {
  filter: blur(40px);
  opacity: 0.25 !important;
}

/* Smooth parallax transform from JS */
body.home.parallax-active .home-parallax-layer {
  transition: transform 0.15s ease-out, opacity 0.4s ease;
}

/* =========================================================
   7) SIGNATURE
========================================================= */
.home-signature {
  text-align: center;
  margin: 40px auto;
  font-size: 1rem;
  color: inherit;
}

.home-signature a {
  color: inherit;
  text-decoration: none;
}

.home-signature a:hover {
  text-decoration: underline;
}

/* =========================================================
   8) SINGLE-SCROLL SAFETY (HOME ONLY)
   Make sure inner wrappers never create their own scrollbars
========================================================= */

body.home .site,
body.home .site-content,
body.home .site-wrapper,
body.home .page-shell {
  overflow-y: visible !important;
  max-height: none !important;
}

/* Reduce weird rubber-band / bounce chaining on some browsers */
body.home {
  overscroll-behavior-y: none;
}
