/* ==========================================================================
   BlackCap — premium editorial redesign (homepage)
   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; }

/* Fine, restrained gold rule used as a section marker */
.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);
}
[data-reveal="scale"]{ transform: translateY(20px) scale(.97); }
[data-reveal="scale"].is-visible{ transform: translateY(0) scale(1); }
[data-reveal="left"]{ transform: translateX(-32px); }
[data-reveal="left"].is-visible{ transform: translateX(0); }
[data-reveal="right"]{ transform: translateX(32px); }
[data-reveal="right"].is-visible{ transform: translateX(0); }

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

/* ---------- Buttons / 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: balance widths for large display type ---------- */
.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;
}

/* ==========================================================================
   Portfolio — video marquees, lite-embed cards, team
   ========================================================================== */

/* ---------- 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, which is what broke fullscreen on the video cards. */
.marquee-viewport{
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  /* Let the browser natively handle panning in both directions — a
     finger dragging mostly sideways scrolls this row (with real
     momentum), one dragging mostly up/down scrolls the page. Limiting
     this to pan-y was fighting the horizontal overflow-x scroll on
     touch devices, which is what made dragging feel dead on mobile. */
  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 (lite-embed) ---------- */
.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, constraining it to
   that box instead of the real viewport. */
.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: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) 45%, rgba(0,0,0,.75) 100%);
  pointer-events: none;
}

.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;
}
.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; }

.video-card-caption{
  position: absolute;
  left: 1.1rem;
  bottom: .9rem;
  right: 1.1rem;
  color: #faf9f6;
  font-family: "Inter", sans-serif;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  pointer-events: none;
}

/* ---------- Team ---------- */
.team-card{
  transition: transform .6s var(--ease-out);
}
.team-photo{
  overflow: hidden;
  border-radius: 1.25rem 1.25rem 3.5rem 1.25rem;
  position: relative;
}
.team-photo img{
  transition: transform 1.2s var(--ease-out);
  filter: contrast(1.02);
}
.team-card:hover .team-photo img{
  transform: scale(1.03);
}
