/* ================================================
   OMENTONE RECORD LABEL — DESIGN SYSTEM
   ================================================ */

/* --- 0. Font Faces --- */

@font-face {
  font-family: 'Oskar One';
  src: url('../Media/Fonts/Oskar-One/Oskar-One-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Oskar One';
  src: url('../Media/Fonts/Oskar-One/Oskar-One-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Oskar One';
  src: url('../Media/Fonts/Oskar-One/Oskar-One-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Open Sans';
  src: url('../Media/Fonts/Open-Sans/OpenSans-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Open Sans';
  src: url('../Media/Fonts/Open-Sans/OpenSans-LightItalic.ttf') format('truetype');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Open Sans';
  src: url('../Media/Fonts/Open-Sans/OpenSans-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Open Sans';
  src: url('../Media/Fonts/Open-Sans/OpenSans-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Open Sans';
  src: url('../Media/Fonts/Open-Sans/OpenSans-Semibold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Open Sans';
  src: url('../Media/Fonts/Open-Sans/OpenSans-SemiboldItalic.ttf') format('truetype');
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Open Sans';
  src: url('../Media/Fonts/Open-Sans/OpenSans-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Open Sans';
  src: url('../Media/Fonts/Open-Sans/OpenSans-BoldItalic.ttf') format('truetype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Open Sans';
  src: url('../Media/Fonts/Open-Sans/OpenSans-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Open Sans';
  src: url('../Media/Fonts/Open-Sans/OpenSans-ExtraBoldItalic.ttf') format('truetype');
  font-weight: 800;
  font-style: italic;
  font-display: swap;
}


/* --- 1. Custom Properties (Design Tokens) --- */

:root {
  /* Palette */
  --base: #0A0908;
  --bone: #E8E1D4;
  --clay: #C9B79C;
  --sand: #A89984;
  --umber: #6B5D4F;
  --charcoal: #2B2622;
  --oxblood: #6B2020;

  /* Per-artist accents */
  --accent-tony: #6B5D4F;
  --accent-tgwc: #6B2020;
  --accent-pxerr: #4A4842;
  --accent-mythic: #C9B79C;

  /* Typography */
  --font-display: 'Oskar One', 'Bodoni Moda', serif;
  --font-accent: 'High Tower Text', 'Cormorant Garamond', 'Bell MT', Garamond, Georgia, serif;
  --font-body: 'Open Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', 'Cascadia Code', 'Consolas', monospace;

  /* Spacing (8px base) */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --space-2xl: 8rem;

  /* Layout */
  --container-max: 1200px;
  --grid-gutter: 1.5rem;

  /* Hairline rules */
  --rule: 1px solid var(--umber);
  --rule-light: 1px solid var(--charcoal);

  /* Transition */
  --ease: 0.3s ease;
}


/* --- 2. Reset --- */

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

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

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--bone);
  background-color: var(--base);
  isolation: isolate;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  pointer-events: none;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(10, 9, 8, 0.5);
  z-index: -1;
  pointer-events: none;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--bone);
  text-decoration: none;
  transition: color var(--ease);
}

a:hover {
  color: var(--oxblood);
}

ul, ol {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}


/* --- 3. Typography --- */

h1, h2 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.15;
  color: var(--bone);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  letter-spacing: 0.06em;
}

h3 {
  font-family: var(--font-accent);
  font-weight: 400;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.35;
  color: var(--bone);
}

p {
  max-width: 60ch;
}

.meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sand);
}

.tagline {
  font-family: var(--font-accent);
  font-weight: 400;
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  color: var(--clay);
}


/* --- 4. Layout --- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--grid-gutter);
}

section {
  padding-block: var(--space-xl);
}

hr {
  border: none;
  border-top: var(--rule);
  margin-block: var(--space-xl);
}


/* --- 5. Accessibility --- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sr-only-focusable:focus {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: auto;
  height: auto;
  padding: var(--space-sm) var(--space-md);
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background: var(--charcoal);
  color: var(--bone);
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

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


/* --- 6. Hero / Wordmark --- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  text-align: center;
  padding-block: var(--space-2xl);
}

.hero-wordmark {
  height: clamp(360px, 72vh, 780px);
  width: auto;
  max-width: 90vw;
  margin-bottom: var(--space-lg);
}

.hero .tagline {
  margin-top: var(--space-md);
}

.hero-nav {
  display: flex;
  justify-content: center;
  align-items: baseline;
}

.hero-nav a {
  color: var(--clay);
  transition: color var(--ease);
}

.hero-nav a:hover {
  color: var(--bone);
}

.hero-nav a + a::before {
  content: '·';
  margin: 0 var(--space-md);
  color: var(--clay);
}


/* --- 7. Streaming Links --- */

.streaming-links {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  margin-top: var(--space-md);
}

.streaming-links a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sand);
}

.streaming-links a:hover {
  color: var(--bone);
}

.streaming-links img {
  width: 16px;
  height: 16px;
  display: inline-block;
}


/* --- 8. Contact --- */

.contact-section {
  text-align: center;
}

.contact-section p {
  margin-inline: auto;
}

.contact-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(var(--space-lg), 5vw, var(--space-2xl));
  max-width: var(--container-max);
  margin-inline: auto;
}

.contact-words {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-word {
  writing-mode: vertical-rl;
  text-orientation: upright;
  padding-inline: clamp(0.65rem, 1.6vw, 1.25rem);
  font-family: var(--font-display);
  font-size: clamp(3w.5rem, 3.2vw, 2.5rem);
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bone);
  border-right: 1px solid var(--umber);
  cursor: default;
  transition: opacity var(--ease), color var(--ease), text-shadow 0.4s ease;
}

.contact-words .contact-word:last-child {
  border-right: none;
}

.contact-email {
  margin: 0;
  max-width: none;
}

.contact-email a {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: 0.04em;
  color: var(--bone);
  transition: opacity var(--ease), text-shadow 0.4s ease;
  transform-origin: center;
}

/* Spotlight: hovering any word dims everything else and glows the word + email */
body:has(.contact-word:hover) #main > *:not(.contact-section),
body:has(.contact-word:hover) .site-footer {
  opacity: 0.1;
  transition: opacity var(--ease);
}

body:has(.contact-word:hover) .contact-word:not(:hover) {
  opacity: 0.15;
}

.contact-word:hover {
  color: var(--bone);
  text-shadow: 0 0 28px rgba(232, 225, 212, 0.5);
}

@keyframes email-breathe {
  0%, 100% {
    text-shadow: 0 0 24px rgba(232, 225, 212, 0.35);
    transform: scale(1);
    letter-spacing: 0.04em;
  }
  50% {
    text-shadow:
      0 0 56px rgba(232, 225, 212, 0.75),
      0 0 12px rgba(232, 225, 212, 0.4);
    transform: scale(1.025);
    letter-spacing: 0.06em;
  }
}

body:has(.contact-word:hover) .contact-email a {
  color: var(--bone);
  animation: email-breathe 2.6s ease-in-out infinite;
}

@media (max-width: 599px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    justify-items: center;
  }
}


