@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@700;900&family=Quicksand:wght@500;600&family=Azeret+Mono:wght@400&display=swap');

/* === Reset & Base === */
*, *::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: 500;
    color: #1A0E2E;
    background-color: #E8DDFF;
    overflow-x: hidden;
}

/* === Typography === */
h1, h2, h3 {
    font-family: 'Nunito', sans-serif;
}

.section-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: #FEFCFF;
    text-align: center;
    margin-bottom: 48px;
    text-shadow: 2px 2px 0 rgba(26, 14, 46, 0.3);
}

/* === Sections === */
.section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* === Corkboard Background Texture === */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background:
        radial-gradient(circle 2px at 15% 25%, rgba(160, 118, 74, 0.3) 1px, transparent 1px),
        radial-gradient(circle 2px at 45% 65%, rgba(160, 118, 74, 0.25) 1px, transparent 1px),
        radial-gradient(circle 2px at 75% 15%, rgba(160, 118, 74, 0.3) 1px, transparent 1px),
        radial-gradient(circle 2px at 85% 85%, rgba(160, 118, 74, 0.2) 1px, transparent 1px),
        radial-gradient(circle 2px at 35% 95%, rgba(160, 118, 74, 0.25) 1px, transparent 1px),
        radial-gradient(circle 1.5px at 55% 45%, rgba(160, 118, 74, 0.2) 1px, transparent 1px),
        radial-gradient(circle 1.5px at 25% 55%, rgba(160, 118, 74, 0.15) 1px, transparent 1px),
        radial-gradient(circle 1.5px at 95% 35%, rgba(160, 118, 74, 0.2) 1px, transparent 1px),
        radial-gradient(ellipse at 50% 50%, #D4A574 0%, #A0764A 100%);
    background-size: 200px 200px, 180px 180px, 220px 220px, 190px 190px, 210px 210px, 160px 160px, 170px 170px, 150px 150px, 100% 100%;
}

/* Pin holes scattered effect */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        radial-gradient(circle 2px at 10% 20%, transparent 0px, transparent 1px, rgba(0,0,0,0.12) 1px, rgba(0,0,0,0.12) 2px, transparent 2px),
        radial-gradient(circle 2px at 30% 70%, transparent 0px, transparent 1px, rgba(0,0,0,0.1) 1px, rgba(0,0,0,0.1) 2px, transparent 2px),
        radial-gradient(circle 2px at 60% 30%, transparent 0px, transparent 1px, rgba(0,0,0,0.12) 1px, rgba(0,0,0,0.12) 2px, transparent 2px),
        radial-gradient(circle 2px at 80% 60%, transparent 0px, transparent 1px, rgba(0,0,0,0.1) 1px, rgba(0,0,0,0.1) 2px, transparent 2px),
        radial-gradient(circle 2px at 50% 90%, transparent 0px, transparent 1px, rgba(0,0,0,0.12) 1px, rgba(0,0,0,0.12) 2px, transparent 2px),
        radial-gradient(circle 2px at 90% 10%, transparent 0px, transparent 1px, rgba(0,0,0,0.1) 1px, rgba(0,0,0,0.1) 2px, transparent 2px),
        radial-gradient(circle 2px at 20% 50%, transparent 0px, transparent 1px, rgba(0,0,0,0.08) 1px, rgba(0,0,0,0.08) 2px, transparent 2px),
        radial-gradient(circle 2px at 70% 80%, transparent 0px, transparent 1px, rgba(0,0,0,0.1) 1px, rgba(0,0,0,0.1) 2px, transparent 2px);
    background-size: 300px 300px, 350px 350px, 280px 280px, 320px 320px, 310px 310px, 290px 290px, 340px 340px, 260px 260px;
    pointer-events: none;
}

/* ============================
   SECTION 1: HERO VAULT
   ============================ */
#hero-vault {
    background: radial-gradient(circle at 50% 40%, #FF4F9A 0%, #2B1B6E 60%, #1A0E2E 100%);
    padding: 40px 20px;
}

.hero-badge-wrapper {
    perspective: 600px;
    margin-bottom: 32px;
}

