﻿/**
 * homepage.css â€” Inspire Recovery Design System
 * Page-specific styles for homepage-v3.html.
 *
 * Shared foundation: ../main.css (tokens, base, layout, typography, navigation,
 * components, forms, animations).
 *
 * This file contains ONLY CSS that is unique to the homepage. The hero here is
 * a full-bleed photo with a warm paper-toned scrim (distinct from the standard
 * two-column hero used on other pages). Everything else below the hero reuses
 * shared components â€” this file adds only the homepage-specific layouts and the
 * .final .inner max-width override.
 */

/* HERO â€” full-bleed photo with warm scrim, copy floats left */
.hero { position: relative; padding: 0; }
.hero-photo {
  position: absolute; inset: 0; z-index: 0;
  border-radius: 0 0 var(--r-lg) var(--r-lg); overflow: hidden;
}
.hero-photo img { object-position: 64% 40%; }
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(96deg, rgba(247,249,245,.95) 0%, rgba(247,249,245,.86) 22%, rgba(247,249,245,.42) 48%, rgba(247,249,245,.04) 72%, transparent 100%),
    linear-gradient(0deg, rgba(247,249,245,.55) 0%, rgba(247,249,245,0) 30%);
}
.hero-inner {
  position: relative; z-index: 2;
  width: min(var(--wide), calc(100% - 44px)); margin: 0 auto;
  min-height: min(84vh, 720px); display: flex; align-items: flex-start;
  padding: clamp(24px, 3vh, 44px) 0 clamp(48px, 6vh, 80px);
}
.hero-copy { max-width: 620px; }
.hero-copy h1 { margin-bottom: 22px; }
.hero-copy .lead { max-width: 44ch; }

/* PROMISE STRIP — lifted cards overlap hero bottom edge */
.promise { padding: 0 0 clamp(24px, 3vh, 40px); background: transparent; position: relative; z-index: 10; margin-top: -56px; }
.promise-grid { display: grid; gap: 16px; }
.promise-item { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--border-light); border-radius: var(--r-md); padding: 20px; box-shadow: 0 2px 12px rgba(0,0,0,.07); }
.promise-item .tick { flex: none; width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--brand-aqua); flex-shrink: 0; }
.promise-item strong { display: block; font-weight: 700; font-size: 1.02rem; }
.promise-item span { color: var(--text-secondary); font-size: .98rem; line-height: 1.5; }

/* RECOGNITION — border-top breaks promise(white)→recognition(white) merge */
/* A: Trans Pink inset panel around .recog-lines */
.recognition { background: #fff; border-top: 1px solid var(--border-light); }
.recognition-grid { display: grid; gap: 40px; align-items: start; }
.recognition .lead { margin-top: 20px; }
.recog-lines {
  display: grid; gap: 14px; margin-top: 20px;
  background: var(--accent-trans-pink);
  border-radius: var(--r-md);
  padding: clamp(20px, 3vw, 32px);
  list-style: none;
}
.recog-lines li {
  display: flex; gap: 10px; align-items: flex-start;
  font-weight: 500; font-size: 1.06rem; line-height: 1.5;
}
.recog-check {
  flex: none;
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-brown);
  line-height: 1.5;
}

/* AUTHENTICITY — centered on warm paper */
/* B: Brand Aqua emphasis bar above h2 */
.authenticity {
  background: var(--surface-soft-blue);
  text-align: center;
}
.authenticity .inner { max-width: 1060px; margin: 0 auto; }
.authenticity h2 { font-size: clamp(2.1rem, 4.2vw, 3.3rem); }
.authenticity h2::before { content: none; }
.authenticity .lead { margin: 24px auto 0; max-width: 72ch; }

/* THE INSPIRE DIFFERENCE — warm ground; centered intro; three balanced cards */
.difference { background: var(--surface-warm); }
.difference .head {
  max-width: 1060px; margin-left: auto; margin-right: auto;
  margin-bottom: clamp(44px, 6vh, 72px);
  text-align: center;
}
.difference .head .eyebrow { display: flex; justify-content: center; }
.difference .head h2 { margin-bottom: 20px; }
.difference .head .lead { max-width: 72ch; margin-left: auto; margin-right: auto; }
/* Cards — equal height guaranteed by grid stretch; flex-column locks internal alignment */
.ideas { display: grid; gap: clamp(20px, 2.5vw, 28px); }
.idea {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  padding: clamp(28px, 3vw, 36px);
  display: flex; flex-direction: column;
  height: 100%;
  box-sizing: border-box;
}
.idea .tick { width: 30px; height: 3px; border-radius: 3px; background: var(--brand-aqua); margin-bottom: 18px; flex-shrink: 0; }
.idea h3 { font-weight: 600; margin-bottom: 10px; }
.idea p { color: var(--text-secondary); max-width: none; }

