@font-face {
  font-family: 'Lemon Milk';
  src: url('fonts/LEMONMILK-BoldItalic.otf') format('opentype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Lemon Milk';
  src: url('fonts/LEMONMILK-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Integral CF';
  src: url('fonts/Fontspring-DEMO-integralcf-regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Integral CF';
  src: url('fonts/Fontspring-DEMO-integralcf-medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Integral CF';
  src: url('fonts/Fontspring-DEMO-integralcf-bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Integral CF';
  src: url('fonts/Fontspring-DEMO-integralcf-extrabold.otf') format('opentype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Integral CF';
  src: url('fonts/Fontspring-DEMO-integralcf-heavy.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Digital-7';
  src: url('fonts/digital-7.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0a0a0a;
  --bg-2: #060606;
  --ink: #f4f4f0;
  --muted: rgba(244, 244, 240, 0.55);
  --faint: rgba(244, 244, 240, 0.3);
  --line: rgba(244, 244, 240, 0.14);
  --accent: #b2c73a;
  --lime: #b2c73a;
  --lime-bright: #d8ec6a;
  --lime-dim: rgba(178, 199, 58, 0.5);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', 'Menlo', monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: 'Integral CF', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.lightbox-open {
  overflow: hidden;
}

body.lightbox-open .page {
  filter: blur(18px) saturate(115%);
  transform: scale(1.015);
  transition: filter 0.35s var(--ease), transform 0.35s var(--ease);
}

body.lightbox-open .atmosphere {
  filter: blur(8px);
  transition: filter 0.35s var(--ease);
}

body.is-loading {
  overflow: hidden;
}

body.is-loading .page {
  visibility: hidden;
}

/* ---------- Preloader ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 75% 65% at 50% 48%, rgba(10, 10, 10, 0.4) 0%, rgba(6, 6, 6, 0.92) 100%),
    var(--bg);
  transition: opacity 0.55s var(--ease), visibility 0.55s var(--ease);
}

.preloader--done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader__grain {
  position: absolute;
  inset: -50%;
  opacity: 0.06;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 8s steps(6) infinite;
}

.preloader__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.85rem, 2.5vh, 1.25rem);
  width: min(88vw, 320px);
  text-align: center;
}

.preloader__mark {
  position: relative;
  margin: 0;
  font-family: 'Integral CF', system-ui, sans-serif;
  font-weight: 900;
  font-size: clamp(1.75rem, 10vw, 3rem);
  line-height: 0.92;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.preloader__mark-back {
  position: absolute;
  inset: 0;
  color: transparent;
  -webkit-text-stroke: 1px rgba(178, 199, 58, 0.2);
  transform: translate(0.03em, 0.04em);
}

.preloader__mark-front {
  display: block;
  background: linear-gradient(172deg, #ffffff 0%, #f4f4f0 42%, #cfd6b0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 24px rgba(178, 199, 58, 0.12));
  animation: nameShimmer 8s ease-in-out infinite;
}

.preloader__track {
  width: 100%;
  height: 2px;
  background: rgba(244, 244, 240, 0.1);
  overflow: hidden;
  border-radius: 2px;
}

.preloader__bar {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, rgba(178, 199, 58, 0.45), var(--lime) 55%, var(--lime-bright));
  box-shadow: 0 0 14px rgba(178, 199, 58, 0.55);
  transition: width 0.35s var(--ease);
}

.preloader__count {
  margin: 0;
  font-family: 'Digital-7', var(--mono);
  font-size: clamp(1.6rem, 8vw, 2.4rem);
  line-height: 1;
  letter-spacing: 0.08em;
  color: var(--lime);
  text-shadow: 0 0 16px rgba(178, 199, 58, 0.45);
}

.preloader__status {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(0.52rem, 1.4vw, 0.62rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--lime-dim);
}

/* ---------- Atmosphere (fixed, behind content) ---------- */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.atmosphere__tint {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 10, 10, 0.35) 0%, rgba(6, 6, 6, 0.15) 45%, rgba(6, 6, 6, 0.7) 100%),
    linear-gradient(135deg, rgba(40, 46, 20, 0.18) 0%, transparent 48%, rgba(6, 6, 6, 0.35) 100%);
}

.atmosphere__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 85% 75% at 50% 42%,
    transparent 0%,
    rgba(0, 0, 0, 0.28) 62%,
    rgba(0, 0, 0, 0.72) 100%
  );
}

.atmosphere__haze {
  position: absolute;
  width: 120vmax;
  height: 120vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.14;
  animation: hazeDrift 30s ease-in-out infinite;
}

.atmosphere__haze--lime {
  top: -45%;
  left: -30%;
  background: radial-gradient(circle, rgba(178, 199, 58, 0.5) 0%, transparent 70%);
}

.atmosphere__haze--cool {
  bottom: -50%;
  right: -35%;
  background: radial-gradient(circle, rgba(120, 150, 190, 0.35) 0%, transparent 70%);
  animation-delay: -15s;
  animation-direction: reverse;
}

.atmosphere__grain {
  position: absolute;
  inset: -50%;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 8s steps(6) infinite;
}

@keyframes hazeDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(3%, 2%) scale(1.05); }
}

@keyframes grainShift {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1%); }
  50% { transform: translate(1%, -2%); }
  75% { transform: translate(2%, 2%); }
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding:
    max(0.85rem, env(safe-area-inset-top))
    max(0.75rem, env(safe-area-inset-right))
    max(1.25rem, env(safe-area-inset-bottom))
    max(0.75rem, env(safe-area-inset-left));
}

