/* ============================================
   gamelicensor.pro - Institutional Authority
   Corporate Black & Gold Design System
   ============================================ */

/* CSS Custom Properties */
:root {
    --void-black: #0A0A0A;
    --obsidian: #111111;
    --grid-phantom: #1A1A1A;
    --gunmetal: #2C2C2C;
    --silver-document: #B8B8B8;
    --gold: #C5A44E;
    --gold-bright: #E8D48B;
    --gold-dim: rgba(197, 164, 78, 0.15);
    --seal-red: #8B2500;
    --permit-green: #2D6B3F;
    --white-plate: #F0EDE4;

    --font-heading: 'Share Tech Mono', monospace;
    --font-body: 'IBM Plex Mono', monospace;
    --font-label: 'Oswald', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--void-black);
    color: var(--silver-document);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.78;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Grid-Line Overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(
            to right,
            var(--grid-phantom) 0px,
            var(--grid-phantom) 1px,
            transparent 1px,
            transparent 60px
        ),
        repeating-linear-gradient(
            to bottom,
            var(--grid-phantom) 0px,
            var(--grid-phantom) 1px,
            transparent 1px,
            transparent 60px
        );
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   Navigation Sigil
   ============================================ */
.nav-sigil {
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 1000;
}

.sigil-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--gold);
    border: 1px solid var(--gold);
    cursor: pointer;
    transition: color 0.3s ease, border-color 0.3s ease;
    background: var(--void-black);
    letter-spacing: 0.1em;
    position: relative;
    z-index: 1001;
}

.sigil-icon:hover {
    color: var(--gold-bright);
    border-color: var(--gold-bright);
}

.sigil-menu {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--obsidian);
    border: 1px solid var(--gold);
    padding: 56px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.4s;
    min-width: 220px;
}

.nav-sigil.active .sigil-menu {
    opacity: 1;
    visibility: visible;
}

.sigil-menu a {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    color: var(--silver-document);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    transition: color 0.3s ease;
    display: block;
    padding: 4px 0;
}

.sigil-menu a:hover {
    color: var(--gold-bright);
}

/* ============================================
   Section Base Styles
   ============================================ */
.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

/* Content Column (Monolith) */
.content-column {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 80px 32px;
    background: var(--obsidian);
    border-left: 1px solid var(--gold);
    border-right: 1px solid var(--gold);
    position: relative;
}

/* Section Headings */
.section-heading {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 3.5vw, 3.2rem);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--gold);
    margin-bottom: 24px;
    line-height: 1.2;
}

/* Body Text */
.body-text {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.78;
    color: var(--silver-document);
    margin-bottom: 24px;
}

.body-text:last-child {
    margin-bottom: 0;
}

/* Gold Horizontal Rule */
.gold-rule {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold) 30%, var(--gold) 70%, transparent);
    margin: 32px 0;
}

/* ============================================
   Fade Reveal Animation
   ============================================ */
.fade-reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ============================================
   Section 1: The Facade
   ============================================ */
.section-facade {
    flex-direction: column;
    background: var(--void-black);
    gap: 40px;
}

.seal-container {
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gold-seal {
    width: 200px;
    height: 200px;
    opacity: 0;
    animation: sealFadeIn 2s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}

@keyframes sealFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.facade-title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4.5vw, 3.8rem);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--gold);
    text-align: center;
    opacity: 0;
    white-space: nowrap;
}

.facade-title.typing {
    opacity: 1;
}

.facade-title .char {
    display: inline-block;
    opacity: 0;
    transition: opacity 0.15s cubic-bezier(0.22, 1, 0.36, 1);
}

.facade-title .char.visible {
    opacity: 1;
}

/* ============================================
   Docked Seal
   ============================================ */
.docked-seal {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) scale(0.4);
    width: 200px;
    height: 200px;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.docked-seal.visible {
    opacity: 1;
}

.docked-seal svg {
    width: 100%;
    height: 100%;
}

/* ============================================
   Section 2: The Mandate
   ============================================ */
.section-mandate {
    align-items: flex-start;
    padding-top: 0;
}

/* ============================================
   Section 3: The Classification Matrix
   ============================================ */
.section-classification {
    align-items: flex-start;
}

