/* ============================================================
   AMMOC — Design System
   ============================================================ */

:root {
  --bg: #0F0E0C;
  --bg-soft: #1A1815;
  --fg: #F5F2EC;
  --fg-dim: #9A9489;
  --fg-faint: #4A463F;
  --accent: #c71f2d;
  --accent-hover: #e02635;
  --line: rgba(245, 242, 236, 0.10);
  --line-strong: rgba(245, 242, 236, 0.18);
  --easing: cubic-bezier(0.16, 1, 0.3, 1);
  --font-display: 'Geist', 'Pretendard', sans-serif;
  --font-body: 'Pretendard', 'Geist', sans-serif;
  --font-mono: 'Geist Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--fg); }

body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 999;
  opacity: 0.03; 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.85' numOctaves='3' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============ LOADER ============ */
.loader {
  position: fixed; inset: 0; background: var(--bg);
  z-index: 9999; display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s var(--easing), visibility 0s 0.6s;
}
.loader.done { opacity: 0; visibility: hidden; }
.loader-text {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.3em; color: var(--fg-dim);
}
.loader-bar {
  position: absolute; bottom: 0; left: 0; height: 1px;
  background: var(--accent); width: 0;
  animation: load 1.2s var(--easing) forwards;
}
@keyframes load { to { width: 100%; } }

/* ============ NAV ============ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 24px 40px;
  display: flex; justify-content: space-between; align-items: center;
  mix-blend-mode: difference;
}
.nav-logo {
  font-family: var(--font-display); font-weight: 700; font-size: 20px;
  letter-spacing: -0.02em; color: var(--fg); text-decoration: none;
}
.nav-logo sup {
  font-size: 0.5em; margin-left: 4px; opacity: 0.6;
  vertical-align: super; font-weight: 400;
}

.nav-right { display: flex; align-items: center; gap: 36px; }
.nav-menu { display: flex; gap: 28px; list-style: none; }
.nav-menu a {
  font-family: var(--font-display); font-weight: 500; font-size: 12px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg); text-decoration: none;
  position: relative; padding-bottom: 4px;
}
.nav-menu a::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 1px; background: currentColor;
  transition: width 0.4s var(--easing);
}
.nav-menu a:hover::after, .nav-menu a.current::after { width: 100%; }

.lang-toggle {
  background: none; border: 1px solid var(--line-strong); color: var(--fg);
  font-family: var(--font-mono); font-weight: 500; font-size: 10px;
  letter-spacing: 0.15em; text-transform: uppercase;
  padding: 8px 14px; border-radius: 100px; cursor: pointer;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.lang-toggle:hover { background: var(--accent); border-color: var(--accent); color: var(--fg); }

@media (max-width: 1100px) {
  .nav-menu { gap: 20px; }
  .nav-menu a { font-size: 11px; letter-spacing: 0.1em; }
}
@media (max-width: 768px) {
  nav { padding: 18px 20px; }
  .nav-right { gap: 14px; }
  .nav-menu { gap: 12px; }
  .nav-menu a { font-size: 9px; letter-spacing: 0.06em; }
  .lang-toggle { padding: 6px 10px; font-size: 9px; }
}

/* ============ UTILS ============ */
.section-label {
  font-family: var(--font-mono); font-weight: 500; font-size: 11px;
  letter-spacing: 0.25em; color: var(--fg-dim); text-transform: uppercase;
  margin-bottom: 56px;
  display: flex; align-items: center; gap: 12px;
}
.section-label::before { content: ''; width: 32px; height: 1px; background: var(--fg-dim); }

.reveal {
  opacity: 0; transform: translateY(40px);
  transition: opacity 1s var(--easing), transform 1s var(--easing);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ============ HERO ============ */
.hero {
  min-height: 100vh; position: relative;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 0 40px;
}
.hero-label, .hero-label-right {
  position: absolute; top: 100px;
  font-family: var(--font-mono); font-weight: 500; font-size: 11px;
  letter-spacing: 0.25em; color: var(--fg-dim); text-transform: uppercase;
}
.hero-label { left: 40px; }
.hero-label-right { right: 40px; text-align: right; line-height: 1.6; }

.ammoc-wordmark {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(7rem, 24vw, 24rem); line-height: 0.9; letter-spacing: -0.05em;
  display: flex; user-select: none;
}
.ammoc-letter {
  display: inline-block;
  transition: transform 0.5s var(--easing), color 0.3s ease;
  will-change: transform; opacity: 0; transform: translateY(40px);
}
.ammoc-wordmark.ready .ammoc-letter { opacity: 1; transform: translateY(0); }
.ammoc-letter:nth-child(1) { transition-delay: 0.05s; }
.ammoc-letter:nth-child(2) { transition-delay: 0.12s; }
.ammoc-letter:nth-child(3) { transition-delay: 0.19s; }
.ammoc-letter:nth-child(4) { transition-delay: 0.26s; }
.ammoc-letter:nth-child(5) { transition-delay: 0.33s; }
.ammoc-letter:hover { color: var(--accent); }

.hero-tagline {
  margin-top: 44px; font-family: var(--font-body); font-weight: 700;
  font-size: clamp(1.05rem, 1.4vw, 1.35rem); letter-spacing: -0.005em;
  color: var(--fg); text-align: center; max-width: 600px;
  opacity: 0; animation: fadeUpCenter 1s var(--easing) 0.6s forwards;
}
.hero-tagline em { font-style: normal; font-weight: 800; color: var(--accent); }

.hero-scroll {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-weight: 500; font-size: 10px;
  letter-spacing: 0.3em; color: var(--fg-dim); text-transform: uppercase;
  opacity: 0; animation: fadeUp 1s var(--easing) 1s forwards;
}
.hero-scroll::after {
  content: ''; display: block; width: 1px; height: 32px;
  background: linear-gradient(to bottom, var(--fg-dim), transparent);
  margin: 12px auto 0; animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine { 0%, 100% { transform: scaleY(1); transform-origin: top; } 50% { transform: scaleY(0.3); transform-origin: top; } }
@keyframes fadeUp { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes fadeUpCenter { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 768px) {
  .hero-label, .hero-label-right { top: 80px; font-size: 9px; }
  .hero-label { left: 20px; }
  .hero-label-right { right: 20px; }
  .hero-tagline { margin-top: 28px; padding: 0 20px; }
}

/* ============ MANIFESTO ============ */
.manifesto { padding: 200px 40px; max-width: 1280px; margin: 0 auto; }
.manifesto-stack { display: flex; flex-direction: column; gap: 40px; max-width: 920px; }
.manifesto-text {
  font-family: var(--font-body); font-weight: 700;
  font-size: clamp(1.5rem, 2.6vw, 2.4rem); line-height: 1.3;
  letter-spacing: -0.015em; color: var(--fg);
}
.manifesto-text em { font-style: normal; font-weight: 900; color: var(--accent); }

@media (max-width: 768px) { .manifesto { padding: 120px 20px; } .manifesto-stack { gap: 28px; } }

/* ============ SERVICES ============ */
.services { padding: 80px 40px 140px; max-width: 1400px; margin: 0 auto; }
.services-headline {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 4rem); line-height: 1.05;
  letter-spacing: -0.03em; margin-bottom: 80px; color: var(--fg);
}
.services-headline em { font-style: normal; font-weight: 800; color: var(--accent); }

.service-row {
  display: grid; grid-template-columns: 80px 1fr 2fr 220px;
  gap: 40px; align-items: center; padding: 36px 0;
  border-top: 1px solid var(--line); transition: background 0.4s ease;
  position: relative; text-decoration: none; color: inherit;
}
.service-row:last-of-type { border-bottom: 1px solid var(--line); }
.service-row.live:hover { background: rgba(199, 31, 45, 0.04); }
.service-row.live:hover .service-name { color: var(--accent); }
.service-row.live:hover .service-arrow { transform: translateX(8px); color: var(--accent); }
.service-row.soon { opacity: 0.7; }

.service-num { font-family: var(--font-mono); font-weight: 500; font-size: 11px; color: var(--fg-faint); letter-spacing: 0.2em; }
.service-name {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.35rem, 2.3vw, 2rem); letter-spacing: -0.02em;
  color: var(--fg); transition: color 0.3s ease;
}
.service-row.soon .service-name { color: var(--fg-dim); }
.service-desc { font-size: 0.95rem; color: var(--fg-dim); line-height: 1.6; }
.service-meta {
  font-family: var(--font-mono); font-weight: 500; font-size: 11px;
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--fg-dim);
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
}
.service-meta.soon-tag { color: var(--fg-faint); }
.service-meta.soon-tag::before {
  content: ''; display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; background: var(--accent); margin-right: 8px;
  animation: pulse 2s ease-in-out infinite; opacity: 0.6;
}
@keyframes pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 0.8; } }
.service-arrow { display: inline-block; transition: transform 0.4s var(--easing), color 0.3s; }