/* ---------- Masthead (KWATTA-family cinematic) ---------- */
.masthead {
  padding-top: 0.25rem;
  margin-bottom: clamp(1.75rem, 5vh, 3rem);
}

.folio {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: clamp(0.5rem, 1.15vw, 0.62rem);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  animation: rise 0.8s var(--ease) 0.04s forwards;
}

.folio-left {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--lime);
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-shadow: 0 0 14px rgba(178, 199, 58, 0.3);
  opacity: 0;
  animation: folioIn 0.9s var(--ease) 0.15s forwards;
}

.folio-left::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 6px var(--lime), 0 0 14px rgba(178, 199, 58, 0.5);
  animation: statusPulse 2.4s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

.folio-right {
  text-align: right;
  white-space: nowrap;
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  animation: folioIn 0.9s var(--ease) 0.4s forwards;
}

.nameplate-wrap {
  position: relative;
  border-bottom: 1px solid var(--line);
  padding: clamp(1rem, 4vh, 2.25rem) 0 clamp(0.85rem, 2.5vh, 1.5rem);
  text-align: center;
  opacity: 0;
  animation: rise 1s var(--ease) 0.1s forwards;
}

.nameplate-wrap::after {
  content: '';
  display: block;
  width: 0;
  height: 1px;
  margin: clamp(0.85rem, 2.5vh, 1.25rem) auto 0;
  background: linear-gradient(90deg, transparent, var(--lime) 50%, transparent);
  box-shadow: 0 0 12px rgba(178, 199, 58, 0.4);
  animation: ruleExpand 1.4s var(--ease) 0.55s forwards;
}