.badge-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin-top: 40px;
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.badge-ring {
    width: 64px;
    height: 64px;
    transition: transform 0.3s ease;
}

.badge-ring svg {
    width: 100%;
    height: 100%;
}

.badge-item:hover .badge-ring {
    transform: scale(1.08);
}

.badge-item:hover .badge-ring svg circle:first-child {
    stroke: var(--gold-bright);
}

.badge-label {
    font-family: var(--font-label);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--silver-document);
    text-align: center;
    transition: color 0.3s ease;
}

.badge-item:hover .badge-label {
    color: var(--gold-bright);
}

/* ============================================
   Section 4: The Verdict
   ============================================ */
.section-verdict {
    align-items: flex-start;
}

.verdict-stamps {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin: 48px 0;
    flex-wrap: wrap;
}

.stamp {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 220px;
    height: 120px;
    border: 3px solid;
    position: relative;
    /* Irregular edges via clip-path */
    clip-path: polygon(
        2% 5%, 8% 0%, 15% 3%, 25% 1%, 35% 4%, 45% 0%, 55% 2%, 65% 0%, 75% 3%, 85% 1%, 92% 4%, 98% 1%,
        100% 8%, 97% 18%, 100% 28%, 98% 38%, 100% 48%, 97% 58%, 100% 68%, 98% 78%, 100% 88%, 97% 95%,
        95% 98%, 88% 100%, 78% 97%, 68% 100%, 58% 98%, 48% 100%, 38% 97%, 28% 100%, 18% 98%, 8% 100%, 3% 97%,
        0% 92%, 2% 82%, 0% 72%, 3% 62%, 0% 52%, 2% 42%, 0% 32%, 3% 22%, 0% 12%, 2% 5%
    );
    padding: 16px;
}

.stamp-licensed {
    border-color: var(--permit-green);
    background: rgba(45, 107, 63, 0.08);
    transform: rotate(-3deg);
}

.stamp-denied {
    border-color: var(--seal-red);
    background: rgba(139, 37, 0, 0.08);
    transform: rotate(3deg);
}

.stamp-licensed .stamp-text {
    color: var(--permit-green);
}

.stamp-denied .stamp-text {
    color: var(--seal-red);
}

.stamp-text {
    font-family: var(--font-heading);
    font-size: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 400;
}

.stamp-sublabel {
    font-family: var(--font-label);
    font-weight: 600;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--silver-document);
    opacity: 0.7;
    margin-top: 6px;
}

/* Stamp fade-reveal animation override */
.stamp.fade-reveal {
    opacity: 0;
    transform: rotate(0deg) scale(1.1);
}

.stamp-licensed.fade-reveal.revealed {
    opacity: 1;
    transform: rotate(-3deg) scale(1);
    animation: stampLicensed 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.stamp-denied.fade-reveal.revealed {
    opacity: 1;
    transform: rotate(3deg) scale(1);
    animation: stampDenied 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes stampLicensed {
    from {
        opacity: 0;
        transform: rotate(-8deg) scale(1.1);
    }
    to {
        opacity: 1;
        transform: rotate(-3deg) scale(1);
    }
}

@keyframes stampDenied {
    from {
        opacity: 0;
        transform: rotate(8deg) scale(1.1);
    }
    to {
        opacity: 1;
        transform: rotate(3deg) scale(1);
    }
}

/* ============================================
   Section 5: The Registry
   ============================================ */
.section-registry {
    align-items: flex-start;
}

.registry-list {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.registry-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px 0;
    border-bottom: 1px solid var(--gunmetal);
}

.registry-item:last-child {
    border-bottom: none;
}

.registry-serial {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    color: var(--gold);
    letter-spacing: 0.1em;
    white-space: nowrap;
    min-width: 130px;
}

.registry-title {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--silver-document);
    letter-spacing: 0.08em;
    flex: 1;
}

.registry-status {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.registry-status svg {
    display: block;
}

/* Registry item stagger animation from left */
.registry-item.fade-reveal {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.registry-item.fade-reveal.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    position: relative;
    z-index: 1;
    padding-bottom: 60px;
}

.site-footer .content-column {
    text-align: center;
    padding-top: 60px;
    padding-bottom: 60px;
}

.footer-seal-container {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.footer-seal {
    width: 140px;
    height: 140px;
    opacity: 0.6;
}

.footer-text {
    font-family: var(--font-heading);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--gold);
    margin-bottom: 8px;
}

.footer-subtext {
    font-family: var(--font-label);
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--silver-document);
    opacity: 0.6;
    margin-bottom: 24px;
}

.footer-meta {
    font-family: var(--font-body);
    font-size: 0.72rem;
    color: var(--silver-document);
    opacity: 0.4;
    letter-spacing: 0.1em;
}

/* ============================================
   Engraving Micro-Pattern Background
   ============================================ */
.section-facade::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cpath d='M0,60 Q30,55 60,60 Q90,65 120,60' fill='none' stroke='%23C5A44E' stroke-width='0.5' opacity='0.06'/%3E%3Cpath d='M0,30 Q30,25 60,30 Q90,35 120,30' fill='none' stroke='%23C5A44E' stroke-width='0.5' opacity='0.04'/%3E%3Cpath d='M0,90 Q30,85 60,90 Q90,95 120,90' fill='none' stroke='%23C5A44E' stroke-width='0.5' opacity='0.04'/%3E%3C/svg%3E");
    background-size: 120px 120px;
    pointer-events: none;
    z-index: -1;
}