.hero-badge {
    width: clamp(180px, 30vw, 280px);
    height: clamp(180px, 30vw, 280px);
    position: relative;
    animation: badgeSpin 8s linear infinite;
    transform-style: preserve-3d;
}

@keyframes badgeSpin {
    from { transform: perspective(600px) rotateY(0deg); }
    to { transform: perspective(600px) rotateY(360deg); }
}

.hero-badge-border {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #E8E8E8 0%, #C0C0C0 25%, #B0B0B0 50%, #D8D8D8 100%);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(255, 79, 154, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.5);
}

.hero-badge-face {
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
}

.hero-badge-svg {
    width: 100%;
    height: 100%;
}

.hero-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: clamp(3rem, 12vw, 8rem);
    color: #FEFCFF;
    text-align: center;
    line-height: 1;
    text-shadow: 3px 3px 0 rgba(43, 27, 110, 0.5);
}

.hero-subtitle {
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: #E8DDFF;
    text-align: center;
    margin-top: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ============================
   SECTION 2: COLLECTION WALL
   ============================ */
#collection-wall {
    padding: 80px 32px;
    background: rgba(26, 14, 46, 0.4);
}

.badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 24px;
    max-width: 1200px;
    width: 100%;
}

.badge-cell {
    aspect-ratio: 1 / 1;
    background: #E8DDFF;
    border-radius: 16px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    opacity: 0;
    transform: translateY(60px) scale(0.7);
    transition: opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.badge-cell.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80%;
    height: 80%;
    position: relative;
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
    cursor: pointer;
}

.badge-item:hover {
    transform: scale(1.1) rotateY(15deg);
}

.badge-border {
    position: absolute;
    top: 0;
    left: 10%;
    width: 80%;
    height: 70%;
    border-radius: 50%;
    background: linear-gradient(135deg, #E8E8E8 0%, #B0B0B0 50%, #D8D8D8 100%);
    box-shadow:
        0 3px 12px rgba(0, 0, 0, 0.25),
        inset 0 1px 3px rgba(255, 255, 255, 0.4);
    animation: metalSheen 4s ease-in-out infinite;
}

.shield-border {
    border-radius: 8px 8px 50% 50%;
}

.hex-border {
    border-radius: 12px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.heart-border {
    border-radius: 50%;
}

@keyframes metalSheen {
    0%, 100% { background: linear-gradient(135deg, #E8E8E8 0%, #C0C0C0 25%, #B0B0B0 50%, #D8D8D8 100%); }
    50% { background: linear-gradient(135deg, #D8D8D8 0%, #E8E8E8 50%, #C0C0C0 75%, #B0B0B0 100%); }
}

/* Color palette reference: #FF7A3D - Citrus Blaze used in SVG badges */

.badge-face {
    position: relative;
    width: 80%;
    z-index: 1;
}

.badge-face svg {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.badge-label {
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    font-size: 13px;
    color: #2B1B6E;
    margin-top: 4px;
    text-align: center;
}

.badge-serial {
    font-family: 'Azeret Mono', monospace;
    font-weight: 400;
    font-size: 11px;
    color: #A0764A;
}

/* ============================
   SECTION 3: BADGE ANATOMY
   ============================ */
#badge-anatomy {
    background: linear-gradient(180deg, #1A0E2E 0%, #2B1B6E 100%);
    padding: 80px 32px;
}

.anatomy-container {
    position: relative;
    width: clamp(260px, 50vw, 450px);
    height: clamp(400px, 60vh, 600px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.anatomy-layer {
    position: absolute;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.anatomy-svg {
    width: clamp(160px, 35vw, 260px);
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.anatomy-label {
    font-family: 'Azeret Mono', monospace;
    font-weight: 400;
    font-size: 13px;
    color: #00D9C0;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.anatomy-container.exploded .anatomy-label {
    opacity: 1;
}

#anatomy-back {
    transform: translateY(0);
}

#anatomy-clasp {
    transform: translateY(0);
}

#anatomy-border {
    transform: translateY(0);
}

#anatomy-face {
    transform: translateY(0);
}

.anatomy-container.exploded #anatomy-back {
    transform: translateY(120px);
}

.anatomy-container.exploded #anatomy-clasp {
    transform: translateY(40px);
}

.anatomy-container.exploded #anatomy-border {
    transform: translateY(-40px);
}

.anatomy-container.exploded #anatomy-face {
    transform: translateY(-120px);
}

/* ============================
   SECTION 4: THE SASH
   ============================ */
#the-sash {
    background: linear-gradient(135deg, #2B1B6E 0%, #1A0E2E 50%, #2B1B6E 100%);
    padding: 80px 0;
    overflow: hidden;
}

#the-sash .section-title {
    padding: 0 32px;
}

.sash-container {
    width: 100%;
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.sash-ribbon {
    position: absolute;
    top: 50%;
    left: -5%;
    width: 110%;
    height: 80px;
    background: #FF4F9A;
    transform: translateY(-50%) rotate(-3deg);
    z-index: 0;
}

.sash-ribbon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%);
}

.sash-badges {
    display: flex;
    gap: 40px;
    padding: 60px 80px;
    position: relative;
    z-index: 1;
    min-width: max-content;
}

.sash-badge {
    flex-shrink: 0;
    width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    scroll-snap-align: center;
    transform: rotate(var(--angle, 0deg));
    transition: transform 0.3s ease-out;
    cursor: pointer;
}

.sash-badge:hover {
    transform: rotate(0deg) scale(1.15);
}

.sash-badge svg {
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
    border-radius: 50%;
}

.sash-badge-name {
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #FEFCFF;
    margin-top: 10px;
    text-align: center;
}

/* ============================
   SECTION 5: STAMP & SEAL
   ============================ */
#stamp-seal {
    background: #1A0E2E;
    padding: 80px 32px;
}