.nameplate {
  position: relative;
  display: inline-block;
  font-family: 'Integral CF', system-ui, sans-serif;
  font-weight: 900;
  font-style: normal;
  font-size: clamp(2.4rem, 14vw, 8.5rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.nameplate-back {
  position: absolute;
  inset: 0;
  color: transparent;
  -webkit-text-stroke: 1px rgba(178, 199, 58, 0.16);
  transform: translate(0.03em, 0.04em);
  pointer-events: none;
  user-select: none;
}

.nameplate-front {
  position: relative;
  display: block;
  background: linear-gradient(
    172deg,
    #ffffff 0%,
    #f4f4f0 40%,
    #cfd6b0 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 30px rgba(178, 199, 58, 0.1));
  animation: nameShimmer 8s ease-in-out 1.2s infinite;
}

@keyframes nameShimmer {
  0%, 100% {
    filter: drop-shadow(0 0 26px rgba(178, 199, 58, 0.08));
  }
  50% {
    filter: drop-shadow(0 0 40px rgba(178, 199, 58, 0.2));
  }
}

@keyframes folioIn {
  from {
    opacity: 0;
    transform: translateY(8px);
    letter-spacing: 0.08em;
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ruleExpand {
  to {
    width: min(12rem, 54vw);
  }
}

.kicker {
  margin-top: clamp(0.6rem, 1.5vh, 1rem);
  font-family: var(--mono);
  font-weight: 400;
  font-style: normal;
  font-size: clamp(0.56rem, 1.5vw, 0.68rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--lime-dim);
  text-align: center;
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.18s forwards;
}

/* ---------- Masonry gallery ---------- */
.gallery-wrap {
  flex: 1;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.masonry {
  column-count: 2;
  column-gap: clamp(0.65rem, 2.2vw, 1.1rem);
}

.tile {
  break-inside: avoid;
  margin-bottom: clamp(0.75rem, 2.5vw, 1.25rem);
  opacity: 0;
  animation: rise 0.75s var(--ease) var(--tile-delay, 0s) forwards;
}

.tile:nth-child(odd) {
  padding-right: 0.15rem;
}

.tile:nth-child(even) {
  padding-left: 0.15rem;
}

.tile-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  color: inherit;
}

.tile-media {
  position: relative;
  width: 100%;
  aspect-ratio: var(--ratio, 16 / 9);
  overflow: hidden;
  background: #0c0c0b;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(244, 244, 240, 0.07);
  transition: box-shadow 0.4s var(--ease);
}

.tile-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(6, 6, 6, 0.25) 0%,
    transparent 32%,
    transparent 62%,
    rgba(6, 6, 6, 0.4) 100%
  );
  pointer-events: none;
  opacity: 0.9;
  transition: opacity 0.4s var(--ease);
}

.tile--reel .tile-media {
  box-shadow: inset 0 0 0 1px rgba(178, 199, 58, 0.22);
}

.tile--feature .tile-media {
  box-shadow: inset 0 0 0 1px rgba(178, 199, 58, 0.28);
}

.tile-index {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 2;
  font-family: 'Digital-7', var(--mono);
  font-size: clamp(0.9rem, 2.4vw, 1.15rem);
  line-height: 1;
  letter-spacing: 0.04em;
  color: rgba(244, 244, 240, 0.65);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  transition: color 0.3s var(--ease), text-shadow 0.3s var(--ease);
}

.tile:nth-child(even) .tile-index {
  left: auto;
  right: 0.5rem;
}

.tile--feature .tile-index,
.tile--reel .tile-index {
  color: var(--lime);
  text-shadow: 0 0 10px rgba(178, 199, 58, 0.5);
}

.tile-media--error::after {
  content: 'SIGNAL LOST';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--faint);
}

.tile-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  transition: transform 0.6s var(--ease), filter 0.4s var(--ease);
  filter: saturate(0.85) contrast(1.05) brightness(0.94);
}

.tile-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.6rem 0.1rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), padding 0.4s var(--ease);
}

.tile:nth-child(odd) .tile-caption {
  padding-left: 0.2rem;
}

.tile:nth-child(even) .tile-caption {
  padding-right: 0.2rem;
  flex-direction: row-reverse;
  text-align: right;
}

.tile-title {
  display: block;
  flex: 1;
  min-width: 0;
  font-family: 'Lemon Milk', system-ui, sans-serif;
  font-weight: 700;
  font-style: italic;
  font-size: clamp(0.62rem, 1.65vw, 0.78rem);
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  transition: color 0.3s var(--ease);
}

.tile-meta {
  display: block;
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: clamp(0.5rem, 1.2vw, 0.6rem);
  font-style: normal;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  transition: color 0.3s var(--ease);
}


@media (hover: hover) {
  .tile-btn:hover .tile-caption {
    border-bottom-color: var(--lime-dim);
    padding-bottom: 0.15rem;
  }

  .tile-btn:hover .tile-title {
    color: var(--lime);
  }

  .tile-btn:hover .tile-meta {
    color: var(--muted);
  }

  .tile-btn:hover .tile-index {
    color: var(--lime);
    text-shadow: 0 0 12px rgba(178, 199, 58, 0.6);
  }

  .tile-btn:hover .tile-media {
    box-shadow: inset 0 0 0 1px rgba(178, 199, 58, 0.4);
  }

  .tile-btn:hover .tile-media video {
    transform: scale(1.04);
    filter: saturate(1) contrast(1.06) brightness(1);
  }

  .tile-btn:hover .tile-media::after {
    opacity: 0.5;
  }

  .tile-media {
    transition: transform 0.45s var(--ease), box-shadow 0.4s var(--ease);
  }
}

.masonry-empty {
  column-span: all;
  text-align: center;
  padding: 3rem 1rem;
  font-family: var(--mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: 0.8rem;
}

/* ---------- Colophon ---------- */
.colophon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: clamp(1.1rem, 3.5vh, 2rem);
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: clamp(0.52rem, 1.3vw, 0.64rem);
  font-style: normal;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
}

