/* O&Y Studio — Extra features layer
   Scroll progress bar · custom cursor · magnetic buttons · split-text reveals ·
   count-up stats · marquee tickers · work-card hover reveal · smooth section seams
*/

/* ---------- SCROLL PROGRESS ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: #fff;
  z-index: 50;
  transition: width 120ms linear;
  pointer-events: none;
  box-shadow: 0 0 8px rgba(255,255,255,0.6);
}

/* ---------- CUSTOM CURSOR ---------- */
@media (hover: hover) and (pointer: fine) {
  html.has-custom-cursor, html.has-custom-cursor * { cursor: none !important; }
  .cursor-dot, .cursor-ring {
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 9999;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
  }
  .cursor-dot {
    width: 6px; height: 6px;
    background: #fff;
    transition: transform 80ms linear, opacity 200ms linear;
  }
  .cursor-ring {
    width: 38px; height: 38px;
    border: 1px solid #fff;
    transition: width 220ms cubic-bezier(.22,.61,.36,1),
                height 220ms cubic-bezier(.22,.61,.36,1),
                background 200ms linear,
                opacity 200ms linear,
                transform 80ms linear;
  }
  .cursor-ring.hover {
    width: 64px; height: 64px;
    background: rgba(255,255,255,0.08);
  }
  .cursor-ring.click { transform: translate(-50%, -50%) scale(0.7); }
  .cursor-ring.text-mode {
    width: 6px; height: 28px;
    border-radius: 2px;
  }
}

/* ---------- MAGNETIC BUTTONS: no layout effect; transform handled by JS ---------- */
.magnetic { display: inline-block; will-change: transform; }

/* ---------- SPLIT-TEXT ---------- */
.split-text .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}
.split-text .word > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 700ms cubic-bezier(.22,.61,.36,1);
}
.split-text.in .word > span {
  transform: translateY(0);
}
/* stagger via inline --i set by JS */
.split-text.in .word > span {
  transition-delay: calc(var(--i, 0) * 60ms);
}

/* ---------- MARQUEE TICKER ---------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid #1a1a1a;
  border-bottom: 1px solid #1a1a1a;
  background: #000;
  padding: 14px 0;
  position: relative;
}
.marquee-track {
  display: flex;
  gap: 48px;
  white-space: nowrap;
  animation: marq 40s linear infinite;
  width: max-content;
}
.marquee-item {
  font-family: var(--font-serif, Georgia, serif);
  font-size: 36px;
  letter-spacing: -0.02em;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 64px;
  font-style: italic;
}
.marquee-item::after {
  content: "◇";
  color: #555;
  font-size: 36px;
  font-style: normal;
  display: inline-block;
  transform: translateY(-2px);
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marq {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- WORK-CARD HOVER REVEAL OVERLAY ---------- */
.work-card .media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 50%);
  opacity: 0;
  transition: opacity 250ms linear;
  pointer-events: none;
  z-index: 1;
}
.work-card:hover .media::after { opacity: 1; }
.work-card .view-label {
  position: absolute;
  left: 16px; bottom: 14px;
  z-index: 2;
  color: #fff;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transform: translateY(8px);
  opacity: 0;
  transition: opacity 250ms linear, transform 320ms cubic-bezier(.22,.61,.36,1);
  pointer-events: none;
}
.work-card .view-label .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #fff;
  margin-right: 8px;
  vertical-align: 1px;
}
.work-card:hover .view-label { opacity: 1; transform: translateY(0); }

/* ---------- COUNT-UP NUMBER ROW ---------- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid #1a1a1a;
  border-bottom: 1px solid #1a1a1a;
  background: #000;
}
.stat-cell {
  padding: 28px 24px;
  border-right: 1px solid #1a1a1a;
}
.stat-cell:last-child { border-right: none; }
.stat-num {
  font-family: var(--font-serif, Georgia, serif);
  font-size: 48px;
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.stat-num .suffix { color: #888; font-size: 28px; vertical-align: 4px; }
.stat-label {
  margin-top: 8px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #888;
}

/* ---------- NOISE + GRAIN OVERLAY (subtle texture) ---------- */
.grain {
  pointer-events: none;
  position: fixed; inset: 0; z-index: 3;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------- SECTION DIVIDER — animated line ---------- */
.seam {
  height: 1px;
  background: #1a1a1a;
  position: relative;
  overflow: hidden;
}
.seam::before {
  content: "";
  position: absolute;
  top: 0; left: -30%;
  height: 1px;
  width: 30%;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  animation: seam-scan 5s ease-in-out infinite;
}
@keyframes seam-scan {
  0%, 100% { left: -30%; }
  50%      { left: 100%; }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  .marquee-track, .seam::before, .split-text .word > span,
  .cursor-dot, .cursor-ring {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
  html.has-custom-cursor, html.has-custom-cursor * { cursor: auto !important; }
  .cursor-dot, .cursor-ring { display: none; }
}