@media (max-width: 1024px) {
  .service-row { grid-template-columns: 40px 1fr; grid-template-rows: auto auto auto; gap: 8px 20px; padding: 28px 0; }
  .service-desc { grid-column: 2; }
  .service-meta { grid-column: 2; justify-content: flex-start; margin-top: 8px; }
}
@media (max-width: 768px) { .services { padding: 60px 20px 100px; } }

/* ============ SPACES FEATURE (home) ============ */
.spaces-feature { padding: 80px 40px 140px; max-width: 1400px; margin: 0 auto; }
.spaces-feature-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-bottom: 60px; }
.spaces-feature-headline {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 4rem); line-height: 1.05;
  letter-spacing: -0.03em; color: var(--fg); max-width: 720px;
}
.spaces-feature-headline em { font-style: normal; font-weight: 800; color: var(--accent); }
.spaces-feature-link {
  font-family: var(--font-mono); font-weight: 500; font-size: 11px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--fg); text-decoration: none;
  border-bottom: 1px solid var(--fg-faint); padding-bottom: 6px;
  display: inline-flex; align-items: center; gap: 12px;
  transition: color 0.3s, border-color 0.3s, gap 0.3s; white-space: nowrap;
}
.spaces-feature-link:hover { color: var(--accent); border-color: var(--accent); gap: 16px; }

