/* style.css — Dijo Studios
   Improved: a11y (gated custom cursor, focus-visible, reduced-motion),
   perf (blur-up placeholders, graceful image fallback), safe-area insets. */
:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --text: #f5f5f5;
  --highlight: #ffc62d; /* Paput-style bright warm yellow — was #d4af37 antique gold */
  --font-heading: 'Nunito', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --spacing: clamp(1rem, 5vw, 3rem);
  --container: min(90%, 1200px);
}

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

html, body {
  width: 100%; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-weight: 400; line-height: 1.6;
  overflow-x: hidden;
  /* scroll-behavior: smooth removed — conflicts with JS-driven scroll (Lenis/Barba)
     and causes jittery double-scroll on Firefox mobile. */
}

/* Sticky-footer flex layout: footer sticks to the viewport bottom on short
   pages and is pushed down naturally when content overflows. */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
main { flex: 1 0 auto; }

/* ── Custom cursor: only enabled on fine-pointer devices AND only after JS
   successfully creates the dot (html.custom-cursor class).
   Guarantees: touch devices keep native input; if JS fails / is disabled,
   the default cursor remains so the pointer is never invisible. ── */
@media (hover: hover) and (pointer: fine) {
  html.custom-cursor,
  html.custom-cursor * {
    cursor: none !important;
  }
}

/* ── Keyboard focus indicator (critical — the custom cursor hides the
   pointer on desktop, so keyboard users need a clear focus ring). ── */
:focus-visible {
  outline: 2px solid var(--highlight);
  outline-offset: 3px;
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }

a { color: inherit; text-decoration: none; transition: 0.3s ease; }
img { max-width: 100%; display: block; }
.container { width: var(--container); margin: 0 auto; padding: 0 var(--spacing); }

/* ── Skip-to-content link (a11y) — hidden until focused ── */
.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10002;
  transform: translateY(-150%);
  background: var(--highlight);
  color: #0a0a0a;
  padding: 0.85rem 1.4rem;
  font-family: var(--font-heading);
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.8rem;
  border-radius: 0 0 10px 0;
  transition: transform 0.25s ease;
}
.skip-link:focus { transform: translateY(0); }

/* ── Custom Cursor (single dot, ripples on hover) ── */
.cursor-dot {
  width: 14px;
  height: 14px;
  background: var(--highlight);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 10001; /* Bumped above loader (10000) and overlay (9999) */
  transform: translate(-50%, -50%) scale(1);
  transition: transform 0.2s ease-out;
}
.cursor-dot.ripple {
  transform: translate(-50%, -50%) scale(1.8);
  transition: transform 0.2s cubic-bezier(0.34, 1.2, 0.64, 1);
}

/* ── Header & Navigation ── */
header {
  position: fixed; top: 0; left: 0; width: 100%;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  z-index: 100; padding: 1rem 0;
  transition: transform 0.45s cubic-bezier(0.16,1,0.3,1), background 0.4s, padding 0.4s;
  padding-top: max(1rem, env(safe-area-inset-top));
}
/* Firefox mobile is notoriously bad at compositing backdrop-filter during scroll —
   use a solid fallback instead. The blur is barely visible on dark bg anyway. */
@supports not (-moz-appearance: none) {
  header { background: rgba(10,10,10,0.85); }
}
@supports (-moz-appearance: none) {
  header { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(10,10,10,0.97); }
}
nav { display: flex; justify-content: space-between; align-items: center; }
.logo-container {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-heading); font-size: 1.2rem; font-weight: 900;
}
.logo-img { height: 35px; width: auto; object-fit: contain; }
.logo-text span { color: var(--highlight); }
/* Gold dot should sit tight between the two words */
.logo-text .letter[data-char="."] {
  margin: 0 -0.03em;
}

