/* Aperture Contemporary — Berlin. Ink-dark gallery theme, vermilion accent. */

:root {
  --ink: #101012;
  --panel: #161618;
  --panel-2: #1c1c20;
  --line: rgba(245, 244, 240, 0.14);
  --line-soft: rgba(245, 244, 240, 0.08);
  --paper: #f5f4f0;
  --muted: #a9a7a1;
  --faint: #6f6e69;
  --accent: #e2482f;
  --accent-deep: #b93220;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-snap: cubic-bezier(0.34, 1.3, 0.64, 1);
  --wrap: 1180px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: clip;
}

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, canvas { display: block; max-width: 100%; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.08; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
h3 { font-size: 1.45rem; }

a { color: inherit; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--accent); color: #fff; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 4px;
  text-decoration: none; transition: top 180ms var(--ease-out);
}
.skip:focus { top: 12px; color: #fff; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px); }

/* ---------- nav ---------- */
.site-nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: rgba(16, 16, 18, 0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
  transition: background 240ms var(--ease-out);
}
.nav-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px);
  display: flex; align-items: center; justify-content: space-between;
  min-height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand:hover { color: inherit; }
.brand-mark {
  width: 30px; height: 30px; flex: none;
  background:
    conic-gradient(from 0deg, transparent 0 40deg, var(--accent) 40deg 80deg, transparent 80deg 120deg, var(--accent) 120deg 160deg, transparent 160deg 200deg, var(--accent) 200deg 240deg, transparent 240deg 280deg, var(--accent) 280deg 320deg, transparent 320deg 360deg);
  -webkit-mask: radial-gradient(circle, transparent 5px, #000 6px);
  mask: radial-gradient(circle, transparent 5px, #000 6px);
  border-radius: 50%;
  transition: transform 280ms var(--ease-out);
}
.brand:hover .brand-mark { transform: rotate(45deg); }
.brand-word { font-family: var(--serif); font-size: 1.25rem; letter-spacing: 0.01em; }
.brand-word em { font-style: italic; color: var(--muted); }

.nav-links { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); }
.nav-links a { text-decoration: none; font-size: 0.95rem; color: var(--muted); transition: color 180ms var(--ease-out); }
.nav-links a:hover { color: var(--paper); }
.nav-links .nav-cta {
  color: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 8px 20px;
  transition: background 200ms var(--ease-out), border-color 200ms var(--ease-out), color 200ms var(--ease-out);
}
.nav-links .nav-cta:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--paper); margin: 5px 0; transition: transform 240ms var(--ease-out), opacity 200ms var(--ease-out); }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: clip;
}
.hero-stage { position: absolute; inset: 0; }
.hero-render {
  width: 100%; height: 100%; object-fit: cover;
  transform-origin: 50% 42%;
  animation: kenburns 28s cubic-bezier(0.22, 1, 0.36, 1) infinite alternate;
}
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.09); } }
.hero-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, rgba(16,16,18,0.94) 0%, rgba(16,16,18,0.35) 34%, transparent 55%),
    radial-gradient(120% 90% at 50% 20%, transparent 55%, rgba(16,16,18,0.55) 100%);
}

