/* ================================================================
   ARTEMIS GALLERY — Main Styles
   ================================================================ */

/* ---- CSS Variables ---- */
:root {
  --bg:        #0a0a0a;
  --bg-2:      #111118;
  --bg-3:      #1a1a2e;
  --accent:    #d4af37;
  --accent-dim:#a8892a;
  --text:      #f5f5f5;
  --text-muted:#888;
  --border:    rgba(212,175,55,0.15);

  --grad-1: #1a1a2e;
  --grad-2: #16213e;
  --grad-3: #0f3460;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-refined: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Raleway', system-ui, sans-serif;

  --ease:      cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition: 0.4s var(--ease);

  --radius:  8px;
  --radius-lg: 16px;
  --shadow:  0 8px 40px rgba(0,0,0,0.6);
  --glow:    0 0 30px rgba(212,175,55,0.3);
}

/* Light theme */
[data-theme="light"] {
  --bg:        #f8f4ee;
  --bg-2:      #ede8df;
  --bg-3:      #ddd5c6;
  --text:      #1a1208;
  --text-muted:#5a4e3a;
  --border:    rgba(212,175,55,0.3);
  --shadow:    0 8px 40px rgba(0,0,0,0.15);
}

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

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
  transition: background var(--transition), color var(--transition);
}

body.loading { overflow: hidden; }

/* Fallback cursor for reduced-motion / touch */
@media (pointer: coarse), (prefers-reduced-motion: reduce) {
  body { cursor: auto; }
  .cursor, .cursor-trail { display: none !important; }
}

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

/* ---- Custom Cursor ---- */
.cursor {
  position: fixed;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s var(--ease), width 0.3s var(--ease), height 0.3s var(--ease), background 0.3s;
  mix-blend-mode: difference;
}
.cursor--hover {
  width: 40px;
  height: 40px;
  background: rgba(212,175,55,0.3);
}
.cursor-trail {
  position: fixed;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(212,175,55,0.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.15s var(--ease);
}

/* ---- Preloader ---- */
.preloader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.preloader__logo {
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 5rem);
  font-weight: 900;
  letter-spacing: 0.3em;
  color: var(--accent);
  margin-bottom: 2rem;
}
.preloader__bar {
  width: min(300px, 80vw);
  height: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}
.preloader__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  transition: width 0.1s linear;
}
.preloader__percent {
  margin-top: 1rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

/* ---- Controls (Theme / Lang) ---- */
.controls {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 800;
  display: flex;
  gap: 0.5rem;
}
.controls__btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(10,10,10,0.7);
  backdrop-filter: blur(10px);
  color: var(--accent);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.controls__btn:hover { background: var(--accent); color: #000; }

[data-theme="dark"]  .controls__icon--light { display: none; }
[data-theme="light"] .controls__icon--dark  { display: none; }

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 700;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.4s, padding 0.4s, box-shadow 0.4s;
}
.nav.scrolled {
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(20px);
  padding: 1rem 2rem;
  box-shadow: 0 1px 0 var(--border);
}
[data-theme="light"] .nav.scrolled { background: rgba(248,244,238,0.94); }

.nav__logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.nav__logo-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--accent);
}
.nav__logo-sub {
  font-family: var(--font-body);
  font-size: 0.6rem;
  letter-spacing: 0.5em;
  color: var(--text-muted);
}

.nav__menu {
  display: flex;
  gap: 2.5rem;
}
.nav__link {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  position: relative;
  transition: color var(--transition);
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--transition);
}
.nav__link:hover, .nav__link.active { color: var(--accent); }
.nav__link:hover::after, .nav__link.active::after { width: 100%; }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  z-index: 10;
}
.nav__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
}
.nav__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Section Shared ---- */
section { position: relative; overflow: hidden; }

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
  padding: 0 1.5rem;
}
.section-eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.2rem;
}
.section-desc {
  font-family: var(--font-refined);
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2.2rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.07);
  opacity: 0;
  transition: opacity var(--transition);
}
.btn:hover::before { opacity: 1; }

.btn--primary {
  background: var(--accent);
  color: #000;
  box-shadow: 0 4px 20px rgba(212,175,55,0.3);
}
.btn--primary:hover {
  background: #e8c847;
  box-shadow: 0 6px 30px rgba(212,175,55,0.5);
  transform: translateY(-2px);
}
.btn--ghost {
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.btn--full { width: 100%; }

/* ================================================================
   HERO
   ================================================================ */
.hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__parallax-bg {
  position: absolute;
  inset: -20%;
  background: radial-gradient(ellipse at 60% 40%, var(--grad-3) 0%, var(--grad-2) 40%, var(--grad-1) 70%, var(--bg) 100%);
  opacity: 0.6;
  will-change: transform;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem 1.5rem;
  max-width: 900px;
}

.hero__eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 12vw, 9rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.02em;
  display: flex;
  flex-direction: column;
  gap: 0.1em;
  margin-bottom: 1.5rem;
}
.hero__title-word { display: block; overflow: hidden; }
.hero__title-word--accent { color: var(--accent); }

