/* ==========================================================================
   footprint.broker — Ethereal Blue / Muji Aesthetic
   Colors: #EDF2FB, #D6E4FF, #C1D5FF, #A8C4FF, #7B9EE8, #6C8FD4, #1B2845, #2C3E6B, #5A6E8F, #E8EEFF, #B8C6FF
   Fonts: Nunito (700, 800), Quicksand (400, 500), Baloo 2 (600)
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
    color: #2C3E6B;
    background-color: #EDF2FB;
    overflow-x: hidden;
    line-height: 1.85;
    letter-spacing: 0.015em;
    font-size: clamp(1rem, 1.1vw, 1.2rem);
}

/* ==========================================================================
   SVG Trail Path
   ========================================================================== */

#trail-svg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Trail uses Light Periwinkle #B8C6FF at 40% opacity per design */
#trail-path {
    stroke: #B8C6FF;
    animation: marchingAnts 20s linear infinite;
}

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

/* ==========================================================================
   Zone Base Styles
   ========================================================================== */

.zone {
    position: relative;
    z-index: 1;
    width: 100%;
}

/* ==========================================================================
   Zone 1: The Impression Field
   ========================================================================== */

#impression-field {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #EDF2FB;
}

.impression-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

#footprint-glyph {
    width: clamp(180px, 28vw, 320px);
    height: auto;
    margin-bottom: 2rem;
}

/* Glyph assembly animation */
.glyph-part {
    opacity: 0;
    transform-origin: center center;
    animation: glyphAssemble 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.glyph-heel   { animation-delay: 0s; }
.glyph-ball   { animation-delay: 0.1s; }
.glyph-toe-1  { animation-delay: 0.3s; }
.glyph-toe-2  { animation-delay: 0.4s; }
.glyph-toe-3  { animation-delay: 0.5s; }
.glyph-toe-4  { animation-delay: 0.6s; }
.glyph-toe-5  { animation-delay: 0.7s; }

@keyframes glyphAssemble {
    0% {
        opacity: 0;
        transform: scale(0.7) rotate(-15deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* Glyph pulse after assembly */
#footprint-glyph {
    animation: glyphPulse 0.6s ease-in-out 1.4s 1;
}

@keyframes glyphPulse {
    0%, 100% {
        filter: none;
    }
    50% {
        filter: drop-shadow(0 0 4px rgba(123, 158, 232, 0.4));
    }
}

.site-name {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4.5rem);
    letter-spacing: 0.02em;
    line-height: 1.2;
    color: #2C3E6B;
    margin-bottom: 1rem;
    min-height: 1.4em;
}

.site-name .letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(12px);
    animation: letterReveal 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes letterReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.site-subtitle {
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    color: #5A6E8F;
    max-width: 36ch;
    min-height: 1.6em;
}

.site-subtitle .letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(12px);
    animation: letterReveal 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ==========================================================================
   Zone 2: The Trace Gallery
   ========================================================================== */

#trace-gallery {
    background-color: #EDF2FB;
}

.trace-band {
    display: flex;
    align-items: center;
    min-height: 80vh;
    padding: clamp(3rem, 6vw, 6rem) clamp(2rem, 8vw, 8rem);
    gap: clamp(2rem, 4vw, 5rem);
}

.trace-band-fog {
    background-color: #D6E4FF;
}

.trace-band-cloud {
    background-color: #C1D5FF;
}

.trace-band-atmosphere {
    background-color: #A8C4FF;
}

.trace-text {
    flex: 1;
    min-width: 0;
}

.trace-heading {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(1.6rem, 3vw, 2.8rem);
    letter-spacing: 0.02em;
    line-height: 1.2;
    color: #2C3E6B;
    margin-bottom: 1.2rem;
}

.trace-body {
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.1vw, 1.2rem);
    line-height: 1.85;
    color: #2C3E6B;
    max-width: 48ch;
    letter-spacing: 0.015em;
}

