/**
 * sober-housing.css — Sober Housing standalone page
 * /sober-housing/ · ID 1022
 *
 * Foundation: main.css (tokens · base · layout · typography · components · forms)
 * All patterns drawn from the approved cornerstone system.
 *
 * Section background rhythm:
 *   S1 AQUA → S2 WHITE → S3 BROWN → S4 SOFT-BLUE
 *   → S5 WHITE → S6 SOFT-BLUE → S7 WHITE → S8 BROWN → S9 AQUA
 *
 * Inner containers:
 *   .wrap (1160px): S1, S2, S3, S5, S6
 *   min(var(--wide), calc(100% - 44px)): S4, S7, S8
 *
 * No new colors, button styles, or design tokens introduced.
 * CSS prefix: sh-
 */


/* ══════════════════════════════════════════════════════════════
   S1 — HERO
   Aqua background. Two-column: content (58%) left · Form 6 card (42%) right.
   ══════════════════════════════════════════════════════════════ */

.sh-hero {
  background: var(--brand-aqua);
}

.sh-hero-grid {
  display: grid;
  grid-template-columns: 58fr 42fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.sh-eyebrow {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: .75;
}

.sh-h1 {
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
  line-height: 1.1;
  margin-bottom: 18px;
}

.sh-hero-lead {
  max-width: 54ch;
  margin-bottom: 28px;
  color: var(--text-primary);
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  line-height: 1.65;
}

.sh-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.sh-hero .btn             { background: #fff; color: var(--ink); }
.sh-hero .btn:hover       { background: #EEF2F1; transform: translateY(-1px); }
.sh-hero .btn.ghost       { background: transparent; color: var(--ink); border-color: rgba(22, 32, 31, .44); }
.sh-hero .btn.ghost:hover { background: rgba(22, 32, 31, .07); transform: none; }

.sh-hero-form-card {
  background: #fff;
  border-radius: var(--r-sm);
  padding: clamp(24px, 3vw, 36px);
  box-shadow: 0 4px 28px rgba(0, 0, 0, .11);
}

.sh-form-eyebrow {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-aqua-hover);
  margin-bottom: 8px;
  text-align: center;
}

.sh-form-lead {
  font-size: .85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  text-align: center;
  margin-bottom: 16px;
}


/* ══════════════════════════════════════════════════════════════
   FORM 6 — HERO CARD OVERRIDES (scoped to .sh-hero-form)
   ══════════════════════════════════════════════════════════════ */

.sh-hero-form .ff-el-group.hiddenfield,
.sh-hero-form .hiddenfield {
  display: none !important;
  visibility: hidden !important;
}

.sh-hero-form .ff-el-group:not(.hiddenfield) {
  display: block !important;
}

.sh-hero-form .ff-btn-submit {
  background: var(--brand-aqua) !important;
  color: var(--text-primary) !important;
  border: 2px solid transparent !important;
  border-radius: 999px !important;
  padding: 11px 24px !important;
  font-family: inherit !important;
  font-size: .875rem !important;
  font-weight: 700 !important;
  letter-spacing: .07em !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  width: 100% !important;
  margin-top: 4px !important;
  transition: background .2s, transform .2s !important;
  line-height: 1.4 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 52px !important;
}

.sh-hero-form .ff-btn-submit:hover {
  background: #5BBFD6 !important;
  transform: translateY(-1px) !important;
}

.sh-hero-form .ff-el-group { margin-bottom: 10px; }
.sh-hero-form .ff-el-group:last-of-type { margin-bottom: 0; }


/* ══════════════════════════════════════════════════════════════
   S2 — WHAT SOBER HOUSING PROVIDES
   White. 4-column card grid.
   Inner container: .wrap
   ══════════════════════════════════════════════════════════════ */

.sh-provides {
  background: #fff;
  border-top: 1px solid var(--border-light);
}

.sh-provides-header {
  max-width: 760px;
  margin: 0 auto var(--space-md);
  text-align: center;
}

.sh-provides-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: 0;
}

.sh-provides-intro {
  font-size: clamp(1rem, 1.4vw, 1.05rem);
  line-height: 1.65;
  color: var(--text-secondary);
  margin-top: 12px;
}

.sh-provides-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.sh-provides-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--r-sm);
  padding: 28px 24px;
}