/* ── Pulsating gold effect for logo text on hover ── */
.logo-text {
  transition: color 0.2s ease;
  letter-spacing: -0.02em;
}
.logo-container:hover .logo-text {
  animation: goldPulse 0.8s infinite ease-in-out;
}
@keyframes goldPulse {
  0% { color: var(--text); text-shadow: 0 0 0 rgba(255, 198, 45, 0); }
  50% { color: var(--highlight); text-shadow: 0 0 8px rgba(255, 198, 45, 0.6); }
  100% { color: var(--text); text-shadow: 0 0 0 rgba(255, 198, 45, 0); }
}

.nav-links { display: flex; gap: 0; position: relative; }
.nav-links a {
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; opacity: 0.65;
  position: relative; display: inline-block; padding: 0.4rem 1rem;
  transition: opacity 0.3s ease, color 0.3s ease;
}
.nav-links a:hover { opacity: 1; color: var(--highlight); }
.nav-links a.active { opacity: 1; color: var(--text); }

/* ── Sliding Gold Indicator ── */
.nav-indicator {
  position: absolute; bottom: -6px; left: 0; height: 2px; width: 0;
  background: var(--highlight); border-radius: 1px; pointer-events: none; opacity: 0;
  will-change: transform, width, opacity;
}

/* ── Slot Machine Letter Spans ── */
.letter {
  display: inline-block;
}
.letter.scrambling { color: var(--highlight); }
.letter.landed { color: var(--text); opacity: 1; }

/* ── Hamburger (mobile) ── */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; background: none; border: none; padding: 4px;
}
.hamburger span {
  display: block; width: 24px; height: 2px; background: var(--text); transition: all 0.3s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Sections & Typography ── */
section { padding: 8rem 0 4rem; min-height: 80vh; display: flex; flex-direction: column; justify-content: center; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 900; line-height: 1.1; margin-bottom: 1.5rem; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.5rem, 8vw, 5.5rem); }
h2 { font-size: clamp(2rem, 6vw, 3.5rem); text-align: center; margin-bottom: 3rem; }
.subtitle { color: #ccc; font-size: 1.1rem; max-width: 600px; margin-bottom: 2rem; }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--text); color: var(--bg); padding: 1rem 2.5rem;
  font-weight: 600; border-radius: 50px; transition: all 0.4s ease;
  text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.1em;
}
.btn:hover { background: var(--highlight); transform: translateY(-2px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Home page hero — left-aligned, like text on a page. Full viewport height. */
.hero-centered {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  margin-top: 0;
  padding-top: 60px;
  padding-bottom: 60px;
  background: radial-gradient(ellipse at left center, rgba(255,198,45,0.04) 0%, transparent 60%);
  position: relative;
}
/* Push the container to the left edge (override .container's auto centering)
   so the text sits against a page-style left margin. */
.hero-centered .container { margin-left: 0; margin-right: auto; }

/* ── Scroll Indicator (glowing bottom edge of hero) ── */
.scroll-indicator {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 0.6rem 1.4rem 0.8rem;
  background: transparent;
  border: none;
  color: var(--highlight);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0.85;
  animation: scrollGlow 2.4s ease-in-out infinite;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  z-index: 2;
  transition: opacity 0.5s ease;
}
.scroll-indicator-arrow {
  display: block;
  line-height: 0;
  animation: scrollBounce 2.4s ease-in-out infinite;
}
.scroll-indicator-arrow svg { display: block; }

/* Glowing bar pinned to the very bottom edge of the hero. */
.hero-centered::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 198, 45, 0.15) 18%,
    rgba(255, 198, 45, 0.85) 50%,
    rgba(255, 198, 45, 0.15) 82%,
    transparent 100%);
  box-shadow: 0 0 28px 4px rgba(255, 198, 45, 0.45),
              0 -2px 18px 2px rgba(255, 198, 45, 0.25);
  animation: scrollBarGlow 2.4s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.45s ease;
}

body.scrolled-from-top .hero-centered::after {
  opacity: 0;
  animation-play-state: paused;
}

