/* ============================================================
   FOX HILLS CASH — "CLEAR SKY"  ·  INNER PAGES
   Layered on top of styles.css. Reuses its tokens, header, footer,
   buttons, .section, .eyebrow, .field, .steps, .reveal, mesh + hills.
   This file only adds inner-page components:
     page-hero · breadcrumb · legal document + TOC + table ·
     info-cards · contact form · rates blocks · CTA band ·
     FAQ accordion · error state.
   Mobile-first: base targets ~360-375px; min-width breakpoints at
   560 / 768 / 820 / 980 progressively enhance — same ladder as styles.css.
   ============================================================ */

/* ============================================================
   PAGE HERO — compact inner-page header band
   Reuses .mesh / .mesh-2 / .hills decorations from styles.css.
   ============================================================ */
.page-hero {
  position: relative;
  overflow: hidden;
  padding-top: clamp(34px, 7vw, 84px);
  padding-bottom: clamp(34px, 6vw, 76px);
  border-bottom: 1px solid var(--hairline);
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
}
/* Tame the shared mesh so it reads as accent, not the whole stage */
.page-hero .mesh  { width: 320px; height: 320px; top: -180px; right: -110px; }
.page-hero .mesh-2{ width: 240px; height: 240px; bottom: -120px; left: -90px; }

.page-hero-inner { position: relative; z-index: 2; max-width: 760px; }

/* breadcrumb */
.crumbs {
  display: flex; align-items: center; flex-wrap: wrap; gap: .15rem .15rem;
  font-family: "General Sans", sans-serif; font-weight: 600;
  font-size: .76rem; letter-spacing: .04em;
  color: var(--ink-faint);
  margin-bottom: 1.1rem;
}
.crumbs a {
  color: var(--ink-faint);
  display: inline-flex; align-items: center; min-height: 32px;
  padding: 0 .15rem;
  transition: color .2s;
}
.crumbs a:hover { color: var(--brand-blue); }
.crumbs .sep { color: var(--hairline-strong); padding: 0 .25rem; }
.crumbs [aria-current="page"] { color: var(--ink); }

