/* premium.css — additive polish layer for Legend Star Foundation site.
   Sits on top of main.css/pages.css. Uses inline-hardcoded brand hex
   (#1B2A4A navy, #C8A84B gold) to bypass the inverted root vars in main.css.
   Opt-in via class names — no existing markup changes its appearance until
   classes are added. No JS. Respects prefers-reduced-motion + hover:none. */

/* ── Premium SVG grain overlay ─────────────────────────────────────────── */
.premium-grain { position: relative; }
.premium-grain::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.07 0 0 0 0 0.10 0 0 0 0 0.18 0 0 0 0.9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.premium-grain > * { position: relative; z-index: 2; }
.premium-grain--gold::before {
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.72 0 0 0 0 0.52 0 0 0 0 0.04 0 0 0 0.85 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Refined card treatment ─────────────────────────────────────────────── */
.premium-card {
  border-color: rgba(184, 134, 11, 0.18) !important;
  box-shadow:
    0 1px 2px rgba(27, 42, 74, 0.04),
    0 8px 24px -10px rgba(27, 42, 74, 0.08);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.4s ease;
}
.premium-card:hover {
  transform: translateY(-4px);
  border-color: rgba(184, 134, 11, 0.45) !important;
  box-shadow:
    0 4px 8px rgba(27, 42, 74, 0.06),
    0 24px 48px -16px rgba(27, 42, 74, 0.16),
    0 0 0 1px rgba(184, 134, 11, 0.10);
}
.premium-card--dark {
  border-color: rgba(184, 134, 11, 0.25) !important;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.10),
    0 16px 40px -10px rgba(0, 0, 0, 0.25);
}
.premium-card--dark:hover {
  transform: translateY(-4px);
  border-color: rgba(184, 134, 11, 0.7) !important;
  box-shadow:
    0 6px 12px rgba(0, 0, 0, 0.18),
    0 32px 64px -18px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(184, 134, 11, 0.25);
}
.impact-tile.premium-card:hover { transform: translateY(-6px); }

/* ── Section dividers — gold hairline ───────────────────────────────────── */
.premium-divider {
  display: block;
  width: 64px;
  height: 1px;
  margin: 24px auto;
  background: linear-gradient(90deg,
    rgba(184, 134, 11, 0.0) 0%,
    rgba(184, 134, 11, 0.5) 50%,
    rgba(184, 134, 11, 0.0) 100%);
}
.premium-divider--left { margin-left: 0; margin-right: 0; }

/* ── Refined hero overlay ───────────────────────────────────────────────── */
.premium-hero-overlay {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(27, 42, 74, 0.10) 0%, rgba(27, 42, 74, 0.00) 50%),
    linear-gradient(180deg,
      rgba(27, 42, 74, 0.30) 0%,
      rgba(27, 42, 74, 0.55) 55%,
      rgba(27, 42, 74, 0.94) 100%);
}

/* ── Partner card with gold monogram ────────────────────────────────────── */
.premium-partner { position: relative; overflow: hidden; }
.premium-partner::after {
  content: '';
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    rgba(184, 134, 11, 0.0) 0%,
    rgba(184, 134, 11, 0.85) 50%,
    rgba(184, 134, 11, 0.0) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.premium-partner:hover::after { opacity: 1; }
.premium-partner-monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: linear-gradient(135deg, #C8A84B 0%, #8B6508 100%);
  color: #1B2A4A;
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 1.3rem;
  margin-bottom: 20px;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.3),
    0 4px 12px -2px rgba(184, 134, 11, 0.35);
}

/* ── Refined tag with gold hairline lead ────────────────────────────────── */
.premium-tag {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 600;
  color: #C8A84B;
}
.premium-tag::before {
  content: '';
  width: 32px;
  height: 1px;
  background: #C8A84B;
  display: inline-block;
}

/* ── Stat tile — premium framing ────────────────────────────────────────── */
/* Default colors assume LIGHT bg. Section-level overrides below for navy bg.
   Lesson learned 2026-05-25: parent section bg=#1B2A4A + text=#1B2A4A =
   invisible. Always pair foreground/background contrast or scope by parent. */
