/* ============================================================
   PREMIUM OVERLAY — premium.css  (v1)
   Loaded AFTER each site's style.css on every page of The Help
   Destination Next Step and its six pillar mini-sites. Upgrades typography,
   depth, motion and material without touching site palettes —
   each pillar keeps its own dramatic identity.
   No third-party code. CSP-safe. Respects reduced motion.
   ============================================================ */

/* ---------- 1. Design tokens ---------- */
:root {
  --pv-e1: 0 1px 2px rgba(13, 27, 42, 0.06), 0 2px 8px rgba(13, 27, 42, 0.05);
  --pv-e2: 0 2px 6px rgba(13, 27, 42, 0.07), 0 10px 28px rgba(13, 27, 42, 0.09);
  --pv-e3: 0 6px 16px rgba(13, 27, 42, 0.10), 0 24px 56px rgba(13, 27, 42, 0.16);
  --pv-ring: 0 0 0 3px;
  --pv-fast: 160ms cubic-bezier(.4, 0, .2, 1);
  --pv-slow: 420ms cubic-bezier(.22, .8, .26, 1);
  --pv-accent: #128279;
  --pv-accent-dk: #0C5F58;
  --pv-deep: #0D2B45;
  --pv-glow: rgba(18, 130, 121, 0.35);
}
html[data-pillar="food"]    { --pv-accent:#3FA34D; --pv-accent-dk:#2F8A3E; --pv-deep:#1F4D3A; --pv-glow:rgba(63,163,77,.35); }
html[data-pillar="jobs"]    { --pv-accent:#2D6CDF; --pv-accent-dk:#1E52B8; --pv-deep:#14213D; --pv-glow:rgba(45,108,223,.35); }
html[data-pillar="housing"] { --pv-accent:#1C6E7E; --pv-accent-dk:#125061; --pv-deep:#103B4F; --pv-glow:rgba(28,110,126,.35); }
html[data-pillar="bills"]   { --pv-accent:#F5751F; --pv-accent-dk:#D65C0C; --pv-deep:#10314A; --pv-glow:rgba(245,117,31,.35); }
html[data-pillar="health"]  { --pv-accent:#17C3B2; --pv-accent-dk:#109A8D; --pv-deep:#2B2D42; --pv-glow:rgba(23,195,178,.35); }
html[data-pillar="giving"]  { --pv-accent:#7C4DFF; --pv-accent-dk:#5E35D6; --pv-deep:#33285A; --pv-glow:rgba(124,77,255,.35); }

/* ---------- 2. Base polish ---------- */
body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--pv-accent); color: #fff; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--pv-accent); outline-offset: 2px; border-radius: 4px; }

/* Smooth page entry */
@keyframes pv-page-in { from { opacity: 0; } to { opacity: 1; } }
body { animation: pv-page-in 380ms ease both; }
body.pv-leaving { opacity: 0; transition: opacity 150ms ease; }

/* ---------- 3. Glass header ---------- */
.hdr {
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(13, 27, 42, 0.08);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 8px 24px -18px rgba(13,27,42,.35);
}
.brand .mark { box-shadow: 0 3px 10px var(--pv-glow), inset 0 -3px 0 rgba(0,0,0,.12); }
.nav a { transition: background var(--pv-fast), color var(--pv-fast), transform var(--pv-fast); }
.nav a:hover { transform: translateY(-1px); }
.nav a.cta { box-shadow: 0 4px 14px var(--pv-glow); }

/* ---------- 4. Cinematic hero ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero::before, .hero::after {
  content: ""; position: absolute; inset: -30%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38% 42% at 22% 28%, rgba(255,255,255,0.16), transparent 60%),
    radial-gradient(30% 34% at 78% 18%, rgba(255,255,255,0.12), transparent 55%),
    radial-gradient(46% 50% at 68% 82%, rgba(0,0,0,0.10), transparent 60%);
  animation: pv-drift 26s ease-in-out infinite alternate;
}
.hero::after {
  background:
    radial-gradient(26% 30% at 82% 70%, rgba(255,255,255,0.10), transparent 55%),
    radial-gradient(34% 38% at 12% 78%, rgba(0,0,0,0.08), transparent 60%);
  animation-duration: 34s; animation-direction: alternate-reverse;
}
@keyframes pv-drift {
  from { transform: translate3d(-2.5%, -2%, 0) scale(1); }
  to   { transform: translate3d(2.5%, 2.5%, 0) scale(1.07); }
}
.hero h1 { letter-spacing: -0.022em; line-height: 1.03; }
.hero .eyebrow {
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 2px 10px rgba(0,0,0,0.10);
}

/* Staggered hero entrance */
@keyframes pv-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.hero .eyebrow  { animation: pv-rise 600ms 60ms cubic-bezier(.22,.8,.26,1) both; }
.hero h1        { animation: pv-rise 650ms 140ms cubic-bezier(.22,.8,.26,1) both; }
.hero p.lede    { animation: pv-rise 650ms 240ms cubic-bezier(.22,.8,.26,1) both; }
.hero .search-card, .hero .hero-cta { animation: pv-rise 700ms 340ms cubic-bezier(.22,.8,.26,1) both; }

/* ---------- 5. Material: cards, tiles, doors ---------- */
.search-card {
  box-shadow: var(--pv-e3);
  border: 1px solid rgba(13,27,42,0.06);
}
.res-card, .cat, .step, .d-block, .side, .note-card, .form-card,
.filters, .faq, .hb-topic, .hb-thread, .hb-post, .hb-compose {
  box-shadow: var(--pv-e1);
  transition: transform var(--pv-fast), box-shadow 220ms ease, border-color var(--pv-fast);
}
.res-card:hover, .cat:hover, .hb-topic:hover, .hb-thread:hover {
  box-shadow: var(--pv-e2);
  transform: translateY(-5px);
}
.pillar-door {
  position: relative; overflow: hidden; isolation: isolate;
  box-shadow: var(--pv-e2);
  transition: transform 220ms cubic-bezier(.22,.8,.26,1), box-shadow 260ms ease;
}
.pillar-door::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 90% at 85% -10%, rgba(255,255,255,0.22), transparent 55%);
}
.pillar-door:hover { transform: translateY(-7px) scale(1.015); box-shadow: var(--pv-e3); }
.pillar-door .d-cta { transition: background var(--pv-fast), transform var(--pv-fast); }
.pillar-door:hover .d-cta { background: rgba(255,255,255,0.34); transform: translateX(3px); }

/* ---------- 6. Buttons ---------- */
.btn {
  box-shadow: 0 2px 10px rgba(13,27,42,0.10);
  transition: transform var(--pv-fast), box-shadow 220ms ease, background var(--pv-fast), color var(--pv-fast);
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(13,27,42,0.18); }
.btn:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(13,27,42,0.12); }
.btn-line { box-shadow: none; }

/* ---------- 7. Scroll reveals (added by premium.js) ---------- */
.pv-reveal { opacity: 0; transform: translateY(26px); }
.pv-reveal.pv-in {
  opacity: 1; transform: none;
  transition: opacity 640ms cubic-bezier(.22,.8,.26,1), transform 640ms cubic-bezier(.22,.8,.26,1);
  transition-delay: var(--pv-d, 0ms);
}

/* ---------- 8. Stat strip ---------- */
.pv-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px; margin-top: 26px;
}
.pv-stat {
  background: rgba(255,255,255,0.14);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 16px; padding: 16px 18px; color: #fff;
  box-shadow: 0 4px 18px rgba(0,0,0,0.10);
}
.pv-stat .n { font-size: 2rem; font-weight: 800; font-family: var(--head, inherit); line-height: 1; display: block; }
.pv-stat .l { font-size: 0.8rem; font-weight: 700; opacity: 0.92; letter-spacing: 0.04em; text-transform: uppercase; }

/* ---------- 9. Back-to-hub pill (injected on pillar pages) ---------- */
.pv-back {
  position: fixed; left: 14px; bottom: 14px; z-index: 998;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--pv-deep); color: #fff; text-decoration: none;
  font-weight: 800; font-size: 0.86rem; line-height: 1.15;
  padding: 11px 16px; border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.85);
  box-shadow: 0 6px 20px rgba(0,0,0,0.28);
  transition: transform var(--pv-fast), box-shadow 220ms ease;
}
.pv-back:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,0.32); color:#fff; }
.pv-back .bi {
  width: 26px; height: 26px; border-radius: 9px; background: var(--pv-accent);
  display: inline-flex; align-items: center; justify-content: center; font-size: 0.95rem;
}
.pv-back .bs { font-weight: 600; font-size: 0.7rem; opacity: 0.85; display: block; }
@media (max-width: 640px) { .pv-back .bs { display: none; } }

