/* odphoto — progressive enhancements layered on top of the compiled Tailwind bundle.
   Everything here is additive: no Tailwind utility is overridden, and with JS/motion
   off the page stays fully visible and usable. */

/* ---- a11y: skip link + visible focus ring ---- */
.skip-link {
  position: fixed;
  left: 1rem; top: 1rem;
  z-index: 10001;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  background: var(--color-primary-400);
  color: #fff;
  font-weight: 700; font-size: 0.875rem;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}
.skip-link:focus { transform: none; outline: none; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--color-primary-400);
  outline-offset: 3px;
  border-radius: 10px;
}

/* keep anchored sections clear of the floating header pill */
#main, #about, #contact, #gallery { scroll-margin-top: 7rem; }

/* ---- grain: subtle texture over the flat surfaces ---- */
.grain {
  position: fixed; inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.86' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) { .grain { opacity: 0.07; } }

/* soft fade beneath the floating header pill so section content doesn't hard-clip
   in the gap above/beside it while scrolling */
.top-fade {
  position: fixed; top: 0; left: 0; right: 0;
  height: 104px; z-index: 50; pointer-events: none;
  background: linear-gradient(to bottom, var(--color-gray-50) 0, var(--color-gray-50) 32%, transparent 100%);
}
@media (prefers-color-scheme: dark) {
  .top-fade { background: linear-gradient(to bottom, var(--color-gray-950) 0, var(--color-gray-950) 32%, transparent 100%); }
}

/* Top-of-page sections must clear the fixed header pill. The compiled Tailwind
   bundle was purged to the original site's classes, so pt-32/pt-40 don't exist —
   set the clearance here instead. */
.page-intro {
  padding-top: clamp(8.5rem, 6rem + 7vw, 11rem);
  padding-bottom: clamp(3rem, 2rem + 2vw, 5rem);
}

/* ---- gallery hover zoom (landing teaser + portfolio) ---- */
#gallery .grid > div > div { overflow: hidden; }
#gallery .grid > div > div img,
#portfolio-grid a img { transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); will-change: transform; }
#gallery .grid > div > div:hover img,
#portfolio-grid a:hover img { transform: scale(1.05); }
#portfolio-grid a { overflow: hidden; cursor: zoom-in; }

/* ---- word marquee (dynamic divider) ---- */
.marquee {
  overflow: hidden;
  padding: 1.15rem 0;
  margin: 0.25rem 0;
  border-top: 1px dashed var(--color-gray-200);
  border-bottom: 1px dashed var(--color-gray-200);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
@media (prefers-color-scheme: dark) { .marquee { border-color: var(--color-gray-800); } }
.marquee__track { display: inline-flex; white-space: nowrap; will-change: transform; animation: od-marquee 40s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group { display: inline-flex; align-items: center; }
.marquee__group span {
  font-family: var(--font-lora); font-style: italic;
  font-size: clamp(1.05rem, 2.4vw, 1.5rem);
  color: var(--color-gray-500);
  padding: 0 1.4rem;
}
.marquee__group span::after { content: "·"; margin-left: 2.8rem; color: var(--color-primary-400); font-style: normal; }
@keyframes od-marquee { to { transform: translateX(-50%); } }

/* ---- scroll reveals (motion only when the user allows it) ---- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal],
  .js [data-reveal-group] > * {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.75s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.75s cubic-bezier(0.2, 0.7, 0.2, 1);
    will-change: opacity, transform;
  }
  .js [data-reveal].in,
  .js [data-reveal-group] > *.in { opacity: 1; transform: none; }
}

/* ---- lightbox ---- */
.lb {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10, 9, 8, 0.92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.28s ease;
}
.lb.open { opacity: 1; pointer-events: auto; }
.lb img {
  max-width: 92vw; max-height: 86vh;
  border-radius: 14px;
  box-shadow: 0 40px 90px -25px rgba(0, 0, 0, 0.8);
  transform: scale(0.97); transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.lb.open img { transform: scale(1); }
.lb__btn {
  position: absolute; display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, 0.1); color: #fff;
  font-size: 1.6rem; line-height: 1; cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.lb__btn:hover { background: rgba(255, 255, 255, 0.22); transform: scale(1.06); }
.lb__close { top: 1.25rem; right: 1.25rem; }
.lb__prev { left: 1.25rem; }
.lb__next { right: 1.25rem; }
@media (max-width: 640px) { .lb__prev { left: 0.5rem; } .lb__next { right: 0.5rem; } .lb__btn { width: 42px; height: 42px; } }
