/* Index only — diary paper texture + lighter glass (user spec) */

body.page-home {
  --glass-fill: rgba(255, 255, 255, 0.75);
  --glass-fill-strong: rgba(255, 255, 255, 0.75);
  --glass-fill-subtle: rgba(255, 255, 255, 0.55);
  --glass-blur: 14px;
  --glass-blur-heavy: 14px;
  --glass-border-outline: rgba(28, 25, 23, 0.1);

  --bg-base: #f7f4ef;
  --bg-texture: url("../assets/bg-texture-a-beige-grain.png");
  --bg-blur: 6px; /* light soften — grain stays visible */

  background-color: var(--bg-base);
  background-image: none;
}

/* Wallpaper — texture A (beige grain), light blur */
body.page-home::before {
  content: "";
  position: fixed;
  inset: -12px;
  z-index: 0;
  pointer-events: none;
  background-image: var(--bg-texture);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(var(--bg-blur));
  transform: scale(1.02);
}

/* Light wash — do not overpower grain */
body.page-home::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(247, 244, 239, 0.22) 0%,
    rgba(247, 244, 239, 0.08) 50%,
    rgba(247, 244, 239, 0.18) 100%
  );
}

/* Exclude skip-link — position:relative on it caused gap above navbar */
body.page-home > header,
body.page-home > main,
body.page-home > footer {
  position: relative;
  z-index: 1;
}

html,
body.page-home {
  margin: 0;
  padding: 0;
}

/* Hero — court backdrop (SC/HC), blurred; hero section only — RDW-UX sign-off */
body.page-home .hero.section--lg {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

body.page-home .hero__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 58%,
    rgba(0, 0, 0, 0.55) 82%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 58%,
    rgba(0, 0, 0, 0.55) 82%,
    transparent 100%
  );
}

body.page-home .hero__backdrop::before {
  content: "";
  position: absolute;
  inset: -12px;
  background-image: url("../assets/hero-court-backdrop.jpg");
  background-size: cover;
  background-position: center 42%;
  background-repeat: no-repeat;
  filter: blur(6px) saturate(1.05);
  transform: scale(1.02);
  opacity: 0.88;
}

body.page-home .hero__backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Even wash + fade into page wallpaper (no diagonal A/B seam) */
  background: linear-gradient(
    180deg,
    rgba(247, 244, 239, 0.44) 0%,
    rgba(247, 244, 239, 0.36) 55%,
    rgba(247, 244, 239, 0.78) 88%,
    var(--bg-base) 100%
  );
}

body.page-home .hero .container {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-transparency: reduce) {
  body.page-home .hero__backdrop {
    -webkit-mask-image: none;
    mask-image: none;
  }

  body.page-home .hero__backdrop::before {
    filter: none;
    opacity: 0.2;
  }

  body.page-home .hero__backdrop::after {
    background: rgba(247, 244, 239, 0.88);
  }
}

/* Navbar — #ffffff @ 75%, flush to top */
body.page-home .site-header {
  margin-top: 0;
  top: 0;
  background: rgba(255, 255, 255, 0.75);
}

body.page-home .site-nav {
  background: rgba(255, 255, 255, 0.75);
}

@media (min-width: 900px) {
  body.page-home .site-nav {
    background: transparent;
  }
}

/* Scroll reveal — 0.3s slide up (index) */
body.page-home .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.3s ease-out,
    transform 0.3s ease-out;
  will-change: opacity, transform;
}

body.page-home .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.page-home .reveal-stagger > .reveal.is-visible:nth-child(1) {
  transition-delay: 0s;
}
body.page-home .reveal-stagger > .reveal.is-visible:nth-child(2) {
  transition-delay: 0.06s;
}
body.page-home .reveal-stagger > .reveal.is-visible:nth-child(3) {
  transition-delay: 0.12s;
}

/* Index typography — Source Serif 4 on all paragraphs (eyebrows stay Inter) */
body.page-home p:not(.eyebrow) {
  font-family: var(--font-serif-4);
}

/* Index body copy — +25% size (items 1–4) */
body.page-home .section-header > p:not(.eyebrow) {
  font-size: 1.25rem;
  line-height: 1.6;
}

body.page-home .card > p:not(.muted) {
  font-size: 1.171875rem; /* 15px × 1.25 */
  line-height: 1.55;
}

