/* gamelicense.info - Design Language Stylesheet */
/* Scandinavian law library aesthetic with earth-tone palette */

:root {
    --earth-bark: #3a322a;
    --earth-clay: #8a7b6d;
    --earth-linen: #ede6dc;
    --earth-chalk: #f7f3ee;
    --earth-umber: #5c4e3f;
    --earth-moss: #6b7d5e;
    --earth-rust: #a0603c;
    --earth-fog: #c4bab0;
    --earth-sand: #d4c8bc;
    --earth-stone: #b8a99a;
    --stagger-base: 400ms;
    --stagger-step: 150ms;
}

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

html {
    scroll-behavior: smooth;
    scrollbar-color: #8a7b6d #f7f3ee;
    scrollbar-width: thin;
}

html::-webkit-scrollbar {
    width: 8px;
}

html::-webkit-scrollbar-track {
    background: var(--earth-chalk);
}

html::-webkit-scrollbar-thumb {
    background: var(--earth-clay);
    border-radius: 4px;
}

body {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.72;
    color: var(--earth-bark);
    background-color: var(--earth-chalk);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    word-spacing: 0.05em;
    overflow-x: hidden;
}

/* ================================
   PARALLAX BACKGROUND LAYER
   ================================ */

.parallax-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 120vh;
    z-index: 0;
    will-change: transform;
    pointer-events: none;
}

.bg-texture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--earth-chalk);
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 40px,
            rgba(138, 123, 109, 0.03) 40px,
            rgba(138, 123, 109, 0.03) 41px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 40px,
            rgba(138, 123, 109, 0.02) 40px,
            rgba(138, 123, 109, 0.02) 41px
        );
}

.bg-grain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ================================
   GOLDEN RATIO HORIZON LINE
   ================================ */

.horizon-line {
    position: fixed;
    top: 61.8vh;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--earth-clay);
    opacity: 0.3;
    z-index: 1;
    pointer-events: none;
}

/* ================================
   DEPTH MARKER / SCROLL PROGRESS
   ================================ */

.depth-marker {
    position: fixed;
    right: 8%;
    top: 0;
    height: 100vh;
    z-index: 100;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.depth-line {
    width: 1px;
    flex: 1;
    background-color: var(--earth-clay);
    opacity: 0.4;
}

.depth-counter {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: var(--earth-clay);
    padding-top: 8px;
    letter-spacing: 0.1em;
}

/* ================================
   SCROLL CONTAINER
   ================================ */

.scroll-container {
    position: relative;
    z-index: 2;
}

/* ================================
   CONTENT SECTIONS
   ================================ */

.content-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 80px 0;
    will-change: filter;
    transition: filter 0.1s linear;
}

.section-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-closing {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ================================
   MID-LAYER (PARALLAX 0.7x)
   ================================ */

.mid-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    will-change: transform;
    pointer-events: none;
}

/* ================================
   PHOTO PANELS
   ================================ */

.photo-panel {
    position: absolute;
    overflow: hidden;
    border-radius: 2px;
}

.photo-panel--wide {
    top: 10%;
    left: 5%;
    width: 55%;
    height: 70%;
}

.photo-panel--right {
    top: 15%;
    right: 5%;
    left: auto;
    width: 40%;
    height: 60%;
}

.photo-panel--left {
    top: 15%;
    left: 5%;
    width: 40%;
    height: 60%;
}

.photo-inner {
    width: 100%;
    height: 100%;
    background-color: var(--earth-sand);
    filter: sepia(15%) contrast(0.92) brightness(1.04);
    opacity: 0.2;
    background-blend-mode: multiply;
    background-size: cover;
    background-position: center;
}

.photo-inner--archive {
    background-color: var(--earth-stone);
    background-image:
        linear-gradient(135deg, var(--earth-sand) 0%, var(--earth-fog) 50%, var(--earth-stone) 100%);
    opacity: 0.15;
}

.photo-inner--cartridge {
    background-color: var(--earth-clay);
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 20px,
            rgba(58, 50, 42, 0.05) 20px,
            rgba(58, 50, 42, 0.05) 22px
        ),
        linear-gradient(180deg, var(--earth-fog) 0%, var(--earth-clay) 100%);
    opacity: 0.18;
}

.photo-inner--library {
    background-color: var(--earth-linen);
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 8px,
            rgba(92, 78, 63, 0.04) 8px,
            rgba(92, 78, 63, 0.04) 10px
        );
    opacity: 0.15;
}

.photo-inner--steel {
    background-color: var(--earth-fog);
    background-image:
        linear-gradient(180deg, var(--earth-clay) 0%, var(--earth-fog) 40%, var(--earth-chalk) 100%);
    opacity: 0.12;
}

.photo-inner--paper {
    background-color: var(--earth-linen);
    background-image:
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 4px,
            rgba(138, 123, 109, 0.03) 4px,
            rgba(138, 123, 109, 0.03) 5px
        );
    opacity: 0.2;
}