.page-hero h1 {
  font-size: clamp(2.1rem, 8.5vw, 3.4rem);
  letter-spacing: -.035em;
  margin-bottom: .65rem;
}
.page-hero h1 .accent {
  font-style: normal;
  background: var(--warm-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.page-hero h1 .blue {
  background: var(--cool-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.page-hero-sub {
  font-size: clamp(1rem, 3.4vw, 1.18rem);
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0;
}
.page-hero-meta {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: 1rem;
  font-family: "General Sans", sans-serif; font-weight: 600;
  font-size: .76rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand-blue);
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  padding: .34rem .8rem;
  box-shadow: var(--shadow-sm);
}

/* ============================================================
   ACTIVE NAV STATE (top nav + mobile drawer)
   ============================================================ */
.mobile-menu a[aria-current="page"] { color: var(--brand-blue); }
@media (min-width: 820px) {
  .nav-links a[aria-current="page"] { color: var(--ink); }
  .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
}

/* ============================================================
   GENERIC CONTENT HELPERS
   ============================================================ */
.measure { max-width: 72ch; }
.lead {
  font-size: clamp(1.05rem, 2.6vw, 1.22rem);
  color: var(--ink-soft);
  line-height: 1.65;
}

/* short warm rule that replaces the legacy line-dash.svg divider */
.rule {
  width: 44px; height: 3px; border-radius: 3px;
  background: var(--warm-grad);
  margin: 1.1rem 0 1.4rem;
}
.rule--full {
  width: 100%; height: 1px; background: var(--hairline);
  margin: 1.6rem 0;
}

/* ============================================================
   LEGAL DOCUMENT LAYOUT  (Privacy / Terms / SMS)
   Single column on mobile; sticky "On this page" index on desktop.
   ============================================================ */
.legal { position: relative; }
.legal-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

/* TOC — hidden on mobile, becomes a sticky rail on desktop */
.legal-toc { display: none; }

.legal-doc { min-width: 0; overflow-wrap: break-word; }
/* long URLs / unbroken tokens (e.g. account-login links) must wrap, not bleed past the edge */
.legal-doc a { overflow-wrap: anywhere; }

/* a bordered "content" card (Privacy & SMS group sections in cards) */
.legal-card {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.3rem, 4vw, 2.6rem);
}
.legal-card + .legal-card { margin-top: clamp(1.2rem, 3vw, 2rem); }

.legal-section { scroll-margin-top: 110px; }
.legal-section + .legal-section { margin-top: clamp(1.6rem, 3.5vw, 2.4rem); }

.legal-section h2 {
  font-family: "General Sans", sans-serif;
  font-weight: 600;
  font-size: clamp(1.05rem, 2.6vw, 1.25rem);
  letter-spacing: -.01em;
  line-height: 1.25;
  color: var(--ink);
  text-transform: none;
}
/* lead heading variant — the "Fact" / "What we do" anchors */
.legal-section--lead h2 {
  color: var(--brand-blue);
  font-size: .8rem; letter-spacing: .16em; text-transform: uppercase;
}
.legal-section--lead > p {
  font-family: "Clash Display", "Switzer", sans-serif;
  font-weight: 500;
  font-size: clamp(1.2rem, 3.2vw, 1.6rem);
  letter-spacing: -.02em; line-height: 1.2;
  color: var(--ink);
}

.legal-doc p { color: var(--ink-soft); margin: 0 0 1em; }
.legal-doc p:last-child { margin-bottom: 0; }
.legal-doc strong { color: var(--ink); font-weight: 600; }
.legal-doc a { color: var(--brand-blue); font-weight: 500; text-underline-offset: 3px; }
.legal-doc a:hover { text-decoration: underline; }

/* lists with a custom blue marker */
.legal-doc ul { list-style: none; margin: .4rem 0 1em; padding: 0; }
.legal-doc ul li {
  position: relative; padding-left: 1.5rem;
  color: var(--ink-soft); margin-bottom: .55rem;
}
.legal-doc ul li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand-blue);
}
.legal-doc ul li p { margin: 0; }

/* ============================================================
   RESPONSIVE TABLE (Privacy sharing matrix)
   Mobile: each row becomes a stacked card using data-label.
   Desktop: a normal striped table.
   ============================================================ */
/* max-width + scroll keeps a wide desktop table inside its column instead of
   pushing the whole page sideways (it stays a stacked card layout on mobile) */
.legal-table-wrap { margin: .4rem 0 .4rem; max-width: 100%; overflow-x: auto; }
.legal-table { width: 100%; border-collapse: collapse; }
.legal-table thead { display: none; }              /* hidden on mobile */
.legal-table tr {
  display: block;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  margin-bottom: .85rem;
}
.legal-table td { display: block; border: 0; padding: 0; }
.legal-table td + td { margin-top: .7rem; }
.legal-table td::before {
  content: attr(data-label);
  display: block;
  font-family: "General Sans", sans-serif; font-weight: 600;
  font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: .25rem;
}
.legal-table td:first-child { color: var(--ink-soft); }
/* YES / NO answer pills for the two short-answer columns */
.legal-table td:not(:first-child) {
  font-family: "General Sans", sans-serif; font-weight: 600; color: var(--ink);
}

/* ============================================================
   INFO CARDS  (Contact intro)
   ============================================================ */
.info-cards {
  display: grid; grid-template-columns: 1fr; gap: clamp(16px, 3vw, 24px);
}
.info-card {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.3rem, 4vw, 2rem);
  transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s, border-color .3s;
  /* long emails/links must wrap, not force the card past its grid track on tiny screens */
  min-width: 0; overflow-wrap: break-word;
}
.info-card a { overflow-wrap: anywhere; }
.info-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: transparent; }
.info-card .ic-icon {
  width: 52px; height: 52px; border-radius: 16px;
  display: grid; place-items: center;
  background: var(--paper-2); color: var(--brand-blue);
  margin-bottom: 1rem;
}
.info-card .ic-icon svg { width: 24px; height: 24px; }
.info-card h3 { font-size: 1.25rem; margin-bottom: .5rem; }
.info-card p { color: var(--ink-soft); font-size: .98rem; margin: 0 0 .6rem; }
.info-card p:last-child { margin-bottom: 0; }
.info-card a { color: var(--brand-blue); font-weight: 600; }
.info-card a:hover { text-decoration: underline; text-underline-offset: 3px; }
.info-card strong { color: var(--ink); font-weight: 600; }