.sh-provides-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}

.sh-provides-card p {
  font-size: .9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}


/* ══════════════════════════════════════════════════════════════
   S3 — HOUSING AND TREATMENT CAN WORK TOGETHER
   Brown background (.section-brown from components.css).
   Two equal-width content cards + support note.
   ══════════════════════════════════════════════════════════════ */

.sh-together-inner {
  max-width: min(var(--wide), calc(100% - 44px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 3.5vw, 40px);
}

.sh-together-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sh-together-inner h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: #fff;
  text-wrap: balance;
  margin: 0;
}

.sh-together-lead {
  font-size: clamp(1rem, 1.4vw, 1.05rem);
  color: rgba(255, 255, 255, .82);
  line-height: 1.7;
  max-width: 60ch;
  margin: 0 auto;
}

.sh-together-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.sh-together-card {
  background: rgba(255, 255, 255, .11);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--r-sm);
  padding: clamp(24px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sh-together-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.sh-together-card p {
  font-size: .95rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, .86);
  margin: 0;
}

.sh-together-note {
  border-top: 1px solid rgba(255, 255, 255, .2);
  padding-top: clamp(20px, 2.5vw, 28px);
}

.sh-together-note p {
  font-size: .92rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, .72);
  max-width: 72ch;
  margin: 0 auto;
  text-align: center;
}


/* ══════════════════════════════════════════════════════════════
   S4 — WHAT DAILY LIFE CAN LOOK LIKE
   Soft-blue. Sticky rail (36%) left + item cards (64%) right.
   ══════════════════════════════════════════════════════════════ */

.sh-daily {
  background: var(--surface-soft-blue);
}

.sh-daily-inner {
  max-width: min(var(--wide), calc(100% - 44px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 36fr 64fr;
  gap: clamp(40px, 5vw, 64px);
  align-items: start;
}

.sh-daily-rail {
  position: sticky;
  top: 100px;
  align-self: start;
}

.sh-daily-rail::before {
  content: '';
  display: block;
  width: 36px;
  height: 3px;
  background: var(--brand-aqua);
  margin-bottom: 20px;
  border-radius: 2px;
}

.sh-daily-rail h2 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  line-height: 1.2;
  margin-bottom: 16px;
}

.sh-daily-rail > p {
  font-size: .95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

.sh-daily-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sh-daily-item {
  background: #fff;
  border-radius: var(--r-sm);
  padding: 24px 28px;
}

.sh-daily-item h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.sh-daily-item p {
  font-size: .95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}


/* ══════════════════════════════════════════════════════════════
   S5 — HOUSING FEATURES
   White. 4-column feature grid + contact note.
   Inner container: .wrap
   ══════════════════════════════════════════════════════════════ */

.sh-features {
  background: #fff;
  border-top: 1px solid var(--border-light);
}

.sh-features-header {
  max-width: 680px;
  margin: 0 auto var(--space-md);
  text-align: center;
}

.sh-features-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: 0;
}

.sh-features-intro {
  font-size: clamp(1rem, 1.4vw, 1.05rem);
  line-height: 1.65;
  color: var(--text-secondary);
  margin-top: 12px;
}

.sh-features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: var(--space-md);
}

.sh-features-item {
  border: 1px solid var(--border-light);
  border-radius: var(--r-sm);
  padding: 28px 24px 24px;
}

.sh-features-item h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}

.sh-features-item p {
  font-size: .9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}

.sh-features-contact {
  font-size: .9rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.6;
}

.sh-features-contact a {
  color: var(--brand-aqua-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}


/* ══════════════════════════════════════════════════════════════
   S6 — LGBTQ-AFFIRMING HOUSING
   Soft-blue. Two-column: editorial left · 4 feature cards right.
   Inner container: .wrap
   ══════════════════════════════════════════════════════════════ */

.sh-affirming {
  background: var(--surface-soft-blue);
}

.sh-affirming-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 5vw, 64px);
  align-items: start;
}