.spaces-feature-photo {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  overflow: hidden; background: var(--bg-soft);
}
.spaces-feature-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s var(--easing); }
.spaces-feature-photo:hover img { transform: scale(1.02); }

.space-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 30% 30%, rgba(199, 31, 45, 0.10), transparent 60%), linear-gradient(135deg, #1A1815, #0F0E0C);
  overflow: hidden;
}
.space-placeholder::before {
  content: ''; position: absolute; top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at center, rgba(245, 242, 236, 0.03), transparent 40%);
  animation: drift 14s ease-in-out infinite;
}
.space-placeholder::after {
  content: attr(data-num); font-family: var(--font-display); font-weight: 800;
  font-size: clamp(4rem, 10vw, 10rem); color: var(--fg-faint);
  position: relative; z-index: 1; letter-spacing: -0.04em;
}
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(40px, 20px); } }

.spaces-feature-meta {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-top: 24px; font-family: var(--font-mono); font-weight: 500;
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--fg-dim);
}
.spaces-feature-meta .loc { color: var(--fg); }

@media (max-width: 768px) {
  .spaces-feature { padding: 60px 20px 100px; }
  .spaces-feature-header { flex-direction: column; align-items: flex-start; gap: 24px; }
  .spaces-feature-photo { aspect-ratio: 4 / 3; }
}

/* ============ MISSION ============ */
.mission { padding: 200px 40px; text-align: center; border-top: 1px solid var(--line); }
.mission-statement {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.5rem, 8vw, 8rem); line-height: 1.0; letter-spacing: -0.04em;
  color: var(--fg); max-width: 1200px; margin: 0 auto;
}
.mission-statement em { font-style: normal; font-weight: 800; color: var(--accent); }
.mission-sub {
  margin-top: 32px; font-family: var(--font-body); font-weight: 500;
  font-size: 1rem; letter-spacing: 0.05em; color: var(--fg-dim); text-transform: uppercase;
}

@media (max-width: 768px) { .mission { padding: 120px 20px; } }

/* ============ CONTACT CTA (home) ============ */
.contact-cta-section { padding: 140px 40px 100px; max-width: 1400px; margin: 0 auto; border-top: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: end; }
.contact-headline {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2rem, 5vw, 4.5rem); line-height: 1.0;
  letter-spacing: -0.03em; color: var(--fg);
}
.contact-headline em { font-style: normal; font-weight: 800; color: var(--accent); }
.contact-cta {
  display: inline-flex; align-items: center; gap: 16px;
  padding: 22px 36px; background: var(--accent); color: var(--fg);
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  text-decoration: none; border-radius: 100px; margin-top: 40px;
  transition: gap 0.4s var(--easing), background 0.3s ease, transform 0.3s ease;
}
.contact-cta:hover { gap: 24px; background: var(--accent-hover); transform: translateY(-2px); }
.contact-cta-arrow { width: 18px; height: 18px; }

