/* 
 * WordRunner Video Explainer - Style Guide & Layout Utility 
 * Based on VIDEO_BRIEF.md — Revised with SVG icons, improved readability, and polish
 */

:root {
    /* Core Colours */
    --color-void-black: #0d0e15;
    --color-neon-cyan: #00e5ff;
    --color-neon-pink: #ff00ff;
    --color-neon-purple: #b026ff;
    --color-tyrell-amber: #ffb300;
    --color-neon-green: #39ff14;
    --color-signal-red: #ff003c;
    --color-white: #ffffff;
    --color-grey: #64748b;
    --color-dark-panel: rgba(13, 14, 21, 0.8);

    /* Gradients */
    --grad-primary: linear-gradient(135deg, var(--color-neon-cyan), var(--color-neon-purple));

    /* Typography */
    --font-display: 'Orbitron', sans-serif;
    --font-ui: 'Share Tech Mono', monospace;

    /* Glows */
    --glow-cyan-subtle: 0 0 10px rgba(0, 229, 255, 0.5), 0 0 20px rgba(0, 229, 255, 0.3);
    --glow-cyan-strong: 0 0 20px rgba(0, 229, 255, 0.8), 0 0 40px rgba(0, 229, 255, 0.6), 0 0 80px rgba(0, 229, 255, 0.4), 0 0 120px rgba(0, 229, 255, 0.2);
    --glow-red-signal: 0 0 15px rgba(255, 0, 60, 0.9), 0 0 30px rgba(255, 0, 60, 0.5);
    --glow-red-strong: 0 0 20px rgba(255, 0, 60, 1), 0 0 50px rgba(255, 0, 60, 0.6), 0 0 100px rgba(255, 0, 60, 0.3);
    --glow-green-success: 0 0 15px rgba(57, 255, 20, 0.8), 0 0 30px rgba(57, 255, 20, 0.4);
    --glow-green-strong: 0 0 20px rgba(57, 255, 20, 0.8), 0 0 40px rgba(57, 255, 20, 0.6), 0 0 80px rgba(57, 255, 20, 0.4);
    --glow-purple: 0 0 15px rgba(176, 38, 255, 0.8), 0 0 30px rgba(176, 38, 255, 0.5);

    /* Spacing Variables - Scaled Up for 1080p Canvas */
    --s-xs: 1rem;
    --s-sm: 2rem;
    --s-md: 3rem;
    --s-lg: 5rem;
    --s-xl: 8rem;
}

/* Base Video Container Setup */
.video-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: var(--color-void-black);
    position: relative;
    overflow: hidden;
    font-family: var(--font-ui);
}

/* The Fixed Resolution Inner Canvas */
#vid-canvas {
    width: 1920px;
    height: 1080px;
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: top left;
    /* Grid Background Effect on Canvas */
    background-image:
        linear-gradient(to right, rgba(0, 229, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 229, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* CRT Scanline Overlay - Reduced intensity for readability */
.video-container::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.12) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    z-index: 20;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

/* ========================
   SCENE COUNTER
   ======================== */
.vid-scene-counter {
    position: absolute;
    top: 2rem;
    right: 3rem;
    z-index: 12;
    font-family: var(--font-ui);
    font-size: 1.8rem;
    color: var(--color-grey);
    letter-spacing: 0.1em;
    opacity: 0;
    pointer-events: none;
}

.vid-scene-counter span {
    color: var(--color-neon-cyan);
    text-shadow: var(--glow-cyan-subtle);
}

/* ========================
   GLITCH TRANSITION OVERLAY
   ======================== */
.vid-glitch-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    background: repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(0, 229, 255, 0.1) 2px,
            rgba(0, 229, 255, 0.1) 4px);
    mix-blend-mode: screen;
}

@keyframes glitchSlice {
    0% {
        clip-path: inset(0 0 100% 0);
    }

    20% {
        clip-path: inset(20% 0 60% 0);
    }

    40% {
        clip-path: inset(40% 0 20% 0);
    }

    60% {
        clip-path: inset(60% 0 10% 0);
    }

    80% {
        clip-path: inset(10% 0 80% 0);
    }

    100% {
        clip-path: inset(0 0 0 0);
    }
}

/* ========================
   RADIAL GLOW (Scene 1)
   ======================== */
.vid-radial-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.08) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: -1;
}

/* Layout Utilities */
.vid-scene {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    visibility: hidden;
    /* GSAP will control this */
}

/* Display overlay over scenes initially */
#vid-play-overlay {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 14, 21, 0.85);
    backdrop-filter: blur(4px);
}

#vid-play-btn {
    background: transparent;
    border: 2px solid var(--color-neon-cyan);
    color: var(--color-white);
    padding: 2rem 4rem;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: var(--glow-cyan-subtle);
    transition: all 0.3s ease;
    z-index: 51;
}

