/* ==========================================================
   gamelicensor.com v2
   Graffiti-meditation on cool-grey concrete.
   Palette: cool-grays (#6a6a6e base, moss-cool #7a8680 accent).
   Typography: Archivo Black (hero graffiti), Jost (body),
               Space Mono (micro labels).
   ========================================================== */

:root {
    /* Cool grey palette */
    --bg-primary: #6a6a6e;
    --bg-mid: #4e4e52;
    --bg-highlight: #b8b8bc;
    --glass-tint: rgba(220, 222, 226, 0.06);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(255, 255, 255, 0.14);
    --mark-primary: #3f3f43;
    --mark-shadow: #5a5a5e;
    --text-body: #d8dadd;
    --text-sub: #9a9ca0;
    --text-micro: #6c6e72;
    --accent-moss: #7a8680;

    /* Dynamic background (transitions during fade section) */
    --bg-dynamic: var(--bg-primary);
    --text-dynamic: var(--text-body);

    /* Timing tokens */
    --ease-out-soft: cubic-bezier(0.16, 0.84, 0.32, 1);
    --ease-in-out-slow: cubic-bezier(0.6, 0, 0.4, 1);
    --dur-slow: 900ms;
    --dur-medium: 600ms;
    --dur-fast: 400ms;
}

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

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-dynamic);
    color: var(--text-dynamic);
    font-family: 'Jost', 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 400;
    font-size: clamp(1.0625rem, 1.3vw, 1.1875rem);
    line-height: 1.8;
    letter-spacing: 0.02em;
    min-height: 100vh;
    transition: background-color 1200ms var(--ease-in-out-slow),
                color 1200ms var(--ease-in-out-slow);
    cursor: default;
}

/* ===================== Concrete wall texture ===================== */

.wall-texture {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(74, 74, 80, 0.35), transparent 55%),
        radial-gradient(ellipse at 80% 70%, rgba(90, 90, 96, 0.30), transparent 50%),
        radial-gradient(ellipse at 50% 90%, rgba(60, 60, 66, 0.25), transparent 60%),
        repeating-radial-gradient(
            circle at 30% 40%,
            rgba(255, 255, 255, 0.015) 0,
            rgba(255, 255, 255, 0.015) 1px,
            transparent 1px,
            transparent 3px
        ),
        repeating-linear-gradient(
            45deg,
            rgba(0, 0, 0, 0.02) 0,
            rgba(0, 0, 0, 0.02) 1px,
            transparent 1px,
            transparent 2px
        );
    mix-blend-mode: overlay;
    opacity: 0;
    animation: wall-appear 1800ms var(--ease-out-soft) 400ms forwards;
}

.wall-texture::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at 50% 40%,
        transparent 40%,
        rgba(0, 0, 0, 0.2) 100%
    );
    mix-blend-mode: multiply;
}

@keyframes wall-appear {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===================== Cursor-follow blob ===================== */

.cursor-blob {
    position: fixed;
    top: 0;
    left: 0;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(
        circle at 50% 50%,
        rgba(255, 255, 255, 0.12) 0%,
        rgba(255, 255, 255, 0.05) 40%,
        transparent 75%
    );
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transform: translate(-50%, -50%) scale(1);
    pointer-events: none;
    z-index: 100;
    opacity: 0;
    transition: opacity 700ms ease-out;
    will-change: transform, opacity;
    mix-blend-mode: screen;
    animation: blob-breathe 3s ease-in-out infinite;
}

.cursor-blob.active {
    opacity: 1;
}

.cursor-blob.near-card {
    background: radial-gradient(
        circle at 50% 50%,
        rgba(255, 255, 255, 0.18) 0%,
        rgba(255, 255, 255, 0.08) 40%,
        transparent 75%
    );
}

@keyframes blob-breathe {
    0%, 100% { transform: translate(-50%, -50%) scale(0.98); }
    50%      { transform: translate(-50%, -50%) scale(1.02); }
}

/* ===================== Micro nav ===================== */

.micro-nav {
    position: fixed;
    top: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: 'Space Mono', 'Courier New', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--text-sub);
    padding: 8px 20px;
    opacity: 0;
    animation: nav-appear 900ms var(--ease-out-soft) 1700ms forwards;
}

