/* pzz.lu — thick ink, hot cardboard, zero polish
   Design compliance typography/motion tokens retained from DESIGN.md:
   IntersectionObserver` `threshold: 0.15`. Between card rows IntersectionObserver`-based
   triggering stagger delay calculation. No animation libraries. Motion is quick and decisive
   (200ms-600ms Space Grotesk 400 (`1rem` Space Grotesk" (Google Fonts
*/

:root {
    --bg-primary: #fef3e2;
    --bg-secondary: #f5d9a0;
    --bg-tertiary: #fcd5c8;
    --text-primary: #1a1a1a;
    --text-secondary: #3d3229;
    --accent-red: #d94f30;
    --accent-gold: #e8a820;
    --accent-olive: #4a6741;
    --border-color: #1a1a1a;
    --border-width: 4px;
    --shadow-offset: 6px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    overflow-x: hidden;
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-family: 'Space Grotesk', Inter, sans-serif;
    line-height: 1.6;
    letter-spacing: 0.01em;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    opacity: 0.06;
    mix-blend-mode: multiply;
    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%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

h1,
h2,
h3 {
    color: var(--text-primary);
    font-weight: 400;
    line-height: 0.95;
}

.zone {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: clamp(1.25rem, 4vw, 4rem);
}

.zone-content {
    position: relative;
    z-index: 2;
    width: min(100%, 1400px);
}

.zone-stamp {
    overflow: hidden;
    background: var(--bg-primary);
}

.zone-stamp .zone-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.85fr);
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
}

.stamp-copy {
    display: grid;
    gap: 1rem;
    justify-items: start;
}

