/* ==========================================================================
   D. SAMEER — CINEMATIC INTRO & BRAND PRELOADER STYLESHEET
   Hardware-Accelerated 60fps Animation Overlay (Stages 1 - 3)
   ========================================================================== */

/* Exact Font Assets for Intro & Signature */
@font-face {
  font-family: 'Autography';
  src: url('../assets/fonts/Autography.woff') format('woff'),
    url('../assets/fonts/Autography.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-black: #000000;
  --color-charcoal: #111111;
  --color-white: #ffffff;
  --color-offwhite: #f5f5f5;
  --color-orange: #FC5B11;
  --color-paper: #E6E4DD;
  --color-grey: #CACACA;
  --color-gray: #666666;
  --font-primary: 'Space Grotesk', sans-serif;
  --font-display: 'Bebas Neue', 'Anton', sans-serif;
  --font-serif: 'Cinzel', serif;
  --font-script: 'Autography', cursive;
  --font-sans: 'Inter', sans-serif;
  --font-marquee: 'Bebas Neue', 'Anton', sans-serif;
}

/* ==========================================================================
   SCROLLER DISABLE & REMOVAL (During Loading Animation)
   Completely removes the scrollbar and locks page scroll until curtain reveal
   ========================================================================== */
html.intro-active,
html.intro-active body {
  overflow: hidden !important;
  height: 100% !important;
  height: 100vh !important;
  max-height: 100vh !important;
  touch-action: pan-y;
  scrollbar-width: none !important; /* Firefox */
  -ms-overflow-style: none !important; /* IE/Edge */
}

html.intro-active::-webkit-scrollbar,
html.intro-active body::-webkit-scrollbar {
  display: none !important; /* Chrome, Safari, Edge */
  width: 0 !important;
  height: 0 !important;
}

/* Intro Bypassed State (for returning visitors / direct anchors) */
html.intro-bypassed #intro-stage-wrapper,
html.intro-bypassed #curtain-wipe {
  display: none !important;
}

/* Master Intro Wrapper (Overlay fixed across full screen) */
#intro-stage-wrapper {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99990;
  overflow: hidden;
  background-color: var(--color-black);
}

/* Hardware accelerated layer default */
.gpu-accel {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Interactive Custom Cursor during Intro */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  background-color: var(--color-orange);
  border-radius: 50%;
  pointer-events: none;
  z-index: 999999;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: width 0.2s, height 0.2s, background-color 0.2s, opacity 0.2s;
}

.custom-cursor.active {
  width: 32px;
  height: 32px;
  background-color: rgba(252, 91, 17, 0.4);
}

/* ==========================================================================
   STAGE 1: PRELOADER (Cursive handwriting "sameer")
   ========================================================================== */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--color-black);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  overflow: hidden;
}

.intro-word-container {
  position: relative;
  width: clamp(260px, 22vw, 360px);
  aspect-ratio: 292 / 40;
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro-word-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  display: block;
}

.intro-img-base {
  width: 100%;
  height: 100%;
  opacity: 1;
}

.intro-img-fill {
  width: 100%;
  height: 100%;
  will-change: opacity;
}

/* ==========================================================================
   STAGE 2: D EMBLEM & MORPH CONTAINER
   ========================================================================== */
#d-stage-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background-color: transparent;
}

.d-emblem-box {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(260px, 25.5vw, 360px);
  aspect-ratio: 348 / 355;
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center center;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform, top, left, width;
}

.d-svg-shape {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.15));
}

.d-svg-shape path {
  fill: var(--color-black);
}

.d-cursive-text {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 84%;
  aspect-ratio: 292 / 40;
  transform: translate(-50%, -50%);
  background-image: url('../assets/sameer_white.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 2;
  pointer-events: none;
}

/* ==========================================================================
   STAGE 3: HERO SECTION OVERLAY
   ========================================================================== */
#hero-section {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  background-color: var(--color-white);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  z-index: 10;
}

.hero-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
}

.hero-signature-wrap {
  position: absolute;
  top: clamp(6vh, 9vh, 12vh);
  left: 50%;
  transform: translateX(-50%);
  width: clamp(340px, 41vw, 580px);
  aspect-ratio: 570 / 214;
  z-index: 25;
  pointer-events: none;
  opacity: 0;
  will-change: opacity;
}

.hero-signature-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.hero-portrait-wrap {
  position: relative;
  height: clamp(520px, 82vh, 780px);
  width: auto;
  aspect-ratio: 432 / 578;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transform: translateY(40px);
  opacity: 0;
  will-change: transform, opacity;
}

.hero-portrait-wrap .hero-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  user-select: none;
  -webkit-user-drag: none;
}

.hoodie-anchor {
  position: absolute;
  top: 44.6%;
  left: 54.2%;
  width: 21.1%;
  aspect-ratio: 348 / 355;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
}

.hero-marquee-wrap {
  position: absolute;
  bottom: clamp(1vh, 3.5vh, 6vh);
  left: 0;
  width: 100%;
  z-index: 15;
  background: transparent;
  overflow: hidden;
  white-space: nowrap;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(30px);
  will-change: transform, opacity;
}

.marquee-track {
  display: flex;
  width: max-content;
  background: transparent;
  will-change: transform;
}

.marquee-text {
  font-family: var(--font-marquee);
  font-size: clamp(5.5rem, 15vw, 12rem);
  line-height: 0.82;
  font-weight: normal;
  color: var(--color-black);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: transparent;
  filter: none;
  user-select: text;
  -webkit-user-select: text;
  cursor: text;
  padding-right: 0.05em;
  transition: color 0.4s ease;
}

.hero-marquee-wrap:hover .marquee-text {
  color: #111111;
}

.hero-scroll-pill {
  position: absolute;
  bottom: 1.5rem;
  right: 3.5rem;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 1.4rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--color-grey);
  border-radius: 50px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  will-change: transform, opacity;
}

.hero-scroll-pill:hover {
  background: var(--color-black);
  border-color: var(--color-black);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.hero-scroll-pill:hover span {
  color: var(--color-white);
}

.hero-scroll-pill:hover svg path {
  stroke: var(--color-orange);
}

.hero-scroll-pill span {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-black);
  transition: color 0.3s ease;
}

.hero-scroll-pill svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s ease;
}

.hero-scroll-pill:hover svg {
  transform: translateY(3px);
}

/* ==========================================================================
   STAGE 4: STAGGERED BLOCK SLIDE CURTAIN
   ========================================================================== */
#curtain-wipe {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  display: flex;
  pointer-events: none;
}

.curtain-col {
  flex: 1;
  height: 100%;
  background-color: var(--color-charcoal);
  will-change: transform;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-scroll-pill {
    right: 1.5rem;
    bottom: 1rem;
    padding: 0.5rem 1rem;
  }
}
