/* ==========================================================================
   WiggleMate home page: the lively layer. Loads after site.css and pip-life.css
   (floating icons, corner Pip and scroll reveals come from pip-life.css/.js).
   Everything is scoped to body[data-page="home"] and only overrides looks, never layout.
   ========================================================================== */

body[data-page="home"] { background: #FFFFFF; }

/* ---------- Header: frosted glass, a small shadow once you scroll ---------- */
body[data-page="home"] .site-header {
  background: rgba(255, 252, 247, 0.8);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--s-line);
}
body[data-page="home"] .nav-cta .btn { position: relative; overflow: hidden; }

/* ---------- Hero: mint-to-cream wash, a faint dot grid, one soft glow behind the buddy ---------- */
body[data-page="home"] .hero-section {
  padding-top: 72px;
  background:
    radial-gradient(55% 70% at 78% 45%, rgba(127, 212, 148, 0.28), transparent 70%),
    radial-gradient(40% 50% at 8% 10%, rgba(255, 214, 186, 0.35), transparent 70%),
    linear-gradient(180deg, #EEF8F2 0%, #F7FBF6 55%, #FFFCF7 100%);
}
@media (min-width: 960px) { body[data-page="home"] .hero-section { padding-top: 96px; } }
/* dot grid, fading out towards the edges */
body[data-page="home"] .hero-section::before {
  inset: 0;
  width: auto; height: auto; left: 0; right: 0; top: 0; margin: 0;
  border-radius: 0;
  background-image: radial-gradient(rgba(45, 122, 96, 0.16) 1.2px, transparent 1.4px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(75% 70% at 50% 40%, #000 30%, transparent 100%);
  mask-image: radial-gradient(75% 70% at 50% 40%, #000 30%, transparent 100%);
  animation: none;
}
/* slow breathing glow behind the desk demo */
body[data-page="home"] .hero-section::after {
  width: 620px; height: 620px; left: auto; right: -120px; top: 40px; margin: 0;
  background: radial-gradient(circle, rgba(95, 208, 180, 0.32), transparent 65%);
  animation: sGlow 9s ease-in-out infinite alternate;
}
@keyframes sGlow { to { transform: scale(1.12); opacity: 0.75; } }
@media (max-width: 959px) {
  body[data-page="home"] .hero-section { padding-top: 44px; }
  body[data-page="home"] .hero-section::after { right: -220px; top: auto; bottom: 40px; }
}
body[data-page="home"] .hero-headline { letter-spacing: -0.025em; }
body[data-page="home"] .hero-headline .accent {
  color: var(--green-primary);
  background: linear-gradient(90deg, rgba(255, 148, 170, 0.5), rgba(255, 186, 150, 0.5)) no-repeat 0 78% / 0% 30%;
  animation: sMark 0.9s cubic-bezier(0.6, 0, 0.2, 1) 0.6s forwards;
}
@keyframes sMark { to { background-size: 100% 30%; } }
body[data-page="home"] .hero-pill { background: var(--s-glass); backdrop-filter: blur(8px); }
body[data-page="home"] .hero-visual .desk { box-shadow: 0 40px 80px -30px rgba(16, 48, 42, 0.45); }

/* a light sweep across the main buttons */
body[data-page="home"] .btn-primary.btn-lg { position: relative; overflow: hidden; }
body[data-page="home"] .btn-primary.btn-lg::after,
body[data-page="home"] .btn-light.btn-lg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.35) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: sShine 4.5s ease-in-out 1.5s infinite;
  pointer-events: none;
}
body[data-page="home"] .btn-light.btn-lg { position: relative; overflow: hidden; }
body[data-page="home"] .btn-light.btn-lg::after { background: linear-gradient(105deg, transparent 35%, rgba(127, 212, 148, 0.4) 50%, transparent 65%); }

/* ---------- Section rhythm: a tinted section, then a white one, all the way down (the dark band is the one exception) ----------
   hero · greeting (white) · problem (peach) · features · tracker (mint) · reactions · settings (peach) · dark band ·
   characters · pricing (peach) · privacy · FAQ (mint) · coming soon · closing (mint) */
body[data-page="home"] .section { padding: 64px 0; }
@media (min-width: 900px) { body[data-page="home"] .section { padding: 84px 0; } }
body[data-page="home"] .section-alt { background: #FFFFFF; border: 0; }
body[data-page="home"] section[aria-labelledby="problem-title"],
body[data-page="home"] section[aria-labelledby="settings-title"],
body[data-page="home"] section[aria-labelledby="pricing-title"] { background: #FFF3E8; border-top: 1px solid #F8E3D2; border-bottom: 1px solid #F8E3D2; }
body[data-page="home"] section[aria-labelledby="tracker-title"],
body[data-page="home"] section[aria-labelledby="faq-title"] { background: #E9F6EF; border-top: 1px solid #D3EBDD; border-bottom: 1px solid #D3EBDD; }

/* titles: a little line either side of every tag, a bit more punch */
body[data-page="home"] .section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.14em;
}
body[data-page="home"] .section-tag::before,
body[data-page="home"] .section-tag::after { content: ""; width: 22px; height: 1.5px; background: currentColor; opacity: 0.45; border-radius: 2px; }
body[data-page="home"] .split-copy .section-tag::after { display: none; }
body[data-page="home"] .section-title { letter-spacing: -0.02em; }
body[data-page="home"] .section-dark .section-tag { color: #8FE0B5; }

/* ---------- Cards: soft depth, lift on hover ---------- */
body[data-page="home"] .problem-card,
body[data-page="home"] .feature-card,
body[data-page="home"] .reaction-card,
body[data-page="home"] .character-card,
body[data-page="home"] .tracker-card,
body[data-page="home"] .privacy-card,
body[data-page="home"] .mock-card {
  border-color: var(--s-line);
  box-shadow: var(--s-shadow);
  transition: transform 0.35s var(--ease-smooth), box-shadow 0.35s var(--ease-smooth), background 0.3s;
}
@media (hover: hover) {
  body[data-page="home"] .problem-card:hover,
  body[data-page="home"] .feature-card:hover,
  body[data-page="home"] .reaction-card:hover,
  body[data-page="home"] .tracker-card:hover,
  body[data-page="home"] .privacy-card:hover { transform: translateY(-5px); box-shadow: var(--s-shadow-lift); }
  body[data-page="home"] .character-card:hover { transform: translateY(-6px) rotate(-1.5deg); box-shadow: var(--s-shadow-lift); }
  body[data-page="home"] .character-card:hover .character-avatar img { animation: sBob 1.6s ease-in-out infinite; }
  body[data-page="home"] .feature-card:hover .feature-icon-box { transform: scale(1.08) rotate(-4deg); }
}
body[data-page="home"] .feature-icon-box { transition: transform 0.35s cubic-bezier(0.3, 1.5, 0.5, 1); }
body[data-page="home"] .problem-card.is-late { box-shadow: 0 0 0 2px rgba(232, 103, 58, 0.25), var(--s-shadow); }

/* reveal items must not fight the hover transforms */
body[data-page="home"] .reveal.in:hover { transition-delay: 0ms; }

/* ---------- Dark comparison section ---------- */
body[data-page="home"] .section-dark {
  background:
    radial-gradient(60% 50% at 15% 0%, rgba(108, 198, 132, 0.22), transparent 70%),
    radial-gradient(50% 60% at 100% 100%, rgba(255, 148, 170, 0.12), transparent 70%),
    linear-gradient(160deg, var(--s-forest-2) 0%, var(--s-forest) 70%);
}

/* ---------- Price card: gradient ring + Pip peeking over the top ---------- */
body[data-page="home"] .pricing-card-main {
  border: 0;
  background:
    linear-gradient(#FFFFFF, #FBFDFC) padding-box,
    linear-gradient(140deg, #7FD494, var(--green-primary) 40%, #FFB59A) border-box;
  border: 2px solid transparent;
  box-shadow: 0 40px 80px -30px rgba(16, 48, 42, 0.4);
  overflow: visible;
}
.home-price-pip {
  position: absolute;
  top: -66px;
  left: 50%;
  width: 78px;
  height: 85px;
  margin-left: -39px;
  filter: drop-shadow(0 8px 12px rgba(16, 48, 42, 0.18));
  animation: sBob 4s ease-in-out infinite;
  z-index: 2;
  pointer-events: none;
}
body[data-page="home"] .pricing-wrap .section-header { margin-bottom: 64px; }

/* ---------- FAQ + final call to action ---------- */
body[data-page="home"] .faq-item { border-color: var(--s-line); border-radius: 20px; }
body[data-page="home"] .faq-item[open] { box-shadow: var(--s-shadow); }
body[data-page="home"] .final-cta-card .character-preview { animation: sBob 4s ease-in-out infinite; }

/* ---------- Footer ---------- */
body[data-page="home"] .site-footer { background: #FFFFFF; }

/* the corner Pip never covers the page footer on phones */
@media (max-width: 760px) {
  body[data-page="home"] .site-footer { padding-bottom: 76px; }
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="home"] .hero-headline .accent { background-size: 100% 30%; }
}

/* ---------- For visitors from social: offer strip, phone note, Pip's greeting, email-me-the-link ---------- */
/* site.js adds .is-phone (anything that isn't a Windows PC) and .is-mac to <html> */
.only-phone, .only-mac { display: none; }
.is-phone .only-phone { display: block; }
.is-mac .only-mac { display: block; }
.is-mac .only-phone { display: none; }

.home-strip {
  background: var(--s-forest);
  color: #CFE8DD;
  text-align: center;
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 16px;
  line-height: 1.4;
}
.home-strip b { color: #FFFFFF; }
.home-strip .left-line { color: #FFCF8A; }
.home-strip .left-line b { color: #FFFFFF; }
.home-strip .left-line:not([hidden])::before { content: " · "; color: #7FA898; }

/* price bits site.js hides until /api/price confirms the founding price (their own display rules would beat [hidden]) */
[data-launch-only][hidden], [data-left][hidden], [data-price-was][hidden] { display: none !important; }

.price-was { text-decoration: line-through; text-decoration-thickness: 2px; opacity: 0.6; font-weight: 600; margin-right: 5px; }

.home-phone-note {
  margin: 18px 0 0;
  padding: 12px 16px;
  max-width: 34em;
  border-radius: 16px;
  background: var(--s-glass);
  border: 1px solid var(--border-green);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-secondary);
}
.home-phone-note a { color: var(--green-primary); font-weight: 700; }

body[data-page="home"] .s-greet-band { background: #FFFFFF; border-top: 1px solid var(--s-line); }

/* closing: a mint band (after the white "coming soon") with the same space above and below the dark card */
body[data-page="home"] .final-cta-section { background: #E9F6EF; border-top: 1px solid #D3EBDD; padding: 64px 0; }
@media (max-width: 760px) { body[data-page="home"] .final-cta-section { padding: 32px 0; } }

.link-card { width: 100%; max-width: 560px; margin: 32px auto 0; padding: 24px 22px; border-radius: 24px; background: #FFFFFF; color: var(--ink); text-align: center; }
.link-card h2 { font-size: 22px; margin: 0 0 6px; color: var(--ink); }
.link-card p { margin: 0 0 14px; color: var(--ink-muted); font-size: 15px; }
form.mini { display: flex; gap: 8px; flex-wrap: wrap; }
form.mini input {
  flex: 1 1 200px;
  min-height: 50px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1.5px solid var(--border-light);
  font: 500 16px var(--font-body);
  color: var(--ink);
  background: var(--s-ivory);
}
form.mini input:focus { outline: none; border-color: var(--green-leaf); background: #FFFFFF; }
form.mini .btn { flex: 1 1 auto; }
.link-card .mini-msg { min-height: 1.4em; margin: 10px 0 0; font-size: 14.5px; color: var(--green-primary); font-weight: 600; }
.link-card .mini-msg.err { color: #B23A3A; }

/* the hero copy is on the left, so the floating icons stay in the outer margins (and are hidden when there's no room) */
body[data-page="home"] .s-float span:nth-child(1) { left: 1.5%; right: auto; top: 18%; }
body[data-page="home"] .s-float span:nth-child(2) { left: auto; right: 2%; top: 8%; }
body[data-page="home"] .s-float span:nth-child(3) { left: 2.5%; right: auto; top: 58%; }
body[data-page="home"] .s-float span:nth-child(4) { left: auto; right: 1.5%; top: 52%; }
body[data-page="home"] .s-float span:nth-child(5) { left: auto; right: 3%; top: 84%; }
body[data-page="home"] .s-float span:nth-child(6) { left: 1.5%; right: auto; top: 82%; }
@media (max-width: 1279px) { body[data-page="home"] .s-float { display: none; } }
