/* ============================================
   gamelicensor.com - Styles
   Gold-Black Licensing Authority Aesthetic

   Palette:
   #050505 - Obsidian Void (page background)
   #0A0A0A - Vault Floor (panel backgrounds)
   #141414 - Charcoal Gate (hover states)
   #C9A84C - License Gold (headlines, borders, active)
   #7A6B2E - Dim Authority (secondary text, atmospheric)
   #3D3517 - Ember Trace (grid lines, ghost elements)
   #E8E4D9 - Clearance White (body text)
   #8B2500 - Revocation Red (denial states)

   Fonts:
   Share Tech Mono - Headlines (monospaced stencil)
   IBM Plex Mono - Body text (humanist mono)
   Orbitron - Accent numerals (geometric display)
   ============================================ */

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #050505;
    color: #E8E4D9;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.8vw, 1.05rem);
    line-height: 1.85;
    letter-spacing: 0.04em;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background-color: #C9A84C;
    color: #050505;
}

/* ============================================
   Fixed Grid Overlay
   Grid-line motif as architectural substrate.
   64px square grid, 0.5px lines in #3D3517.
   Fixed position for parallax depth separation.
   ============================================ */
#grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.15;
    background-image:
        linear-gradient(to right, #3D3517 0.5px, transparent 0.5px),
        linear-gradient(to bottom, #3D3517 0.5px, transparent 0.5px);
    background-size: 64px 64px;
    transition: opacity 0.3s ease-out;
}

/* ============================================
   Certificate Watermark
   60vmin diameter, 3% opacity, ultra-slow
   rotation (360deg / 300s). Always centered.
   ============================================ */
#watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60vmin;
    height: 60vmin;
    pointer-events: none;
    z-index: 0;
    opacity: 0.03;
    animation: watermarkRotate 300s linear infinite;
}

#watermark svg {
    width: 100%;
    height: 100%;
}

@keyframes watermarkRotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ============================================
   Scroll Progress Dot
   Fixed bottom-right, opacity maps from
   0.2 to 1.0 based on scroll percentage.
   ============================================ */
#scroll-progress-dot {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #C9A84C;
    opacity: 0.2;
    z-index: 100;
    pointer-events: none;
    transition: opacity 0.15s ease-out;
}

/* ============================================
   Typography
   ============================================ */

/* Headlines: Share Tech Mono
   Uppercase, wide tracking, stencil look */
.headline {
    font-family: 'Share Tech Mono', monospace;
    font-weight: 400;
    font-size: clamp(1.6rem, 4vw, 2.8rem);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #C9A84C;
    line-height: 1.3;
}

/* Body text: IBM Plex Mono 400 */
.body-text {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.8vw, 1.05rem);
    line-height: 1.85;
    letter-spacing: 0.04em;
    color: #E8E4D9;
}

/* Accent numerals: Orbitron 700
   Large standalone focal numbers */
.accent-numeral {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 6rem);
    color: #C9A84C;
    line-height: 1;
    margin-bottom: 8px;
    opacity: 0.9;
}

/* Caption text: IBM Plex Mono 300
   Secondary/metadata captions */
.caption-text {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: #7A6B2E;
    margin-bottom: 24px;
    text-transform: uppercase;
}

/* ============================================
   Sections
   Each occupies minimum 85vh, vertically
   centered content, creating rhythmic cadence.
   ============================================ */
.section {
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    padding: 60px 24px;
}

#entry-gate {
    min-height: 100vh;
}

#exit-gate {
    min-height: 100vh;
}

#seal-section {
    min-height: 100vh;
}

.section-content {
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
}

/* ============================================
   Gate Lines
   Horizontal gold lines that span full viewport
   width, animating open from center outward.
   ============================================ */
.gate-line {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0.5px;
    background-color: #C9A84C;
    z-index: 3;
    transition: none;
}

.gate-line.animate {
    animation: gateOpen 0.8s ease-out forwards;
}

@keyframes gateOpen {
    from {
        width: 0;
    }
    to {
        width: 100vw;
    }
}

.gate-line.gate-close {
    animation: gateClose 0.8s ease-out forwards;
}

@keyframes gateClose {
    from {
        width: 100vw;
    }
    to {
        width: 0;
    }
}

/* ============================================
   Entry Gate
   Pure #050505 black with centered gold line
   and letter-by-letter title reveal.
   ============================================ */
#entry-gate {
    position: relative;
    background-color: #050505;
}

#entry-line {
    top: 50%;
    transform: translate(-50%, -50%);
}

#site-title {
    font-size: clamp(2rem, 6vw, 4rem);
    letter-spacing: 0.25em;
    margin-top: 40px;
    opacity: 0;
    text-align: center;
}

#site-title.visible {
    opacity: 1;
}

#site-title .letter {
    opacity: 0;
    display: inline-block;
    transition: opacity 0.15s ease-out;
}

#site-title .letter.show {
    opacity: 1;
}

/* Chevron: slow opacity pulse indicating scroll */
#scroll-chevron {
    margin-top: 60px;
    opacity: 0;
    animation: none;
    text-align: center;
}

#scroll-chevron.visible {
    animation: chevronPulse 2s ease-in-out infinite;
}

@keyframes chevronPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* ============================================
   Registration Panels
   Thin gold border, double-rule certificate
   effect, subtle background elevation.
   ============================================ */