.char {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%);
}

.hero__subtitle {
  font-family: var(--font-refined);
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  opacity: 0;
  transform: translateY(20px);
}

.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
}

.hero__scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 2;
  opacity: 0;
}
.hero__scroll-text {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  writing-mode: horizontal-tb;
}
.hero__scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

/* ================================================================
   GALLERY
   ================================================================ */
.gallery-section {
  padding: 8rem 2rem;
  background: var(--bg-2);
}
.gallery-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 2rem;
}

.gallery-card {
  position: relative;
  background: var(--bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: none;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
  border: 1px solid transparent;
  will-change: transform;
}
.gallery-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.gallery-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--glow), var(--shadow);
  border-color: var(--border);
  z-index: 5;
}

.gallery-card__img-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}
.gallery-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.gallery-card:hover .gallery-card__img { transform: scale(1.08); }

.gallery-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,10,0.8) 0%, transparent 60%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}
.gallery-card:hover .gallery-card__overlay { opacity: 1; }

.gallery-card__overlay-icon {
  width: 56px;
  height: 56px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--accent);
  transform: scale(0);
  transition: transform 0.4s var(--ease-back);
}
.gallery-card:hover .gallery-card__overlay-icon { transform: scale(1); }

.gallery-card__info {
  padding: 1.2rem 1.4rem 1.4rem;
}
.gallery-card__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  transition: color var(--transition);
}
.gallery-card:hover .gallery-card__title { color: var(--accent); }

.gallery-card__artist {
  font-family: var(--font-refined);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.gallery-card__year {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  display: block;
  margin-top: 0.4rem;
}

.gallery-card__share {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  opacity: 0;
  transition: opacity var(--transition);
}
.gallery-card:hover .gallery-card__share { opacity: 1; }

.share-btn {
  width: 34px;
  height: 34px;
  background: rgba(10,10,10,0.7);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--accent);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  backdrop-filter: blur(6px);
}
.share-btn:hover { background: var(--accent); color: #000; }

/* ================================================================
   TIMELINE
   ================================================================ */
.timeline-section {
  padding: 8rem 2rem;
  background: var(--bg);
  position: relative;
}
.timeline-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, var(--bg-2), transparent);
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: calc(50% - 1px);
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--border) 10%, var(--border) 90%, transparent);
}

.timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  gap: 0 1.5rem;
  margin-bottom: 3.5rem;
  align-items: start;
}
.timeline__item:nth-child(odd)  .timeline__content { grid-column: 1; text-align: right; }
.timeline__item:nth-child(even) .timeline__content { grid-column: 3; }
.timeline__dot {
  grid-column: 2;
  grid-row: 1;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  margin: 0 auto;
  box-shadow: 0 0 0 4px rgba(212,175,55,0.15);
  position: relative;
  z-index: 2;
  transition: box-shadow 0.4s;
}
.timeline__item:hover .timeline__dot { box-shadow: 0 0 0 8px rgba(212,175,55,0.25); }

.timeline__period {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.timeline__era {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
}
.timeline__text {
  font-family: var(--font-refined);
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ================================================================
   VIRTUAL TOUR
   ================================================================ */
.tour-section {
  padding: 8rem 2rem;
  background: var(--bg-3);
  perspective: 1200px;
}

.tour {
  max-width: 1000px;
  margin: 0 auto;
}

.tour__stage {
  width: 100%;
  aspect-ratio: 16/9;
  perspective: 1000px;
  perspective-origin: 50% 50%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  position: relative;
}

.tour__scene {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s var(--ease);
}

.tour__hall {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 2rem;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
  pointer-events: none;
}
.tour__hall.active { opacity: 1; pointer-events: all; }

.tour__hall-walls {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}
.tour__wall {
  position: absolute;
}
.tour__wall--back {
  inset: 0;
  background: linear-gradient(135deg, var(--grad-2), var(--grad-3));
}
.tour__wall--left {
  top: 0; bottom: 0; left: 0; width: 30%;
  background: linear-gradient(90deg, rgba(0,0,0,0.5), transparent);
}
.tour__wall--right {
  top: 0; bottom: 0; right: 0; width: 30%;
  background: linear-gradient(-90deg, rgba(0,0,0,0.5), transparent);
}
.tour__wall--floor {
  bottom: 0; left: 0; right: 0; height: 30%;
  background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
}

.tour__hall-art {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  padding: 2rem 4rem;
  z-index: 2;
}
.tour__frame {
  flex: 0 0 auto;
  border: 8px solid #8b6914;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), inset 0 0 0 2px rgba(255,220,100,0.15);
  overflow: hidden;
  transform: perspective(600px) rotateY(0deg);
  transition: transform 0.5s var(--ease), box-shadow 0.5s;
  width: clamp(140px, 25%, 220px);
  aspect-ratio: 4/3;
}
.tour__frame:hover {
  transform: perspective(600px) rotateY(5deg) scale(1.04);
  box-shadow: 0 30px 80px rgba(0,0,0,0.7), 0 0 30px rgba(212,175,55,0.2);
}
.tour__frame img { width: 100%; height: 100%; object-fit: cover; }

.tour__hall-label {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 3;
}
.tour__hall-label h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.tour__hall-label p {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.2em;
}

.tour__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}
.tour__btn {
  width: 50px;
  height: 50px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--accent);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  background: rgba(10,10,10,0.5);
  backdrop-filter: blur(8px);
}
.tour__btn:hover { background: var(--accent); color: #000; border-color: var(--accent); transform: scale(1.1); }

.tour__dots { display: flex; gap: 0.5rem; }
.tour__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  transition: var(--transition);
}
.tour__dot--active, .tour__dot:hover { background: var(--accent); transform: scale(1.3); }

