/* ========================================
   SHARED STAGE LAYOUT & VARIABLES
   ======================================== */

/* Bebas Neue is now loaded via the single consolidated Google Fonts <link>
   enqueued in included/enqueue.php (handle: offart-fonts). The old render-blocking
   @import that lived here was the top LCP offender (~1.5s serialized critical chain). */

/* A11y: screen-reader-only fallback (also defined in a11y.css) */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

:root {
  --bg: #050505;
  --text: #ffffff;
  --dim: rgba(255, 255, 255, 0.4);
  --surface: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.1);
  --accent: #c9a84c;
  --accent-cool: #7b93a8;
  --holo-cyan: #00f3ff;
  --holo-red: #ff3b3b;
  --font-head: "Bebas Neue", "Audiowide", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-tech: "Rajdhani", sans-serif;
  --ease-smooth: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Base Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body,
html {
  height: 100% !important;
  overflow: hidden !important;
  background: var(--bg) !important;
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* ========================================
   OVERRIDE ASTRA / ELEMENTOR WRAPPERS
   These add white backgrounds AND dark text color
   ======================================== */
.site-content,
.ast-container,
#content,
.entry-content,
.elementor,
.elementor-page,
.elementor-location-single,
.elementor-location-archive,
.page-template-homepage {
  background: var(--bg) !important;
  color: var(--text) !important;
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
}

/* Keep site header visible; hide only footer on homepage stage system */
.site-footer,
.site-below-footer-wrap {
  display: none !important;
}

/* Remove Astra content wrappers spacing + force white text */
.ast-separate-container .ast-article-single,
.ast-separate-container .ast-article-post,
.ast-page-builder-template .site-content > .ast-container {
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  color: var(--text) !important;
}

/* Prevent parent stacking context issues with position:fixed */
#page,
.hfeed,
.site {
  overflow: visible !important;
  transform: none !important;
  will-change: auto !important;
  color: var(--text) !important;
}

/* Remove any content area padding */
.site-main,
#primary {
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
}

/* Kill Astra breadcrumbs if present */
.ast-breadcrumbs-wrapper {
  display: none !important;
}

/* Noise texture overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  opacity: 0.025;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px;
}

/* ========================================
   STAGES CONTAINER
   ======================================== */
#stages-viewport {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  will-change: transform, opacity;
  overflow: hidden;
  padding-bottom: 100px; /* Space for dock */
}

.stage.active {
  opacity: 1;
  visibility: visible;
}

/* Ensure white text inheritance inside stages */
.stage {
    color: var(--text);
}

/* Mobile: prevent header overlap (Astra header ~60px) */
@media (max-width: 768px) {
    .stage {
        padding-top: 60px;
    }
}

/* ========================================
   STAGE PROGRESS DOTS — Right side
   ======================================== */
.stage-progress {
    position: fixed;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 8999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

/* Connecting line behind dots */
.stage-progress::before {
    content: '';
    position: absolute;
    top: 6px;
    bottom: 6px;
    width: 1px;
    background: rgba(255, 255, 255, 0.06);
    z-index: 0;
}

.stage-dot {
    appearance: none;
    -webkit-appearance: none;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    color: inherit;
    /* WCAG 2.5.8: real 24x24 tap target. The visible dot is drawn by ::before so the
       target can be large while the dot stays small. (Was an 8px button = failing target.) */
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    z-index: 1;
    margin: 2px 0;
}

/* Visible dot — the actual clickable target is the 24x24 .stage-dot button around it */
.stage-dot::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.4s var(--ease-smooth);
}

.stage-dot:hover::before {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.4);
}

.stage-dot.active::before {
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(201, 168, 76, 0.45),
                0 0 4px rgba(201, 168, 76, 0.8);
}

.stage-dot.active:hover::before {
    transform: scale(1.3);
}

/* Stage label tooltip on hover */
.stage-dot::after {
    content: attr(data-label);
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%) translateX(4px);
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 4px 10px;
    font-family: var(--font-tech);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
}

.stage-dot:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.stage-dot.active::after {
    color: var(--accent);
}

/* ========================================
   GESTURE HINT — Scroll / Swipe indicator
   ======================================== */
.stage-gesture-hint {
    position: fixed;
    bottom: 75px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 8998;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
}

.stage-gesture-hint.visible {
    opacity: 1;
}

/* Hide on last stage */
.stage-gesture-hint.at-end {
    display: none;
}

.gesture-chevrons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.gesture-chevron {
    width: 18px;
    height: 18px;
    border-right: 2px solid rgba(255, 255, 255, 0.45);
    border-bottom: 2px solid rgba(255, 255, 255, 0.45);
    transform: rotate(45deg);
    animation: gestureFloat 2.2s ease-in-out infinite;
}

.gesture-chevron:nth-child(2) {
    margin-top: -8px;
    opacity: 0.5;
    animation-delay: 0.25s;
}

@keyframes gestureFloat {
    0%, 100% {
        transform: rotate(45deg) translateY(0);
        opacity: 0.35;
    }
    50% {
        transform: rotate(45deg) translateY(5px);
        opacity: 0.85;
    }
}

.gesture-text {
    font-family: var(--font-tech);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

/* Hide old hero-scroll-hint (replaced by global gesture hint) */
.hero-scroll-hint {
    display: none !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .stage-progress {
        right: 10px;
    }

    .stage-dot {
        /* keep the 24x24 tap target on mobile; only the visible dot shrinks */
        width: 24px;
        height: 24px;
        margin: 0;
    }

    .stage-dot::before {
        width: 6px;
        height: 6px;
    }

    .stage-dot.active::before {
        width: 8px;
        height: 8px;
    }

    /* No tooltip on mobile */
    .stage-dot::after {
        display: none;
    }

    .stage-gesture-hint {
        bottom: 65px;
    }

    .gesture-chevron {
        width: 16px;
        height: 16px;
    }

    .gesture-text {
        font-size: 11px;
        letter-spacing: 3px;
        color: rgba(255, 255, 255, 0.55);
    }
}

/* ========================================
   KEEP SCROLLING HINT (all stages)
   Very subtle hint at bottom
   ======================================== */
.stage-scroll-hint {
    position: absolute;
    bottom: 200px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-tech);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    pointer-events: none;
    z-index: 100;
}

@media (max-width: 1024px) {
    .stage-scroll-hint {
        bottom: 200px;
        font-size: 11px;
        letter-spacing: 2px;
    }
}
