/* ============================================
   NORTH KENSINGTON HERITAGE — DESIGN SYSTEM V2
   Rich Interactive Components
   ============================================ */

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-tertiary: #1a1a24;
  --bg-card: #16161f;
  --bg-card-hover: #1e1e2a;
  --bg-glass: rgba(22, 22, 31, 0.7);
  --bg-glass-light: rgba(255, 255, 255, 0.03);
  --bg-accent: #1a1610;
  --bg-overlay: rgba(10, 10, 15, 0.92);
  --text-primary: #f0ece4;
  --text-secondary: #a8a29e;
  --text-muted: #6b6560;
  --text-accent: #d4a853;
  --accent-gold: #d4a853;
  --accent-gold-light: #e8c876;
  --accent-gold-dim: #a07c30;
  --accent-warm: #c47832;
  --accent-copper: #b87333;
  --accent-blue: #4a8cc7;
  --accent-green: #4aba8a;
  --accent-red: #d45555;
  --border-subtle: rgba(212, 168, 83, 0.1);
  --border-medium: rgba(212, 168, 83, 0.25);
  --border-strong: rgba(212, 168, 83, 0.5);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(212, 168, 83, 0.12);
  --shadow-glow-strong: 0 0 60px rgba(212, 168, 83, 0.2);
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --fs-hero: clamp(2.8rem, 7vw, 5rem);
  --fs-h1: clamp(2rem, 4vw, 3.2rem);
  --fs-h2: clamp(1.6rem, 3vw, 2.4rem);
  --fs-h3: clamp(1.1rem, 1.8vw, 1.4rem);
  --fs-body: clamp(0.95rem, 1.1vw, 1.05rem);
  --fs-small: 0.875rem;
  --fs-caption: 0.75rem;
  --lh-heading: 1.15;
  --lh-body: 1.8;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;
  --max-width: 1200px;
  --max-width-narrow: 800px;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --radius-pill: 50px;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 0.2s var(--ease);
  --transition-base: 0.35s var(--ease);
  --transition-slow: 0.6s var(--ease);
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden
}

a {
  color: var(--accent-gold);
  text-decoration: none;
  transition: color var(--transition-fast)
}

a:hover {
  color: var(--accent-gold-light)
}

img {
  max-width: 100%;
  height: auto;
  display: block
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  line-height: var(--lh-heading);
  font-weight: 700
}

h1 {
  font-size: var(--fs-h1)
}

h2 {
  font-size: var(--fs-h2)
}

h3 {
  font-size: var(--fs-h3)
}

p {
  color: var(--text-secondary);
  margin-bottom: var(--space-md)
}

.text-accent {
  color: var(--accent-gold)
}

.text-muted {
  color: var(--text-muted)
}

.lead-text {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.85;
  color: var(--text-secondary);
  max-width: 720px
}

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md)
}

.container--narrow {
  max-width: var(--max-width-narrow)
}

.section {
  padding: var(--space-2xl) 0;
  position: relative
}

.section--alt {
  background: var(--bg-secondary)
}

.section--dark {
  background: var(--bg-tertiary)
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-xl)
}

.section__header h2 {
  margin-bottom: var(--space-sm)
}

.section__header p {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto
}

.section__label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: var(--space-sm);
  padding: 0.35em 1.2em;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-pill);
  background: rgba(212, 168, 83, 0.05)
}

.divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-copper));
  border: none;
  margin: var(--space-lg) auto;
  border-radius: 2px
}