#vid-play-btn:hover {
    background: rgba(0, 229, 255, 0.1);
    box-shadow: var(--glow-cyan-strong);
    transform: scale(1.05);
}

.vid-play-icon {
    font-size: 4rem;
    color: var(--color-neon-cyan);
}


.flex-row {
    display: flex;
    flex-direction: row;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-wrap {
    flex-wrap: wrap;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.align-start {
    align-items: flex-start;
}

.gap-xs {
    gap: var(--s-xs);
}

.gap-sm {
    gap: var(--s-sm);
}

.gap-md {
    gap: var(--s-md);
}

.gap-lg {
    gap: var(--s-lg);
}

.gap-xl {
    gap: var(--s-xl);
}

.mt-xs {
    margin-top: var(--s-xs);
}

.mt-sm {
    margin-top: var(--s-sm);
}

.mt-md {
    margin-top: var(--s-md);
}

.mt-lg {
    margin-top: var(--s-lg);
}

.mt-xl {
    margin-top: var(--s-xl);
}

.mb-xs {
    margin-bottom: var(--s-xs);
}

.mb-sm {
    margin-bottom: var(--s-sm);
}

.mb-md {
    margin-bottom: var(--s-md);
}

.mb-xl {
    margin-bottom: var(--s-xl);
}

.p-sm {
    padding: var(--s-sm);
}

.p-md {
    padding: var(--s-md);
}

.p-lg {
    padding: var(--s-lg);
}

.p-xl {
    padding: var(--s-xl);
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.w-1-2 {
    width: 50%;
}

.w-3-4 {
    width: 75%;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.opacity-0 {
    opacity: 0;
}

.text-center {
    text-align: center;
}

/* transform utilities for initial positions */
.transl-x-100 {
    transform: translateX(100px);
}

.transl-x-minus {
    transform: translateX(-50px);
}

/* Larger slide distance for 1920p canvas */
.transl-x-far-minus {
    transform: translateX(-200px);
}

.transl-y-plus {
    transform: translateY(50px);
}

.transl-y-minus {
    transform: translateY(-50px);
}

.scale-50 {
    transform: scale(0.5);
}

.scale-150 {
    transform: scale(1.5);
}

/* Typography Classes */
.vid-headline {
    font-family: var(--font-display);
    text-transform: uppercase;
    color: var(--color-white);
    line-height: 1.2;
}

.vid-body {
    font-family: var(--font-ui);
    line-height: 1.5;
}

/* Colors */
.vid-text-cyan {
    color: var(--color-neon-cyan);
    text-shadow: var(--glow-cyan-subtle);
}

.text-white {
    color: var(--color-white);
}

.text-grey {
    color: var(--color-grey);
}

.text-green {
    color: var(--color-neon-green);
    text-shadow: var(--glow-green-success);
}

.text-amber {
    color: var(--color-tyrell-amber);
}

.vid-text-gradient {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Sizes - Scaled Up for 1080p Canvas */
.text-xs {
    font-size: 1.2rem;
}

.text-sm {
    font-size: 1.5rem;
}

.text-md {
    font-size: 2.2rem;
}

.text-lg {
    font-size: 3rem;
}

.text-xl {
    font-size: 4rem;
}

.text-xxl {
    font-size: 6rem;
}

.text-3xl {
    font-size: 8rem;
}

.text-4xl {
    font-size: 10rem;
}

.tracking-wide {
    letter-spacing: 0.1em;
}

.tracking-normal {
    letter-spacing: normal;
}

.text-shadow-purple {
    filter: drop-shadow(0 0 15px rgba(176, 38, 255, 0.8));
}

.text-shadow-none {
    filter: none !important;
}

/* UI Component Elements */
.vid-panel {
    border: 1px solid var(--color-neon-cyan);
    background: var(--color-dark-panel);
    box-shadow: var(--glow-cyan-subtle);
    border-radius: 4px;
}

.border-green {
    border-color: var(--color-neon-green) !important;
}

.glow-green {
    box-shadow: var(--glow-green-success) !important;
}

.glow-green-subtle {
    box-shadow: 0 0 5px rgba(57, 255, 20, 0.5), 0 0 10px rgba(57, 255, 20, 0.3) !important;
}

.border-grey {
    border: 1px solid var(--color-grey);
}

.bg-black-70 {
    background: rgba(13, 14, 21, 0.7);
}

.rounded {
    border-radius: 8px;
}

.vid-blinking-cursor::after {
    content: '|';
    animation: blink 1s step-end infinite;
    color: var(--color-neon-cyan);
    text-shadow: var(--glow-cyan-strong);
    margin-left: 2px;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* ========================
   SVG ICON WRAPPER
   ======================== */
.vid-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
}

.vid-icon-wrap svg {
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.15));
}

/* Scene Specific Styles */
.vid-scene-bottom {
    position: absolute;
    bottom: 10%;
    left: 0;
    right: 0;
}

/* ========================
   SCENE 2 - Problem Icons
   ======================== */
.vid-problem-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 320px;
    padding: 2.5rem;
    border: 1px solid var(--color-grey);
    border-radius: 8px;
    background: rgba(13, 14, 21, 0.5);
    transition: all 0.3s;
}

/* ========================
   SCENE 3 - Discipline Icons with Accent Colours
   ======================== */
.vid-discipline-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 250px;
    padding: 2rem;
    background: var(--color-dark-panel);
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 8px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

/* Accent colour variants */
.vid-disc-cyan {
    border-color: rgba(0, 229, 255, 0.4);
}

.vid-disc-amber {
    border-color: rgba(255, 179, 0, 0.4);
}

.vid-disc-pink {
    border-color: rgba(255, 0, 255, 0.4);
}

.vid-disc-purple {
    border-color: rgba(176, 38, 255, 0.4);
}

.vid-disc-green {
    border-color: rgba(57, 255, 20, 0.4);
}

/* ========================
   SCENE 5 - Dark Document (replaces white card)
   ======================== */
.vid-doc-dark {
    width: 280px;
    height: 380px;
    background: var(--color-dark-panel);
    border: 1px solid var(--color-neon-cyan);
    box-shadow: var(--glow-cyan-subtle);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

#s5-cards {
    width: 550px;
}

/* Styled APPROVED stamp */
.vid-stamp {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--color-neon-green);
    text-shadow: var(--glow-green-success);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    border: 2px solid var(--color-neon-green);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
}

/* ========================
   SCENE 6 - Shield & Trust
   ======================== */
.vid-shield-container {
    width: 350px;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.vid-shield-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 20px rgba(0, 229, 255, 0.3));
}