@keyframes scrollGlow {
  0%, 100% { opacity: 0.55; text-shadow: 0 0 6px rgba(255, 198, 45, 0.25); }
  50% { opacity: 1; text-shadow: 0 0 14px rgba(255, 198, 45, 0.7); }
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

@keyframes scrollBarGlow {
  0%, 100% {
    opacity: 0.5;
    box-shadow: 0 0 14px 1px rgba(255, 198, 45, 0.25),
                0 -1px 10px 1px rgba(255, 198, 45, 0.12);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 32px 6px rgba(255, 198, 45, 0.55),
                0 -3px 22px 4px rgba(255, 198, 45, 0.3);
  }
}

/* Mobile tweaks: smaller text, slightly faster pulse for snappier feel. */
@media (hover: none) and (pointer: coarse) {
  .scroll-indicator {
    font-size: 0.62rem;
    padding: 0.5rem 1.2rem 0.7rem;
  }
  .scroll-indicator-arrow { animation: none; }
}

/* Respect prefers-reduced-motion: kill all looping animations. */
@media (prefers-reduced-motion: reduce) {
  .scroll-indicator,
  .scroll-indicator-arrow,
  .hero-centered::after { animation: none; }
  .scroll-indicator { opacity: 0.85; }
  .hero-centered::after { opacity: 0.7; }
}
.hero-content { width: 100%; }
/* Hide hero text from the very first paint so it's never visible before the
   typewriter starts. The typewriter removes .hero-pending once it has cleared
   the original HTML and set up the caret. <noscript> overrides this for
   JS-disabled visitors. */
.hero-content.hero-pending > * { visibility: hidden; }
.page-headline {
  text-align: left;
  font-size: clamp(2rem, 6vw, 4rem);
  margin-top: 1rem;
}
.subtitle { margin-left: 0; margin-right: 0; }

/* ── Screen-reader only (visually hidden, read by search engines & assistive tech) ── */
.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;
}

/* ── Stats & Brands ── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 2rem; margin: 3rem 0; }
.stat-box { background: var(--surface); padding: 2rem; text-align: center; border: 1px solid rgba(255,255,255,0.05); transition: 0.3s; }
.stat-box:hover { border-color: var(--highlight); transform: translateY(-5px); }
.stat-box h3 { font-size: 2.5rem; margin-bottom: 0.5rem; color: var(--highlight); font-family: var(--font-heading); font-weight: 900; }
.stat-box p { font-size: 0.9rem; color: #b8b8b8; text-transform: uppercase; }
.brands { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 2rem; }
.brand-tag { padding: 0.5rem 1rem; border: 1px solid rgba(255,255,255,0.2); border-radius: 999px; font-size: 0.85rem; transition: 0.3s; }
.brand-tag:hover { border-color: var(--highlight); color: var(--text); }

/* ── Upload Zone & Gallery (legacy classes kept for compatibility) ── */
.upload-zone { border: 2px dashed rgba(255,255,255,0.2); padding: 4rem; text-align: center; background: var(--surface); margin-bottom: 2rem; cursor: pointer; transition: 0.3s; }
.upload-zone:hover, .upload-zone.dragover { border-color: var(--highlight); background: rgba(255,198,45,0.05); }
.clear-btn { background: transparent; border: 1px solid rgba(255,255,255,0.2); color: var(--text); padding: 0.8rem 2rem; cursor: pointer; border-radius: 50px; font-size: 0.8rem; transition: 0.3s; }
.clear-btn:hover { border-color: var(--highlight); color: var(--highlight); }