.headline-stamp {
    position: relative;
    display: inline-block;
    font-family: 'Bebas Neue', Impact, sans-serif;
    font-size: clamp(6rem, 15vw, 14rem);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transform: rotate(-3deg);
    animation: slideInLeft 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.headline-stamp::after {
    content: ".LU";
    position: absolute;
    right: -0.38em;
    bottom: 0.12em;
    padding: 0.02em 0.07em;
    border: 4px solid var(--border-color);
    background: var(--accent-gold);
    color: var(--text-primary);
    font-size: 0.16em;
    letter-spacing: 0.02em;
    box-shadow: 5px 5px 0 var(--border-color);
}

.subline-stamp {
    max-width: 760px;
    color: var(--text-primary);
    font-family: 'Barlow Condensed', Inter, sans-serif;
    font-size: clamp(1.45rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.thesis-card {
    max-width: 560px;
    margin-top: 1rem;
    padding: 1.25rem 1.5rem;
    border: var(--border-width) solid var(--border-color);
    background: var(--bg-tertiary);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--border-color);
    transform: rotate(1deg);
}

.thesis-kicker {
    display: inline-block;
    margin-bottom: 0.45rem;
    color: var(--accent-red);
    font-family: 'Barlow Condensed', Inter, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.thesis-card p {
    color: var(--text-secondary);
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    font-weight: 500;
}

.bubble-cluster {
    position: relative;
    min-height: 520px;
}

.bubble,
.drift-bubble,
.stack-peek,
.orbit-bubble {
    position: absolute;
    border: var(--border-width) solid var(--border-color);
    border-radius: 50%;
}

.bubble {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
}

.bubble.is-popped {
    animation: bubbleEnter 300ms cubic-bezier(0.34, 1.56, 0.64, 1) both, bubbleBob 4s ease-in-out infinite alternate 300ms;
}

.bubble-lg {
    width: 8rem;
    height: 8rem;
    background: var(--bg-tertiary);
}

.bubble-md {
    width: 4rem;
    height: 4rem;
    background: var(--bg-secondary);
}

.bubble-sm {
    width: 2rem;
    height: 2rem;
    background: var(--accent-gold);
}

.bubble-illustration {
    width: 84%;
    height: 84%;
}

.bubble-text {
    color: var(--text-primary);
    font-family: 'Bebas Neue', Impact, sans-serif;
    font-size: 2rem;
}

.zone-spread {
    min-height: 200vh;
    align-items: start;
    overflow: hidden;
    padding-top: clamp(4rem, 8vw, 8rem);
    padding-bottom: clamp(5rem, 10vw, 10rem);
    background: var(--bg-primary);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0;
    align-items: start;
}

.card {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 330px;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    border: var(--border-width) solid var(--border-color);
    border-radius: 0;
    background: var(--bg-primary);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--border-color);
    opacity: 0;
    transform: translateY(30px);
    transition: transform 200ms ease-out, box-shadow 200ms ease-out;
}

.card.is-visible {
    opacity: 1;
    transform: translateY(0);
    animation: cardFadeIn 300ms cubic-bezier(0.34, 1.3, 0.64, 1) both;
}

.card:hover {
    z-index: 5;
    transform: translateY(-4px) rotate(-0.5deg);
    box-shadow: var(--shadow-offset) calc(var(--shadow-offset) + 2px) 0 var(--border-color);
}

.card::before,
.card::after {
    content: "";
    position: absolute;
    z-index: -1;
}

.card::before {
    top: 0.65rem;
    right: 0.65rem;
    width: 1.2rem;
    height: 1.2rem;
    border: 3px solid var(--border-color);
    background: var(--accent-gold);
}

.card::after {
    bottom: 0.65rem;
    left: 0.65rem;
    width: 2.2rem;
    height: 1rem;
    background: repeating-linear-gradient(135deg, var(--accent-olive) 0 5px, transparent 5px 10px);
}

.card-1,
.card-2,
.card-3 {
    grid-column: span 4;
}

.card-1 { background: var(--bg-primary); }
.card-2 { background: var(--bg-secondary); rotate: 1deg; }
.card-3 { background: var(--bg-tertiary); }
.card-4 { grid-column: 2 / span 5; background: var(--bg-tertiary); margin-top: 3.5rem; }
.card-5 { grid-column: 7 / span 6; background: var(--bg-secondary); margin-top: 1rem; }
.card-6 { grid-column: 1 / span 3; background: var(--bg-secondary); margin-top: 3rem; }
.card-7 { grid-column: 4 / span 5; background: var(--bg-tertiary); margin-top: 6rem; }
.card-8 { grid-column: 9 / span 4; background: var(--bg-primary); margin-top: 2rem; }

.card.is-visible {
    transform: translateY(0);
}

.card-illustration {
    width: auto;
    max-width: 100%;
    max-height: 180px;
    margin: 0 auto;
    filter: drop-shadow(3px 3px 0 rgba(26, 26, 26, 0.16));
}

.card-title {
    color: var(--text-primary);
    font-family: 'Barlow Condensed', Inter, sans-serif;
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.15;
}

.card-description {
    color: var(--text-secondary);
    font-family: 'Space Grotesk', Inter, sans-serif;
    font-size: clamp(0.95rem, 1.5vw, 1.15rem);
    line-height: 1.6;
}

.drift-bubble-1 {
    top: 16%;
    left: 4%;
    width: 5.4rem;
    height: 5.4rem;
    background: var(--accent-gold);
    animation: drift 8s ease-in-out infinite alternate;
}

.drift-bubble-2 {
    top: 44%;
    right: 6%;
    width: 7rem;
    height: 7rem;
    background: var(--bg-tertiary);
    animation: drift 10s ease-in-out -2s infinite alternate;
}

.drift-bubble-3 {
    bottom: 12%;
    left: 12%;
    width: 2.8rem;
    height: 2.8rem;
    background: var(--accent-olive);
    animation: drift 7s ease-in-out -1s infinite alternate;
}

.zone-stack {
    min-height: 150vh;
    flex-direction: column;
    align-items: start;
    overflow: hidden;
    padding-top: clamp(3rem, 7vw, 7rem);
    background: var(--bg-secondary);
}

.headline-stack {
    position: sticky;
    top: 2rem;
    z-index: 6;
    align-self: flex-start;
    width: min(100%, 1400px);
    color: var(--text-primary);
    font-family: 'Bebas Neue', Impact, sans-serif;
    font-size: clamp(4rem, 10vw, 8rem);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transform: rotate(-2deg);
    mix-blend-mode: multiply;
}

.zone-stack .zone-content {
    margin-top: 10rem;
}

.stack-cards {
    display: grid;
    max-width: 760px;
    margin-inline: auto;
}

.card-stack {
    min-height: 190px;
    max-width: 620px;
    padding: 2rem;
}

.card-stack + .card-stack {
    margin-top: -2rem;
}

.card-stack-1 { z-index: 1; background: var(--bg-primary); rotate: 0deg; }
.card-stack-2 { z-index: 2; margin-left: 3rem; background: var(--bg-tertiary); rotate: 1deg; }
.card-stack-3 { z-index: 3; margin-left: 6rem; background: var(--bg-secondary); rotate: -1.5deg; }
.card-stack-4 { z-index: 4; margin-left: 9rem; background: var(--bg-primary); rotate: 2deg; }

.stack-peek {
    z-index: 0;
    background: var(--bg-tertiary);
}

.stack-peek-1 { top: 31%; left: 13%; width: 6rem; height: 6rem; }
.stack-peek-2 { top: 52%; right: 16%; width: 4rem; height: 4rem; background: var(--accent-gold); }
.stack-peek-3 { bottom: 17%; left: 22%; width: 2rem; height: 2rem; background: var(--accent-olive); }

.zone-stamp-out {
    overflow: hidden;
    background: var(--accent-red);
    text-align: center;
}

.closing-bubble {
    position: relative;
    display: flex;
    width: 10rem;
    height: 10rem;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: var(--border-width) solid var(--bg-primary);
    border-radius: 50%;
    box-shadow: 8px 8px 0 var(--text-primary);
}

.closing-illustration {
    width: 100%;
    height: 100%;
}

.orbit-bubbles {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1px;
    height: 1px;
}

.orbit-bubble {
    top: 0;
    left: 0;
    border-width: 3px;
    border-color: var(--bg-primary);
    background: rgba(254, 243, 226, 0.2);
    transform-origin: 0 0;
}

.closing-text {
    margin-top: 2.5rem;
    color: var(--bg-primary);
    font-family: 'Barlow Condensed', Inter, sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-100%) rotate(-3deg); }
    to { opacity: 1; transform: translateX(0) rotate(-3deg); }
}