/* --- 9. Footer --- */

.site-footer {
  padding-block: var(--space-md) var(--space-sm);
}

.site-footer hr {
  margin-block: var(--space-md);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
}

.footer-links {
  display: flex;
  gap: var(--space-lg);
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sand);
}

.footer-links a:hover {
  color: var(--bone);
}

.footer-copy {
  width: 100%;
  text-align: center;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--umber);
}


/* --- 10. Scroll-Fade Animation --- */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}


/* --- 11. Responsive --- */

/* Mobile-first base is already set above. Below are breakpoints. */

@media (max-width: 767px) {
  .hero-wordmark {
    height: 68vh;
    width: auto;
    max-width: 80vw;
  }

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

  .footer-links {
    justify-content: center;
  }
}

@media (min-width: 1024px) {
  .hero {
    min-height: 80vh;
  }
}


/* --- 12. Reduced Motion --- */

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

  .fade-in {
    opacity: 1;
    transform: none;
  }

  .bg-video {
    display: none;
  }
}


/* --- 13. Gallery Wall (single-page home) --- */

.home-gallery .hero--gallery {
  min-height: 92vh;
  gap: var(--space-md);
  position: relative;
}

.home-gallery .hero-wordmark {
  height: clamp(380px, 78vh, 820px);
  width: auto;
  max-width: 90vw;
  filter: drop-shadow(0 2px 40px rgba(0, 0, 0, 0.6));
}