.contact-info { font-size: 0.95rem; line-height: 1.9; color: var(--fg-dim); }
.contact-info strong { color: var(--fg); font-weight: 700; display: block; margin-bottom: 8px; font-size: 1.05rem; }
.contact-info a {
  color: var(--fg-dim); text-decoration: none;
  border-bottom: 1px solid var(--fg-faint);
  transition: color 0.3s, border-color 0.3s;
}
.contact-info a:hover { color: var(--accent); border-color: var(--accent); }

@media (max-width: 768px) { .contact-cta-section { padding: 100px 20px 60px; } .contact-grid { grid-template-columns: 1fr; gap: 48px; } }

/* ============ FOOTER ============ */
footer {
  padding: 48px 40px 32px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-weight: 500; font-size: 11px;
  color: var(--fg-faint); letter-spacing: 0.1em; text-transform: uppercase;
  border-top: 1px solid var(--line);
}
footer a { color: var(--fg-dim); text-decoration: none; }
footer a:hover { color: var(--fg); }

@media (max-width: 768px) { footer { padding: 32px 20px; flex-direction: column; gap: 16px; text-align: center; } }

/* ============ SPACES PAGE ============ */
.page-spaces { padding: 160px 40px 100px; max-width: 1400px; margin: 0 auto; min-height: 100vh; }
.spaces-hero { display: grid; grid-template-columns: 2fr 1fr; gap: 80px; margin-bottom: 100px; align-items: end; }
.spaces-page-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.5rem, 6vw, 6rem); line-height: 1.0;
  letter-spacing: -0.035em; color: var(--fg);
}
.spaces-page-title em { font-style: normal; font-weight: 800; color: var(--accent); }
.spaces-page-subtitle {
  font-family: var(--font-body); font-weight: 500; font-size: 1rem;
  color: var(--fg-dim); line-height: 1.7; max-width: 360px;
}

.spaces-grid { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: minmax(120px, auto); gap: 16px; }
.space-card { position: relative; overflow: hidden; }
.space-card.s-1 { grid-column: span 7; grid-row: span 4; }
.space-card.s-2 { grid-column: span 5; grid-row: span 4; }
.space-card.s-3 { grid-column: span 4; grid-row: span 3; }
.space-card.s-4 { grid-column: span 4; grid-row: span 3; }
.space-card.s-5 { grid-column: span 4; grid-row: span 3; }

.space-img { position: relative; width: 100%; height: 100%; min-height: 240px; overflow: hidden; background: var(--bg-soft); }
.space-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s var(--easing); }
.space-card:hover .space-img img { transform: scale(1.03); }

.space-caption {
  position: absolute; bottom: 16px; left: 16px; right: 16px;
  display: flex; justify-content: space-between; align-items: flex-end;
  font-family: var(--font-mono); font-weight: 500; font-size: 10px;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--fg);
  z-index: 2; mix-blend-mode: difference;
}
.space-loc { font-weight: 700; }
.space-meta { color: var(--fg-dim); text-align: right; }

@media (max-width: 900px) {
  .spaces-hero { grid-template-columns: 1fr; gap: 32px; margin-bottom: 60px; }
  .spaces-page-subtitle { max-width: none; }
  .spaces-grid { gap: 10px; grid-auto-rows: minmax(80px, auto); }
  .space-card.s-1 { grid-column: span 12; grid-row: span 3; }
  .space-card.s-2 { grid-column: span 12; grid-row: span 3; }
  .space-card.s-3 { grid-column: span 6; grid-row: span 2; }
  .space-card.s-4 { grid-column: span 6; grid-row: span 2; }
  .space-card.s-5 { grid-column: span 12; grid-row: span 2; }
}
@media (max-width: 768px) { .page-spaces { padding: 120px 20px 60px; } }

/* ============================================================
   GALLERY PAGES (videos.html, photos.html)
   ============================================================ */

