/* ==========================================================================
   BlackCap — premium editorial redesign (Library)
   Custom layer on top of Tailwind (utilities handle layout; this file
   handles brand type, motion, and the few effects Tailwind can't express).
   ========================================================================== */

:root{
  --ink:        #0b0b0c;
  --ink-2:      #141416;
  --ink-3:      #1c1c1f;
  --paper:      #faf9f6;
  --paper-2:    #f1efea;
  --gold:       #c9a227;
  --gold-light: #e8cd73;
  --gold-dim:   #8a6e1e;
  --ease-out:   cubic-bezier(.16,1,.3,1);
  --ease-in-out: cubic-bezier(.65,0,.35,1);
}

*{ -webkit-tap-highlight-color: transparent; }

html{
  scroll-behavior: smooth;
}

body{
  background: var(--paper);
  font-feature-settings: "ss01" 1, "cv01" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ---------- Selection & scrollbar ---------- */
::selection{ background: var(--gold); color: #0b0b0c; }

html{ scrollbar-width: thin; scrollbar-color: var(--gold-dim) transparent; }
::-webkit-scrollbar{ width: 10px; height: 10px; }
::-webkit-scrollbar-track{ background: transparent; }
::-webkit-scrollbar-thumb{ background: rgba(201,162,39,.35); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover{ background: rgba(201,162,39,.6); background-clip: padding-box; }

/* ---------- Typography ---------- */
.font-display{ font-family: "Fraunces", "Iowan Old Style", ui-serif, Georgia, serif; }
.font-sans{ font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }

h1, h2, h3, .font-display{ letter-spacing: -0.01em; }

.text-balance{ text-wrap: balance; }

.rule-gold{
  display: inline-block;
  width: 2.25rem;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.eyebrow{
  font-family: "Inter", sans-serif;
  font-size: .75rem;
  letter-spacing: .28em;
  font-weight: 600;
  text-transform: uppercase;
}

/* ---------- Scroll reveal ---------- */
[data-reveal]{
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal].is-visible{
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce){
  [data-reveal]{ opacity: 1; transform: none; transition: none; }
}

/* ---------- Links ---------- */
.link-underline{
  background-image: linear-gradient(var(--gold), var(--gold));
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 1px;
  transition: background-size .5s var(--ease-out);
}
.link-underline:hover{ background-size: 100% 1px; }

/* ---------- Decorative glows ---------- */
.glow{
  position: absolute;
  border-radius: 999px;
  filter: blur(90px);
  pointer-events: none;
}

.float-slow{ animation: float 9s ease-in-out infinite; }
.float-slower{ animation: float 13s ease-in-out infinite; }
.float-slowest{ animation: float 17s ease-in-out infinite; }
@keyframes float{
  0%, 100%{ transform: translate3d(0,0,0); }
  50%{ transform: translate3d(0,-22px,0); }
}

/* ---------- Custom cursor dot (desktop only) ---------- */
#cursor-dot{
  position: fixed;
  top: 0; left: 0;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--gold);
  pointer-events: none;
  z-index: 999;
  transform: translate3d(-50%,-50%,0);
  transition: width .3s var(--ease-out), height .3s var(--ease-out), opacity .3s;
  mix-blend-mode: difference;
  opacity: 0;
}
#cursor-dot.is-active{ opacity: 1; }
#cursor-dot.is-hover{ width: 44px; height: 44px; background: rgba(201,162,39,.35); }

@media (hover: none){
  #cursor-dot{ display: none; }
}

/* ---------- Utility ---------- */
.display-tight{ line-height: .96; }

/* ---------- Focus states (accessibility) ---------- */
a:focus-visible, button:focus-visible{
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ==========================================================================
   Library — video marquee wall
   ========================================================================== */

/* ---------- Marquee (draggable, auto-scrolling) ----------
   Real horizontally-scrollable containers — a finger or the mouse can
   grab and drag them along the exact same path the automatic motion
   uses. main.js drives the idle auto-scroll (rAF + scrollLeft, not a
   CSS transform) and pauses it on interaction / while a video plays.
   Deliberately NOT a transform-animated track: a transformed ancestor
   constrains the Fullscreen API to that ancestor's box instead of the
   real viewport. */
.marquee-viewport{
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  touch-action: pan-x pan-y;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee-viewport::-webkit-scrollbar{ display: none; }
.marquee-viewport.is-dragging{
  cursor: grabbing;
  user-select: none;
}
.marquee-viewport.is-dragging .video-card{ pointer-events: none; }

.marquee-track{
  display: flex;
  align-items: flex-start;
  width: max-content;
}

/* ---------- Video card ---------- */
.video-card{
  position: relative;
  flex-shrink: 0;
  border-radius: 1.1rem;
  overflow: hidden;
  background: #050505;
  box-shadow: 0 24px 48px -24px rgba(0,0,0,.55);
  transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out);
}
.video-card:hover{
  box-shadow: 0 34px 64px -20px rgba(0,0,0,.65);
}
.video-card:not(.has-embed):hover{
  transform: translateY(-6px);
}
/* Once a video is embedded, never apply a transform to this card again —
   a transformed ancestor breaks the Fullscreen API. */
.video-card.has-embed{ transform: none !important; }

.video-card-media{
  position: relative;
  width: 100%;
  height: 100%;
}
.video-card-media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1.2s var(--ease-out), filter .6s var(--ease-out);
  -webkit-user-drag: none;
  user-select: none;
}
.video-card:not(.has-embed):hover .video-card-media img{
  transform: scale(1.045);
  filter: brightness(.82);
}
.video-card-media iframe{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-card-scrim{
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,.7) 100%);
  pointer-events: none;
  transition: opacity .5s var(--ease-out);
}
.video-card.has-embed .video-card-scrim{ opacity: 0; }

/* The play button is a one-shot trigger: tap it once, it disappears
   for good, and Vimeo's own controls (play/pause/scrub/volume/
   fullscreen) — visible underneath from the start — become the only
   way to control playback. Nothing custom is ever layered on top of
   them again, so there's never anything for the native bar to fight
   for clicks with. */
.video-card-play{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 0;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
  z-index: 2;
}

.video-card-play-ring{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: rgba(250,249,246,.14);
  border: 1px solid rgba(250,249,246,.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transform: scale(.88);
  transition: transform .5s var(--ease-out), background-color .5s var(--ease-out), border-color .5s var(--ease-out);
}
.video-card:hover .video-card-play-ring{
  transform: scale(1);
  background: var(--gold);
  border-color: var(--gold);
}
.video-card-play-ring svg{
  width: 1.05rem;
  height: 1.05rem;
  color: #faf9f6;
  margin-left: 2px;
  transition: color .5s var(--ease-out);
}
.video-card:hover .video-card-play-ring svg{ color: #0b0b0c; }

/* ---------- Mobile swipe hint ----------
   A small, elegant nudge shown only on phones/tablets, letting people
   know the rows drag sideways. Dismissed for good (this page load)
   the moment someone actually touches a row — see main.js. */
#swipe-hint{
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
}
#swipe-hint.is-dismissed{
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}
.swipe-hint-icon{
  animation: swipe-hint-move 1.8s ease-in-out infinite;
}
@keyframes swipe-hint-move{
  0%, 100%{ transform: translateX(-3px); }
  50%{ transform: translateX(3px); }
}
@media (prefers-reduced-motion: reduce){
  .swipe-hint-icon{ animation: none; }
}