.premium-stat { padding: 24px 8px; text-align: center; position: relative; }
.premium-stat-number {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: clamp(2.6rem, 4vw, 3.6rem);
  line-height: 1;
  color: #1B2A4A;
  letter-spacing: -0.02em;
}
.premium-stat-number em { color: #C8A84B; font-style: normal; }
.premium-stat-label {
  margin-top: 12px;
  font-weight: 600;
  color: #1B2A4A;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}
.premium-stat-sub {
  margin-top: 6px;
  color: #8892A4;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Navy-section overrides — when premium-stat sits inside .stats (navy bg) */
.stats .premium-stat-number,
.stats .premium-stat-label {
  color: #ffffff !important;
}
.stats .premium-stat-number em { color: #C8A84B !important; }
.stats .premium-stat-sub {
  color: rgba(255, 255, 255, 0.65) !important;
}

/* ── Hero photo treatment ───────────────────────────────────────────────── */
.premium-hero-photo {
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 4px 12px rgba(27, 42, 74, 0.08),
    0 24px 60px -20px rgba(27, 42, 74, 0.30);
}
.premium-hero-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.premium-hero-photo:hover img { transform: scale(1.03); }

/* ── Page hero (full-bleed) ─────────────────────────────────────────────── */
/* No flex centering — container handles its own top/bottom padding so the
   hero reads from-the-top with consistent breathing room below the fixed nav.
   The image MUST be selected through <picture> too (browsers wrap the img). */
.premium-page-hero {
  position: relative;
  min-height: 60vh;
  padding: 0;
  color: #fff;
  overflow: hidden;
  background: #1B2A4A;
}
.premium-page-hero > picture {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
}
.premium-page-hero > picture > img,
.premium-page-hero > img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  max-width: none;
}
.premium-page-hero > .premium-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.premium-page-hero > .container { position: relative; z-index: 2; }

/* Mobile: partners-intro grid collapses to single column */
@media (max-width: 768px) {
  .partners-intro-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  .mission-grid,
  .founders-grid,
  .event-grid {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }
  .premium-page-hero {
    min-height: 50vh;
  }
  /* Donate founder-band: convert pill to stacked column on narrow screens */
  .founder-band {
    flex-direction: column !important;
    border-radius: 16px !important;
    text-align: center !important;
    padding: 24px 24px !important;
  }
  .founder-band > div:last-child {
    text-align: center !important;
  }
}

/* ── Reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .premium-card,
  .premium-card:hover,
  .premium-hero-photo:hover img,
  .ig-feed-item:hover img,
  .pillar-card:hover .pillar-img img,
  .mark-image-frame:hover img {
    transition: none !important;
    transform: none !important;
  }
}
@media (hover: none) {
  .premium-card:hover { transform: none; }
  .premium-hero-photo:hover img { transform: none; }
}

/* ── Cursor gating (WCAG fix) ───────────────────────────────────────────── */
/* main.css declares `cursor:none` on body+button unconditionally.
   That hides the native cursor for keyboard users with no JS, and
   for desktop users before the custom-cursor div mounts. Gate it
   behind fine-pointer hover devices only. */
@media not (hover: hover) and (pointer: fine) {
  body, button, a, [role="button"] {
    cursor: auto !important;
  }
  a, button, [role="button"] { cursor: pointer !important; }
}

/* ── Active nav link — current page indicator ──────────────────────────── */
/* Visitor must always know which page they're on. The default .nav-link
   has a hover-grown gold underline; .active pre-shows it and shifts the
   text color to gold so the current page is clearly marked. */
.nav-link.active {
  color: #C8A84B !important;
}
.nav-link.active::after {
  width: 100% !important;
  background: #C8A84B !important;
}
.mobile-link.active {
  color: #C8A84B !important;
}
/* When on the donate page, the donate CTA in the nav gets a subtle
   "current" treatment — inset gold ring instead of solid navy. */
.nav-cta.active {
  background: #C8A84B !important;
  color: #1B2A4A !important;
}
.mobile-cta.active {
  background: #C8A84B !important;
  color: #1B2A4A !important;
}

/* ── Focus-visible (WCAG 2.4.7 AA) ──────────────────────────────────────── */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
details:focus-visible,
.impact-tile:focus-visible,
.mobile-link:focus-visible,
.mobile-cta:focus-visible,
.nav-link:focus-visible,
.nav-cta:focus-visible,
.footer-social a:focus-visible {
  outline: 2px solid #C8A84B !important;
  outline-offset: 3px !important;
  border-radius: 4px;
  box-shadow: 0 0 0 4px rgba(184, 134, 11, 0.18);
}
.skip-nav:focus-visible {
  outline: 2px solid #C8A84B !important;
  outline-offset: 0 !important;
}
/* Make sure focus on form inputs inside the contact panel reads clearly */
.panel-form-group input:focus-visible,
.panel-form-group select:focus-visible,
.panel-form-group textarea:focus-visible {
  border-color: #C8A84B !important;
  box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.20);
  outline: none !important;
}

/* ── Footer 4-column override ───────────────────────────────────────────── */
/* main.css declares `grid-template-columns: 1.4fr 1fr 1fr 1.2fr 1fr` which
   was designed for 5 columns including the now-removed "Find Us" map block.
   Override to 4 evenly-balanced columns. */
.footer-grid {
  grid-template-columns: 1.5fr 1fr 1.2fr 1.3fr !important;
  gap: 56px !important;
}
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 40px !important;
  }
}
@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
}

/* ── Touch targets (WCAG 2.5.8 — 44×44 minimum on mobile) ───────────────── */
@media (max-width: 1024px) {
  .footer-social a,
  .nav-toggle,
  .contact-panel-close {
    min-width: 44px !important;
    min-height: 44px !important;
  }
}

/* ── Hero scroll text contrast (WCAG 1.4.3) ─────────────────────────────── */
.hero-scroll span,
.foundation-hero .hero-scroll span,
.premium-page-hero .hero-scroll span {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* ── Required-field asterisk visible-text equivalent ────────────────────── */
.panel-form-group .required {
  color: #dc3545;
  font-weight: 700;
}
.panel-form-group .required::after {
  content: " (required)";
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