.registration-panel {
    background-color: #0A0A0A;
    border: 1px solid #C9A84C;
    padding: 48px;
    position: relative;
    transition: background-color 0.3s ease-out;
}

.registration-panel:hover {
    background-color: #141414;
}

/* Double-rule effect (certificate border) */
.registration-panel::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    border: 0.5px solid #C9A84C;
    pointer-events: none;
    opacity: 0.6;
}

/* Corner flourishes on panels */
.registration-panel::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 16px;
    height: 16px;
    border-top: 0.5px solid #7A6B2E;
    border-right: 0.5px solid #7A6B2E;
    pointer-events: none;
    opacity: 0.5;
}

/* ============================================
   Icon + Text Blocks
   Icons always framed in thin gold circle,
   left-aligned with text to the right.
   ============================================ */
.icon-text-block {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.icon-circle {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border: 1px solid #C9A84C;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-circle svg {
    width: 32px;
    height: 32px;
}

.block-text {
    flex: 1;
}

.block-text .headline {
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    margin-bottom: 16px;
}

.block-text .body-text {
    opacity: 0.92;
}

/* ============================================
   Terminal Strips
   Narrow bands with monospaced data scrolling
   slowly, atmospheric licensing machine hum.
   ============================================ */
.terminal-strip {
    width: 100%;
    height: 48px;
    overflow: hidden;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    border-top: 0.5px solid #3D3517;
    border-bottom: 0.5px solid #3D3517;
}

.terminal-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: #7A6B2E;
    opacity: 0.4;
    white-space: nowrap;
    display: inline-block;
    animation: terminalScroll 40s linear infinite;
    padding-left: 100%;
}

@keyframes terminalScroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-100%);
    }
}

/* ============================================
   Fade Reveal Animation
   Primary animation pattern: opacity 0 to 1,
   translateY 20px to 0, 600ms, ease-out.
   Triggered at 30% viewport intersection.
   ============================================ */
.fade-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms ease-out, transform 600ms ease-out;
}

.fade-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Seal Section - Icon Ring
   8 icons arranged in a circle, staggered
   200ms reveal. Visual climax of the corridor.
   ============================================ */
.seal-icon-ring {
    position: relative;
    width: 400px;
    height: 400px;
    max-width: 90vw;
    max-height: 90vw;
    margin: 0 auto;
}

/* Decorative ring behind the icons */
.seal-icon-ring::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    height: 85%;
    border: 0.5px solid #C9A84C;
    border-radius: 50%;
    opacity: 0.2;
    pointer-events: none;
}

.seal-icon-ring::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    border: 0.5px solid #C9A84C;
    border-radius: 50%;
    opacity: 0.15;
    pointer-events: none;
}

.seal-ring-icon {
    position: absolute;
    opacity: 0;
    transition: opacity 600ms ease-out;
}

.seal-ring-icon.revealed {
    opacity: 1;
}

/* Position 8 icons in a circle (45 degree intervals) */
.seal-ring-icon[data-index="0"] { top: 0; left: 50%; transform: translateX(-50%); }
.seal-ring-icon[data-index="1"] { top: 14.6%; right: 14.6%; }
.seal-ring-icon[data-index="2"] { top: 50%; right: 0; transform: translateY(-50%); }
.seal-ring-icon[data-index="3"] { bottom: 14.6%; right: 14.6%; }
.seal-ring-icon[data-index="4"] { bottom: 0; left: 50%; transform: translateX(-50%); }
.seal-ring-icon[data-index="5"] { bottom: 14.6%; left: 14.6%; }
.seal-ring-icon[data-index="6"] { top: 50%; left: 0; transform: translateY(-50%); }
.seal-ring-icon[data-index="7"] { top: 14.6%; left: 14.6%; }

/* ============================================
   Denial / Warning States
   Revocation Red for denial indicators.
   ============================================ */
.denial-indicator {
    border-color: #8B2500;
    color: #8B2500;
}

.denial-indicator .icon-circle {
    border-color: #8B2500;
}

.denial-indicator .headline {
    color: #8B2500;
}

/* ============================================
   Exit Gate
   Returns to pure black. Access Granted with
   slow pulsing opacity.
   ============================================ */
#exit-gate {
    background-color: #050505;
}

#exit-line {
    top: 0;
}

#access-granted {
    text-align: center;
    font-size: clamp(1.6rem, 5vw, 3rem);
    letter-spacing: 0.3em;
    opacity: 0;
}

#access-granted.pulsing {
    animation: accessPulse 3s ease-in-out infinite;
}

@keyframes accessPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

#exit-caption {
    text-align: center;
    margin-top: 24px;
    opacity: 0;
    transition: opacity 1s ease-out 0.5s;
}

#exit-caption.visible {
    opacity: 1;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .registration-panel {
        padding: 28px 20px;
    }

    .icon-text-block {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .seal-icon-ring {
        width: 280px;
        height: 280px;
    }

    .icon-circle {
        width: 48px;
        height: 48px;
    }

    .icon-circle svg {
        width: 26px;
        height: 26px;
    }

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

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

    #scroll-progress-dot {
        bottom: 16px;
        right: 16px;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 40px 16px;
    }

    .registration-panel {
        padding: 20px 14px;
    }

    .seal-icon-ring {
        width: 220px;
        height: 220px;
    }

    .terminal-text {
        font-size: 10px;
    }

    .caption-text {
        font-size: 0.65rem;
    }
}
