/* ========================================
   gamelicens.ing - Styles
   Minimalist immersive-scroll licensing journey
   ======================================== */

/* Custom Properties */
:root {
    --process-blue: #4A7BD9;
    --action-amber: #D4944A;
    --canvas-white: #FAFAF5;
    --system-gray: #6B6B78;
    --active-green: #4CAF50;
    --deep-navy: #1A2434;
    --highlight-lilac: #8B7BC8;
    --bg-tint: rgba(74, 123, 217, 0.02);
    --scroll-progress: 0;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.75;
    color: var(--deep-navy);
    background-color: var(--canvas-white);
    background-image: linear-gradient(
        to bottom,
        rgba(74, 123, 217, calc(0.02 * (1 - var(--scroll-progress)))),
        rgba(212, 148, 74, calc(0.02 * var(--scroll-progress)))
    );
    overflow-x: hidden;
}

/* ========================================
   Timeline
   ======================================== */
#timeline {
    position: fixed;
    left: 40px;
    top: 0;
    height: 100vh;
    width: 10px;
    z-index: 100;
    pointer-events: none;
}

#timeline-svg {
    position: absolute;
    left: 0;
    top: 0;
    width: 10px;
    height: 100%;
}

#timeline-bg {
    stroke: var(--deep-navy);
    stroke-opacity: 0.2;
}

#timeline-fill {
    stroke: var(--active-green);
    stroke-width: 2;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 0.1s linear;
}

.timeline-marker {
    position: absolute;
    left: -3px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.timeline-marker.visible {
    opacity: 1;
}

.marker-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--deep-navy);
    background: var(--canvas-white);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.timeline-marker.reached .marker-circle {
    border-color: var(--active-green);
    background: var(--active-green);
    transform: scale(1.2);
}

.marker-label {
    font-family: 'Overpass Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--system-gray);
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.timeline-marker.reached .marker-label {
    opacity: 1;
    transform: translateX(0);
    color: var(--active-green);
}

/* ========================================
   Main Content
   ======================================== */
#content {
    margin-left: 80px;
    padding-right: 40px;
    max-width: 900px;
}

@media (max-width: 768px) {
    #timeline {
        left: 16px;
    }
    #content {
        margin-left: 50px;
        padding-right: 20px;
    }
    .marker-label {
        display: none;
    }
}

/* ========================================
   Hero / Opening Viewport
   ======================================== */
#hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

#hero-inner {
    opacity: 0;
}

#hero-inner.revealed {
    opacity: 1;
}

#title-text {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: clamp(28px, 5vw, 60px);
    letter-spacing: -0.01em;
    line-height: 1.1;
    color: var(--deep-navy);
    position: relative;
}

#title-main {
    color: var(--deep-navy);
}

#title-dot {
    color: var(--deep-navy);
}

#title-ing {
    color: var(--action-amber);
    animation: ingPulse 3s ease-in-out infinite;
}

@keyframes ingPulse {
    0%, 100% {
        text-shadow: 0 0 0 rgba(212, 148, 74, 0);
    }
    50% {
        text-shadow: 0 0 20px rgba(212, 148, 74, 0.4);
    }
}

#hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1.5vw, 18px);
    color: var(--system-gray);
    margin-top: 16px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

#hero-inner.revealed #hero-subtitle {
    opacity: 1;
    transform: translateY(0);
}

/* Typing cursor effect */
#title-text::after {
    content: '';
    display: inline-block;
    width: 3px;
    height: 0.85em;
    background: var(--deep-navy);
    margin-left: 4px;
    vertical-align: text-bottom;
    animation: cursorBlink 1s steps(1) infinite;
}

@keyframes cursorBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Scroll indicator */
#scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.6s ease;
}

#scroll-indicator.visible {
    opacity: 1;
}

#scroll-indicator.hidden {
    opacity: 0;
}

#scroll-indicator span {
    font-family: 'Overpass Mono', monospace;
    font-size: 12px;
    color: var(--system-gray);
    letter-spacing: 0.05em;
}

#scroll-indicator svg {
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* ========================================
   Breathing Strips
   ======================================== */
.breathing-strip {
    width: calc(100% + 80px + 40px);
    margin-left: -80px;
    height: 80px;
    overflow: hidden;
    position: relative;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.breathing-strip.visible {
    opacity: 1;
}

.breathing-strip[data-pattern="1"] {
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 20px,
        rgba(74, 123, 217, 0.04) 20px,
        rgba(74, 123, 217, 0.04) 21px
    );
    animation: stripShift1 20s linear infinite;
}

.breathing-strip[data-pattern="2"] {
    background: repeating-linear-gradient(
        135deg,
        transparent,
        transparent 16px,
        rgba(212, 148, 74, 0.05) 16px,
        rgba(212, 148, 74, 0.05) 17px
    );
    animation: stripShift2 25s linear infinite;
}

.breathing-strip[data-pattern="3"] {
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 12px,
        rgba(139, 123, 200, 0.04) 12px,
        rgba(139, 123, 200, 0.04) 13px
    );
    animation: stripShift3 18s linear infinite;
}