/* ============================================
   HERO — Full-screen with particle-like bg
   ============================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-3xl) var(--space-md);
  overflow: hidden;
  background: radial-gradient(ellipse at 30% 50%, rgba(212, 168, 83, 0.06) 0%, transparent 50%), radial-gradient(ellipse at 70% 50%, rgba(74, 140, 199, 0.04) 0%, transparent 50%), var(--bg-primary)
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to top, var(--bg-primary), transparent);
  pointer-events: none
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 850px
}

.hero__label {
  display: inline-block;
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: var(--space-md);
  opacity: 0;
  animation: fadeUp .8s var(--ease) .2s forwards
}

.hero__title {
  font-size: var(--fs-hero);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: var(--space-md);
  padding-bottom: 0.08em;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-gold-light) 50%, var(--text-primary) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeUp .8s var(--ease) .4s forwards, shimmer 8s ease-in-out infinite;
  opacity: 0
}

.hero__subtitle {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto var(--space-lg);
  opacity: 0;
  animation: fadeUp .8s var(--ease) .6s forwards
}

.hero__scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: var(--fs-caption);
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp .8s var(--ease) 1s forwards
}

.hero__scroll-indicator::after {
  content: '';
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent-gold), transparent);
  animation: scrollPulse 2s ease-in-out infinite
}

/* ============================================
   CARD SYSTEM — Multiple variants
   ============================================ */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-md)
}

.card-grid--2 {
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr))
}

.card-grid--3 {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr))
}

/* Standard card */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-lg);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-copper));
  opacity: 0;
  transition: opacity var(--transition-base)
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg), var(--shadow-glow)
}

.card:hover::before {
  opacity: 1
}

.card__icon {
  font-size: 2.2rem;
  margin-bottom: var(--space-sm)
}

.card__title {
  font-family: var(--font-heading);
  font-size: var(--fs-h3);
  margin-bottom: var(--space-xs)
}

.card__meta {
  font-size: var(--fs-small);
  color: var(--accent-gold);
  margin-bottom: var(--space-sm);
  font-weight: 500
}

.card__text {
  font-size: var(--fs-body);
  color: var(--text-secondary);
  margin-bottom: 0
}

/* ============================================
   PARALLAX QUOTE BANNER
   ============================================ */

.parallax-banner {
  position: relative;
  padding: var(--space-xl) var(--space-md);
  text-align: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-accent) 50%, var(--bg-tertiary) 100%)
}

.parallax-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(212, 168, 83, 0.1) 0%, transparent 70%);
  pointer-events: none
}

.parallax-banner__quote {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-style: italic;
  color: var(--text-primary);
  max-width: 800px;
  margin: 0 auto var(--space-md);
  position: relative;
  z-index: 1;
  line-height: 1.5
}

.parallax-banner__quote::before {
  content: '"';
  font-size: 6rem;
  position: absolute;
  top: -30px;
  left: -20px;
  color: var(--accent-gold);
  opacity: 0.15;
  font-style: normal;
  line-height: 1
}

.parallax-banner__cite {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  color: var(--accent-gold);
  font-style: normal;
  position: relative;
  z-index: 1
}

.documentary-link-cta {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0.8em 1.5em;
  border-radius: var(--radius-pill);
  border: 1px solid var(--accent-gold-light);
  background: linear-gradient(135deg, var(--accent-gold-light), var(--accent-gold));
  color: #1b1206;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(212, 168, 83, 0.35);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast)
}

.documentary-link-cta::after {
  content: '↗';
  font-size: 0.95em
}

.documentary-link-cta:hover {
  color: #1b1206;
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(212, 168, 83, 0.45);
  filter: saturate(1.08)
}

.documentary-link-cta:focus-visible {
  outline: 2px solid #fff4d5;
  outline-offset: 3px
}

/* ============================================
   BADGE / TAG
   ============================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: .3em .9em;
  font-size: var(--fs-caption);
  font-weight: 600;
  border-radius: var(--radius-pill);
  background: rgba(212, 168, 83, 0.1);
  color: var(--accent-gold);
  border: 1px solid var(--border-subtle)
}

.badge--blue {
  background: rgba(74, 140, 199, 0.1);
  color: var(--accent-blue);
  border-color: rgba(74, 140, 199, 0.2)
}

.badge--green {
  background: rgba(74, 186, 138, 0.1);
  color: var(--accent-green);
  border-color: rgba(74, 186, 138, 0.2)
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  background: var(--bg-secondary)
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-md)
}

.site-footer__link {
  font-size: var(--fs-small);
  color: var(--text-muted);
  padding: .4em .8em;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  text-decoration: none
}

.site-footer__link:hover,
.site-footer__link.is-current {
  color: var(--accent-gold);
  background: rgba(212, 168, 83, 0.08)
}

.site-footer__credit {
  font-size: var(--fs-caption);
  color: var(--text-muted)
}

/* ============================================
   SCROLL REVEAL
   ============================================ */

