/* =========================================================================
   The Obsidian Lens — landing-page base styles
   -------------------------------------------------------------------------
   Shared across every page under /l/<slug>/. Pairs with Tailwind (CDN) for
   utilities. Overrides and page-specific touches live in each landing's
   inline <style>.
   ========================================================================= */

/* ---------- Fonts (Playfair Display + Inter) ---------- */
/* Loaded via <link> in HTML for render speed; this block documents intent. */

:root {
  --ol-bg: #000;
  --ol-bg-soft: #09090B;
  --ol-surface: #141416;
  --ol-text: #E4E4E7;
  --ol-text-dim: #94A3B8;
  --ol-text-dimmer: #64748B;
  --ol-border: rgba(255, 255, 255, 0.08);
  --ol-border-strong: rgba(255, 255, 255, 0.3);

  /* Motion curve — the site-wide ease used for reveals, hover, etc. */
  --ol-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--ol-bg);
  color: var(--ol-text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, .font-display {
  font-family: 'Playfair Display', Georgia, serif;
}

/* ---------- Minimal top nav (landing-page style — stripped for focus) ---------- */
.ol-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(0, 0, 0, 0.65);
  border-bottom: 1px solid var(--ol-border);
  transition: background 0.3s ease, border-color 0.3s ease;
}

/* ---------- Hero — video background, dark gradients, cinematic feel ---------- */
.ol-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh; /* mobile-safe viewport */
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  background: var(--ol-bg-soft);
}

.ol-hero__video-wrap {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.ol-hero__video,
.ol-hero__video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Top-to-bottom darkener — ensures headline legibility over any footage */
.ol-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.35) 40%,
    rgba(0, 0, 0, 0.85) 80%,
    rgba(0, 0, 0, 1) 100%
  );
  pointer-events: none;
}

/* Subtle radial vignette — cinematic framing */
.ol-hero__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 40%,
    rgba(0, 0, 0, 0.6) 100%
  );
  pointer-events: none;
}

/* ---------- Type scale helpers ---------- */
.ol-eyebrow {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ol-text-dim);
}

.ol-eyebrow--lg { font-size: 0.875rem; }

.ol-accent-line {
  width: 60px;
  height: 1px;
  background: linear-gradient(to right, rgba(248, 250, 252, 0.6), transparent);
}

.ol-accent-line--center {
  background: linear-gradient(
    to right,
    transparent,
    rgba(248, 250, 252, 0.6),
    transparent
  );
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Buttons ---------- */
.ol-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  text-decoration: none;
}

.ol-btn--primary {
  background: #FFF;
  color: #000;
  border: 1px solid #FFF;
}
.ol-btn--primary:hover { background: #F1F5F9; border-color: #F1F5F9; }

.ol-btn--ghost {
  background: transparent;
  color: #FFF;
  border: 1px solid var(--ol-border-strong);
}
.ol-btn--ghost:hover { background: #FFF; color: #000; border-color: #FFF; }

.ol-btn:focus-visible {
  outline: 2px solid #FFF;
  outline-offset: 3px;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ol-ease), transform 0.8s var(--ol-ease);
}
.reveal.visible { opacity: 1; transform: none; }

.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.8s var(--ol-ease), transform 0.8s var(--ol-ease);
}
.reveal-left.visible { opacity: 1; transform: none; }

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.8s var(--ol-ease), transform 0.8s var(--ol-ease);
}
.reveal-right.visible { opacity: 1; transform: none; }

/* ---------- Feature / capability card (used in "what I shoot" grids) ---------- */
.ol-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--ol-border);
  border-radius: 1rem;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
  overflow: hidden;
}
.ol-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}

.ol-card__num {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 3rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1;
  color: rgba(255, 255, 255, 0.18);
  margin-bottom: 1rem;
}

/* ---------- Gallery (rendered by gallery-loader.js) ---------- */
/* !important on layout rules — belt-and-suspenders against Tailwind Preflight,
   browser extensions, or any user stylesheet that might flatten the grid. */