.trace-illustration {
    flex: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.trace-illustration svg {
    width: 100%;
    max-width: 400px;
    height: auto;
}

/* ==========================================================================
   Zone 3: The Geometry Garden
   ========================================================================== */

#geometry-garden {
    min-height: 100vh;
    background-color: #1B2845;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.garden-content {
    position: relative;
    z-index: 2;
    max-width: 680px;
    padding: 3rem;
    text-align: center;
}

.garden-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: clamp(1.05rem, 1.3vw, 1.35rem);
    line-height: 1.9;
    color: #E8EEFF;
    letter-spacing: 0.015em;
}

/* Floating shapes */
.floating-shape {
    position: absolute;
    z-index: 1;
    pointer-events: none;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.floating-shape svg {
    width: 100%;
    height: 100%;
}

/* Individual shape positions, sizes, and animations */
.shape-1  { width: 60px;  top: 8%;   left: 12%;  animation: float1 35s linear infinite; opacity: 0.2; }
.shape-2  { width: 80px;  top: 15%;  left: 75%;  animation: float2 42s linear infinite; opacity: 0.15; }
.shape-3  { width: 50px;  top: 55%;  left: 5%;   animation: float3 30s linear infinite; opacity: 0.18; }
.shape-4  { width: 90px;  top: 70%;  left: 60%;  animation: float4 48s linear infinite; opacity: 0.12; }
.shape-5  { width: 40px;  top: 25%;  left: 45%;  animation: float5 38s linear infinite; opacity: 0.25; }
.shape-6  { width: 100px; top: 80%;  left: 20%;  animation: float6 52s linear infinite; opacity: 0.1; }
.shape-7  { width: 55px;  top: 40%;  left: 85%;  animation: float7 28s linear infinite; opacity: 0.2; }
.shape-8  { width: 70px;  top: 12%;  left: 35%;  animation: float8 45s linear infinite; opacity: 0.14; }
.shape-9  { width: 35px;  top: 65%;  left: 50%;  animation: float9 33s linear infinite; opacity: 0.22; }
.shape-10 { width: 65px;  top: 90%;  left: 80%;  animation: float10 40s linear infinite; opacity: 0.16; }
.shape-11 { width: 120px; top: 5%;   left: 55%;  animation: float11 55s linear infinite; opacity: 0.08; }
.shape-12 { width: 45px;  top: 35%;  left: 15%;  animation: float12 37s linear infinite; opacity: 0.2; }
.shape-13 { width: 55px;  top: 78%;  left: 40%;  animation: float13 31s linear infinite; opacity: 0.18; }
.shape-14 { width: 75px;  top: 20%;  left: 90%;  animation: float14 50s linear infinite; opacity: 0.12; }
.shape-15 { width: 85px;  top: 48%;  left: 65%;  animation: float15 43s linear infinite; opacity: 0.14; }
.shape-16 { width: 50px;  top: 85%;  left: 10%;  animation: float16 36s linear infinite; opacity: 0.2; }
.shape-17 { width: 40px;  top: 60%;  left: 30%;  animation: float17 29s linear infinite; opacity: 0.22; }
.shape-18 { width: 95px;  top: 10%;  left: 5%;   animation: float18 47s linear infinite; opacity: 0.1; }
.shape-19 { width: 60px;  top: 45%;  left: 50%;  animation: float19 34s linear infinite; opacity: 0.16; }
.shape-20 { width: 65px;  top: 30%;  left: 70%;  animation: float20 41s linear infinite; opacity: 0.18; }

@keyframes float1 {
    0%   { transform: translate(0, 0) rotate(0deg); }
    25%  { transform: translate(40px, -30px) rotate(15deg); }
    50%  { transform: translate(-20px, 20px) rotate(-10deg); }
    75%  { transform: translate(30px, 40px) rotate(8deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes float2 {
    0%   { transform: translate(0, 0) rotate(0deg); }
    25%  { transform: translate(-50px, 20px) rotate(-12deg); }
    50%  { transform: translate(30px, -40px) rotate(18deg); }
    75%  { transform: translate(-20px, -10px) rotate(-5deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes float3 {
    0%   { transform: translate(0, 0) rotate(0deg); }
    25%  { transform: translate(60px, 15px) rotate(20deg); }
    50%  { transform: translate(20px, -35px) rotate(-15deg); }
    75%  { transform: translate(-40px, 25px) rotate(10deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes float4 {
    0%   { transform: translate(0, 0) rotate(0deg); }
    25%  { transform: translate(-30px, -45px) rotate(-8deg); }
    50%  { transform: translate(45px, 15px) rotate(12deg); }
    75%  { transform: translate(10px, -25px) rotate(-18deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes float5 {
    0%   { transform: translate(0, 0) rotate(0deg); }
    25%  { transform: translate(25px, 35px) rotate(10deg); }
    50%  { transform: translate(-35px, -15px) rotate(-20deg); }
    75%  { transform: translate(15px, -40px) rotate(5deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes float6 {
    0%   { transform: translate(0, 0) rotate(0deg); }
    25%  { transform: translate(50px, -20px) rotate(-14deg); }
    50%  { transform: translate(-10px, 30px) rotate(8deg); }
    75%  { transform: translate(-35px, -15px) rotate(-6deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes float7 {
    0%   { transform: translate(0, 0) rotate(0deg); }
    25%  { transform: translate(-40px, 25px) rotate(16deg); }
    50%  { transform: translate(15px, -45px) rotate(-12deg); }
    75%  { transform: translate(30px, 10px) rotate(7deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes float8 {
    0%   { transform: translate(0, 0) rotate(0deg); }
    25%  { transform: translate(35px, 40px) rotate(-10deg); }
    50%  { transform: translate(-25px, -20px) rotate(15deg); }
    75%  { transform: translate(-10px, 30px) rotate(-8deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes float9 {
    0%   { transform: translate(0, 0) rotate(0deg); }
    25%  { transform: translate(-20px, -35px) rotate(12deg); }
    50%  { transform: translate(40px, 10px) rotate(-18deg); }
    75%  { transform: translate(-15px, 25px) rotate(6deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes float10 {
    0%   { transform: translate(0, 0) rotate(0deg); }
    25%  { transform: translate(30px, -25px) rotate(-15deg); }
    50%  { transform: translate(-40px, 35px) rotate(10deg); }
    75%  { transform: translate(20px, -10px) rotate(-5deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes float11 {
    0%   { transform: translate(0, 0) rotate(0deg); }
    25%  { transform: translate(-15px, 20px) rotate(5deg); }
    50%  { transform: translate(25px, -30px) rotate(-8deg); }
    75%  { transform: translate(-30px, 10px) rotate(12deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes float12 {
    0%   { transform: translate(0, 0) rotate(0deg); }
    25%  { transform: translate(45px, 15px) rotate(-20deg); }
    50%  { transform: translate(-15px, -40px) rotate(14deg); }
    75%  { transform: translate(20px, 25px) rotate(-7deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes float13 {
    0%   { transform: translate(0, 0) rotate(0deg); }
    25%  { transform: translate(-35px, -20px) rotate(18deg); }
    50%  { transform: translate(30px, 35px) rotate(-10deg); }
    75%  { transform: translate(-10px, -30px) rotate(4deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes float14 {
    0%   { transform: translate(0, 0) rotate(0deg); }
    25%  { transform: translate(20px, 40px) rotate(-12deg); }
    50%  { transform: translate(-45px, -10px) rotate(16deg); }
    75%  { transform: translate(15px, -35px) rotate(-9deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes float15 {
    0%   { transform: translate(0, 0) rotate(0deg); }
    25%  { transform: translate(-25px, 30px) rotate(8deg); }
    50%  { transform: translate(35px, -25px) rotate(-14deg); }
    75%  { transform: translate(-20px, -15px) rotate(11deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes float16 {
    0%   { transform: translate(0, 0) rotate(0deg); }
    25%  { transform: translate(40px, -35px) rotate(-16deg); }
    50%  { transform: translate(-30px, 20px) rotate(10deg); }
    75%  { transform: translate(10px, 40px) rotate(-4deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes float17 {
    0%   { transform: translate(0, 0) rotate(0deg); }
    25%  { transform: translate(-15px, 45px) rotate(14deg); }
    50%  { transform: translate(40px, -10px) rotate(-20deg); }
    75%  { transform: translate(-25px, -30px) rotate(8deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes float18 {
    0%   { transform: translate(0, 0) rotate(0deg); }
    25%  { transform: translate(30px, 20px) rotate(-6deg); }
    50%  { transform: translate(-20px, -35px) rotate(12deg); }
    75%  { transform: translate(35px, -10px) rotate(-15deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes float19 {
    0%   { transform: translate(0, 0) rotate(0deg); }
    25%  { transform: translate(-40px, -15px) rotate(10deg); }
    50%  { transform: translate(20px, 40px) rotate(-18deg); }
    75%  { transform: translate(25px, -20px) rotate(6deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes float20 {
    0%   { transform: translate(0, 0) rotate(0deg); }
    25%  { transform: translate(15px, -40px) rotate(-12deg); }
    50%  { transform: translate(-35px, 15px) rotate(16deg); }
    75%  { transform: translate(30px, 30px) rotate(-8deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

/* ==========================================================================
   Zone 4: The Catalog
   ========================================================================== */

#catalog {
    background-color: #EDF2FB;
    padding: clamp(4rem, 10vw, 10rem) clamp(2rem, 8vw, 8rem);
}

.catalog-content {
    max-width: 640px;
    margin: 0 auto;
}

.catalog-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1rem 1.5rem;
    margin-bottom: 3rem;
    border-radius: 12px;
    transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (hover: hover) {
    .catalog-item:hover {
        transform: translateY(-6px);
        box-shadow: 0 8px 24px rgba(123, 158, 232, 0.18);
    }

    .catalog-item:hover .catalog-icon svg {
        transform: scale(1.1);
    }
}

.catalog-item:not(:hover) {
    transition: transform 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.catalog-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.catalog-icon svg {
    width: 100%;
    height: 100%;
    transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.catalog-label {
    font-family: 'Baloo 2', cursive;
    font-weight: 600;
    font-size: clamp(0.85rem, 0.95vw, 1rem);
    color: #2C3E6B;
    letter-spacing: 0.01em;
}

/* ==========================================================================
   Zone 5: The Departure
   ========================================================================== */

#departure {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, #EDF2FB, #ffffff);
    position: relative;
}

.departure-content {
    text-align: center;
    padding: 3rem;
}

.departure-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    color: #5A6E8F;
    letter-spacing: 0.02em;
    line-height: 1.5;
    margin-bottom: 2.5rem;
}

.departure-icon {
    display: flex;
    justify-content: center;
}

.departure-icon svg {
    width: 48px;
    height: auto;
    animation: gentlePulse 3s ease-in-out infinite;
}

@keyframes gentlePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ==========================================================================
   Responsive: Below 768px
   ========================================================================== */

@media (max-width: 768px) {
    .trace-band {
        flex-direction: column;
        min-height: auto;
        padding: clamp(2rem, 4vw, 4rem) clamp(1.5rem, 4vw, 3rem);
    }

    .trace-text {
        order: 1;
    }

    .trace-illustration {
        order: 2;
        flex: 1;
    }

    .trace-illustration svg {
        max-width: 300px;
    }

    /* Reduce geometry garden shapes on mobile */
    .shape-11,
    .shape-14,
    .shape-15,
    .shape-18,
    .shape-19,
    .shape-20,
    .shape-6,
    .shape-8 {
        display: none;
    }

    .garden-content {
        padding: 2rem 1.5rem;
    }

    #trail-svg {
        opacity: 0.5;
    }
}

/* ==========================================================================
   Dotted Trail Decorative Lines
   ========================================================================== */

.trace-band::before {
    content: '';
    position: absolute;
    left: clamp(1rem, 4vw, 4rem);
    top: 0;
    bottom: 0;
    width: 2px;
    background-image: repeating-linear-gradient(
        to bottom,
        #A8C4FF 0px,
        #A8C4FF 3px,
        transparent 3px,
        transparent 11px
    );
    opacity: 0.3;
}

.trace-band {
    position: relative;
}