/* ---------- 10. Sister strip ("Other things you may need help with") ---------- */
.pv-sisters { padding: 46px 20px 54px; background: var(--pv-deep); }
.pv-sisters .in { max-width: 1120px; margin: 0 auto; }
.pv-sisters h2 { color: #fff; font-family: var(--head, inherit); font-weight: 800; font-size: clamp(1.25rem, 2.6vw, 1.7rem); letter-spacing: -0.01em; }
.pv-sisters .sub { color: rgba(255,255,255,0.75); font-weight: 600; font-size: 0.95rem; margin: 6px 0 20px; }
.pv-sisters .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.pv-sis {
  display: flex; flex-direction: column; gap: 4px; text-decoration: none;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.13);
  border-radius: 14px; padding: 14px 15px; color: #fff;
  transition: transform var(--pv-fast), background var(--pv-fast), border-color var(--pv-fast);
}
.pv-sis:hover { transform: translateY(-4px); background: rgba(255,255,255,0.13); border-color: var(--sc, #fff); }
.pv-sis .se { font-size: 1.35rem; }
.pv-sis .sn { font-weight: 800; font-size: 0.95rem; }
.pv-sis .sd { font-weight: 600; font-size: 0.78rem; color: rgba(255,255,255,0.72); }
.pv-sis.hub { background: rgba(255,255,255,0.13); border-style: dashed; }

/* ---------- 11. Sponsor / ad-ready slot ---------- */
.sponsor-slot {
  border: 2px dashed rgba(13,27,42,0.16); border-radius: 14px;
  padding: 18px 20px; text-align: center; margin: 26px auto;
  max-width: 728px; background: rgba(255,255,255,0.55);
}
.sponsor-slot .sl-k { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.55; display: block; margin-bottom: 4px; }
.sponsor-slot a { font-weight: 800; color: var(--pv-accent-dk); }

/* ---------- 12. Footer polish ---------- */
.ftr { position: relative; }
.ftr::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--pv-accent), transparent 60%);
  opacity: 0.65;
}

