/* ==============================================
   PHYSICAL DESIGN — Encre & Acier
   Design Tokens (Primitive → Semantic → Component)
   ============================================== */

/* --- PRIMITIVE TOKENS --- */
:root {
  --gray-950: #0F0F13;
  --gray-900: #1A1A22;
  --gray-100: #EDEDF0;
  --gray-400: #908E98;
  --red-600: #D92B2B;
  --red-600-15: rgba(217, 43, 43, 0.15);
  --red-hover: #B82424;
  --white: #FFFFFF;

  --font-display: 'Big Shoulders Display', 'Impact', sans-serif;
  --font-body: 'Manrope', 'Segoe UI', sans-serif;

  /* --- SEMANTIC TOKENS --- */
  --color-base: var(--gray-950);
  --color-surface: var(--gray-900);
  --color-text-primary: var(--gray-100);
  --color-text-secondary: var(--gray-400);
  --color-accent: var(--red-600);
  --color-accent-subtle: var(--red-600-15);
  --border-default: var(--gray-900);
  --border-accent: var(--red-600);

  /* --- COMPONENT TOKENS --- */
  --btn-primary-bg: var(--color-accent);
  --btn-primary-text: var(--color-text-primary);
  --btn-primary-hover: var(--red-hover);
  --nav-bg-scrolled: rgba(26, 26, 34, 0.92);
  --pulse-line-color: var(--color-accent);
  --pulse-line-width: 2px;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--color-base);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--color-text-primary);
  background-color: var(--color-base);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* --- FOCUS --- */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* --- TYPOGRAPHY --- */
.heading {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  line-height: 1.05;
  color: var(--color-text-primary);
}

.heading-700 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  line-height: 1.1;
}

/* --- HEADER --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem 2rem;
  transition: background-color 0.4s ease, padding 0.4s ease, backdrop-filter 0.4s ease;
  background-color: transparent;
}

.site-header.scrolled {
  background-color: var(--nav-bg-scrolled);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    var(--color-base) 0%,
    rgba(15, 15, 19, 0.92) 20%,
    rgba(15, 15, 19, 0.65) 50%,
    rgba(15, 15, 19, 0.5) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
}

/* --- THE PULSE LINE --- */
.pulse-line {
  width: var(--pulse-line-width);
  background-color: var(--pulse-line-color);
  margin: 0 auto;
  animation: pulse 2s ease-in-out infinite;
}

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

.pulse-line-static {
  width: var(--pulse-line-width);
  background-color: var(--pulse-line-color);
}

/* Hero pulse line */
.hero-pulse {
  height: 80px;
  margin-bottom: 2rem;
}

/* Section separator pulse */
.section-pulse {
  height: 60px;
  margin: 0 auto;
}

/* --- LETTER ANIMATION --- */
.hero-title .letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px);
  animation: letterReveal 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.hero-title .letter-space {
  display: inline-block;
  width: 0.25em;
}

@keyframes letterReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- STATS BANNER --- */
.stats-banner {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.5rem;
  letter-spacing: 0.04em;
  color: var(--color-text-primary);
  line-height: 1.1;
}

.stat-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-text-secondary);
  margin-top: 0.25rem;
}

/* --- SERVICE CARDS --- */
.service-card {
  background-color: var(--color-surface);
  border-left: var(--pulse-line-width) solid var(--color-accent);
  padding: 2rem 1.75rem;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.service-card:hover {
  background-color: var(--color-accent-subtle);
  transform: translateY(-4px);
}

.service-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-primary);
  margin: 0 0 0.75rem 0;
}

.service-card p {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* --- MASONRY GALLERY --- */
.gallery-masonry {
  column-count: 3;
  column-gap: 0.5rem;
  width: 100%;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 0.5rem;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover img,
.gallery-item:focus-within img {
  transform: scale(1.05);
}

/* Red diagonal slash on hover */
.gallery-item::after {
  content: '';
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: linear-gradient(
    135deg,
    transparent 48.5%,
    var(--color-accent) 48.5%,
    var(--color-accent) 49.5%,
    transparent 49.5%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.gallery-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(15, 15, 19, 0.4);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
  pointer-events: none;
}

.gallery-item:hover::after,
.gallery-item:focus-within::after {
  opacity: 0.7;
}

.gallery-item:hover::before,
.gallery-item:focus-within::before {
  opacity: 1;
}

/* --- LIGHTBOX --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(15, 15, 19, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

/* --- REVIEW CARDS --- */
.review-card {
  background-color: var(--color-surface);
  padding: 2rem;
  position: relative;
}

.review-card .quote-mark {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--color-accent);
  line-height: 1;
  position: absolute;
  top: 1rem;
  left: 1.5rem;
}

.review-stars {
  display: flex;
  gap: 2px;
}

.review-stars svg {
  width: 16px;
  height: 16px;
  fill: var(--color-accent);
}

/* --- BUTTONS --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  background-color: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1rem 2rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary:hover {
  background-color: var(--btn-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(217, 43, 43, 0.35);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  background-color: transparent;
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1rem 2rem;
  border: 1px solid var(--color-text-secondary);
  cursor: pointer;
  transition: border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}

/* --- HAMBURGER --- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  z-index: 201;
}

.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--color-text-primary);
  transition: transform 0.35s ease, opacity 0.35s ease;
  transform-origin: center;
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- MOBILE MENU --- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  background-color: rgba(15, 15, 19, 0.97);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.mobile-menu[aria-hidden="false"] {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu a {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.mobile-menu a:hover,
.mobile-menu a:focus-visible {
  color: var(--color-accent);
}

/* --- SCROLL REVEAL --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger */
.stagger > * { transition-delay: calc(var(--i, 0) * 0.1s); }

/* --- DUALITY SEPARATOR (vertical pulse line between artists) --- */
.duality-line {
  width: var(--pulse-line-width);
  background: linear-gradient(to bottom, transparent, var(--color-accent), transparent);
  align-self: stretch;
  min-height: 100px;
}

/* --- HOURS GRID --- */
.hours-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 1rem;
  font-size: 0.875rem;
}

.hours-grid dt {
  color: var(--color-text-secondary);
  font-weight: 500;
}

.hours-grid dd {
  margin: 0;
  color: var(--color-text-primary);
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
  .gallery-masonry {
    column-count: 2;
  }
}

@media (max-width: 768px) {
  .site-header { padding: 1rem 1.25rem; }
  .site-header.scrolled { padding-top: 0.75rem; padding-bottom: 0.75rem; }
  .hamburger { display: flex; }

  .gallery-masonry {
    column-count: 1;
  }

  .stat-number { font-size: 2rem; }
}

/* --- 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;
  }

  html { scroll-behavior: auto; }

  .reveal, .reveal-left, .reveal-right {
    opacity: 1;
    transform: none;
  }

  .hero-title .letter {
    opacity: 1;
    transform: none;
  }

  .pulse-line {
    opacity: 1;
    animation: none;
  }
}