.colophon-rule {
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--lime-dim), transparent);
}

/* ---------- Locale modal (Spain detection) ---------- */
body.locale-open {
  overflow: hidden;
}

.locale-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    max(1rem, env(safe-area-inset-top))
    max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
}

.locale-modal[hidden] {
  display: none;
}

.locale-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 4, 0.78);
  backdrop-filter: blur(14px) saturate(110%);
  -webkit-backdrop-filter: blur(14px) saturate(110%);
  animation: modalFadeIn 0.35s var(--ease) forwards;
}

.locale-modal-card {
  position: relative;
  z-index: 1;
  width: min(92vw, 360px);
  padding: 1.65rem 1.35rem 1.35rem;
  border: 1px solid rgba(178, 199, 58, 0.28);
  background: rgba(8, 8, 8, 0.88);
  backdrop-filter: blur(20px) saturate(125%);
  -webkit-backdrop-filter: blur(20px) saturate(125%);
  box-shadow:
    0 0 0 1px rgba(244, 244, 240, 0.04) inset,
    0 24px 48px rgba(0, 0, 0, 0.55);
  text-align: center;
  animation: modalSlideUp 0.45s var(--ease) forwards;
}

.locale-modal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 42%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--lime), transparent);
}

.locale-modal-mark {
  display: block;
  margin-bottom: 1rem;
  font-family: 'Integral CF', system-ui, sans-serif;
  font-weight: 900;
  font-size: 0.72rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--lime-dim);
}

.locale-modal-kicker {
  font-family: var(--mono);
  font-size: 0.52rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.75rem;
}