body.page-home .article-card__excerpt {
  font-size: 1.171875rem;
}

body.page-home .insights-intro {
  max-width: 42rem;
  margin: 0 0 var(--space-4);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--grey-600);
}

body.page-home .pillar > p {
  font-size: 1.171875rem;
  line-height: 1.55;
}

body.page-home .split > .reveal > p:not(.eyebrow) {
  font-size: 1.25rem;
  line-height: 1.6;
}

body.page-home .about-pull-quote {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  font-style: normal;
  line-height: 1.28;
  letter-spacing: -0.02em;
  color: var(--grey-900);
}

body.page-home .about-pull-quote strong {
  font-weight: 600;
}

/* Hero columns — right stack matches left panel height on desktop */
@media (min-width: 1024px) {
  body.page-home .hero .split > .hero__copy,
  body.page-home .hero .split > .hero-aside {
    height: 100%;
    align-self: stretch;
  }

  body.page-home .hero-aside {
    min-height: 100%;
  }

  body.page-home .hero-insight-cta {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: none;
    align-items: stretch;
    box-sizing: border-box;
  }

  body.page-home .hero-insight-cta__content {
    height: 100%;
    min-height: 100%;
  }

  body.page-home .hero-insight-cta__action {
    margin-top: auto;
  }
}

/* Visible reveal blocks — even vertical distribution */
body.page-home .reveal-stagger {
  align-items: stretch;
}

body.page-home .card.reveal.is-visible,
body.page-home .pillar.reveal.is-visible,
body.page-home .split > .reveal.is-visible {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  flex: 1;
  gap: var(--space-2);
  min-height: 100%;
}

body.page-home .grid-3.reveal-stagger > .card.reveal.is-visible {
  height: 100%;
}

body.page-home .split .grid-3.reveal-stagger {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--space-3);
  min-height: 100%;
}

body.page-home .split .grid-3.reveal-stagger > .pillar.reveal.is-visible {
  flex: 1;
  min-height: 0;
}

/* Hero — outcome-led copy + proof strip */
body.page-home .hero__copy .eyebrow {
  font-size: 13.75px; /* +25% vs global 11px — hero only */
}

body.page-home .hero__copy h1 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  line-height: 1.18;
}

body.page-home .hero-lead {
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--grey-800);
  margin-bottom: var(--space-3);
}

/* Credentials strip — number · label · marks (aligned grid) */
body.page-home .hero-proof {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0 0 var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--glass-border-outline);
}

body.page-home .hero-proof__cell {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 2px;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--glass-border-outline);
}

body.page-home .hero-proof__cell:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

body.page-home .hero-proof__metric {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--grey-900);
  letter-spacing: -0.02em;
}

body.page-home .hero-proof__metric--text {
  font-size: 1.375rem;
}

body.page-home .hero-proof__unit {
  font-size: 1.125rem;
  font-weight: 600;
}

body.page-home .hero-proof__desc {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--grey-600);
  max-width: 16rem;
}

body.page-home .hero-proof__marks {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: var(--space-2);
  align-self: start;
}

body.page-home .hero-proof__mark {
  width: 36px;
  height: 36px;
  object-fit: contain;
  padding: 4px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--glass-border-outline);
  border-radius: 50%;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  body.page-home .hero-proof {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 var(--space-3);
    padding-top: var(--space-4);
  }

  body.page-home .hero-proof__cell {
    padding: 0 var(--space-2) 0 0;
    border-bottom: none;
    border-right: 1px solid var(--glass-border-outline);
    min-height: 7.5rem;
  }

  body.page-home .hero-proof__cell:last-child {
    border-right: none;
    padding-right: 0;
  }

  body.page-home .hero-proof__desc {
    max-width: none;
  }

  body.page-home .hero-proof__marks {
    margin-top: auto;
    padding-top: var(--space-2);
  }
}
body.page-home .reveal-stagger > .reveal.is-visible:nth-child(4) {
  transition-delay: 0.18s;
}

@media (prefers-reduced-motion: reduce) {
  body.page-home .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  body.page-home {
    --glass-fill: rgba(255, 255, 255, 0.92);
    --glass-fill-strong: rgba(255, 255, 255, 0.96);
    --glass-blur: 0;
    --glass-blur-heavy: 0;
  }
}