/* ============================================================
   CONTACT  (address block + form card)  — shared by Contact & FAQ
   ============================================================ */
.contact-grid {
  display: grid; grid-template-columns: 1fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}
.contact-intro h2 { font-size: clamp(1.8rem, 5vw, 2.6rem); letter-spacing: -.03em; }
.contact-intro > p { color: var(--ink-soft); margin-top: .9rem; max-width: 42ch; }

.contact-info {
  margin-top: 1.4rem;
  display: flex; flex-direction: column; gap: .55rem;
}
.contact-info .ci-row {
  display: flex; align-items: center; gap: .7rem;
  font-size: 1rem; color: var(--ink-soft);
}
.contact-info .ci-row svg { width: 18px; height: 18px; color: var(--brand-blue); flex: none; }
.contact-info .ci-row strong { color: var(--ink); font-weight: 600; }
.contact-info a { color: var(--brand-blue); }
.contact-info a:hover { text-decoration: underline; text-underline-offset: 3px; }
.contact-info .ci-name {
  font-family: "Clash Display", sans-serif; font-weight: 600;
  font-size: 1.15rem; color: var(--ink); margin-bottom: .15rem;
}

/* form card — same DNA as the home apply-card */
.form-card {
  position: relative;
  background: var(--white);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,.7);
  overflow: hidden;
}
.form-card::before { content: ""; display: block; height: 6px; background: var(--cool-grad); }
.form-card-body { padding: clamp(1.4rem, 4vw, 2rem); }
.form-card h3 { font-size: 1.3rem; margin-bottom: .4rem; }
.form-card .fc-sub { color: var(--ink-soft); font-size: .95rem; margin-bottom: 1.2rem; }

/* extend styles.css .field to cover textareas */
.field textarea {
  font-family: "Switzer", sans-serif; font-size: 1rem; color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: .85rem .95rem;
  min-height: 120px; resize: vertical;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea::placeholder { color: var(--ink-faint); }
.field textarea:hover { border-color: var(--hairline-strong); }
.field textarea:focus {
  outline: none; background: #fff;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 4px rgba(0,96,239,.14);
}
.form-stack { display: flex; flex-direction: column; gap: 1rem; }

/* ============================================================
   RATES
   ============================================================ */
.cost-grid {
  display: grid; grid-template-columns: 1fr; gap: clamp(18px, 3vw, 40px);
}
.cost-grid p { color: var(--ink-soft); }
.cost-grid strong { color: var(--ink); font-weight: 600; }

.nsf-callout {
  display: flex; align-items: center; gap: clamp(1rem, 3vw, 1.6rem);
  background: var(--white);
  border: 1px solid var(--hairline);
  border-left: 4px solid var(--fox-orange);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.2rem, 3.5vw, 1.8rem);
}
.nsf-callout .nsf-amt {
  font-family: "Clash Display", sans-serif; font-weight: 700;
  font-size: clamp(2.4rem, 8vw, 3.2rem); line-height: 1;
  color: var(--fox-red); flex: none;
}
.nsf-callout .nsf-body h3 { font-size: 1.15rem; margin-bottom: .35rem; }
.nsf-callout .nsf-body p { color: var(--ink-soft); font-size: .96rem; margin: 0; }

/* ============================================================
   CTA BAND  (Apply prompt — Rates / FAQ)
   ============================================================ */