.vid-orbit-container {
    position: absolute;
    width: 750px;
    height: 750px;
    border-radius: 50%;
    border: 1px solid rgba(0, 229, 255, 0.15);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.05), inset 0 0 15px rgba(0, 229, 255, 0.03);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.vid-badge {
    position: absolute;
    background: var(--color-dark-panel);
    border: 1px solid var(--color-neon-cyan);
    padding: 1.25rem 2.5rem;
    font-size: 1.8rem;
    border-radius: 40px;
    font-family: var(--font-ui);
    color: var(--color-white);
    white-space: nowrap;
    box-shadow: var(--glow-cyan-subtle);
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.vid-badge-icon {
    flex-shrink: 0;
}

/* 4 badge positions (reduced from 6) */
.badge-p1 {
    top: 0%;
    left: 50%;
}

.badge-p2 {
    top: 50%;
    left: 100%;
}

.badge-p3 {
    top: 100%;
    left: 50%;
}

.badge-p4 {
    top: 50%;
    left: 0%;
}

/* ========================
   SCENE 7 - CTA
   ======================== */
.vid-btn {
    font-family: var(--font-display);
    font-size: 2.5rem;
    padding: 1.5rem 4rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
}

.vid-btn-primary {
    background: var(--grad-primary);
    color: var(--color-white);
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

/* Pulsing CTA glow */
.vid-btn-pulse {
    animation: ctaPulse 2s ease-in-out infinite;
}

@keyframes ctaPulse {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(0, 229, 255, 0.3), 0 0 20px rgba(176, 38, 255, 0.2);
    }

    50% {
        box-shadow: 0 0 25px rgba(0, 229, 255, 0.6), 0 0 50px rgba(176, 38, 255, 0.4);
    }
}

/* ========================
   PROGRESS BAR - Increased size & glow
   ======================== */
#vid-progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 15;
}

#vid-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--color-neon-cyan);
    box-shadow: var(--glow-cyan-subtle), 0 0 8px rgba(0, 229, 255, 0.4);
}

/* ========================
   FULLSCREEN MODE
   ======================== */
.video-container:fullscreen,
.video-container:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    aspect-ratio: unset;
    background: var(--color-void-black);
}

/* ========================
   CLOSE / EXIT BUTTON
   ======================== */
.vid-close-btn {
    display: none;
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 60;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--color-neon-cyan);
    border-radius: 50%;
    background: rgba(13, 14, 21, 0.8);
    color: var(--color-neon-cyan);
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: var(--glow-cyan-subtle);
    transition: background 0.2s, box-shadow 0.2s;
}

.vid-close-btn:hover,
.vid-close-btn:focus-visible {
    background: rgba(0, 229, 255, 0.15);
    box-shadow: var(--glow-cyan-strong);
    outline: none;
}
/* ========================
   SCENE 7 (Formerly 6) - Parent Co-Learning
   ======================== */
#s6-student-icon,
#s6-parent-icon {
    width: 220px;
    padding: 1.5rem;
}

#s6-sync-arrows {
    animation: syncPulse 2s ease-in-out infinite;
}

@keyframes syncPulse {
    0%, 100% {
        opacity: 0.7;
        transform: scale(0.95);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
        filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.5));
    }
}