.sh-affirming-content {
  position: sticky;
  top: 100px;
}

.sh-affirming-content h2 {
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  line-height: 1.18;
  margin-bottom: 16px;
}

.sh-affirming-content p {
  font-size: .95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 18px;
}

.sh-affirming-content p:last-of-type { margin-bottom: 0; }

.sh-affirming-points {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.sh-affirming-point {
  background: #fff;
  border-radius: var(--r-sm);
  padding: 20px 24px;
}

.sh-affirming-point h3 {
  font-size: .9rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.sh-affirming-point p {
  font-size: .88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}


/* ══════════════════════════════════════════════════════════════
   S7 — FARR CERTIFICATION AND STRUCTURE
   White. Sticky rail (36%) left + body prose (64%) right.
   ══════════════════════════════════════════════════════════════ */

.sh-farr {
  background: #fff;
  border-top: 1px solid var(--border-light);
}

.sh-farr-inner {
  max-width: min(var(--wide), calc(100% - 44px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 36fr 64fr;
  gap: clamp(40px, 5vw, 64px);
  align-items: start;
}

.sh-farr-rail {
  position: sticky;
  top: 100px;
  align-self: start;
}

.sh-farr-rail::before {
  content: '';
  display: block;
  width: 36px;
  height: 3px;
  background: var(--brand-aqua);
  margin-bottom: 20px;
  border-radius: 2px;
}

.sh-farr-rail h2 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  line-height: 1.2;
  margin-bottom: 16px;
}

.sh-farr-rail > p {
  font-size: .95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

.sh-farr-body {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 2.5vw, 26px);
}

.sh-farr-body p {
  font-size: .95rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin: 0;
}


/* ══════════════════════════════════════════════════════════════
   S8 — WHAT HAPPENS IF SOMEONE RELAPSES?
   Soft-blue. Two-column editorial: heading left · white panel right.
   ══════════════════════════════════════════════════════════════ */

.sh-relapse {
  background: var(--surface-soft-blue);
}

.sh-relapse-grid {
  display: grid;
  grid-template-columns: 40fr 60fr;
  gap: clamp(40px, 5vw, 64px);
  align-items: start;
}

.sh-relapse-left {
  position: sticky;
  top: 100px;
  align-self: start;
}

.sh-relapse-eyebrow {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-aqua-hover);
  margin-bottom: 14px;
}

.sh-relapse-left h2 {
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  line-height: 1.18;
  text-wrap: balance;
  margin-bottom: 16px;
}

.sh-relapse-intro {
  font-size: clamp(1rem, 1.4vw, 1.05rem);
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}

.sh-relapse-panel {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--r-sm);
  padding: clamp(28px, 3.5vw, 44px);
  box-shadow: 0 2px 16px rgba(0, 0, 0, .06);
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2vw, 22px);
}

.sh-relapse-panel p {
  font-size: .95rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin: 0;
}


/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .sh-provides-grid  { grid-template-columns: repeat(2, 1fr); }
  .sh-features-grid  { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
  .sh-hero-grid        { grid-template-columns: 1fr; gap: 32px; }
  .sh-hero-form-card   { max-width: 520px; }
  .sh-affirming-grid   { grid-template-columns: 1fr; gap: 32px; }
  .sh-affirming-content { position: static; }
  .sh-daily-inner      { grid-template-columns: 1fr; }
  .sh-daily-rail       { position: static; }
  .sh-farr-inner       { grid-template-columns: 1fr; }
  .sh-farr-rail        { position: static; }
  .sh-relapse-grid     { grid-template-columns: 1fr; gap: 28px; }
  .sh-relapse-left     { position: static; }
}

@media (max-width: 900px) {
  .sh-together-cards   { grid-template-columns: 1fr; }
  .sh-affirming-points { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .sh-provides-grid    { grid-template-columns: 1fr; }
  .sh-features-grid    { grid-template-columns: 1fr; }
  .sh-hero-ctas        { flex-direction: column; }
}