/* COMMUNITY — white; photo sections stay on white per brand guidelines */
/* border-top separates visually from Difference(warm) */
.community { background: #fff; border-top: 1px solid var(--border-light); }
.community-grid { display: grid; gap: clamp(36px, 5vw, 64px); align-items: center; }
.community h2 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); max-width: none; }
.community p { color: var(--text-secondary); max-width: 50ch; margin-top: 22px; font-size: clamp(1.1rem, 1.7vw, 1.28rem); line-height: 1.6; }
.community-photo {
  border-radius: var(--r-lg) var(--r-lg) var(--r-sm) var(--r-lg); overflow: hidden;
  height: min(64vh, 540px);
  box-shadow: var(--shadow);
}
.community-photo img { object-position: 50% 46%; }

/* WHAT BECOMES POSSIBLE — brown; text-only section; white text for contrast */
.possible { background: #7F4E20; }
.possible .possible-grid { display: grid; gap: clamp(28px, 4vw, 56px); align-items: start; }
.possible .head .eyebrow { color: rgba(255,255,255,.75); }
.possible .head h2 { color: #fff; }
.possible-copy { max-width: 600px; }
.possible-copy p { font-size: clamp(1.16rem, 1.6vw, 1.4rem); line-height: 1.66; color: rgba(255,255,255,.82); }
.possible-copy p + p { margin-top: 20px; }
.possible-copy em { font-style: normal; color: var(--brand-aqua); font-weight: 500; }

/* CLINICAL — border-top breaks possible(white)→clinical(white) merge */
/* C: Brand Aqua side band on left text column; E: Brand Aqua outline frame on photo */
.clinical { background: #fff; border-top: 1px solid var(--border-light); }
.clinical-grid { display: grid; gap: clamp(36px, 5vw, 64px); align-items: center; }
.clinical-grid > :first-child {
  border-left: 4px solid var(--brand-aqua);
  padding-left: clamp(20px, 2.5vw, 32px);
}
.clinical h2 { margin-bottom: 20px; }
.clinical .lead { margin-bottom: 30px; }
.signals { display: grid; gap: 20px; }
.signal { display: flex; gap: 14px; align-items: flex-start; max-width: 44ch; }
.signal .tick { flex: none; width: 9px; height: 9px; margin-top: 8px; border-radius: 50%; background: var(--brand-aqua); }
.signal strong { font-weight: 700; }
.signal span { color: var(--text-secondary); }
.clinical-note { margin-top: 26px; font-size: .9rem; color: var(--text-tertiary); max-width: 46ch; }
.clinical-photo {
  border-radius: var(--r-lg) var(--r-sm) var(--r-lg) var(--r-lg); overflow: hidden;
  height: 440px; box-shadow: var(--shadow);
  outline: 3px solid var(--brand-aqua);
  outline-offset: 6px;
}
.clinical-photo img { object-position: 48% 46%; }

/* CLINICAL BODY — co-occurring / dual-diagnosis paragraph below signals */
.clinical-body {
  margin-top: 28px;
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 50ch;
}

/* TREATMENT PATHWAYS — warm ground between Clinical(white) and Library(soft-blue) */
.pathways { background: var(--surface-warm); border-top: 1px solid var(--border-light); }
.pathways-head {
  max-width: 1060px; margin: 0 auto clamp(36px, 5vh, 52px);
  text-align: center;
}
.pathways-head h2 { margin-bottom: 16px; }
.pathways-head .lead { max-width: 72ch; margin: 0 auto; }
.pathways-grid {
  display: grid;
  gap: clamp(14px, 2vw, 20px);
  grid-template-columns: 1fr 1fr;
}
.pathway {
  display: flex; flex-direction: column;
  padding: clamp(22px, 2.5vw, 30px);
  background: #fff; border: 1px solid var(--border-light); border-radius: var(--r-md);
  text-decoration: none; color: var(--ink);
  transition: transform .2s, box-shadow .2s, border-color .2s;
  height: 100%; box-sizing: border-box;
}
.pathway:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.pathway strong { font-weight: 700; font-size: 1.08rem; display: block; margin-bottom: 8px; }
.pathway > span:not(.go) { color: var(--text-secondary); font-size: .97rem; line-height: 1.5; flex: 1; }
.pathway .go {
  font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--brand-aqua-hover); margin-top: 16px; display: block;
}
.pathway--hub { border-color: var(--brand-aqua); }
.pathway--hub:hover { border-color: transparent; }
@media (min-width: 760px) {
  .pathways-grid { grid-template-columns: repeat(3, 1fr); }
}

/* RECOVERY LIBRARY — soft blue ground; Trans Pink accent strip breaks from Clinical(white) */
.library { background: var(--surface-soft-blue); border-top: 5px solid var(--accent-trans-pink); }
.library .head { display: grid; gap: 14px; max-width: var(--measure); margin-bottom: clamp(34px, 5vh, 52px); }
.topics { display: grid; gap: 14px; }
.library-browse-all { text-align: center; margin-top: clamp(28px, 4vh, 44px); }
.topic {
  display: flex; flex-direction: column;
  min-height: 132px; padding: 22px 24px;
  background: var(--surface-warm); border: 1px solid var(--border-light); border-radius: var(--r-md);
  text-decoration: none; transition: transform .2s, box-shadow .2s, border-color .2s;
  height: 100%; box-sizing: border-box;
}
.topic:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.topic h3 { font-weight: 500; font-size: 1.14rem; flex: 1; }
.topic .go {
  font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--brand-aqua-hover); margin-top: 18px; display: block;
}

/* ADMISSIONS — warm paper; breaks Library(soft-blue) → white run before Final(aqua) */
.admissions { background: var(--surface-warm); }
.admissions-grid { display: grid; gap: clamp(36px, 5vw, 64px); align-items: center; }
.adm-photo {
  border-radius: var(--r-lg) var(--r-sm) var(--r-lg) var(--r-lg); overflow: hidden;
  height: 460px; box-shadow: var(--shadow);
}
.adm-photo img { object-position: 66% 42%; }
.admissions h2 { margin-bottom: 20px; }

/* FINAL — two-column split: headline left, stacked CTAs right; fills full container width */
.final { background: var(--surface-soft-blue); }
.final .btn { background: var(--brand-aqua); color: var(--ink); text-align: center; }
.final .btn.ghost { background: transparent; color: var(--ink); border-color: rgba(22,32,31,.44); text-align: center; }
.final .inner { max-width: var(--wide); text-align: left; }
.final .eyebrow { justify-content: flex-start; }
.final-split { display: grid; align-items: center; gap: clamp(40px, 5vw, 80px); }
.final h2 { margin-bottom: 0; font-size: clamp(2rem, 3.5vw, 2.8rem); max-width: 26ch; }
.final .final-cta .actions { flex-direction: column; align-items: stretch; gap: 12px; margin-top: 0; }
@media (min-width: 760px) {
  .final-split { grid-template-columns: 1fr 280px; }
}

/* .final .btn.ghost ink override removed — now handled centrally in components.css */
.authenticity .eyebrow { justify-content: center; }

/*
 * Photo placeholder geometry â€” ensures .ph fills each photo container while
 * images are pending upload. The shared .ph rule uses position:relative with
 * no explicit height, so it doesn't fill its container on its own.
 *
 * .hero-photo is position:absolute; inset:0 â€” .ph must match that positioning.
 * The three section photos use height â€” .ph fills automatically via height:100%.
 *
 * These rules are removed once all four images are uploaded to the Media Library
 * and $xxx_img_id variables in front-page.php are set to real attachment IDs.
 */
.hero-photo .ph { position: absolute; inset: 0; }
/* .ph fallbacks â€” frame containers now use height not min-height, so .ph fills automatically */

/* RESPONSIVE */
@media (min-width: 760px) {
  nav.primary { display: flex; }
  .menu-toggle { display: none; }
  .mobile-nav { display: none !important; }
  .promise-grid { grid-template-columns: repeat(4, 1fr); }
  .recognition-grid { grid-template-columns: 0.92fr 1.08fr; }
  .recog-lines { grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .ideas { grid-template-columns: repeat(3, 1fr); }
  .community-grid { grid-template-columns: 1.05fr 0.95fr; }
  .clinical-grid { grid-template-columns: 1fr 0.9fr; }
  .possible .possible-grid { grid-template-columns: 0.85fr 1fr; }
  .admissions-grid { grid-template-columns: 0.9fr 1fr; }
  .topics { grid-template-columns: repeat(4, 1fr); }
  .footer-inner { grid-template-columns: 1fr auto; align-items: end; }
}
@media (max-width: 759px) {
  .topics { grid-template-columns: 1fr 1fr; }
  .hero-inner { align-items: flex-end; }
  .hero-photo::after {
    background: linear-gradient(180deg,
      rgba(247,249,245,0) 0%, rgba(247,249,245,.10) 30%,
      rgba(247,249,245,.80) 62%, rgba(247,249,245,.97) 100%);
  }
}