/* ============ HERO VIDEO (top of videos page) ============ */
.gallery-hero-video {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 480px;
  max-height: 800px;
  overflow: hidden;
  margin-bottom: 80px;
}
.gallery-hero-video.no-video {
  height: auto;
  min-height: 0;
  margin-bottom: 0;
}
.gallery-hero-video.no-video .hero-video-bg,
.gallery-hero-video.no-video .hero-overlay { display: none; }
.gallery-hero-video.no-video .hero-content {
  position: relative;
  padding: 160px 40px 80px;
}

.hero-video-bg {
  position: absolute; inset: 0;
  overflow: hidden;
  background: var(--bg-soft);
}
.hero-video-iframe {
  position: absolute;
  top: 50%; left: 50%;
  /* Cover trick: take the larger of "16:9 by height" or "16:9 by width" */
  width: 177.78vh;
  height: 56.25vw;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  border: 0;
  pointer-events: none;
  /* Fade in once loaded */
  opacity: 0;
  animation: heroFadeIn 1.2s 0.4s var(--easing) forwards;
}
@keyframes heroFadeIn { to { opacity: 1; } }

.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom,
      rgba(15, 14, 12, 0.5) 0%,
      rgba(15, 14, 12, 0.35) 40%,
      rgba(15, 14, 12, 0.7) 80%,
      var(--bg) 100%);
}

.hero-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 0 40px 80px;
  z-index: 2;
  display: flex; flex-direction: column; gap: 16px;
}
.hero-content .section-label {
  margin-bottom: 12px;
}
.gallery-hero-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.5rem, 7vw, 7rem); line-height: 0.95;
  letter-spacing: -0.04em; color: var(--fg);
  max-width: 1100px;
}
.gallery-hero-title em { font-style: normal; font-weight: 800; color: var(--accent); }
.gallery-hero-subtitle {
  font-family: var(--font-body); font-weight: 500; font-size: 1.05rem;
  color: var(--fg-dim); max-width: 480px; line-height: 1.6;
}

@media (max-width: 768px) {
  .gallery-hero-video { height: 60vh; min-height: 400px; margin-bottom: 48px; }
  .hero-content { padding: 0 20px 48px; }
}

/* ============ GALLERY BODY WRAP ============ */
.page-gallery {
  padding: 0 0 100px;
  max-width: 1600px;
  margin: 0 auto;
  min-height: 100vh;
}
.gallery-body {
  padding: 0 40px;
}
@media (max-width: 768px) {
  .gallery-body { padding: 0 20px; }
}

/* ============ TAG BADGES (on cards) ============ */
.gallery-tags {
  position: absolute;
  top: 14px; left: 14px;
  display: flex; flex-wrap: wrap; gap: 6px;
  z-index: 3;
  max-width: calc(100% - 28px);
}
.tag-badge {
  font-family: var(--font-mono); font-weight: 500; font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg);
  background: rgba(15, 14, 12, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 5px 10px;
  border-radius: 100px;
  border: 1px solid rgba(245, 242, 236, 0.12);
  white-space: nowrap;
}

/* ============ COMMON CARD STYLES ============ */
.gallery-item {
  cursor: pointer;
  display: block;
  position: relative;
  --px: 0;
  --py: 0;
}

.gallery-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-soft);
  margin-bottom: 18px;
}

.gallery-thumb .thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--easing), filter 0.4s ease;
  filter: brightness(0.85) saturate(0.92);
  transform-origin: center;
}

.gallery-item:hover .thumb-img {
  transform:
    scale(1.06)
    translate(calc(var(--px) * 12px), calc(var(--py) * 8px));
  filter: brightness(1.02) saturate(1.05);
}

/* While hover-preview iframe is playing, hide static img */
.gallery-thumb.playing .thumb-img,
.gallery-thumb.playing .gallery-play,
.gallery-thumb.playing .thumb-fallback {
  opacity: 0;
}

.thumb-preview-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
  /* Cover the area; iframe is 16:9, container is 16:9, so it fits */
  z-index: 2;
}

