/* ============================================
   gabs.day - Memphis Group Inspired Design
   ============================================ */

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

/* ---- Variables ---- */
:root {
    --near-black: #1A1A1A;
    --warm-cream: #F5F0E8;
    --memphis-yellow: #FFD166;
    --signal-red: #E84855;
    --terrazzo-teal: #2EC4B6;
    --plum-circuit: #5B2C6F;
    --coral-shout: #FF6B6B;
    --cool-white: #F5F5F5;
    --accent-orange: #F5A623;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.65;
    letter-spacing: 0.01em;
    color: var(--near-black);
    background: var(--warm-cream);
    overflow-x: hidden;
}

/* ---- Navigation Circles ---- */
#nav-circles {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 16px;
    z-index: 1000;
}

.nav-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 150ms ease-out, box-shadow 150ms ease-out;
    border: 0 solid var(--near-black);
}

.nav-circle:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 0 3px var(--near-black);
}

.nav-circle.active {
    box-shadow: 0 0 0 3px var(--near-black);
}

.nav-circle.pulse {
    animation: circlePulse 400ms ease-out;
}

@keyframes circlePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* ---- Clusters (General) ---- */
.cluster {
    position: relative;
    min-height: 100vh;
    padding: 80px 5vw 60px;
    overflow: hidden;
}

.cluster-content {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    margin: 0 auto;
}

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

/* ---- Cluster Backgrounds ---- */
.cluster-1 {
    background: var(--warm-cream);
}

.cluster-2 {
    background: var(--cool-white);
}

.cluster-3 {
    background: var(--warm-cream);
}

.cluster-4 {
    background: var(--terrazzo-teal);
    color: var(--warm-cream);
}

.cluster-5 {
    background: var(--cool-white);
}

/* ---- Hero Title ---- */
.title-block {
    padding-top: 15vh;
    margin-bottom: 60px;
}

.hero-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(48px, 12vw, 140px);
    font-weight: 400;
    letter-spacing: 0.05em;
    line-height: 0.92;
    text-transform: uppercase;
}

.hero-title .letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px) scale(0.3);
}

.hero-title .letter.animate-in {
    animation: letterBounceIn 500ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes letterBounceIn {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.3);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hero-day {
    position: relative;
    display: inline-block;
    margin-top: 8px;
}

.hero-day span {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 32px;
    color: var(--near-black);
}

.squiggle-underline {
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 12px;
}

/* ---- Cluster Headings ---- */
.cluster-heading {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(36px, 6vw, 72px);
    font-weight: 400;
    letter-spacing: 0.05em;
    line-height: 0.92;
    margin-bottom: 40px;
}

/* ---- Content Blocks ---- */
.content-block {
    border: 4px solid var(--near-black);
    padding: 32px 36px;
    margin-bottom: 30px;
    background: var(--warm-cream);
    position: relative;
    transition: transform 150ms ease-out, box-shadow 150ms ease-out;
}

.content-block:hover {
    box-shadow: 4px 4px 0 var(--near-black);
    transform: translate(-2px, -2px) rotate(inherit);
}

.content-block p {
    margin-bottom: 16px;
}

.content-block p:last-child {
    margin-bottom: 0;
}

/* Block variations */
.block-intro {
    max-width: 600px;
    margin-left: 10%;
    border-color: var(--memphis-yellow);
}

.block-left {
    max-width: 520px;
    position: relative;
    z-index: 2;
}

.block-right {
    max-width: 520px;
    margin-left: auto;
    margin-top: -30px;
    position: relative;
    z-index: 3;
}

.block-wide {
    max-width: 800px;
    margin: 0 auto;
}

.block-teal {
    background: transparent;
    border-color: var(--memphis-yellow);
    color: var(--warm-cream);
}

.block-closing {
    max-width: 650px;
    margin: 0 auto 60px;
}

/* ---- Zigzag Top Border ---- */
.zigzag-top {
    clip-path: polygon(
        0% 12px, 2% 0%, 4% 12px, 6% 0%, 8% 12px, 10% 0%,
        12% 12px, 14% 0%, 16% 12px, 18% 0%, 20% 12px, 22% 0%,
        24% 12px, 26% 0%, 28% 12px, 30% 0%, 32% 12px, 34% 0%,
        36% 12px, 38% 0%, 40% 12px, 42% 0%, 44% 12px, 46% 0%,
        48% 12px, 50% 0%, 52% 12px, 54% 0%, 56% 12px, 58% 0%,
        60% 12px, 62% 0%, 64% 12px, 66% 0%, 68% 12px, 70% 0%,
        72% 12px, 74% 0%, 76% 12px, 78% 0%, 80% 12px, 82% 0%,
        84% 12px, 86% 0%, 88% 12px, 90% 0%, 92% 12px, 94% 0%,
        96% 12px, 98% 0%, 100% 12px,
        100% 100%, 0% 100%
    );
    padding-top: 48px;
}

/* ---- Annotations (Caveat) ---- */
.annotation {
    display: inline-block;
    position: relative;
    padding: 16px 24px;
    margin: 20px 0;
    background: var(--warm-cream);
    border: 3px solid var(--signal-red);
    border-radius: 12px;
}

.annotation::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 30px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 12px solid var(--signal-red);
}