.breathing-strip[data-pattern="4"] {
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 24px,
            rgba(74, 123, 217, 0.03) 24px,
            rgba(74, 123, 217, 0.03) 25px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 24px,
            rgba(74, 123, 217, 0.03) 24px,
            rgba(74, 123, 217, 0.03) 25px
        );
    animation: stripShift4 30s linear infinite;
}

.breathing-strip[data-pattern="5"] {
    background: repeating-linear-gradient(
        60deg,
        transparent,
        transparent 10px,
        rgba(76, 175, 80, 0.04) 10px,
        rgba(76, 175, 80, 0.04) 11px
    );
    animation: stripShift5 22s linear infinite;
}

.breathing-strip[data-pattern="6"] {
    background: repeating-linear-gradient(
        120deg,
        transparent,
        transparent 14px,
        rgba(212, 148, 74, 0.04) 14px,
        rgba(212, 148, 74, 0.04) 15px
    );
    animation: stripShift6 28s linear infinite;
}

@keyframes stripShift1 {
    from { background-position: 0 0; }
    to { background-position: 200px 0; }
}
@keyframes stripShift2 {
    from { background-position: 0 0; }
    to { background-position: 160px 160px; }
}
@keyframes stripShift3 {
    from { background-position: 0 0; }
    to { background-position: 120px 120px; }
}
@keyframes stripShift4 {
    from { background-position: 0 0; }
    to { background-position: 240px 240px; }
}
@keyframes stripShift5 {
    from { background-position: 0 0; }
    to { background-position: 100px 100px; }
}
@keyframes stripShift6 {
    from { background-position: 0 0; }
    to { background-position: 140px 140px; }
}

/* ========================================
   Stages
   ======================================== */
.stage {
    padding: 120px 0 80px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.stage.visible {
    opacity: 1;
    transform: translateY(0);
}

.stage-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 24px;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.4s ease 0.2s, transform 0.4s ease 0.2s;
}

.stage.visible .stage-icon {
    opacity: 1;
    transform: scale(1);
}

.stage-icon svg {
    width: 100%;
    height: 100%;
}

.stage-title {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: clamp(24px, 4vw, 52px);
    letter-spacing: -0.01em;
    color: var(--deep-navy);
    margin-bottom: 16px;
}

.stage-description {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    color: var(--system-gray);
    max-width: 680px;
    margin-bottom: 48px;
    line-height: 1.75;
}

/* ========================================
   Process Cards (Hover-Lift)
   ======================================== */
.process-card {
    background: var(--canvas-white);
    border: 1px solid rgba(107, 107, 120, 0.12);
    border-radius: 8px;
    padding: 28px 32px;
    margin-bottom: 20px;
    max-width: 640px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.stage.visible .process-card:nth-child(4) {
    transition-delay: 0.1s;
}

.stage.visible .process-card:nth-child(5) {
    transition-delay: 0.2s;
}

.stage.visible .process-card:nth-child(6) {
    transition-delay: 0.3s;
}

.process-card.hover-lift {
    cursor: default;
    transition: opacity 0.5s ease, transform 0.3s ease, box-shadow 0.2s ease;
}

.stage.visible .process-card.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.2s ease;
}

.process-card.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.process-card h3 {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    font-size: 16px;
    color: var(--deep-navy);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.process-card p {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 15px;
    color: var(--system-gray);
    line-height: 1.7;
}

/* Color-coded left borders per stage */
.stage[data-stage="0"] .process-card {
    border-left: 3px solid var(--process-blue);
}

.stage[data-stage="1"] .process-card {
    border-left: 3px solid var(--action-amber);
}

.stage[data-stage="2"] .process-card {
    border-left: 3px solid var(--highlight-lilac);
}

.stage[data-stage="3"] .process-card {
    border-left: 3px solid var(--process-blue);
}

.stage[data-stage="4"] .process-card {
    border-left: 3px solid var(--active-green);
}

/* ========================================
   Closing Section
   ======================================== */
#closing {
    padding: 120px 0 160px;
    text-align: left;
}

#closing-title {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: clamp(24px, 3.5vw, 44px);
    letter-spacing: -0.01em;
    color: var(--deep-navy);
    margin-bottom: 20px;
}

#closing-text {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    color: var(--system-gray);
    max-width: 600px;
    line-height: 1.75;
    margin-bottom: 48px;
}

#closing-loop {
    width: 120px;
    height: 120px;
    opacity: 0;
    transition: opacity 0.8s ease;
}

#closing-loop.visible {
    opacity: 1;
}

#closing-loop svg {
    width: 100%;
    height: 100%;
    animation: loopRotate 12s linear infinite;
}

@keyframes loopRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========================================
   Stage-specific background tint transitions
   ======================================== */
.stage[data-stage="0"],
.stage[data-stage="1"],
.stage[data-stage="2"] {
    background: linear-gradient(
        180deg,
        rgba(74, 123, 217, 0.015) 0%,
        transparent 100%
    );
    border-radius: 0;
    margin-left: -20px;
    padding-left: 20px;
    margin-right: -20px;
    padding-right: 20px;
}

.stage[data-stage="3"],
.stage[data-stage="4"] {
    background: linear-gradient(
        180deg,
        rgba(212, 148, 74, 0.015) 0%,
        transparent 100%
    );
    border-radius: 0;
    margin-left: -20px;
    padding-left: 20px;
    margin-right: -20px;
    padding-right: 20px;
}