/* ---------- 13. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  body, .hero .eyebrow, .hero h1, .hero p.lede, .hero .search-card, .hero .hero-cta { animation: none !important; }
  .hero::before, .hero::after { animation: none !important; }
  .pv-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  * { transition-duration: 1ms !important; }
}

/* ---------- 14. Hero kicker (warm hook above the plain-language H1) ---------- */
.hero-kicker {
  display: block;
  font-family: var(--head, inherit);
  font-weight: 700;
  font-size: clamp(.95rem, 1.8vw, 1.2rem);
  opacity: .85;
  margin-bottom: 10px;
  line-height: 1.25;
}

/* ---------- 15. Donation button "coming soon" state ---------- */
a.pv-soon { opacity: .5; cursor: not-allowed; position: relative; }
a.pv-soon::after {
  content: "coming soon"; font-size: .62rem; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; margin-left: 8px; opacity: .8; vertical-align: middle;
}


/* ---------- 16. "brought to you by Destination Next Step" byline (pillar pages) ---------- */
.pv-byline {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  flex-wrap: wrap; text-align: center;
  padding: 7px 14px;
  font-size: 0.82rem; letter-spacing: 0.02em;
  background: var(--pv-navy, #0F2E45); color: #C9DCE8;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.pv-byline a {
  color: #F2C14E; font-weight: 700; text-decoration: none;
  border-bottom: 1px solid transparent; transition: border-color .18s ease;
}
.pv-byline a:hover, .pv-byline a:focus { border-bottom-color: #F2C14E; }
@media (max-width: 480px) { .pv-byline { font-size: 0.76rem; padding: 6px 10px; } }

/* ---------- 17. "Did you know?" question hooks ---------- */
.hook-grid { display: grid; gap: 12px; }
.hook { background: var(--white,#fff); border: 1px solid var(--line,#e3e8ec);
  border-left: 5px solid var(--pv-gold,#F2C14E); border-radius: 12px; overflow: hidden;
  transition: box-shadow .18s ease, border-color .18s ease; }
.hook.open { box-shadow: 0 8px 24px rgba(15,46,69,.10); border-left-color: #0C5F58; }
.hook-q { display: flex; align-items: flex-start; gap: 10px; width: 100%;
  background: none; border: 0; text-align: left; cursor: pointer;
  padding: 15px 16px; font: inherit; color: #14405C; }
.hook-q:hover { background: #FAFCFD; }
.hook-qt { flex: 1; font-weight: 800; font-size: 1.04rem; line-height: 1.38; }
.hook-tag { flex: none; align-self: center; background: #14405C; color: #fff;
  font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; }
.hook-caret { flex: none; align-self: center; color: #6C8397; font-size: 1rem;
  transition: transform .2s ease; }
.hook.open .hook-caret { transform: rotate(180deg); }
.hook-a { padding: 0 16px 16px 16px; }
.hook-a p { margin: 0 0 12px; color: #40566A; line-height: 1.62; font-size: .97rem; }
.hook-a strong { color: #14405C; }
@media (max-width: 560px) {
  .hook-qt { font-size: .98rem; }
  .hook-tag { display: none; }
}