.tour__hint {
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-top: 1rem;
  text-transform: uppercase;
}

/* ================================================================
   CONTACT
   ================================================================ */
.contact-section {
  padding: 8rem 2rem 6rem;
  background: var(--bg-2);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1100px;
  margin: 0 auto 4rem;
  align-items: start;
}

.contact-map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.contact-map svg { width: 100%; height: auto; display: block; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.form-input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  resize: none;
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(212,175,55,0.15); }
.form-input.error { border-color: #e55; }

.form-error {
  font-size: 0.78rem;
  color: #e55;
  min-height: 1em;
}
.form-success {
  text-align: center;
  color: var(--accent);
  font-family: var(--font-refined);
  font-size: 0.95rem;
  min-height: 1.5em;
}

.social-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto;
}
.social-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  transition: var(--transition);
}
.social-link:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-3px); }

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
  padding: 2rem;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer__copy, .footer__made {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* ================================================================
   MODAL
   ================================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 8000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
}
.modal.open { opacity: 1; visibility: visible; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(12px);
}

.modal__content {
  position: relative;
  z-index: 2;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 960px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  transform: scale(0.92) translateY(30px);
  transition: transform 0.45s var(--ease-back);
  box-shadow: var(--shadow);
}
.modal.open .modal__content { transform: scale(1) translateY(0); }

.modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  width: 38px;
  height: 38px;
  background: rgba(10,10,10,0.7);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  backdrop-filter: blur(6px);
}
.modal__close:hover { background: var(--accent); color: #000; }

.modal__body {
  display: grid;
  grid-template-columns: 55% 45%;
  max-height: 90vh;
  overflow: hidden;
}
.modal__img-wrap {
  aspect-ratio: 4/3;
  overflow: hidden;
}
.modal__img { width: 100%; height: 100%; object-fit: cover; }

.modal__info {
  padding: 2.5rem 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.modal__year {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--accent);
}
.modal__title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
}
.modal__artist {
  font-family: var(--font-refined);
  font-style: italic;
  font-size: 1rem;
  color: var(--text-muted);
}
.modal__desc {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-top: 0.5rem;
  flex: 1;
}
.modal__actions { margin-top: auto; padding-top: 1rem; }

/* ================================================================
   REVEAL ANIMATIONS (initial hidden state)
   ================================================================ */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
}
.reveal-card {
  opacity: 0;
  transform: translateY(50px);
}
.reveal-timeline {
  opacity: 0;
  transform: translateX(-40px);
}
.timeline__item:nth-child(even).reveal-timeline {
  transform: translateX(40px);
}
.reveal-up.visible,
.reveal-card.visible,
.reveal-timeline.visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-layout { grid-template-columns: 1fr; }
  .contact-map { max-width: 500px; margin: 0 auto; }
}

@media (max-width: 768px) {
  .nav__menu {
    position: fixed;
    inset: 0;
    background: rgba(10,10,10,0.97);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
  }
  .nav__menu.open { opacity: 1; visibility: visible; }
  .nav__link { font-size: 1.1rem; }
  .nav__burger { display: flex; }

  .gallery-grid { grid-template-columns: 1fr; max-width: 480px; }

  .timeline::before { left: 12px; }
  .timeline__item { grid-template-columns: 28px 1fr; }
  .timeline__item:nth-child(odd) .timeline__content,
  .timeline__item:nth-child(even) .timeline__content { grid-column: 2; text-align: left; }
  .timeline__dot { grid-column: 1; }

  .modal__body { grid-template-columns: 1fr; }
  .modal__img-wrap { aspect-ratio: 16/9; }

  .tour__hall-art { gap: 1.5rem; padding: 1.5rem 2rem; }
  .tour__frame { width: clamp(100px, 40%, 160px); }

  .footer__inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .gallery-section,
  .timeline-section,
  .tour-section,
  .contact-section { padding: 5rem 1rem; }

  .hero__actions { flex-direction: column; align-items: center; }
  .controls { top: auto; bottom: 1.5rem; right: 1rem; }
}