/* ── Pinterest Masonry Grid (full-width, edge-to-edge, tight spacing) ── */
.gallery-wrap {
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  padding: 0 5px;
  box-sizing: border-box;
}
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 1px;
  gap: 5px;
  width: 100%;
}
.gallery-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  cursor: pointer;
  background: linear-gradient(135deg, #141414, #1c1c1c);
  width: 100%;
  contain: content;
  /* Keyboard: make focusable cards behave like buttons visually on focus */
}
.gallery-card:focus-visible {
  outline: 2px solid var(--highlight);
  outline-offset: 2px;
}
/* Blur-up shimmer placeholder while an image is still loading */
.gallery-card.is-loading::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.05) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite linear;
  z-index: 0;
  border-radius: 18px;
}
.gallery-card.is-loaded::before { display: none; }
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-card.is-loading::before { animation: none; }
}
.gallery-card img {
  width: 100%;
  height: auto;
  display: block;
  position: relative;
  z-index: 1;
  filter: grayscale(10%) brightness(0.94);
  transition: filter 0.5s ease;
  border-radius: 18px;
  /* decoding async off the main thread */
}
/* Promote only the image to its own GPU layer on desktop. */
@media (hover: hover) and (pointer: fine) {
  .gallery-card img { will-change: transform; }
}
.gallery-card:hover img {
  filter: grayscale(0%) brightness(1.02);
}

/* Graceful fallback when an image fails to load (broken link / network error).
   Keeps the card in the grid with a tasteful placeholder instead of a broken icon. */
.gallery-card.img-failed {
  background: linear-gradient(135deg, #141414, #1f1f1c);
  min-height: 220px;
}
.gallery-card.img-failed img,
.gallery-card.img-failed .card-overlay,
.gallery-card.img-failed::after { display: none !important; }
.gallery-card.img-failed .img-failed-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255,198,45,0.45);
  z-index: 1;
}

.card-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.15) 55%, transparent 100%); opacity: 0; transition: opacity 0.4s ease; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem; z-index: 2; }
.gallery-card:hover .card-overlay { opacity: 1; }
.gallery-card:focus-visible .card-overlay { opacity: 1; }
.card-icon { width: 54px; height: 54px; border: 2px solid var(--highlight); border-radius: 50%; display: flex; align-items: center; justify-content: center; transform: scale(0.7); opacity: 0; transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), opacity 0.4s ease; }
.gallery-card:hover .card-icon,
.gallery-card:focus-visible .card-icon { transform: scale(1); opacity: 1; }
.card-icon svg { width: 22px; height: 22px; stroke: var(--highlight); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card-label { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--highlight); opacity: 0; transform: translateY(8px); transition: opacity 0.4s 0.05s ease, transform 0.4s 0.05s cubic-bezier(0.16,1,0.3,1); }
.gallery-card:hover .card-label,
.gallery-card:focus-visible .card-label { opacity: 1; transform: translateY(0); }
.gallery-card::after { content: ''; position: absolute; inset: 0; border: 2px solid var(--highlight); border-radius: 18px; opacity: 0; transform: scale(1.04); transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16,1,0.3,1); pointer-events: none; }
.gallery-card:hover::after,
.gallery-card:focus-visible::after { opacity: 0.5; transform: scale(1); }
.card-overlay .ripple { position: absolute; border-radius: 50%; background: rgba(255,198,45,0.35); transform: scale(0); animation: ripple-anim 0.55s ease-out forwards; pointer-events: none; }
@keyframes ripple-anim { to { transform: scale(4); opacity: 0; } }

