/* ============================================================
   PREMIUM OVERLAY — premium.css  (v1)
   Loaded AFTER each site's style.css on every page of The Help
   Harbor 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: #E14E2E;
  --pv-accent-dk: #C23D20;
  --pv-deep: #1E2633;
  --pv-glow: rgba(225, 78, 46, 0.35);
}
html[data-pillar="events"]   { --pv-accent:#FF6B4A; --pv-accent-dk:#E14E2E; --pv-deep:#1E2633; --pv-glow:rgba(255,107,74,.35); }
html[data-pillar="college"]  { --pv-accent:#2C7FBF; --pv-accent-dk:#1F6399; --pv-deep:#22305B; --pv-glow:rgba(44,127,191,.35); }
html[data-pillar="realfood"] { --pv-accent:#3f7a4a; --pv-accent-dk:#2f5d3a; --pv-deep:#22331f; --pv-glow:rgba(63,122,74,.35); }
html[data-pillar="kitchens"] { --pv-accent:#2864E8; --pv-accent-dk:#1B4BB8; --pv-deep:#0B1220; --pv-glow:rgba(40,100,232,.35); }
html[data-pillar="venues"]   { --pv-accent:#D86245; --pv-accent-dk:#B94A30; --pv-deep:#34223A; --pv-glow:rgba(216,98,69,.35); }
html[data-pillar="repairs"]  { --pv-accent:#B8462F; --pv-accent-dk:#93351F; --pv-deep:#102A43; --pv-glow:rgba(184,70,47,.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-Harbor 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;
}