@keyframes pulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}

.gallery-intro {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-2xl);
  padding-inline: var(--grid-gutter);
}

.gallery-intro .meta {
  margin-bottom: var(--space-md);
}

.gallery-intro h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: 0.12em;
  margin-bottom: var(--space-md);
  animation: pulse 2.6s ease-in-out infinite;
}

.gallery-lede {
  font-family: var(--font-accent);
  color: var(--clay);
  margin: 0 auto;
  font-size: 1.1rem;
}

/* The wall — fluid auto-fill grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-xl) var(--space-lg);
  padding-block: var(--space-lg) var(--space-2xl);
  max-width: 1500px;
  margin-inline: auto;
  padding-inline: var(--grid-gutter);
}

/* Each artwork — a matted, subtly floating print on the wall */
.frame {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Outer frame — dark wood ring around the artwork */
.frame-mat {
  position: relative;
  background: var(--base);
  padding: clamp(8px, 1.2vw, 18px);
  border: clamp(8px, 1vw, 14px) solid var(--charcoal);
  transition: transform 0.6s cubic-bezier(.2,.7,.2,1);
}

.frame:hover .frame-mat,
.frame:focus-within .frame-mat {
  transform: translateY(-4px);
}

/* Artwork window inside the frame */
.frame-artwork {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--base);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5);
}

.frame-artwork img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  opacity: 0;
  transition:
    opacity 0.6s ease,
    transform 0.8s cubic-bezier(.2,.7,.2,1),
    filter 0.6s ease;
  filter: saturate(0.92) contrast(1.02);
}

.frame-artwork img.loaded { opacity: 1; }

.frame:hover .frame-artwork img,
.frame:focus-within .frame-artwork img {
  transform: scale(1.03);
  filter: saturate(1) contrast(1.04);
}

/* Placard below the frame — full label */
.frame-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-xs);
  padding-top: var(--space-md);
  max-width: 42ch;
  margin-inline: auto;
}

.plaque-number {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  background: linear-gradient(180deg, var(--clay) 0%, var(--sand) 50%, var(--umber) 100%);
  border: 1px solid rgba(0, 0, 0, 0.45);
  border-radius: 1px;
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 230, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4),
    0 1px 3px rgba(0, 0, 0, 0.55);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--charcoal);
  text-shadow:
    0 1px 0 rgba(255, 248, 230, 0.35),
    0 -1px 0 rgba(0, 0, 0, 0.3);
}

.plaque-piece {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  letter-spacing: 0.02em;
  color: var(--clay);
  line-height: 1.3;
}

.plaque-title {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 400;
  font-size: clamp(1.1rem, 1.8vw, 1.5rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bone);
  margin: 0;
  transition: color var(--ease);
}

.plaque-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--sand);
  text-transform: uppercase;
}

.frame-blurb {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--clay);
  margin-top: var(--space-xs);
  max-width: 42ch;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Streaming / external links — revealed on hover/focus */
.plaque-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-xs);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.frame:is(:hover, :focus-within) :is(.frame-blurb, .plaque-links) {
  opacity: 1;
  transform: translateY(0);
}

.plaque-links a {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--sand);
}

.plaque-links a:hover {
  color: var(--bone);
}