.stamp-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.seal-ring {
    width: clamp(250px, 40vw, 400px);
    height: clamp(250px, 40vw, 400px);
    border-radius: 50%;
    border: 6px solid #FF4F9A;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow:
        0 0 0 12px #1A0E2E,
        0 0 0 16px #FFD23F,
        0 0 0 28px #1A0E2E,
        0 0 0 30px #FF4F9A;
    animation: sealPulse 3s ease-in-out infinite;
}

@keyframes sealPulse {
    0%, 100% { box-shadow: 0 0 0 12px #1A0E2E, 0 0 0 16px #FFD23F, 0 0 0 28px #1A0E2E, 0 0 0 30px #FF4F9A; }
    50% { box-shadow: 0 0 0 12px #1A0E2E, 0 0 0 16px #FFD23F, 0 0 0 28px #1A0E2E, 0 0 0 30px #FF4F9A, 0 0 30px rgba(255, 79, 154, 0.3); }
}

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

.stamp-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: #1A0E2E;
    text-shadow:
        1px 1px 0 #FF4F9A,
        2px 2px 0 #FF4F9A,
        3px 3px 0 rgba(255, 79, 154, 0.5);
    /* Embossed / debossed effect */
    -webkit-text-stroke: 1px rgba(255, 79, 154, 0.3);
    position: relative;
}

.stamp-text::after {
    content: 'badge.bar';
    position: absolute;
    top: 2px;
    left: 2px;
    color: rgba(232, 221, 255, 0.15);
    -webkit-text-stroke: 0;
    z-index: -1;
}

.stamp-subtext {
    font-family: 'Azeret Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.75rem, 1.5vw, 1rem);
    color: #00D9C0;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-top: 8px;
}

.stamp-cta {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    color: #FFD23F;
    margin-top: 48px;
    letter-spacing: 1px;
    text-shadow: 0 0 20px rgba(255, 210, 63, 0.3);
    animation: ctaGlow 2s ease-in-out infinite alternate;
}

@keyframes ctaGlow {
    from { text-shadow: 0 0 20px rgba(255, 210, 63, 0.2); }
    to { text-shadow: 0 0 40px rgba(255, 210, 63, 0.5); }
}

/* ============================
   SCROLL PROGRESS INDICATOR
   ============================ */
.scroll-progress {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 50px;
    height: 50px;
    z-index: 100;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.progress-ring-svg {
    width: 100%;
    height: 100%;
}

.progress-ring-bg {
    fill: none;
    stroke: #2B1B6E;
    stroke-width: 4;
}

.progress-ring-fill {
    fill: none;
    stroke: #FFD23F;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 125.66;
    stroke-dashoffset: 125.66;
    transform: rotate(-90deg);
    transform-origin: center;
    transition: stroke-dashoffset 0.1s ease;
}

/* ============================
   RIBBON STRIPS (Decorative)
   ============================ */
.ribbon-strip {
    position: fixed;
    width: 200vw;
    height: 24px;
    background: #FF4F9A;
    z-index: 50;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.ribbon-strip::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%);
}

.ribbon-1 {
    top: 25%;
    left: -50%;
    transform: rotate(-5deg);
}

.ribbon-2 {
    top: 55%;
    left: -50%;
    transform: rotate(3deg);
}

.ribbon-3 {
    top: 80%;
    left: -50%;
    transform: rotate(-2deg);
}

/* Show ribbons only on scroll */
body.scrolled .ribbon-strip {
    opacity: 0.12;
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 768px) {
    .badge-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .sash-badges {
        padding: 60px 40px;
        gap: 24px;
    }

    .sash-badge {
        width: 110px;
    }

    .sash-badge svg {
        width: 90px;
        height: 90px;
    }

    .anatomy-container {
        height: 450px;
    }

    .anatomy-container.exploded #anatomy-back {
        transform: translateY(90px);
    }

    .anatomy-container.exploded #anatomy-clasp {
        transform: translateY(30px);
    }

    .anatomy-container.exploded #anatomy-border {
        transform: translateY(-30px);
    }

    .anatomy-container.exploded #anatomy-face {
        transform: translateY(-90px);
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .badge-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1025px) {
    .badge-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ============================
   BOUNCE-IN ANIMATION
   ============================ */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: translateY(60px) scale(0.7);
    }
    60% {
        opacity: 1;
        transform: translateY(-8px) scale(1.02);
    }
    80% {
        transform: translateY(4px) scale(0.99);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.badge-cell.visible {
    animation: bounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Stagger delays for cells in same row */
.badge-cell:nth-child(5n+1).visible { animation-delay: 0ms; }
.badge-cell:nth-child(5n+2).visible { animation-delay: 80ms; }
.badge-cell:nth-child(5n+3).visible { animation-delay: 160ms; }
.badge-cell:nth-child(5n+4).visible { animation-delay: 240ms; }
.badge-cell:nth-child(5n+5).visible { animation-delay: 320ms; }

/* ============================
   SASH BADGE ENTRANCE
   ============================ */
.sash-badge {
    opacity: 0;
    transform: rotate(var(--angle, 0deg)) translateY(40px) scale(0.8);
}

.sash-badge.visible {
    opacity: 1;
    transform: rotate(var(--angle, 0deg)) translateY(0) scale(1);
    transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Stagger delays for sash badges */
.sash-badge:nth-child(1).visible { transition-delay: 0ms; }
.sash-badge:nth-child(2).visible { transition-delay: 100ms; }
.sash-badge:nth-child(3).visible { transition-delay: 200ms; }
.sash-badge:nth-child(4).visible { transition-delay: 300ms; }
.sash-badge:nth-child(5).visible { transition-delay: 400ms; }
.sash-badge:nth-child(6).visible { transition-delay: 500ms; }
.sash-badge:nth-child(7).visible { transition-delay: 600ms; }
.sash-badge:nth-child(8).visible { transition-delay: 700ms; }

/* ============================
   SEAL ENTRANCE
   ============================ */
.seal-ring {
    opacity: 0;
    transform: scale(0.5) rotate(-15deg);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#stamp-seal.in-view .seal-ring {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.stamp-cta {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease 0.4s, transform 0.6s ease 0.4s;
}

#stamp-seal.in-view .stamp-cta {
    opacity: 1;
    transform: translateY(0);
}