/* ============ TYPOGRAPHY FALLBACK (when thumbnail unavailable) ============ */
.thumb-fallback {
  display: none;
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at top right, rgba(199, 31, 45, 0.18), transparent 60%),
    linear-gradient(135deg, #1a1614 0%, #0F0E0C 60%, #1a0f10 100%);
  padding: 28px;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.gallery-thumb.thumb-fallback-active .thumb-img { display: none; }
.gallery-thumb.thumb-fallback-active .thumb-fallback { display: flex; }

.thumb-fallback::before {
  content: '';
  position: absolute;
  top: -40%; right: -20%;
  width: 70%; height: 180%;
  background: radial-gradient(ellipse, rgba(199, 31, 45, 0.12), transparent 70%);
  transform: rotate(-15deg);
  pointer-events: none;
}
.thumb-fallback-year {
  font-family: var(--font-mono); font-weight: 500;
  font-size: 11px; letter-spacing: 0.3em;
  color: var(--accent);
  text-transform: uppercase;
  z-index: 1;
}
.thumb-fallback-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1rem, 1.8vw, 1.5rem);
  line-height: 1.2; letter-spacing: -0.02em;
  color: var(--fg);
  z-index: 1;
  max-width: 95%;
}

/* ============ PLAY ICON ============ */
.gallery-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to top, rgba(15, 14, 12, 0.45), transparent 65%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
}
.gallery-item:hover .gallery-play { opacity: 1; }
.gallery-play-icon {
  width: 60px; height: 60px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s var(--easing), background 0.3s ease;
  box-shadow: 0 6px 24px rgba(199, 31, 45, 0.35);
}
.gallery-item:hover .gallery-play-icon { transform: scale(1.08); background: var(--accent-hover); }
.gallery-play-icon svg { width: 22px; height: 22px; color: var(--fg); margin-left: 3px; }

/* ============ CARD INFO BELOW ============ */
.gallery-info {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 16px;
  align-items: baseline;
}
.gallery-meta-num {
  font-family: var(--font-mono); font-weight: 500;
  font-size: 11px; color: var(--fg-faint);
  letter-spacing: 0.2em;
}
.gallery-meta-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: 15px; color: var(--fg);
  letter-spacing: -0.01em; line-height: 1.4;
  transition: color 0.3s ease;
}
.gallery-meta-date {
  font-family: var(--font-mono); font-weight: 500;
  font-size: 11px; color: var(--fg-dim);
  letter-spacing: 0.15em; text-transform: uppercase;
  white-space: nowrap;
}
.gallery-item:hover .gallery-meta-title { color: var(--accent); }

/* ============================================================
   LAYOUT C — RHYTHM GRID (12-col asymmetric)
   Pattern per 5 items in 2 rows:
     Row 1: [7] [5]
     Row 2: [4] [4] [4]
   ============================================================ */
.gallery-grid.layout-c {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 64px 24px;
}

.gallery-grid.layout-c .gallery-item:nth-child(5n+1) { grid-column: span 7; }
.gallery-grid.layout-c .gallery-item:nth-child(5n+2) { grid-column: span 5; }
.gallery-grid.layout-c .gallery-item:nth-child(5n+3) { grid-column: span 4; }
.gallery-grid.layout-c .gallery-item:nth-child(5n+4) { grid-column: span 4; }
.gallery-grid.layout-c .gallery-item:nth-child(5n+5) { grid-column: span 4; }

/* Bigger items get a slightly bigger play icon */
.gallery-grid.layout-c .gallery-item:nth-child(5n+1) .gallery-play-icon { width: 72px; height: 72px; }
.gallery-grid.layout-c .gallery-item:nth-child(5n+1) .gallery-play-icon svg { width: 28px; height: 28px; }
.gallery-grid.layout-c .gallery-item:nth-child(5n+1) .thumb-fallback-title { font-size: clamp(1.5rem, 2.6vw, 2.4rem); }

@media (max-width: 1100px) {
  .gallery-grid.layout-c {
    grid-template-columns: repeat(6, 1fr);
    gap: 48px 20px;
  }
  .gallery-grid.layout-c .gallery-item:nth-child(5n+1) { grid-column: span 6; }
  .gallery-grid.layout-c .gallery-item:nth-child(5n+2) { grid-column: span 6; }
  .gallery-grid.layout-c .gallery-item:nth-child(5n+3) { grid-column: span 3; }
  .gallery-grid.layout-c .gallery-item:nth-child(5n+4) { grid-column: span 3; }
  .gallery-grid.layout-c .gallery-item:nth-child(5n+5) { grid-column: span 6; }
}
@media (max-width: 640px) {
  .gallery-grid.layout-c { grid-template-columns: 1fr; gap: 40px; }
  .gallery-grid.layout-c .gallery-item { grid-column: 1; }
}