/* Artist-accent color on the label title, revealed on hover/focus */
.frame[data-artist="tony-aman"]:hover .plaque-title,
.frame[data-artist="tony-aman"]:focus-within .plaque-title { color: var(--accent-tony); }
.frame[data-artist="tgwc"]:hover .plaque-title,
.frame[data-artist="tgwc"]:focus-within .plaque-title { color: var(--accent-tgwc); }
.frame[data-artist="px-err"]:hover .plaque-title,
.frame[data-artist="px-err"]:focus-within .plaque-title { color: var(--accent-pxerr); }
.frame[data-artist="mythic-valley"]:hover .plaque-title,
.frame[data-artist="mythic-valley"]:focus-within .plaque-title { color: var(--accent-mythic); }

/* Spotlight: hovering or focusing any frame dims the entire page */
body:has(.frame:is(:hover, :focus-within)) #main > *:not(#gallery),
body:has(.frame:is(:hover, :focus-within)) .gallery-intro,
body:has(.frame:is(:hover, :focus-within)) .site-footer {
  opacity: 0.1;
  transition: opacity var(--ease);
}

/* Frames need !important — the hang-in animation's `to` state holds opacity: 1
   in the cascade above regular declarations. */
body:has(.frame:is(:hover, :focus-within)) .gallery-grid > .frame:not(:is(:hover, :focus-within)) {
  opacity: 0.1 !important;
  transition: opacity var(--ease);
}

/* All frames — uniform size: 2-col span, 4/5 portrait */
.frame {
  --frame-index: 0;
  --frame-y: 0px;
  --frame-r: 0deg;
  grid-column: span 2;
  translate: 0 var(--frame-y);
  rotate: var(--frame-r);
}

.frame .frame-artwork { aspect-ratio: 4 / 5; }

/* Per-artist hand-hung offsets — deterministic, subtle */
.frame--mythic      { --frame-index: 0; --frame-y: 10px;  --frame-r: -0.2deg;  }
.frame--wildwood    { --frame-index: 1; --frame-y: 0px;   --frame-r: 0.15deg;  }
.frame--mesa        { --frame-index: 2; --frame-y: -6px;  --frame-r: 0.25deg;  }
.frame--tgwc        { --frame-index: 3; --frame-y: 4px;   --frame-r: -0.25deg; }
.frame--tony        { --frame-index: 4; --frame-y: -4px;  --frame-r: 0.1deg;   }

/* Salon hang: composed 3 + 2 layout on desktop, bottom row centered */
@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(6, 1fr);
    grid-template-areas:
      "my my wi wi me me"
      ".  tg tg to to  .";
  }

  .frame--mythic      { grid-area: my; }
  .frame--wildwood    { grid-area: wi; }
  .frame--mesa        { grid-area: me; }
  .frame--tgwc        { grid-area: tg; }
  .frame--tony        { grid-area: to; }
}

/* Frame scroll-reveal: canvas leaning in, then hung */
@keyframes hang-in {
  from {
    opacity: 0;
    transform: perspective(800px) rotateX(-14deg) translateY(24px);
  }
  to {
    opacity: 1;
    transform: perspective(800px) rotateX(0deg) translateY(0px);
  }
}

@supports (animation-timeline: scroll()) {
  .frame {
    animation: hang-in linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 45%;
  }
}

/* JS-driven fallback for browsers without scroll-driven animations */
.frame--hang-init {
  opacity: 0;
  transform: perspective(800px) rotateX(-14deg) translateY(24px);
  transition: opacity 0.7s ease-out, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(var(--frame-index, 0) * 60ms);
}

.frame--hang-init.frame--visible {
  opacity: 1;
  transform: perspective(800px) rotateX(0deg) translateY(0);
}

/* Mobile — single column hang */
@media (max-width: 599px) {
  .frame { grid-column: span 1; }
}

/* Gallery-wall — full-bleed textured wall (background lifted to ::before so it
   can fade independently of the frames sitting on top). */
.gallery-wall {
  position: relative;
  max-width: 100%;
  width: 100%;
  margin-inline: 0;
  padding-inline: 0;
  padding-block: var(--space-2xl) var(--space-xl);
  border-top: 1px solid var(--umber);
}