.micro-nav a {
    color: inherit;
    text-decoration: none;
    transition: color 400ms ease-out;
}

.micro-nav a:hover {
    color: var(--text-body);
}

.nav-divider {
    color: var(--text-micro);
    font-size: 0.7em;
}

@keyframes nav-appear {
    from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===================== Main column (centered spine) ===================== */

main {
    position: relative;
    z-index: 1;
    max-width: 780px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}

/* ===================== Section head (micro label) ===================== */

.section-head {
    padding-top: 120px;
    padding-bottom: 40px;
}

.section-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.8125rem;
    font-weight: 400;
    letter-spacing: 0.25em;
    text-transform: lowercase;
    color: var(--text-micro);
}

/* ===================== Section 1: Hero ===================== */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 0 60px;
}

.hero-inner {
    position: relative;
    text-align: center;
    max-width: 720px;
}

.hero-mark {
    font-family: 'Archivo Black', 'Jost', sans-serif;
    font-weight: 900;
    font-size: clamp(3rem, 8.5vw, 7rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--mark-primary);
    text-shadow:
        0 0 2px rgba(63, 63, 67, 0.9),
        0 0 8px rgba(90, 90, 94, 0.55),
        0 0 18px rgba(90, 90, 94, 0.35),
        0 0 32px rgba(90, 90, 94, 0.22);
    opacity: 0;
    transform: translateY(12px);
    animation: mark-reveal 1200ms var(--ease-out-soft) 700ms forwards;
    position: relative;
}

.hero-mark::before {
    content: "";
    position: absolute;
    inset: -6px -10px;
    background: radial-gradient(
        ellipse at 50% 50%,
        rgba(63, 63, 67, 0.18) 0%,
        transparent 65%
    );
    z-index: -1;
    filter: blur(10px);
}