/* ── Lightbox (role="dialog") ── */
#lightbox { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s; }
#lightbox.open { opacity: 1; visibility: visible; }
.lb-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); cursor: zoom-out; }
@supports (-moz-appearance: none) {
  .lb-backdrop { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(0,0,0,0.98); }
}
.lb-img-wrap { position: relative; z-index: 1; max-width: 90vw; max-height: 88vh; display: flex; align-items: center; justify-content: center; transform: scale(0.9); transition: transform 0.4s cubic-bezier(0.16,1,0.3,1); }
#lightbox.open .lb-img-wrap { transform: scale(1); }
#lb-img { max-width: 90vw; max-height: 86vh; object-fit: contain; display: block; border-radius: 2px; box-shadow: 0 30px 80px rgba(0,0,0,0.7); transition: opacity 0.25s ease, transform 0.25s ease; touch-action: none; }
#lb-img.switching { opacity: 0; transform: scale(0.97); }
#lb-img.zoomed {
  transform-origin: 50% 50%;
  transition: none;
}
.lb-counter { position: absolute; top: 1.5rem; left: 50%; transform: translateX(-50%); z-index: 2; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.75); }
.lb-close { position: absolute; top: max(1.5rem, env(safe-area-inset-top)); right: max(1.5rem, env(safe-area-inset-right)); z-index: 2; background: transparent; border: 1px solid rgba(255,255,255,0.2); color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 1.1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; }
.lb-close:hover, .lb-close:focus-visible { border-color: var(--highlight); color: var(--highlight); transform: rotate(90deg); }
.lb-prev, .lb-next { position: absolute; top: 50%; z-index: 2; transform: translateY(-50%); background: transparent; border: 1px solid rgba(255,255,255,0.2); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; }
.lb-prev { left: 1.5rem; } .lb-next { right: 1.5rem; }
.lb-prev:hover, .lb-next:hover, .lb-prev:focus-visible, .lb-next:focus-visible { border-color: var(--highlight); color: var(--highlight); background: rgba(255,198,45,0.08); outline: none; }
.lb-prev:hover { transform: translateY(-50%) translateX(-3px); } .lb-next:hover { transform: translateY(-50%) translateX(3px); }
@media (max-width: 600px) { .lb-prev { left: 0.6rem; } .lb-next { right: 0.6rem; } .lb-close { top: 0.8rem; right: 0.8rem; } }

/* ── Contact Form ── */
form { max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; gap: 1.5rem; }
input, textarea { background: transparent; border: none; border-bottom: 1px solid rgba(255,255,255,0.2); color: var(--text); padding: 1rem; font-family: inherit; outline: none; transition: 0.3s; font-size: 16px; }
textarea { min-height: 150px; resize: vertical; }
input:focus, textarea:focus { border-bottom-color: var(--highlight); }
/* Always show a focus ring on inputs for keyboard users (border colour alone
   is too subtle once the custom cursor hides the pointer). */
input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--highlight);
  outline-offset: 4px;
  border-radius: 2px;
}
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }

/* Honeypot — visually hidden from real users, visible to bots */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important; height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  tab-index: -1;
}
/* Form status region (aria-live) */
.form-status {
  min-height: 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--highlight);
}
.form-status.error { color: #ff7a7a; }
.form-status.success { color: #74e08a; }
.form-status.sending { color: var(--highlight); }

/* ── Footer (sticky to bottom via flex layout on <body> wrapper) ── */
footer { padding: 4rem 0 calc(2.5rem + env(safe-area-inset-bottom)); text-align: center; border-top: 1px solid rgba(255,255,255,0.1); margin-top: auto; color: #aaa; font-size: 0.9rem; }
footer a { color: var(--highlight); margin: 0 0.5rem; transition: all 0.3s ease; display: inline-block; }
footer a:hover { animation: goldPulse 0.8s infinite ease-in-out; }

/* ═══════════════════════════════════════════════
   PAGE TRANSITION OVERLAY — organic gold blob
═══════════════════════════════════════════════ */
#pt-overlay {
  position: fixed; inset: 0;
  z-index: 8500;
  pointer-events: none;
  overflow: hidden;
}
.pt-blob {
  position: absolute;
  inset: 0;
  background: var(--highlight);
  will-change: clip-path;
  clip-path: circle(0% at 0% 100%);
}

/* ── Scroll Reveal (initial state — GSAP animates from here) ── */
.reveal-up { opacity: 0; }

/* ═══════════════════════════════════════════════
   CINEMATIC LOADER — gold blob cover
═══════════════════════════════════════════════ */
#site-loader {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
  pointer-events: auto;
}
.loader-blob {
  position: absolute;
  inset: 0;
  background: var(--highlight);
  will-change: clip-path;
  clip-path: circle(200vmax at 0% 100%);
  z-index: 1;
}
.loader-content-wrap {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100vw;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
}
#loader-text {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 10vw, 15rem);
  font-weight: 900;
  color: #0a0a0a;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  white-space: nowrap;
  display: inline-block;
  line-height: 1;
  text-align: center;
  transform: scale(0.92);
  transform-origin: center center;
  width: auto;
}
@media (max-width: 480px) {
  #loader-text { font-size: clamp(1rem, 9.5vw, 4rem); }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; }
  section { min-height: auto; padding: 5rem 0 3rem; }
  .hamburger { display: flex; }
  .nav-links {
    display: none; flex-direction: column;
    position: fixed; top: 65px; left: 0; right: 0;
    background: rgba(10,10,10,0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.5rem 2rem; gap: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1); z-index: 99;
  }
  @supports (-moz-appearance: none) {
    .nav-links { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(10,10,10,0.99); }
  }
  .nav-links.open { display: flex; }
}
@media (max-width: 600px) {
  .gallery-wrap { padding: 0 3px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 3px; }
  .gallery-card { border-radius: 12px; }
  .gallery-card img { border-radius: 12px; }
  .stats { grid-template-columns: 1fr 1fr; }
}