/* ================================
   FOREGROUND LAYER
   ================================ */

.fore-layer {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 0 6%;
}

/* ================================
   FILING TAB
   ================================ */

.filing-tab {
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 8px;
    background-color: var(--earth-rust);
    transform: translateX(-100%);
    opacity: 0;
    transition: transform var(--stagger-base) ease-out, opacity var(--stagger-base) ease-out;
}

.content-section.is-visible .filing-tab {
    transform: translateX(0);
    opacity: 1;
}

/* ================================
   SECTION CONTENT
   ================================ */

.section-content {
    max-width: 600px;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 600ms ease-out, transform 600ms ease-out;
    transition-delay: calc(var(--stagger-base) + var(--stagger-step));
}

.content-section.is-visible .section-content {
    opacity: 1;
    transform: translateY(0);
}

.section-content--left {
    margin-right: auto;
    margin-left: 6%;
}

.section-content--right {
    margin-left: auto;
    margin-right: 6%;
}

.section-content--center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* ================================
   TYPOGRAPHY
   ================================ */

.section-label {
    display: inline-block;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--earth-clay);
    margin-bottom: 16px;
}

.section-headline {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--earth-bark);
    text-transform: lowercase;
    margin-bottom: 32px;
}

h1.section-headline {
    font-size: clamp(42px, 7vw, 80px);
}

.section-body {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.72;
    color: var(--earth-bark);
    max-width: 62ch;
    margin-bottom: 20px;
    word-spacing: 0.05em;
}

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

/* ================================
   DOCUMENT CARD
   ================================ */

.document-card {
    position: relative;
    background-color: var(--earth-linen);
    border: 1px solid var(--earth-stone);
    padding: 40px;
    box-shadow: 0 8px 32px rgba(58, 50, 42, 0.12);
    margin-bottom: 24px;
}

/* ================================
   CLAUSE NUMBERS
   ================================ */

.clause-numbers {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 24px;
}

.clause-numbers span {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: var(--earth-fog);
    letter-spacing: 0.1em;
}

.clause-numbers--side {
    position: absolute;
    left: 2%;
    bottom: 20%;
    z-index: 3;
}

/* ================================
   STAMP MARKS
   ================================ */

.stamp-mark {
    position: absolute;
    z-index: 5;
    color: var(--earth-rust);
    opacity: 0;
    transform: rotate(-15deg) scale(0.8);
    transition: opacity 800ms ease-out, transform 800ms ease-out;
}

.content-section.is-visible .stamp-mark {
    opacity: 0.5;
    transform: rotate(var(--stamp-rotation, 0deg)) scale(1);
}

.content-section:nth-child(2) .stamp-mark {
    right: 12%;
    bottom: 15%;
}

.content-section:nth-child(4) .stamp-mark {
    left: 8%;
    bottom: 12%;
}

.content-section:nth-child(5) .stamp-mark {
    right: 15%;
    top: 18%;
}

.content-section:nth-child(6) .stamp-mark {
    left: 10%;
    bottom: 20%;
}

/* ================================
   CLOSING SECTION
   ================================ */

.closing-text {
    font-size: 18px;
    line-height: 1.8;
    max-width: 52ch;
    margin-left: auto;
    margin-right: auto;
}

.closing-stamp {
    color: var(--earth-rust);
    opacity: 0;
    transform: rotate(-10deg) scale(0.7);
    transition: opacity 1000ms ease-out, transform 1000ms ease-out;
    transition-delay: 400ms;
    margin: 48px auto;
}

.content-section.is-visible .closing-stamp {
    opacity: 0.6;
    transform: rotate(2deg) scale(1);
}

.footer-note {
    font-size: 12px;
    color: var(--earth-clay);
    letter-spacing: 0.05em;
    margin-top: 48px;
}

/* ================================
   RESPONSIVE
   ================================ */

@media (max-width: 768px) {
    .section-content--left,
    .section-content--right {
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
    }

    .fore-layer {
        padding: 0 24px;
    }

    .document-card {
        padding: 24px;
    }

    .photo-panel--wide,
    .photo-panel--right,
    .photo-panel--left {
        left: 0;
        right: 0;
        width: 100%;
        height: 50%;
    }

    .content-section {
        padding: 48px 0;
    }

    .clause-numbers--side {
        position: relative;
        left: auto;
        bottom: auto;
        margin-top: 16px;
    }

    .depth-marker {
        right: 4%;
    }

    .section-body {
        font-size: 14px;
    }

    .stamp-mark {
        display: none;
    }
}

@media (max-width: 480px) {
    .section-headline {
        font-size: clamp(28px, 8vw, 48px);
    }

    h1.section-headline {
        font-size: clamp(32px, 9vw, 56px);
    }
}