.reveal-enabled .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s var(--ease), transform .7s var(--ease)
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0)
}

.reveal--delay-1 {
  transition-delay: .1s
}

.reveal--delay-2 {
  transition-delay: .2s
}

.reveal--delay-3 {
  transition-delay: .3s
}

.reveal--delay-4 {
  transition-delay: .4s
}

.reveal-enabled .reveal--left {
  transform: translateX(-40px)
}

.reveal--left.is-visible {
  transform: translateX(0)
}

.reveal-enabled .reveal--right {
  transform: translateX(40px)
}

.reveal--right.is-visible {
  transform: translateX(0)
}

.reveal-enabled .reveal--scale {
  transform: scale(0.9)
}

.reveal--scale.is-visible {
  transform: scale(1)
}

.reveal-enabled .reveal-stagger>* {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .5s var(--ease), transform .5s var(--ease)
}

.reveal-stagger.is-visible>*:nth-child(1) {
  opacity: 1;
  transform: none;
  transition-delay: .05s
}

.reveal-stagger.is-visible>*:nth-child(2) {
  opacity: 1;
  transform: none;
  transition-delay: .1s
}

.reveal-stagger.is-visible>*:nth-child(3) {
  opacity: 1;
  transform: none;
  transition-delay: .15s
}

.reveal-stagger.is-visible>*:nth-child(4) {
  opacity: 1;
  transform: none;
  transition-delay: .2s
}

.reveal-stagger.is-visible>*:nth-child(5) {
  opacity: 1;
  transform: none;
  transition-delay: .25s
}

.reveal-stagger.is-visible>*:nth-child(6) {
  opacity: 1;
  transform: none;
  transition-delay: .3s
}

.reveal-stagger.is-visible>*:nth-child(n+7) {
  opacity: 1;
  transform: none;
  transition-delay: .35s
}

/* ============================================
   KEYFRAMES
   ============================================ */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

@keyframes fadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

@keyframes shimmer {

  0%,
  100% {
    background-position: 0% center
  }

  50% {
    background-position: 200% center
  }
}

@keyframes scrollPulse {

  0%,
  100% {
    opacity: .3;
    transform: scaleY(1)
  }

  50% {
    opacity: 1;
    transform: scaleY(1.2)
  }
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(10px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(212, 168, 83, 0.3)
  }

  50% {
    box-shadow: 0 0 0 12px rgba(212, 168, 83, 0)
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media(max-width:1024px) {
  .card-grid--2 {
    grid-template-columns: 1fr
  }
}

@media(max-width:768px) {
  .hero {
    min-height: 80vh;
    padding: var(--space-2xl) var(--space-md)
  }

  .section {
    padding: var(--space-xl) 0
  }

  .card-grid,
  .card-grid--3 {
    grid-template-columns: 1fr
  }
}

@media(max-width:480px) {
  .hero {
    min-height: 70vh
  }

  .hero__scroll-indicator {
    display: none
  }
}

/* Utilities */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0
}

.text-center {
  text-align: center
}

.text-left {
  text-align: left
}

.mb-0 {
  margin-bottom: 0
}

.mb-sm {
  margin-bottom: var(--space-sm)
}

.mb-md {
  margin-bottom: var(--space-md)
}

.mb-lg {
  margin-bottom: var(--space-lg)
}

.mb-xl {
  margin-bottom: var(--space-xl)
}

.mt-xl {
  margin-top: var(--space-xl)
}

/* Contextual image lightbox */

/* Readable secondary text: these used --text-muted (3.3:1); hero and disabled states keep theirs. */

.text-muted,
.tabs__btn,
.stat__label,
.stat__sublabel,
.context-placeholder__caption {
  color: var(--text-secondary)
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto
  }

  .reveal-enabled .reveal,
  .reveal-enabled .reveal--left,
  .reveal-enabled .reveal--right,
  .reveal-enabled .reveal--scale,
  .reveal-enabled .reveal-stagger>* {
    opacity: 1;
    transform: none;
    transition: none
  }

  .card:hover {
    transform: none
  }
}