/* Engraving pattern on content sections */
.section-mandate .content-column::before,
.section-classification .content-column::before,
.section-verdict .content-column::before,
.section-registry .content-column::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cpath d='M0,60 Q30,55 60,60 Q90,65 120,60' fill='none' stroke='%23C5A44E' stroke-width='0.5' opacity='0.03'/%3E%3Cpath d='M0,30 Q30,25 60,30 Q90,35 120,30' fill='none' stroke='%23C5A44E' stroke-width='0.5' opacity='0.02'/%3E%3Cpath d='M0,90 Q30,85 60,90 Q90,95 120,90' fill='none' stroke='%23C5A44E' stroke-width='0.5' opacity='0.02'/%3E%3C/svg%3E");
    background-size: 120px 120px;
    pointer-events: none;
    z-index: 0;
}

/* Grid-line structural motifs behind content */
.section-classification .content-column::after,
.section-registry .content-column::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(
            to right,
            rgba(197, 164, 78, 0.03) 0px,
            rgba(197, 164, 78, 0.03) 1px,
            transparent 1px,
            transparent 80px
        ),
        repeating-linear-gradient(
            to bottom,
            rgba(197, 164, 78, 0.03) 0px,
            rgba(197, 164, 78, 0.03) 1px,
            transparent 1px,
            transparent 80px
        );
    pointer-events: none;
    z-index: 0;
}

/* Ensure content stacks above pseudo-elements */
.content-column > * {
    position: relative;
    z-index: 1;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .content-column {
        max-width: 100%;
        padding: 60px 20px;
        border-left: none;
        border-right: none;
    }

    .badge-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .verdict-stamps {
        flex-direction: column;
        align-items: center;
        gap: 32px;
    }

    .stamp {
        width: 200px;
        height: 100px;
    }

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

    .registry-item {
        gap: 12px;
    }

    .registry-serial {
        font-size: 0.68rem;
        min-width: 100px;
    }

    .registry-title {
        font-size: 0.8rem;
    }

    .facade-title {
        white-space: normal;
        text-align: center;
        padding: 0 20px;
    }

    .nav-sigil {
        top: 16px;
        left: 16px;
    }

    .seal-container {
        width: 160px;
        height: 160px;
    }

    .gold-seal {
        width: 160px;
        height: 160px;
    }

    .docked-seal {
        display: none;
    }
}

@media (max-width: 480px) {
    .badge-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .badge-ring {
        width: 52px;
        height: 52px;
    }

    .badge-label {
        font-size: 0.6rem;
    }

    .section-heading {
        letter-spacing: 0.1em;
    }

    .registry-serial {
        min-width: 80px;
        font-size: 0.6rem;
    }
}

/* ============================================
   Scrollbar Styling
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--void-black);
}

::-webkit-scrollbar-thumb {
    background: var(--gunmetal);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

/* Selection color */
::selection {
    background: rgba(197, 164, 78, 0.3);
    color: var(--white-plate);
}