@keyframes mark-reveal {
    from {
        opacity: 0;
        transform: translateY(12px);
        filter: blur(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.hero-subtitle {
    margin-top: 28px;
    font-family: 'Jost', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.4vw, 1.125rem);
    letter-spacing: 0.18em;
    text-transform: lowercase;
    color: var(--text-sub);
    opacity: 0;
    transform: translateY(8px);
    animation: fade-up 800ms var(--ease-out-soft) 1600ms forwards;
}

.hero-motif {
    margin-top: 48px;
    display: inline-block;
    opacity: 0;
    animation: fade-up 800ms var(--ease-out-soft) 2000ms forwards;
}

.hero-motif svg {
    animation: motif-sway 8s ease-in-out infinite;
    transform-origin: center bottom;
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes motif-sway {
    0%, 100% { transform: rotate(-2deg); }
    50%      { transform: rotate(2deg); }
}

.scroll-hint {
    position: absolute;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: fade-up 800ms var(--ease-out-soft) 2400ms forwards;
}

.scroll-hint-dot {
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-micro);
    animation: scroll-pulse 2.4s ease-in-out infinite;
}

@keyframes scroll-pulse {
    0%, 100% { opacity: 0.3; transform: translateY(0); }
    50%      { opacity: 1;   transform: translateY(6px); }
}

/* ===================== Section 2: Koan wall ===================== */

.koan-wall {
    min-height: 120vh;
    padding-bottom: 120px;
}

.koans {
    display: flex;
    flex-direction: column;
    gap: 64px;
    align-items: center;
    margin-top: 40px;
}

.koan-card {
    position: relative;
    width: 100%;
    max-width: 540px;
    padding: 52px 44px 44px;
    background: var(--glass-tint);
    backdrop-filter: blur(14px) saturate(120%);
    -webkit-backdrop-filter: blur(14px) saturate(120%);
    border: 1px solid var(--glass-border);
    border-radius: 2px;
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.25),
        inset 0 0 0 1px rgba(255, 255, 255, 0.02);
    opacity: 0;
    transform: translateY(16px);
    transition:
        opacity var(--dur-slow) var(--ease-out-soft),
        transform var(--dur-slow) var(--ease-out-soft),
        backdrop-filter var(--dur-medium) ease-out,
        border-color var(--dur-medium) ease-out,
        box-shadow var(--dur-medium) ease-out;
    overflow: hidden;
}

.koan-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.koan-card:hover {
    transform: translateY(-2px);
    backdrop-filter: blur(18px) saturate(130%);
    -webkit-backdrop-filter: blur(18px) saturate(130%);
    border-color: var(--glass-border-hover);
    box-shadow:
        0 38px 72px rgba(0, 0, 0, 0.32),
        inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.koan-num {
    display: block;
    font-family: 'Space Mono', monospace;
    font-size: 0.8125rem;
    font-weight: 400;
    letter-spacing: 0.22em;
    color: var(--text-micro);
    margin-bottom: 22px;
}

.koan-text {
    font-family: 'Jost', sans-serif;
    font-weight: 400;
    font-size: clamp(1.5rem, 3vw, 2.125rem);
    line-height: 1.5;
    letter-spacing: -0.005em;
    color: var(--text-body);
    opacity: 0;
    transition: opacity var(--dur-slow) var(--ease-out-soft) 200ms;
}

.koan-card.visible .koan-text {
    opacity: 1;
}

.koan-motif {
    margin-top: 32px;
    display: inline-block;
    opacity: 0.8;
    transition: opacity 600ms ease-out, transform 600ms ease-out;
}

.koan-motif svg {
    animation: motif-sway 7s ease-in-out infinite;
    transform-origin: center;
}

.koan-card:hover .koan-motif {
    opacity: 1;
}

.koan-card.cursor-near .koan-motif svg {
    animation-duration: 3s;
}

/* ===================== Section 3: Garden ===================== */

.garden {
    min-height: 100vh;
    padding-bottom: 120px;
}

.garden-inner {
    position: relative;
    padding: 40px 0;
}

.stones {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 72px;
    padding: 60px 0;
    max-width: 400px;
    margin: 0 auto;
}

.garden-path {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.garden-path-line {
    stroke-dasharray: 3 6;
    animation: path-drift 16s linear infinite;
}

@keyframes path-drift {
    from { stroke-dashoffset: 0; }
    to   { stroke-dashoffset: -72; }
}

.stone {
    position: relative;
    z-index: 1;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--glass-tint);
    backdrop-filter: blur(14px) saturate(120%);
    -webkit-backdrop-filter: blur(14px) saturate(120%);
    border: 1px solid var(--glass-border);
    box-shadow:
        0 24px 48px rgba(0, 0, 0, 0.22),
        inset 0 0 0 1px rgba(255, 255, 255, 0.02);
    opacity: 0;
    transform: scale(0.92);
    transition:
        opacity var(--dur-slow) var(--ease-out-soft),
        transform var(--dur-slow) var(--ease-out-soft),
        backdrop-filter var(--dur-medium) ease-out,
        border-color var(--dur-medium) ease-out,
        box-shadow var(--dur-medium) ease-out;
}

.stone.visible {
    opacity: 1;
    transform: scale(1);
}

.stone:hover {
    backdrop-filter: blur(18px) saturate(130%);
    -webkit-backdrop-filter: blur(18px) saturate(130%);
    border-color: var(--glass-border-hover);
    box-shadow:
        0 30px 56px rgba(0, 0, 0, 0.30),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.stone-word {
    font-family: 'Jost', sans-serif;
    font-weight: 500;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    color: var(--text-body);
}

.garden-motifs {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.motif {
    position: absolute;
    opacity: 0.7;
    transition: opacity 600ms ease-out;
}

.motif svg {
    animation: motif-sway 9s ease-in-out infinite;
    transform-origin: center;
}

.motif-branch {
    top: 20%;
    left: 8%;
}

.motif-rain {
    top: 8%;
    right: 12%;
}

.motif-leaf {
    bottom: 22%;
    left: 12%;
}

.motif-wave {
    bottom: 10%;
    right: 10%;
}

.motif.cursor-near svg {
    animation-duration: 4s;
}

.motif.cursor-near {
    opacity: 1;
}

/* ===================== Section 4: Agreement ===================== */

.agreement {
    min-height: 100vh;
    padding-bottom: 80px;
}

.agreement-inner {
    max-width: 520px;
    margin: 0 auto;
    padding-top: 40px;
}

.agreement-line {
    font-family: 'Jost', sans-serif;
    font-weight: 300;
    font-size: clamp(1.25rem, 2.2vw, 1.75rem);
    line-height: 1.7;
    color: var(--text-body);
    margin-bottom: 32px;
}

.agreement-email {
    font-family: 'Space Mono', monospace;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--text-sub);
    margin-bottom: 64px;
}

.blank-card {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-tint);
    backdrop-filter: blur(14px) saturate(120%);
    -webkit-backdrop-filter: blur(14px) saturate(120%);
    border: 1px solid var(--glass-border);
    border-radius: 2px;
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.25),
        inset 0 0 0 1px rgba(255, 255, 255, 0.02);
    overflow: hidden;
    transition:
        backdrop-filter var(--dur-medium) ease-out,
        border-color var(--dur-medium) ease-out,
        box-shadow var(--dur-medium) ease-out;
}

.blank-card:hover {
    backdrop-filter: blur(18px) saturate(130%);
    -webkit-backdrop-filter: blur(18px) saturate(130%);
    border-color: var(--glass-border-hover);
}

.blank-hint {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--text-micro);
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 600ms ease-out;
}