.gallery-wall::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: #181310;
  background-image:
    radial-gradient(ellipse at 50% 50%, transparent 25%, rgba(10, 9, 8, 0.6) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.1'/%3E%3C/svg%3E");
  background-size: 100% 100%, 200px 200px;
  background-repeat: no-repeat, repeat;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

body:has(.frame:is(:hover, :focus-within)) .gallery-wall::before {
  opacity: 0.4;
}

/* Scroll offset for anchor jumps */
#gallery, #contact {
  scroll-margin-top: var(--space-lg);
}


/* --- 14. Frame trigger + per-artist motion --- */

/* Click-to-open trigger covering the mat */
.frame-trigger {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: zoom-in;
}

.frame-trigger:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 4px;
}

/* PX/ERR — subtle chromatic aberration glitch on hover */
@keyframes pxerr-glitch {
  0%, 100% {
    transform: scale(1.03) translate(0, 0);
    filter: saturate(1) contrast(1.04);
  }
  50% {
    transform: scale(1.03) translate(1px, 0);
    filter: saturate(1) contrast(1.04)
      drop-shadow(1.5px 0 rgba(255, 0, 80, 0.35))
      drop-shadow(-1.5px 0 rgba(0, 200, 255, 0.35));
  }
}

.frame--pxerr:hover .frame-artwork img,
.frame--pxerr:focus-within .frame-artwork img {
  animation: pxerr-glitch 0.18s steps(2) infinite;
}

/* TGWC — low jitter on hover */
@keyframes tgwc-jitter {
  0%, 100% { transform: scale(1.03) translate(0, 0); }
  20%      { transform: scale(1.03) translate(-1px, 0); }
  40%      { transform: scale(1.03) translate(1px, -1px); }
  60%      { transform: scale(1.03) translate(0, 1px); }
  80%      { transform: scale(1.03) translate(-1px, 1px); }
}

.frame--tgwc:hover .frame-artwork img,
.frame--tgwc:focus-within .frame-artwork img {
  animation: tgwc-jitter 0.5s steps(5) infinite;
}

/* Mesa — slow saturation pulse on hover */
@keyframes mesa-pulse {
  0%, 100% {
    transform: scale(1.03);
    filter: saturate(1) contrast(1.04);
  }
  50% {
    transform: scale(1.04);
    filter: saturate(1.18) contrast(1.08) brightness(1.05);
  }
}

.frame--mesa:hover .frame-artwork img,
.frame--mesa:focus-within .frame-artwork img {
  animation: mesa-pulse 2.4s ease-in-out infinite;
}


/* --- 15. Lightbox --- */

.lightbox {
  border: 0;
  padding: 0;
  background: var(--base);
  color: var(--bone);
  width: min(1100px, 92vw);
  max-height: 92vh;
  margin: auto;
}

.lightbox::backdrop {
  background: rgba(10, 9, 8, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lightbox[open] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--space-xl);
  padding: var(--space-xl);
  border: 1px solid var(--charcoal);
  position: relative;
}

.lightbox-close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  z-index: 10;
  width: 44px;
  height: 44px;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--bone);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color var(--ease);
}

.lightbox-close:hover {
  color: var(--clay);
}

.lightbox-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  min-width: 0;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  background: var(--base);
  border: 1px solid var(--charcoal);
}

.lightbox-placard {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-self: center;
  text-align: left;
}

.lightbox-placard .plaque-number {
  align-self: flex-start;
}

.lightbox-placard .plaque-links {
  justify-content: flex-start;
  opacity: 1;
  transform: none;
}

.lightbox-placard .frame-blurb {
  opacity: 1;
  transform: none;
}

@media (max-width: 768px) {
  .lightbox[open] {
    grid-template-columns: 1fr;
    padding: var(--space-lg);
    gap: var(--space-md);
  }
  .lightbox-img {
    max-height: 60vh;
  }
}


/* --- 16. Print --- */

@media print {
  body {
    background: #fff;
    color: #000;
  }

  .site-footer,
  .streaming-links,
  .bg-video,
  .bg-overlay {
    display: none;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #555;
  }
}