.ol-gallery {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)) !important;
  gap: 0.75rem !important;
  width: 100% !important;
}
@media (max-width: 480px) {
  .ol-gallery {
    /* Tighter floor on phones so we still get 2 columns on narrow widths */
    grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)) !important;
    gap: 0.5rem !important;
  }
}

.ol-gallery__card {
  position: relative;
  display: block !important;
  width: 100% !important;
  aspect-ratio: 4 / 5;
  padding: 0;
  margin: 0;
  border: 0;
  background: #09090B;
  border-radius: 0.5rem;
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ol-ease), transform 0.7s var(--ol-ease);
}
.ol-gallery__card.is-visible { opacity: 1; transform: none; }
.ol-gallery__card img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important; /* beat Tailwind Preflight's img { max-width: 100% } */
  object-fit: cover;
  filter: brightness(0.82);
  transition: transform 0.6s var(--ol-ease), filter 0.5s var(--ol-ease);
  will-change: transform;
}
.ol-gallery__card:hover img,
.ol-gallery__card:focus-visible img {
  transform: scale(1.06);
  filter: brightness(1);
}
.ol-gallery__card:focus-visible {
  outline: 2px solid #FFF;
  outline-offset: 3px;
}
/* Subtle gradient on hover to hint the image opens — no heavy overlay text */
.ol-gallery__card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.45) 0%,
    rgba(0, 0, 0, 0) 35%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.ol-gallery__card:hover::after,
.ol-gallery__card:focus-visible::after { opacity: 1; }

.ol-gallery__state {
  grid-column: 1 / -1;
  padding: 3rem 1rem;
  text-align: center;
  color: var(--ol-text-dim);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9rem;
}
.ol-gallery__state a {
  color: #FFF;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ol-gallery__spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 0.6rem;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-top-color: #FFF;
  border-radius: 50%;
  vertical-align: -2px;
  animation: ol-spin 900ms linear infinite;
}
@keyframes ol-spin { to { transform: rotate(360deg); } }

/* ---------- Lightbox (single instance, injected by gallery-loader.js) ---------- */
.ol-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 1rem;
}
.ol-lightbox.is-open { display: flex; }

.ol-lightbox__stage {
  position: relative;
  max-width: 92vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ol-lightbox__stage img {
  max-width: 92vw;
  max-height: 85vh;
  object-fit: contain;
  background: #000;
  border-radius: 2px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  transition: opacity 0.15s ease;
}

.ol-lightbox__caption {
  position: absolute;
  bottom: 1.25rem;
  left: 0;
  right: 0;
  text-align: center;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ol-text-dim);
  margin: 0;
  pointer-events: none;
}

.ol-lightbox__btn {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #FFF;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.ol-lightbox__btn svg { width: 20px; height: 20px; }
.ol-lightbox__btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.35);
}
.ol-lightbox__btn:focus-visible {
  outline: 2px solid #FFF;
  outline-offset: 2px;
}
@media (min-width: 768px) {
  .ol-lightbox__btn { width: 48px; height: 48px; }
  .ol-lightbox__btn svg { width: 22px; height: 22px; }
}

.ol-lightbox__close { top: 1.25rem; right: 1.25rem; }
.ol-lightbox__prev  { left: 1rem;  top: 50%; transform: translateY(-50%); }
.ol-lightbox__next  { right: 1rem; top: 50%; transform: translateY(-50%); }
@media (min-width: 768px) {
  .ol-lightbox__close { top: 1.5rem; right: 1.5rem; }
  .ol-lightbox__prev  { left: 2rem; }
  .ol-lightbox__next  { right: 2rem; }
}

body.ol-no-scroll { overflow: hidden; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #27272A; border-radius: 3px; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-left, .reveal-right {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .ol-card { transition: none; }
  .ol-card:hover { transform: none; }
  .ol-gallery__card {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .ol-gallery__card img { transition: none; }
  .ol-gallery__card:hover img,
  .ol-gallery__card:focus-visible img { transform: none; }
  .ol-gallery__spinner { animation: none; }
}
