/* ============================================================
   PIFI — Play It Forward Interactive
   Design: shadcn-inspired, WipEout Futurism aesthetic
   ============================================================ */

/* ── Custom Properties ────────────────────────────────────── */
:root {
  /* Brand */
  --pifi-orange: #d4682a;
  --pifi-orange-hover: #b8551e;
  --pifi-orange-subtle: rgba(212, 104, 42, 0.12);
  --pifi-orange-border: rgba(212, 104, 42, 0.3);

  /* Light scheme tokens */
  --bg: #ffffff;
  --bg-alt: #f9f9f8;
  --bg-card: #ffffff;
  --border: #e4e4e7;
  --border-hover: #d4d4d8;
  --text: #09090b;
  --text-muted: #71717a;
  --text-subtle: #a1a1aa;
  --ring: rgba(212, 104, 42, 0.4);

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,.05);
  --shadow: 0 1px 3px 0 rgba(0,0,0,.1), 0 1px 2px -1px rgba(0,0,0,.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;

  /* Spacing */
  --radius: 8px;
  --radius-sm: 4px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Layout */
  --nav-h: 64px;
  --container: 1200px;
  --gutter: clamp(1rem, 5vw, 2rem);

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 200ms;
}

/* Dark scheme overrides */
[data-theme="dark"] {
  --bg: #09090b;
  --bg-alt: #111113;
  --bg-card: #18181b;
  --border: #27272a;
  --border-hover: #3f3f46;
  --text: #fafafa;
  --text-muted: #a1a1aa;
  --text-subtle: #71717a;
  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,.4);
  --shadow: 0 1px 3px 0 rgba(0,0,0,.5), 0 1px 2px -1px rgba(0,0,0,.3);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.5), 0 2px 4px -2px rgba(0,0,0,.3);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.6), 0 4px 6px -4px rgba(0,0,0,.4);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }

/* ── Accessibility ─────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: var(--pifi-orange);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 2px solid var(--pifi-orange);
  outline-offset: 2px;
}

/* ── Layout ────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ── Navigation ────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.nav {
  display: flex;
  align-items: center;
  height: var(--nav-h);
  gap: 1.5rem;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-right: auto;
  text-decoration: none;
}

.nav__logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.nav__wordmark {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--pifi-orange);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.nav__link:hover,
.nav__link--active {
  color: var(--text);
  background: var(--bg-alt);
}

.nav__link--active {
  color: var(--pifi-orange);
}

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.theme-toggle:hover { color: var(--text); background: var(--bg-alt); }

.theme-toggle__moon { display: none; }
[data-theme="dark"] .theme-toggle__sun { display: none; }
[data-theme="dark"] .theme-toggle__moon { display: block; }

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  padding: 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.nav__hamburger span {
  display: block;
  height: 1.5px;
  background: var(--text);
  border-radius: 99px;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav__hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav__hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* Mobile nav */
@media (max-width: 720px) {
  .nav__hamburger { display: flex; }

  .nav__links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem;
    z-index: 99;
    box-shadow: var(--shadow-lg);
  }
  .nav__links.is-open { display: flex; }
  .nav__link { padding: 0.75rem 1rem; font-size: 1rem; }
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: all var(--dur) var(--ease);
}
.btn:focus-visible { outline: 2px solid var(--pifi-orange); outline-offset: 2px; }

.btn--primary {
  background: var(--pifi-orange);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--pifi-orange-hover); box-shadow: var(--shadow); }

.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.btn--outline:hover { background: var(--bg-alt); border-color: var(--border-hover); }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(3rem, 8vw, 6rem);
  position: relative;
  overflow: hidden;
}

/* Subtle geometric background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, var(--pifi-orange-subtle) 0%, transparent 70%);
  pointer-events: none;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.hero__greeting {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--pifi-orange);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.hero__name {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.hero__role {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 500;
  color: var(--text-muted);
}

.hero__sub {
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  color: var(--text-subtle);
  margin-top: 0.25rem;
  margin-bottom: 2rem;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero__card {
  flex-shrink: 0;
}

.hero__card-img {
  width: clamp(200px, 28vw, 320px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  object-fit: contain;
  background: #fff;
  transition: box-shadow var(--dur) var(--ease);
}
.hero__card-img:hover { box-shadow: 0 20px 40px -8px rgba(212,104,42,0.25); }

.hero__scroll {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  color: var(--text-subtle);
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

@media (max-width: 680px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero__card {
    display: block;
    order: -1;
    margin-inline: auto;
  }
  .hero__card-img {
    width: clamp(180px, 58vw, 280px);
  }
  .hero__cta { justify-content: center; }
}

/* ── Section Scaffold ──────────────────────────────────────── */
.section { padding-block: clamp(4rem, 8vw, 7rem); }
.section--alt { background: var(--bg-alt); }

.section__header {
  margin-bottom: 3rem;
}

.section__label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pifi-orange);
  margin-bottom: 0.75rem;
}
.section__label::before {
  content: '';
  display: block;
  width: 1.5rem;
  height: 1px;
  background: var(--pifi-orange);
}

.section__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.section__desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 60ch;
  line-height: 1.7;
}

/* ── About ─────────────────────────────────────────────────── */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.about__bio p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}
.about__bio p:last-child { margin-bottom: 0; }
.about__bio strong { color: var(--text); font-weight: 600; }

.stats__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.stat-card:hover { border-color: var(--pifi-orange-border); box-shadow: var(--shadow); }