.cta-band {
  position: relative; overflow: hidden;
  background: var(--cool-grad);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow-lg);
  padding: clamp(2rem, 6vw, 3.4rem);
  color: #fff;
  text-align: center;
  isolation: isolate;
}
.cta-band::after { /* soft glow */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 60% at 80% 10%, rgba(255,255,255,.22), transparent 60%),
    radial-gradient(50% 50% at 12% 95%, rgba(241,90,36,.40), transparent 70%);
}
.cta-band h2 { color: #fff; font-size: clamp(1.7rem, 5vw, 2.6rem); letter-spacing: -.03em; }
.cta-band p { color: rgba(255,255,255,.86); margin: .8rem auto 1.6rem; max-width: 46ch; }

/* ============================================================
   FAQ ACCORDION  (native <details name> = exclusive accordion)
   ============================================================ */
.faq-list {
  display: flex; flex-direction: column; gap: .8rem;
  max-width: 760px; margin-inline: auto;
}
.faq-item {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color .25s, box-shadow .25s;
}
.faq-item[open] { border-color: rgba(0,96,239,.35); box-shadow: var(--shadow-md); }

.faq-q {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.05rem 1.2rem;
  font-family: "General Sans", sans-serif; font-weight: 600;
  font-size: 1.02rem; color: var(--ink);
  min-height: 44px;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q:focus-visible { outline: 3px solid var(--brand-blue); outline-offset: -3px; border-radius: var(--radius-sm); }
.faq-item:hover .faq-q { color: var(--brand-blue); }

.faq-chevron {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--paper-2); color: var(--brand-blue);
  transition: transform .3s cubic-bezier(.2,.8,.2,1), background .25s, color .25s;
}
.faq-chevron svg { width: 16px; height: 16px; }
.faq-item[open] .faq-chevron { transform: rotate(180deg); background: var(--cool-grad); color: #fff; }

.faq-a { padding: 0 1.2rem 1.2rem; }
.faq-a-inner {
  color: var(--ink-soft); font-size: .98rem; line-height: 1.65;
  border-top: 1px solid var(--hairline); padding-top: .95rem;
}
.faq-a-inner strong { color: var(--ink); font-weight: 600; }
.faq-a-inner a { color: var(--brand-blue); font-weight: 500; }
.faq-a-inner a:hover { text-decoration: underline; text-underline-offset: 3px; }
.faq-a-inner ul { margin: .6rem 0 0; padding-left: 1.2rem; }
.faq-a-inner ul li { margin-bottom: .45rem; }
@media (prefers-reduced-motion: no-preference) {
  .faq-item[open] .faq-a-inner { animation: faqIn .34s cubic-bezier(.2,.8,.2,1); }
  @keyframes faqIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
}

/* ============================================================
   ERROR STATE
   ============================================================ */
.error-page {
  position: relative; overflow: hidden;
  min-height: 70vh;
  display: grid; place-items: center; text-align: center;
}
.error-inner { position: relative; z-index: 2; max-width: 520px; padding-block: clamp(48px, 10vw, 96px); }
.error-badge {
  display: inline-grid; place-items: center;
  width: 76px; height: 76px; border-radius: 22px;
  background: var(--paper-2); color: var(--fox-red);
  margin-bottom: 1.4rem;
}
.error-badge svg { width: 36px; height: 36px; }
.error-page h1 { font-size: clamp(2.2rem, 9vw, 3.4rem); letter-spacing: -.035em; margin-bottom: .7rem; }
.error-page p { color: var(--ink-soft); font-size: 1.08rem; margin-bottom: 1.8rem; }

/* ============================================================
   BREAKPOINT 560px
   ============================================================ */
@media (min-width: 560px) {
  .info-cards { grid-template-columns: 1fr 1fr; }
  .info-card.full { grid-column: 1 / -1; }
  .cost-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   BREAKPOINT 768px — tablet
   ============================================================ */
@media (min-width: 768px) {
  .page-hero .mesh  { width: 440px; height: 440px; top: -240px; right: -150px; }
  .page-hero .mesh-2{ width: 320px; height: 320px; bottom: -160px; left: -120px; }

  /* the Privacy table becomes a real table on tablet+ */
  .legal-table thead { display: table-header-group; }
  .legal-table tr {
    display: table-row; background: none; border: 0; border-radius: 0;
    padding: 0; margin: 0;
  }
  .legal-table tbody tr:nth-child(odd) { background: var(--paper); }
  .legal-table th, .legal-table td {
    display: table-cell; text-align: left; vertical-align: top;
    padding: .85rem 1rem; border-bottom: 1px solid var(--hairline);
  }
  .legal-table td + td { margin-top: 0; }
  .legal-table td::before { display: none; }
  .legal-table thead th {
    font-family: "General Sans", sans-serif; font-weight: 600;
    font-size: .76rem; letter-spacing: .04em; color: var(--ink);
    background: var(--paper-2); border-bottom: 1px solid var(--hairline-strong);
  }
  .legal-table thead th:nth-child(n+2),
  .legal-table tbody td:nth-child(n+2) { width: 1%; white-space: nowrap; }
}

/* ============================================================
   BREAKPOINT 980px — desktop: two-col contact + sticky legal TOC
   ============================================================ */
@media (min-width: 980px) {
  .contact-grid { grid-template-columns: 1fr .82fr; gap: clamp(40px, 5vw, 80px); }

  .legal-layout { grid-template-columns: 232px 1fr; gap: clamp(40px, 5vw, 72px); }
  .legal-toc {
    display: block; position: sticky; top: clamp(96px, 11vh, 116px);
    align-self: start;
  }
  .legal-toc .toc-title {
    font-family: "General Sans", sans-serif; font-weight: 600;
    font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
    color: var(--ink-faint); margin-bottom: .9rem;
  }
  .legal-toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .1rem; }
  .legal-toc a {
    display: block; padding: .5rem .8rem;
    font-size: .92rem; color: var(--ink-soft); line-height: 1.35;
    border-left: 2px solid var(--hairline);
    transition: color .2s, border-color .2s, background .2s;
  }
  .legal-toc a:hover { color: var(--brand-blue); border-color: var(--brand-blue); background: var(--paper-2); }
  .legal-toc a.is-active { color: var(--brand-blue); border-color: var(--brand-blue); font-weight: 600; }
}

/* ============================================================
   Apply — validation summary
   Public-page twin of the members-area .notice/.notice--danger
   callout (wwwroot/css/clearsky/app.css) — public pages load
   styles.css + pages.css only, not app.css, so the danger palette
   is inlined here (same values as app.css's --bad-bg/--bad-bd/--bad-ink)
   rather than referencing tokens that aren't in scope.
   ============================================================ */
.notice {
  display: flex; gap: .9rem; align-items: flex-start;
  border-radius: var(--radius); padding: 1.1rem 1.15rem;
  margin-bottom: clamp(16px, 3vw, 22px);
}
.notice--danger { background: #fdeceb; border: 1px solid #f6c9c6; }
.notice .alert-message { flex: 1; min-width: 0; }
.notice .alert-message h4 {
  font-family: "General Sans", sans-serif; font-weight: 600;
  font-size: .82rem; letter-spacing: .08em; text-transform: uppercase;
  margin: 0 0 .5rem;
}
.notice--danger .alert-message h4 { color: #cf2318; }
.notice .alert-message ul { margin: 0; padding-left: 1.15rem; font-size: .92rem; line-height: 1.6; }
.notice .alert-message ul li + li { margin-top: .3rem; }
.notice--danger .alert-message ul { color: var(--ink-soft); }
/* site.js rewrites the summary entries into links that jump to the offending field. */
.notice .alert-message a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.notice .alert-message a:hover { color: var(--ink); }
.notice .alert-message a:focus-visible { outline: 3px solid var(--brand-blue); outline-offset: 2px; border-radius: 3px; }

/* ============================================================
   Account — sign in
   ============================================================ */
.login-alert {
  display: flex; gap: .8rem; align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-left: 4px solid var(--fox-red);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  padding: 1rem 1.1rem;
  margin-bottom: 1.3rem;
}
.login-alert svg { width: 20px; height: 20px; color: var(--fox-red); flex: none; margin-top: .1rem; }
.login-alert .alert-message { margin: 0; font-size: .92rem; color: var(--ink-soft); }