/* ============================================================
   LAYOUT D — Horizontal scroll + simple grid
   ============================================================ */
.gallery-grid-d-wrap { display: block; }

.gallery-scroll-section {
  margin-bottom: 80px;
  /* Bleed to edges */
  margin-left: -40px;
  margin-right: -40px;
}
@media (max-width: 768px) {
  .gallery-scroll-section { margin-left: -20px; margin-right: -20px; margin-bottom: 56px; }
}

.gallery-scroll {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0 40px 24px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--fg-faint) transparent;
}
.gallery-scroll::-webkit-scrollbar { height: 4px; }
.gallery-scroll::-webkit-scrollbar-track { background: transparent; }
.gallery-scroll::-webkit-scrollbar-thumb { background: var(--fg-faint); border-radius: 100px; }
@media (max-width: 768px) {
  .gallery-scroll { padding: 0 20px 16px; gap: 16px; }
}

.gallery-scroll .gallery-item.scroll-card {
  flex: 0 0 540px;
  scroll-snap-align: start;
}
@media (max-width: 768px) {
  .gallery-scroll .gallery-item.scroll-card { flex: 0 0 86vw; }
}

.gallery-scroll .gallery-item.scroll-card .gallery-thumb {
  aspect-ratio: 16 / 9;
}
.gallery-scroll .gallery-item.scroll-card .gallery-play-icon {
  width: 72px; height: 72px;
}
.gallery-scroll .gallery-item.scroll-card .gallery-play-icon svg { width: 28px; height: 28px; }

.gallery-grid.layout-grid-simple {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px 28px;
}
@media (max-width: 1100px) {
  .gallery-grid.layout-grid-simple { grid-template-columns: repeat(2, 1fr); gap: 48px 20px; }
}
@media (max-width: 640px) {
  .gallery-grid.layout-grid-simple { grid-template-columns: 1fr; gap: 40px; }
}

/* ============ PHOTO GRID (still simple grid for now) ============ */
.gallery-grid.photo {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px 28px;
}
.gallery-grid.photo .gallery-thumb { aspect-ratio: 4 / 5; }

@media (max-width: 1100px) {
  .gallery-grid.photo { grid-template-columns: repeat(2, 1fr); gap: 48px 20px; }
}
@media (max-width: 700px) {
  .gallery-grid.photo { grid-template-columns: 1fr; gap: 40px; }
}

.gallery-empty {
  padding: 80px 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

/* ============================================================
   LIGHTBOX (shared modal for video + photo)
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 14, 12, 0.96);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.lightbox.open { display: flex; opacity: 1; }

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 28px;
  background: none;
  border: none;
  color: var(--fg);
  cursor: pointer;
  padding: 12px;
  z-index: 10;
  transition: color 0.3s ease, transform 0.3s ease;
}
.lightbox-close:hover { color: var(--accent); transform: rotate(90deg); }
.lightbox-close svg { width: 28px; height: 28px; display: block; }

.lightbox-content {
  width: 100%;
  max-width: 1280px;
  position: relative;
}

.lightbox-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
.lightbox-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.lightbox-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: calc(100vh - 200px);
}
.lightbox-image-wrap img {
  max-width: 100%;
  max-height: calc(100vh - 200px);
  object-fit: contain;
  display: block;
}

/* Image navigation (prev/next) */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid var(--line-strong);
  background: rgba(15, 14, 12, 0.6);
  backdrop-filter: blur(8px);
  color: var(--fg);
  width: 48px; height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, border-color 0.3s ease;
  z-index: 5;
}
.lightbox-nav:hover { background: var(--accent); border-color: var(--accent); }
.lightbox-nav svg { width: 20px; height: 20px; }
.lightbox-prev { left: -72px; }
.lightbox-next { right: -72px; }
.lightbox-nav:disabled { opacity: 0.3; cursor: not-allowed; }
.lightbox-nav:disabled:hover { background: rgba(15, 14, 12, 0.6); border-color: var(--line-strong); }