.hero-copy {
  position: relative; z-index: 2;
  max-width: var(--wrap); margin: 0 auto; width: 100%;
  padding: 0 clamp(20px, 4vw, 48px) clamp(72px, 10vh, 110px);
}
.hero-kicker { color: var(--muted); font-size: 0.95rem; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 18px; }
.hero-copy h1 { font-size: clamp(3rem, 9vw, 6.4rem); margin-bottom: 20px; text-shadow: 0 2px 30px rgba(0,0,0,0.55); }
.hero-sub { max-width: 34rem; color: #d8d6d0; font-size: 1.12rem; margin: 0 0 18px; }
.hero-now { color: var(--muted); font-size: 0.98rem; margin: 0 0 30px; max-width: 34rem; }
.now-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; animation: pulse 2.6s var(--ease-out) infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.hero-now a { color: var(--paper); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
  display: inline-block; text-decoration: none; font-size: 1rem; font-weight: 600;
  padding: 14px 30px; border-radius: 999px; cursor: pointer;
  transition: transform 200ms var(--ease-out), background 200ms var(--ease-out), color 200ms var(--ease-out), border-color 200ms var(--ease-out);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-solid { background: var(--accent); border: 1px solid var(--accent); color: #fff; }
.btn-solid:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--paper); }
.btn-ghost:hover { border-color: var(--paper); color: var(--paper); }

.hero-hint {
  position: absolute; right: clamp(20px, 4vw, 48px); bottom: 26px; z-index: 2;
  color: var(--faint); font-size: 0.85rem; letter-spacing: 0.06em; margin: 0;
}

/* ---------- sections ---------- */
.section { padding: clamp(72px, 9vw, 130px) 0; scroll-margin-top: 60px; }
.section-alt { background: var(--panel); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }

.section-head { margin-bottom: clamp(36px, 5vw, 64px); max-width: 46rem; }
.lede { color: var(--muted); font-size: 1.15rem; margin: 0; }

/* ---------- exhibitions ---------- */
.exhibit {
  display: grid; grid-template-columns: 240px 1fr; gap: clamp(18px, 4vw, 60px);
  padding: clamp(26px, 3.4vw, 40px) 0; border-top: 1px solid var(--line);
}
.exhibit:last-child { border-bottom: 1px solid var(--line); }
.exhibit-status {
  display: inline-block; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 4px 14px; margin: 0 0 12px;
}
.exhibit-feature .exhibit-status { background: var(--accent); color: #fff; }
.exhibit-range { color: var(--muted); font-size: 0.98rem; margin: 0; }
.exhibit-body h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 12px; }
.exhibit-body p { color: #cfcdc7; max-width: 44rem; margin: 0 0 12px; }
.exhibit-meta { color: var(--faint) !important; font-size: 0.92rem; }

/* ---------- artists ---------- */
.artist-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); }
.artist { background: var(--panel); padding: clamp(24px, 3vw, 38px); transition: background 240ms var(--ease-out); }
.artist:hover { background: var(--panel-2); }
.artist-name { font-family: var(--serif); font-size: 1.5rem; margin: 0 0 6px; }
.artist-facts { color: var(--faint); font-size: 0.9rem; margin: 0 0 10px; }
.artist-line { color: #cfcdc7; margin: 0; font-size: 1rem; }

/* ---------- collection ---------- */
.art-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 3vw, 34px); }
.art-card {
  margin: 0; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 6px; overflow: hidden;
  cursor: pointer; padding: 0;
  transition: transform 240ms var(--ease-out), border-color 240ms var(--ease-out), box-shadow 240ms var(--ease-out);
}
.art-card:hover, .art-card:focus-visible { transform: translateY(-6px); border-color: var(--line); box-shadow: 0 24px 60px rgba(0,0,0,0.45); }
.art-card .art-frame { aspect-ratio: 4 / 5; overflow: hidden; background: #0a0a0b; }
.art-card canvas { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease-out); }
.art-card:hover canvas { transform: scale(1.03); }
.art-cap { padding: 18px 20px 20px; text-align: left; }
.art-cap h3 { font-size: 1.12rem; margin: 0 0 4px; }
.art-cap p { color: var(--muted); font-size: 0.9rem; margin: 0; }

/* ---------- visit ---------- */
.visit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3.4vw, 44px); }
.visit-block h3 { font-size: 1.3rem; margin-bottom: 16px; }
.hours { margin: 0 0 16px; }
.hours div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.hours dt { color: var(--muted); }
.hours dd { margin: 0; font-weight: 600; }
.visit-note { color: var(--muted); font-size: 0.95rem; }
.visit-block address { font-style: normal; font-size: 1.1rem; line-height: 1.7; margin: 0 0 16px; }
.visit-list { list-style: none; margin: 0; padding: 0; }
.visit-list li { padding: 10px 0 10px 26px; border-bottom: 1px solid var(--line-soft); position: relative; color: #cfcdc7; }
.visit-list li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }

/* ---------- about ---------- */
.about-figure { margin: 0 0 clamp(30px, 4vw, 52px); }
.about-figure img { width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--line-soft); }
.about-figure figcaption { color: var(--faint); font-size: 0.9rem; margin-top: 10px; }
.about-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.about-main p { color: #cfcdc7; font-size: 1.08rem; max-width: 40rem; }
.about-main p:first-child::first-letter {
  font-family: var(--serif); font-size: 3.4em; float: left; line-height: 0.85; padding-right: 10px; color: var(--accent);
}
.about-quote { border-left: 2px solid var(--accent); padding: 6px 0 6px 28px; margin-top: 8px; }
.about-quote blockquote { margin: 0; }
.about-quote p { font-family: var(--serif); font-size: 1.35rem; line-height: 1.45; font-style: italic; color: var(--paper); }
.about-quote cite { display: block; margin-top: 14px; font-style: normal; font-size: 0.92rem; color: var(--muted); }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.contact-mail { font-family: var(--serif); font-size: clamp(1.3rem, 2.6vw, 1.9rem); word-break: break-all; }
.contact-phone { color: var(--muted); margin: 18px 0 8px; }
.contact-phone span { color: var(--faint); font-size: 0.9rem; }
.contact-form { display: grid; gap: 18px; }
.field label { display: block; font-size: 0.92rem; font-weight: 600; margin-bottom: 8px; color: #d8d6d0; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--ink); border: 1px solid var(--line); border-radius: 6px;
  color: var(--paper); font: inherit; font-size: 1rem; padding: 12px 14px;
  transition: border-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(226, 72, 47, 0.22); }
.form-note { min-height: 1.6em; color: var(--muted); font-size: 0.95rem; margin: 0; }
.form-note.error { color: var(--accent); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line-soft); padding: 48px 0 40px; background: #0b0b0d; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: start; }
.footer-brand .brand-word { font-size: 1.4rem; }
.footer-brand p { color: var(--muted); font-size: 0.95rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: flex-end; }
.footer-nav a { text-decoration: none; color: var(--muted); font-size: 0.95rem; transition: color 180ms var(--ease-out); }
.footer-nav a:hover { color: var(--paper); }
.footer-legal { grid-column: 1 / -1; color: var(--faint); font-size: 0.85rem; margin: 8px 0 0; padding-top: 20px; border-top: 1px solid var(--line-soft); }

/* ---------- lightbox ---------- */
.lightbox { border: 1px solid var(--line); background: var(--panel); color: var(--paper); border-radius: 8px; padding: 0; max-width: min(92vw, 760px); }
.lightbox::backdrop { background: rgba(8, 8, 10, 0.82); backdrop-filter: blur(6px); }
.lb-inner { position: relative; padding: 22px; }
.lb-art canvas { width: 100%; height: auto; border-radius: 4px; }
.lb-cap h3 { margin: 18px 0 4px; font-size: 1.4rem; }
.lb-cap p { color: var(--muted); margin: 0; font-size: 0.95rem; }
.lb-close {
  position: absolute; top: 10px; right: 10px; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(16,16,18,0.8); color: var(--paper);
  font-size: 1.5rem; line-height: 1; cursor: pointer;
  transition: background 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.lb-close:hover { background: var(--accent); transform: rotate(90deg); }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 560ms var(--ease-out), transform 560ms var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .art-grid { grid-template-columns: repeat(2, 1fr); }
  .artist-list { grid-template-columns: 1fr; }
  .visit-grid { grid-template-columns: 1fr; }
  .about-cols, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-nav { justify-content: flex-start; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(16,16,18,0.98); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height 280ms var(--ease-out);
  }
  .nav-links.open { max-height: 420px; }
  .nav-links a { padding: 14px clamp(20px, 4vw, 48px); border-top: 1px solid var(--line-soft); }
  .nav-links .nav-cta { border: 0; border-radius: 0; padding: 14px clamp(20px, 4vw, 48px); }
  .exhibit { grid-template-columns: 1fr; gap: 14px; }
  .art-grid { grid-template-columns: 1fr; }
  .hero-hint { display: none; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