/* ============================================
   SPONSORS & PATRONS
   ============================================ */

.supporter-group + .supporter-group {
  margin-top: var(--space-xl)
}

.supporter-group__title {
  text-align: center;
  margin-bottom: var(--space-md)
}

/* Two portraits side by side until phone width; each crop keeps the face in frame. */
.patron-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 760px;
  margin-inline: auto
}

/* Side by side, the cards share a row height and the figure (photo plus any credit) absorbs the
   difference, so both names sit on one line. Stacked cards keep their natural height. */
.patron-card {
  display: flex;
  flex-direction: column
}

.patron-card__media {
  flex: 1 0 auto;
  margin: 0 0 var(--space-md)
}

.patron-card__image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-tertiary)
}

.patron-card__image--powell {
  object-position: 50% 20%
}

.patron-card__image--hall {
  object-position: 44% 0
}

/* The brief's small gold caps for patron titles; other pages keep the sentence-case meta line. */
.patron-card .card__meta {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 600
}

.patron-card__credit {
  margin-top: var(--space-xs);
  font-size: var(--fs-small);
  line-height: 1.45;
  color: var(--text-secondary)
}

.patron-card__credit a {
  color: var(--accent-gold);
  text-decoration: underline;
  text-underline-offset: 2px
}

/* A withdrawn photo: omit the figure and add this modifier, so no empty frame shows. */
.patron-card--no-photo {
  padding-top: var(--space-xl)
}

/* Stacked, each portrait stays a readable size instead of filling a tablet screen. */
@media(max-width:768px) {
  .patron-grid {
    grid-template-columns: minmax(0, 440px);
    justify-content: center
  }
}

/* Supporter logos keep their natural proportions; the Perring feature pairs photo and text. */
/* One 120px logo band (Jordan, 2026-10-26): every supporter logo shares a height, so the titles in
   a row line up. Proportions are kept, and the height is reserved before a lazy logo loads. */
.funding-logo {
  display: block;
  height: 120px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  margin-inline: auto;
  margin-bottom: var(--space-md)
}

/* RBKC keeps its white panel, now inside the shared band. */
.funding-logo--rbkc {
  box-sizing: border-box;
  padding: 8px;
  background: #fff
}

.card--perring-feature {
  grid-column: span 2;
  padding: var(--space-md)
}

.perring-feature {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: var(--space-lg);
  align-items: center
}

.perring-feature__media {
  margin: 0
}

.perring-feature__image {
  width: 100%;
  min-height: clamp(260px, 30vw, 360px);
  max-height: clamp(280px, 36vw, 420px);
  object-fit: contain;
  object-position: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-tertiary)
}

.perring-feature__content .card__title {
  margin-bottom: var(--space-sm)
}

.perring-feature__content .card__text {
  margin-bottom: 0
}

@media(max-width:768px) {
  .card--perring-feature {
    grid-column: auto;
    padding: var(--space-lg)
  }

  .perring-feature {
    grid-template-columns: 1fr;
    gap: var(--space-md)
  }

  .perring-feature__image {
    min-height: clamp(220px, 58vw, 320px);
    max-height: none
  }
}

/* Narrow phones: slimmer card padding gives long supporter names, the Perring text and Joe
   Powell's credit more line length. */
@media(max-width:480px) {
  .card,
  .card--perring-feature {
    padding: 22px
  }
}