.locale-modal-title {
  font-family: 'Integral CF', system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1rem, 4.2vw, 1.28rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.locale-modal-copy {
  font-family: 'Integral CF', system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(0.68rem, 2.1vw, 0.78rem);
  letter-spacing: 0.03em;
  line-height: 1.55;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.locale-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.locale-modal-btn {
  width: 100%;
  padding: 0.82rem 1rem;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.locale-modal-btn:active {
  transform: scale(0.98);
}

.locale-modal-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: var(--lime);
  color: #0a0a0a;
  border-color: rgba(178, 199, 58, 0.65);
  font-family: 'Integral CF', system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(0.6rem, 1.9vw, 0.7rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.locale-modal-btn-primary:hover {
  background: var(--lime-bright);
  border-color: var(--lime-bright);
}

.locale-flag {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.1rem;
  line-height: 1;
}

.locale-modal-btn-ghost {
  background: transparent;
  color: var(--faint);
  font-family: var(--mono);
  font-weight: 400;
  font-size: clamp(0.52rem, 1.6vw, 0.62rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.locale-modal-btn-ghost:hover {
  color: var(--ink);
  border-color: rgba(244, 244, 240, 0.28);
  background: rgba(244, 244, 240, 0.04);
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    max(0.85rem, env(safe-area-inset-top))
    max(0.85rem, env(safe-area-inset-right))
    max(0.85rem, env(safe-area-inset-bottom))
    max(0.85rem, env(safe-area-inset-left));
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 75% 65% at 50% 48%, rgba(10, 10, 10, 0.35) 0%, rgba(6, 6, 6, 0.72) 100%),
    rgba(8, 8, 8, 0.55);
  backdrop-filter: blur(28px) saturate(120%);
  -webkit-backdrop-filter: blur(28px) saturate(120%);
  animation: fadeIn 0.28s ease forwards;
}

.lightbox-stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(96vw, 1080px);
  max-height: 92dvh;
  animation: scaleIn 0.32s var(--ease) forwards;
}

.lightbox-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-bottom: 0.7rem;
  margin-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
}

.lightbox-title {
  font-family: 'Integral CF', system-ui, sans-serif;
  font-weight: 700;
  font-style: normal;
  font-size: clamp(0.8rem, 2.4vw, 1.1rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}

.lightbox-close {
  border: none;
  background: transparent;
  color: var(--lime);
  font-family: var(--mono);
  font-size: clamp(0.56rem, 1.3vw, 0.68rem);
  font-style: normal;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease, text-shadow 0.2s ease;
  white-space: nowrap;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  color: var(--lime-bright);
  text-shadow: 0 0 12px rgba(178, 199, 58, 0.5);
  outline: none;
}

.lightbox-player {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-height: calc(92dvh - 3.5rem);
  background: transparent;
  overflow: visible;
}

.lightbox-player video {
  display: block;
  width: auto;
  height: auto;
  max-width: min(96vw, 1080px);
  max-height: calc(92dvh - 3.5rem);
  margin: 0 auto;
  object-fit: contain;
  background: #000;
  border-radius: 2px;
  box-shadow:
    0 0 0 1px rgba(244, 244, 240, 0.08),
    0 24px 80px rgba(0, 0, 0, 0.65);
}

/* ---------- Motion ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.98); }
  to   { opacity: 1; transform: scale(1); }
}

/* ---------- Responsive columns ---------- */
@media (min-width: 641px) {
  .page {
    padding-left: max(1.25rem, env(safe-area-inset-left));
    padding-right: max(1.25rem, env(safe-area-inset-right));
  }

  .masonry {
    column-count: 3;
    column-gap: 0.75rem;
  }
}

@media (min-width: 1024px) {
  .masonry {
    column-count: 4;
    column-gap: 0.85rem;
  }
}

/* ---------- Phone polish + performance ---------- */
@media (max-width: 640px) {
  .masonry {
    display: block;
    column-count: 2;
    column-gap: clamp(0.55rem, 2vw, 0.75rem);
    column-fill: balance;
  }

  .tile {
    display: inline-block;
    width: 100%;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    margin-bottom: clamp(0.65rem, 2vw, 0.9rem);
  }

  .tile:nth-child(odd) {
    padding-right: 0.1rem;
    padding-left: 0;
  }

  .tile:nth-child(even) {
    padding-left: 0.1rem;
    padding-right: 0;
  }

  .masthead {
    margin-bottom: clamp(1.35rem, 4.5vh, 2rem);
  }

  .folio {
    padding: 0.5rem 0;
    font-size: 0.5rem;
    letter-spacing: 0.2em;
  }

  .folio-left {
    gap: 0.45rem;
    letter-spacing: 0.2em;
  }

  .folio-left::before {
    width: 5px;
    height: 5px;
  }

  .nameplate {
    font-size: clamp(3rem, 20vw, 5.5rem);
    letter-spacing: 0.01em;
  }

  .nameplate-wrap {
    padding: clamp(1rem, 3.5vh, 1.5rem) 0 clamp(0.8rem, 2vh, 1.15rem);
  }

  .kicker {
    letter-spacing: 0.26em;
    font-size: 0.6rem;
  }

  /* Lighter atmosphere for battery / GPU on phones */
  .atmosphere__haze {
    width: 90vmax;
    height: 90vmax;
    filter: blur(55px);
    opacity: 0.12;
  }

  .atmosphere__grain {
    opacity: 0.04;
  }

  .tile-index {
    top: 0.4rem;
    left: 0.4rem;
    font-size: 0.95rem;
  }

  .tile:nth-child(even) .tile-index {
    right: 0.4rem;
  }

  .tile-caption {
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 0.35rem;
    padding-top: 0.5rem;
  }

  .tile-title {
    font-size: clamp(0.48rem, 2.8vw, 0.58rem);
    letter-spacing: 0.03em;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .tile-meta {
    font-size: 0.42rem;
    letter-spacing: 0.1em;
  }

  .tile:nth-child(even) .tile-caption {
    flex-direction: row-reverse;
  }

  .colophon {
    gap: 0.6rem;
    margin-top: clamp(0.65rem, 2vh, 1rem);
    padding-top: 0.65rem;
    letter-spacing: 0.16em;
  }

  .gallery-wrap {
    margin-bottom: -0.15rem;
  }

  .masonry .tile:last-child {
    margin-bottom: clamp(0.35rem, 1.2vw, 0.55rem);
  }

  .locale-modal-card {
    padding: 1.45rem 1.15rem 1.15rem;
  }

  .locale-modal-title {
    letter-spacing: 0.08em;
  }
}

@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; }

  .folio,
  .folio-left,
  .folio-right,
  .nameplate-wrap,
  .nameplate-wrap::after,
  .kicker,
  .tile {
    opacity: 1;
  }

  .nameplate-wrap::after {
    width: min(12rem, 54vw);
  }

  .atmosphere__haze,
  .atmosphere__grain {
    animation: none;
  }

  body.lightbox-open .page {
    filter: none;
    transform: none;
  }

  body.lightbox-open .atmosphere {
    filter: none;
  }

  .preloader__grain {
    animation: none;
  }
}
