/* ═══════════════════════════════════════════════════════════
   MED-LINE — Award Layer · award.css
   Custom cursor · Page transitions · Scroll progress
   Grain texture · Magnetic buttons · Split text · Parallax
   © 2026 Stan Paraclete · stanparaclete.com
═══════════════════════════════════════════════════════════ */

/* ── Skip link ── */
.skip-link {
  position: fixed;
  top: -100%; left: 1rem;
  background: var(--navy);
  color: white;
  padding: 10px 18px;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  z-index: 99999;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* ── Page transition overlay ── */
#page-transition {
  position: fixed;
  inset: 0;
  background: var(--navy);
  z-index: 99998;
  pointer-events: none;
  transform: scaleY(0);
  transform-origin: bottom;
}
#page-transition.entering {
  transform: scaleY(1);
  transform-origin: bottom;
  transition: transform 0.55s cubic-bezier(0.76, 0, 0.24, 1);
  pointer-events: all;
}
#page-transition.leaving {
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.55s cubic-bezier(0.76, 0, 0.24, 1);
}

/* ── Scroll progress bar ── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--gold);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ── Custom cursor ── */
#cursor-dot,
#cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 99997;
  mix-blend-mode: exclusion;
  will-change: transform;
}
#cursor-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: white;
  transform: translate(-50%, -50%);
}
#cursor-ring {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.55);
  transform: translate(-50%, -50%) scale(1);
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.18s,
              width 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
/* Cursor states */
body.cursor-hover #cursor-ring {
  width: 60px; height: 60px;
  border-color: rgba(166, 124, 58, 0.8);
}
body.cursor-link #cursor-ring {
  width: 48px; height: 48px;
  border-color: rgba(255,255,255,0.9);
}
body.cursor-image #cursor-ring {
  width: 72px; height: 72px;
  border-color: rgba(166, 124, 58, 0.6);
}
/* Hide system cursor on desktop */
@media (pointer: fine) {
  html, body { cursor: none; }
  a, button, [role="button"], input, select, textarea, label {
    cursor: none;
  }
}

/* ── Grain texture overlay ── */
#grain {
  position: fixed;
  inset: 0;
  z-index: 99996;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  animation: grainShift 0.5s steps(1) infinite;
}
@keyframes grainShift {
  0%   { background-position: 0 0; }
  10%  { background-position: -50px -25px; }
  20%  { background-position: -100px -50px; }
  30%  { background-position: 50px 100px; }
  40%  { background-position: -100px 50px; }
  50%  { background-position: -200px 0px; }
  60%  { background-position: -50px 200px; }
  70%  { background-position: 100px 50px; }
  80%  { background-position: 50px 0px; }
  90%  { background-position: 200px -100px; }
  100% { background-position: 0 0; }
}

/* ── GSAP Reveal helpers ── */
.gsap-reveal {
  opacity: 0;
  transform: translateY(40px);
  will-change: opacity, transform;
}
.gsap-reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  will-change: opacity, transform;
}
.gsap-reveal-right {
  opacity: 0;
  transform: translateX(40px);
  will-change: opacity, transform;
}
.gsap-reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  will-change: opacity, transform;
}

/* ── Split-text chars ── */
.char-wrap { overflow: hidden; display: inline-block; vertical-align: bottom; }
.char {
  display: inline-block;
  will-change: transform, opacity;
  transform: translateY(110%);
  opacity: 0;
}
.char.revealed {
  transform: translateY(0%);
  opacity: 1;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.5s ease;
}

/* ── Magnetic button ── */
.magnetic {
  position: relative;
  display: inline-block;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.magnetic-inner {
  position: relative;
  display: inline-block;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

/* ── Hero parallax ── */
.hero-portrait img {
  will-change: transform;
}

/* ── Image reveal (clip-path wipe) ── */
.img-reveal-wrap {
  overflow: hidden;
  position: relative;
}
.img-reveal-wrap img {
  transform-origin: center center;
  will-change: transform, clip-path;
}

/* ── Stats counter ── */
.stat-num[data-count] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.stat-num.counted {
  opacity: 1;
  transform: translateY(0);
}

/* ── Line draw on section labels ── */
.label::before {
  transform-origin: left;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.label.line-drawn::before {
  transform: scaleX(1);
}

/* ── Ticker speed on hover ── */
.ticker:hover .ticker-track {
  animation-play-state: paused;
}

/* ── Focus-visible (accessibility) ── */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ── Prefers-reduced-motion ── */
@media (prefers-reduced-motion: reduce) {
  #cursor-dot, #cursor-ring { display: none; }
  #grain { display: none; }
  .char { transform: none; opacity: 1; transition: none; }
  .char.revealed { transform: none; opacity: 1; transition: none; }
  .gsap-reveal, .gsap-reveal-left, .gsap-reveal-right, .gsap-reveal-scale {
    opacity: 1 !important;
    transform: none !important;
  }
  #page-transition { display: none; }
  .ticker-track { animation-play-state: paused; }
  .hero-portrait img { will-change: auto; }
  .magnetic { transition: none; }
}

/* ══════════════════════════════════════════════════════
   AWARD ADDITIONS — stats-band 5-col, award strip
══════════════════════════════════════════════════════ */
.stats-band[style*="repeat(5"] {
  grid-template-columns: repeat(5, 1fr) !important;
}
@media (max-width: 900px) {
  .stats-band[style*="repeat(5"] {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}
@media (max-width: 640px) {
  .stats-band[style*="repeat(5"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Award section grid inside navy section */
.section--navy .section-intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6vw;
  align-items: center;
}
@media (max-width: 900px) {
  .section--navy .section-intro-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Gallery masonry responsive */
@media (max-width: 640px) {
  .masonry-2, .masonry-3 { columns: 1 !important; }
}
@media (max-width: 900px) {
  .masonry-3 { columns: 2 !important; }
}