/* ── Image Protection (visual deterrent only; not a real access control) ── */
.gallery-card img,
#lb-img {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.gallery-card { pointer-events: auto; }

/* ── Mobile: hide custom cursor, scrollable lightbox, CENTER IMAGES ── */
@media (hover: none) and (pointer: coarse) {
  .cursor-dot { display: none !important; }
  html, body, *, a, button, .btn, input, textarea, select,
  .gallery-card, .nav-links a, .logo-container, .brand-tag,
  .upload-zone, .clear-btn, [role="button"] {
    cursor: auto !important;
  }
  #lightbox {
    align-items: center;
    padding-top: 60px;
    padding-bottom: 80px;
    justify-content: center;
    overflow-y: auto;
  }
  #lightbox .lb-img-wrap {
    max-height: none;
    max-width: 100vw;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #lb-img {
    max-width: 100vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    margin: 0 auto;
    border-radius: 12px;
    display: block;
  }
  .lb-prev, .lb-next {
    width: 40px; height: 40px;
    bottom: calc(1.5rem + env(safe-area-inset-bottom));
    top: auto;
    transform: none !important;
  }
  .lb-prev { left: calc(50% - 52px); }
  .lb-next { right: calc(50% - 52px); }
}

/* ── Gallery section ── sit flush below hero, no extra top padding */
section.gallery-section {
  padding: 0;
  min-height: auto;
}
.featured-card:hover img {
  filter: grayscale(0%) brightness(1.02);
}

/* Spotlight headline – two layers, one masked */
.spotlight-headline {
  position: relative;
  display: inline-block;
  margin: 0;
  cursor: default;
}
.spotlight-headline .page-headline { margin: 0; }

/* ── Typewriter cursor (blinking yellow bar) ──
   Shown alone for ~500ms after the loader, then the headline types out
   next to it. Removed once typing completes. */
.tw-cursor {
  display: inline-block;
  width: 0.06em;
  height: 0.78em;
  background: var(--highlight);
  margin-left: 0.08em;
  vertical-align: -0.04em;
  border-radius: 1px;
  animation: tw-blink 0.9s steps(1) infinite;
}
@keyframes tw-blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .tw-cursor { animation: none; }
}
.highlight-layer {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  color: var(--highlight);
  background: transparent;
  clip-path: circle(0% at 0% 0%);
  pointer-events: none;
  transition: clip-path 0.05s linear;
  z-index: 2;
}
.highlight-layer.active {
  transition: clip-path 0.1s ease-out;
}

/* ═══════════════════════════════════════════════
   GLOBAL REDUCED MOTION — kill all non-essential
   animation/transition for motion-sensitive users.
   The JS layer also branches on this preference
   (skips the loader scramble, snake-reveal scrub,
   SplitType, parallax) so the experience stays calm.
═══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal-up { opacity: 1 !important; transform: none !important; }
  .gallery-card { opacity: 1 !important; transform: none !important; }
  .pt-blob, .loader-blob { display: none !important; }
}