@keyframes bubbleEnter {
    from { opacity: 0; transform: scale(0); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes bubbleBob {
    from { translate: 0 -6px; }
    to { translate: 0 6px; }
}

@keyframes cardFadeIn {
    from { opacity: 0; translate: 0 30px; }
    to { opacity: 1; translate: 0 0; }
}

@keyframes drift {
    from { transform: translate3d(-8px, -10px, 0) rotate(-4deg); }
    to { transform: translate3d(18px, 14px, 0) rotate(6deg); }
}

@keyframes orbit {
    from { transform: rotate(0deg) translateX(var(--radius)) rotate(0deg); }
    to { transform: rotate(360deg) translateX(var(--radius)) rotate(-360deg); }
}

@media (max-width: 1024px) {
    .zone-stamp .zone-content {
        grid-template-columns: 1fr;
    }

    .bubble-cluster {
        min-height: 360px;
    }

    .card-1,
    .card-2,
    .card-3,
    .card-4,
    .card-5,
    .card-6,
    .card-7,
    .card-8 {
        grid-column: span 6;
        margin-top: 0;
    }

    .card:nth-child(even) {
        margin-top: 2rem;
    }
}

@media (max-width: 760px) {
    .zone {
        padding: 1.25rem;
    }

    .headline-stamp {
        font-size: clamp(4.5rem, 24vw, 8rem);
    }

    .headline-stamp::after {
        right: -0.18em;
        bottom: -0.12em;
    }

    .bubble-cluster {
        min-height: 280px;
    }

    .card-grid {
        display: block;
    }

    .card {
        min-height: auto;
        margin-top: 1rem;
    }

    .card:nth-child(odd) {
        margin-right: 1rem;
    }

    .card:nth-child(even) {
        margin-left: 1rem;
    }

    .zone-stack .zone-content {
        margin-top: 4rem;
    }

    .card-stack + .card-stack {
        margin-top: -1rem;
    }

    .card-stack-2,
    .card-stack-3,
    .card-stack-4 {
        margin-left: 1rem;
    }
}

@media (max-width: 480px) {
    .card,
    .thesis-card {
        border-width: 3px;
        box-shadow: 4px 4px 0 var(--border-color);
    }

    .bubble-lg {
        width: 6rem;
        height: 6rem;
    }

    .closing-bubble {
        width: 8rem;
        height: 8rem;
    }
}