.blank-card:hover .blank-hint {
    opacity: 0.8;
}

.blank-mist {
    position: absolute;
    top: 0;
    left: 0;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(
        circle at 50% 50%,
        rgba(255, 255, 255, 0.12) 0%,
        rgba(255, 255, 255, 0.05) 40%,
        transparent 75%
    );
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 900ms ease-out;
    filter: blur(6px);
}

.blank-mist.active {
    opacity: 1;
}

/* ===================== Section 5: Fade out ===================== */

.fade-out {
    min-height: 60vh;
    padding: 80px 0 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.final-dot {
    display: block;
    font-family: 'Jost', sans-serif;
    font-weight: 500;
    font-size: 3rem;
    line-height: 1;
    color: var(--text-body);
    margin-bottom: 48px;
    transition: color 1200ms var(--ease-in-out-slow);
}

.colophon {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    color: var(--text-micro);
    opacity: 0.6;
}

/* ===================== Responsive tweaks ===================== */

@media (max-width: 600px) {
    .micro-nav {
        font-size: 0.7rem;
        gap: 10px;
        top: 18px;
    }

    .koan-card {
        padding: 44px 28px 36px;
    }

    .stones {
        gap: 56px;
    }

    .stone {
        width: 170px;
        height: 170px;
    }

    .motif-branch, .motif-leaf {
        left: 2%;
    }

    .motif-rain, .motif-wave {
        right: 2%;
    }

    .section-head {
        padding-top: 80px;
    }
}

@media (max-width: 420px) {
    .hero-mark {
        font-size: clamp(2.5rem, 14vw, 3.5rem);
    }
}

/* ===================== Stencil misregister (occasional small decor) ===================== */

.koan-card::after {
    content: "";
    position: absolute;
    top: 12px;
    right: 16px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--text-micro);
    opacity: 0.25;
    transform: translate(1px, -1px);
}

.koan-card[data-koan="2"]::after {
    top: 14px;
    right: 18px;
    transform: translate(-2px, 1px);
}

.koan-card[data-koan="3"]::after {
    top: 10px;
    right: 14px;
    width: 4px;
    height: 4px;
}