.caveat-text {
    font-family: 'Caveat', cursive;
    font-size: 22px;
    font-weight: 400;
    color: var(--signal-red);
}

.annotation-talk {
    opacity: 0;
    margin-left: 40%;
    margin-top: -20px;
}

.annotation-talk.animate-in {
    animation: annotationRotateIn 500ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes annotationRotateIn {
    0% {
        opacity: 0;
        transform: rotate(-15deg);
    }
    100% {
        opacity: 1;
        transform: rotate(-2deg);
    }
}

.annotation-aside {
    margin-left: 55%;
    border-color: var(--accent-orange);
}

.annotation-aside::after {
    border-top-color: var(--accent-orange);
}

.annotation-quiet {
    border-color: var(--memphis-yellow);
    background: rgba(26, 26, 26, 0.3);
}

.annotation-quiet::after {
    border-top-color: var(--memphis-yellow);
}

.annotation-end {
    margin-left: 30%;
    border-color: var(--signal-red);
}

/* ---- Dialogue Pair ---- */
.dialogue-pair {
    position: relative;
}

/* ---- Squiggle Separators ---- */
.squiggle-separator {
    width: 100%;
    height: 60px;
    overflow: hidden;
    position: relative;
    z-index: 5;
}

.squiggle-svg {
    width: 100%;
    height: 100%;
}

.squiggle-path {
    opacity: 0.7;
}

/* ---- Zigzag Separator ---- */
.zigzag-separator {
    width: 100%;
    height: 24px;
    overflow: hidden;
    position: relative;
    z-index: 5;
}

.zigzag-svg {
    width: 100%;
    height: 100%;
}

/* ---- Closing Statement ---- */
.closing-statement {
    text-align: center;
    margin: 40px 0;
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(60px, 15vw, 160px);
    letter-spacing: 0.08em;
    line-height: 0.92;
}

.closing-word {
    display: inline-block;
}

/* ---- Footer ---- */
.site-footer {
    padding: 80px 5vw 60px;
    background: var(--warm-cream);
    text-align: center;
    overflow: hidden;
}

.footer-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(60px, 10vw, 120px);
    letter-spacing: 0.05em;
    line-height: 0.92;
    margin-bottom: 30px;
    display: inline-block;
}

.footer-squiggle {
    width: 100%;
    height: 20px;
    display: block;
}

/* ---- Confetti Shapes ---- */
.confetti-shape {
    position: absolute;
    opacity: 0;
    transition: opacity 600ms ease;
    pointer-events: none;
}

.confetti-shape.visible {
    opacity: 1;
}

.confetti-circle {
    border-radius: 50%;
}

.confetti-square {
    border-radius: 0;
}

.confetti-triangle {
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
    border-left-style: solid;
    border-right-style: solid;
    border-bottom-style: solid;
    border-left-color: transparent;
    border-right-color: transparent;
}

/* ---- Dot Grid Background ---- */
.cluster::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, currentColor 2px, transparent 2px);
    background-size: 24px 24px;
    opacity: 0.06;
}

.cluster-1::before { color: var(--memphis-yellow); }
.cluster-2::before { color: var(--signal-red); }
.cluster-3::before { color: var(--terrazzo-teal); }
.cluster-4::before { color: var(--warm-cream); opacity: 0.08; }
.cluster-5::before { color: var(--plum-circuit); }

/* ---- Scroll Animations ---- */
.scroll-animate {
    opacity: 0;
    transform: translateY(60px) scale(0.85);
    transition: none;
}

.scroll-animate.entered {
    animation: bounceEnter 600ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes bounceEnter {
    0% {
        opacity: 0;
        transform: translateY(60px) scale(0.85);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Squiggle draw animation */
.squiggle-path {
    stroke-dasharray: 3000;
    stroke-dashoffset: 3000;
    transition: stroke-dashoffset 800ms ease-out;
}

.squiggle-path.drawn {
    stroke-dashoffset: 0;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    #nav-circles {
        position: fixed;
        top: 50%;
        left: auto;
        right: 12px;
        transform: translateY(-50%);
        flex-direction: column;
        gap: 10px;
    }

    .nav-circle {
        width: 24px;
        height: 24px;
    }

    .cluster {
        padding: 60px 4vw 40px;
    }

    .title-block {
        padding-top: 10vh;
    }

    .block-intro {
        margin-left: 0;
        max-width: 100%;
    }

    .block-left,
    .block-right {
        max-width: 100%;
        margin-left: 0;
    }

    .block-right {
        margin-top: -15px;
    }

    .annotation-talk {
        margin-left: 10%;
    }

    .annotation-aside {
        margin-left: 10%;
    }

    .annotation-end {
        margin-left: 5%;
    }

    /* Halve rotations on mobile */
    .content-block,
    .cluster-heading,
    .title-block,
    .annotation,
    .closing-statement,
    .footer-title {
        transform: rotate(calc(var(--rotation, 0deg) / 2)) !important;
    }
}