.lightbox-caption {
  position: absolute;
  bottom: 32px;
  left: 40px;
  right: 40px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-dim);
  pointer-events: none;
}
.lightbox-title { color: var(--fg); font-weight: 600; font-family: var(--font-display); font-size: 14px; letter-spacing: -0.005em; text-transform: none; }
.lightbox-date { color: var(--fg-dim); }
.lightbox-counter { color: var(--fg-faint); }

@media (max-width: 1400px) {
  .lightbox-prev { left: 16px; }
  .lightbox-next { right: 16px; }
}
@media (max-width: 768px) {
  .lightbox { padding: 20px; }
  .lightbox-close { top: 12px; right: 12px; }
  .lightbox-caption { bottom: 20px; left: 20px; right: 20px; flex-direction: column; gap: 6px; align-items: flex-start; }
  .lightbox-nav { width: 40px; height: 40px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

/* ============ CONTACT PAGE ============ */
.page-contact { padding: 160px 40px 100px; max-width: 1400px; margin: 0 auto; min-height: 100vh; }
.contact-hero { display: grid; grid-template-columns: 2fr 1fr; gap: 80px; margin-bottom: 120px; align-items: end; }
.contact-page-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.5rem, 6vw, 6rem); line-height: 1.0;
  letter-spacing: -0.035em; color: var(--fg);
}
.contact-page-title em { font-style: normal; font-weight: 800; color: var(--accent); }
.contact-page-subtitle {
  font-family: var(--font-body); font-weight: 500; font-size: 1rem;
  color: var(--fg-dim); line-height: 1.7; max-width: 360px;
}

.contact-page-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 100px; align-items: start; }

.form-wrap { position: relative; }
.contact-form { display: flex; flex-direction: column; gap: 40px; }
.field { position: relative; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.field label {
  display: block; font-family: var(--font-mono); font-weight: 500;
  font-size: 10px; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--fg-dim); margin-bottom: 14px;
}
.field label .req { color: var(--accent); margin-left: 4px; font-weight: 700; }
.field input, .field textarea {
  width: 100%; background: transparent; border: none;
  border-bottom: 1px solid var(--line-strong); color: var(--fg);
  font-family: var(--font-display); font-weight: 500; font-size: 1.1rem;
  padding: 8px 0 16px; transition: border-color 0.4s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--accent); }
.field textarea { resize: vertical; min-height: 120px; font-family: var(--font-body); font-size: 1rem; line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: var(--fg-faint); font-family: var(--font-body); font-weight: 400; font-size: 1rem; }

.form-submit {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 16px;
  padding: 22px 36px; background: var(--accent); color: var(--fg);
  border: none; font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  border-radius: 100px; cursor: pointer;
  transition: gap 0.4s var(--easing), background 0.3s ease, transform 0.3s ease, opacity 0.3s;
  margin-top: 12px;
}
.form-submit:hover:not(:disabled) { gap: 24px; background: var(--accent-hover); transform: translateY(-2px); }
.form-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.form-submit svg { width: 18px; height: 18px; }

.form-message { display: none; padding: 32px; border: 1px solid var(--line-strong); border-radius: 4px; margin-bottom: 32px; }
.form-message.show { display: block; }
.form-message.success { border-color: var(--accent); background: rgba(199, 31, 45, 0.06); }
.form-message.error { border-color: rgba(255, 100, 100, 0.4); background: rgba(255, 100, 100, 0.05); }
.form-message-title { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; margin-bottom: 8px; color: var(--fg); }
.form-message-desc { font-size: 0.9rem; color: var(--fg-dim); line-height: 1.6; }

.info-sidebar { padding-top: 32px; border-top: 1px solid var(--line); }
.info-block { margin-bottom: 40px; }
.info-label { font-family: var(--font-mono); font-weight: 500; font-size: 10px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--fg-faint); margin-bottom: 8px; }
.info-value { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--fg); line-height: 1.5; }
.info-value a { color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--fg-faint); transition: color 0.3s, border-color 0.3s; }
.info-value a:hover { color: var(--accent); border-color: var(--accent); }

@media (max-width: 900px) {
  .contact-hero { grid-template-columns: 1fr; gap: 32px; margin-bottom: 80px; }
  .contact-page-subtitle { max-width: none; }
  .contact-page-grid { grid-template-columns: 1fr; gap: 60px; }
  .field-row { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 768px) { .page-contact { padding: 120px 20px 60px; } }