.stat-card__number {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--pifi-orange);
  line-height: 1;
}
.stat-card__plus { font-size: 0.7em; vertical-align: super; }
.stat-card__label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.4;
}

@media (max-width: 800px) {
  .about__grid { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 500px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Filter Tabs ────────────────────────────────────────────── */
.filter-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 0.25rem;
}
.filter-tabs::-webkit-scrollbar { display: none; }

.filter-tab {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.875rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: transparent;
  transition: all var(--dur) var(--ease);
}
.filter-tab:hover { color: var(--text); border-color: var(--border-hover); background: var(--bg); }
.filter-tab--active {
  background: var(--pifi-orange);
  color: #fff;
  border-color: var(--pifi-orange);
}

/* ── Products Grid ──────────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 1.25rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.product-card:hover {
  border-color: var(--pifi-orange-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.product-card[hidden] { display: none; }

.product-card__img-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-alt);
  cursor: zoom-in;
}

.product-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms var(--ease);
}
.product-card:hover .product-card__img { transform: scale(1.04); }

.product-card__badge {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.badge--premium {
  background: rgba(212, 104, 42, 0.9);
  color: #fff;
}
.badge--indie {
  background: rgba(99, 102, 241, 0.9);
  color: #fff;
}
.badge--licensed {
  background: rgba(16, 185, 129, 0.9);
  color: #fff;
}

.product-card__body {
  padding: 1rem 1.125rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  flex: 1;
}

.product-card__title {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}

.product-card__partner {
  font-size: 0.8125rem;
  color: var(--text-subtle);
  line-height: 1.4;
}

.product-card__platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.25rem;
}

.product-card__note {
  margin-top: 0.5rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.platform-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--bg-alt);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ── Recognition ────────────────────────────────────────────── */
.recognition__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.recognition__award {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.award__badge {
  max-width: 260px;
  border-radius: var(--radius);
}

.recognition__award-text h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.badge--category {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--pifi-orange);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.recognition__award-text p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.recognition__award-text strong { color: var(--text); }

.pull-quote {
  padding: 2rem;
  border-left: 3px solid var(--pifi-orange);
  background: var(--bg-card);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.pull-quote p {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 1rem;
}

.pull-quote footer {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.pull-quote cite a {
  color: var(--pifi-orange);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 700px) {
  .recognition__grid { grid-template-columns: 1fr; }
}

/* ── Services List ──────────────────────────────────────────── */
.services__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-bottom: 3rem;
  list-style: none;
}

.services__list li {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-card);
  transition: border-color var(--dur) var(--ease);
}

.services__list li::before {
  content: '';
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pifi-orange);
}

.services__list li:hover { border-color: var(--pifi-orange-border); color: var(--text); }

/* ── Contact Cards ──────────────────────────────────────────── */
.contact__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  flex: 1;
  min-width: 220px;
  padding: 1.125rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  color: var(--text);
  text-decoration: none;
  transition: all var(--dur) var(--ease);
}
.contact-card:hover {
  border-color: var(--pifi-orange-border);
  box-shadow: var(--shadow);
  color: var(--text);
}

.contact-card__icon {
  color: var(--pifi-orange);
  flex-shrink: 0;
}

.contact-card div {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex: 1;
  min-width: 0;
}

.contact-card__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.contact-card__handle {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-card__arrow {
  color: var(--text-subtle);
  flex-shrink: 0;
  transition: color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.contact-card:hover .contact-card__arrow { color: var(--pifi-orange); transform: translate(2px, -2px); }

/* ── Quote Section ──────────────────────────────────────────── */
.quote-section {
  padding-block: clamp(4rem, 8vw, 7rem);
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.quote-section__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
}

.manifesto-quote p {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-weight: 400;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 64ch;
  margin: 0 auto;
}
.manifesto-quote em { font-style: italic; color: var(--text); }

.manifesto-quote__attr {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.625rem;
}

.manifesto-quote__attr > div {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.manifesto-quote__photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--pifi-orange);
  flex-shrink: 0;
}

.manifesto-quote__name {
  display: block;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--pifi-orange-border);
}
.manifesto-quote__name:hover { color: var(--pifi-orange); }

.manifesto-quote__role {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-subtle);
}

.manifesto-quote__role a {
  color: var(--pifi-orange);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.manifesto-quote__role a:hover { text-decoration: none; }

.quote-divider {
  border: none;
  border-top: 1px solid var(--border);
  width: 4rem;
  margin: 3rem auto;
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding-block: 2rem;
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.footer__brand img { border-radius: var(--radius-sm); }

.footer__name {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
}
.footer__motto {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.1rem;
}

.footer__copy {
  font-size: 0.8125rem;
  color: var(--text-subtle);
}

/* ── Lightbox ───────────────────────────────────────────────── */
.lightbox__backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn 200ms var(--ease) both;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 201;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: fadeIn 200ms var(--ease) both;
}

.lightbox[hidden], .lightbox__backdrop[hidden] { display: none; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: min(900px, 90vw);
  max-height: 90svh;
}

.lightbox__img {
  max-width: 100%;
  max-height: calc(90svh - 6rem);
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.lightbox__caption {
  color: rgba(255,255,255,0.8);
  font-size: 0.875rem;
  text-align: center;
  max-width: 60ch;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  transition: background var(--dur) var(--ease);
}
.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover { background: rgba(255,255,255,0.2); }

.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* ── Animations & utilities ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

.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;
}

/* Fade-in on scroll */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 500ms var(--ease), transform 500ms var(--ease);
}
.fade-in.visible {
  opacity: 1;
  transform: none;
}
