/* mybadge.page - Avant-garde badge display */
/* Forest-green palette with diagonal-sections layout */

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

:root {
    --forest-deep: #1A4A28;
    --mint-light: #D4E8D4;
    --clean-white: #FAFAFA;
    --organic-brown: #8A6848;
    --sprout-green: #48B868;
    --bark-dark: #2A2A20;
    --canopy-shadow: #0A2810;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1vw, 16px);
    line-height: 1.7;
    color: var(--bark-dark);
    background-color: var(--canopy-shadow);
    overflow-x: hidden;
}

/* ============================================
   IDENTITY SLASH - Hero Section
   ============================================ */

#identity-slash {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.identity-upper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--forest-deep);
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 75%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.identity-lower {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--clean-white);
    clip-path: polygon(0 75%, 100% 45%, 100% 100%, 0 100%);
    z-index: 1;
}

.site-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(28px, 4vw, 56px);
    letter-spacing: -0.02em;
    color: var(--clean-white);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInTitle 800ms ease-out 500ms forwards;
    z-index: 5;
    position: relative;
}

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

/* Tech Motif Organisms */
.tech-motifs,
.band-tech-motifs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
}

.tech-motif {
    position: absolute;
    opacity: 0;
    animation: fadeInTech 1000ms ease-out 1200ms forwards;
    transition: opacity 400ms ease;
}

.band-tech-motifs .tech-motif {
    opacity: 0.15;
    animation: none;
}

@keyframes fadeInTech {
    to {
        opacity: 0.15;
    }
}

/* Organic Blob Shapes */
.blob {
    position: absolute;
    transform: scale(0);
    animation: blobEnter 800ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    z-index: 2;
}

.blob-1 {
    width: 180px;
    height: 180px;
    background-color: var(--mint-light);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    bottom: 10%;
    left: 8%;
    animation-delay: 200ms;
    animation-name: blobEnter, blobFloat1;
    animation-duration: 800ms, 8s;
    animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1), ease-in-out;
    animation-delay: 200ms, 1000ms;
    animation-fill-mode: forwards, none;
    animation-iteration-count: 1, infinite;
}

.blob-2 {
    width: 120px;
    height: 120px;
    background-color: var(--sprout-green);
    opacity: 0.4;
    border-radius: 60% 40% 50% 50% / 40% 60% 40% 60%;
    bottom: 18%;
    left: 35%;
    animation-delay: 400ms;
    animation-name: blobEnter, blobFloat2;
    animation-duration: 800ms, 10s;
    animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1), ease-in-out;
    animation-delay: 400ms, 1200ms;
    animation-fill-mode: forwards, none;
    animation-iteration-count: 1, infinite;
}

.blob-3 {
    width: 90px;
    height: 90px;
    background-color: var(--mint-light);
    opacity: 0.6;
    border-radius: 50% 50% 30% 70% / 60% 40% 60% 40%;
    bottom: 5%;
    right: 15%;
    animation-delay: 600ms;
    animation-name: blobEnter, blobFloat3;
    animation-duration: 800ms, 7s;
    animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1), ease-in-out;
    animation-delay: 600ms, 1400ms;
    animation-fill-mode: forwards, none;
    animation-iteration-count: 1, infinite;
}

.blob-4 {
    width: 150px;
    height: 150px;
    background-color: var(--sprout-green);
    opacity: 0.25;
    border-radius: 40% 60% 60% 40% / 50% 40% 60% 50%;
    bottom: 20%;
    right: 30%;
    animation-delay: 350ms;
    animation-name: blobEnter, blobFloat1;
    animation-duration: 800ms, 9s;
    animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1), ease-in-out;
    animation-delay: 350ms, 1150ms;
    animation-fill-mode: forwards, none;
    animation-iteration-count: 1, infinite;
}

.blob-5 {
    width: 60px;
    height: 60px;
    background-color: var(--mint-light);
    opacity: 0.5;
    border-radius: 70% 30% 50% 50% / 30% 70% 30% 70%;
    bottom: 12%;
    left: 55%;
    animation-delay: 500ms;
    animation-name: blobEnter, blobFloat2;
    animation-duration: 800ms, 6s;
    animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1), ease-in-out;
    animation-delay: 500ms, 1300ms;
    animation-fill-mode: forwards, none;
    animation-iteration-count: 1, infinite;
}

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

@keyframes blobFloat1 {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-15px) scale(1.02); }
}

@keyframes blobFloat2 {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.03); }
}

@keyframes blobFloat3 {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.01); }
}

/* Blob pulse on scroll */
.blob.pulse {
    animation-name: blobPulse !important;
    animation-duration: 4s !important;
    animation-timing-function: ease-in-out !important;
    animation-iteration-count: infinite !important;
    animation-fill-mode: none !important;
}

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

/* ============================================
   DIAGONAL ACHIEVEMENT BANDS
   ============================================ */

.diagonal-band {
    position: relative;
    padding: 120px 40px;
    min-height: 50vh;
    overflow: hidden;
    transition: clip-path 400ms ease;
}

/* Diagonal clip-path cuts with varying angles */
.diagonal-band:nth-child(2) {
    clip-path: polygon(0 8%, 100% 0, 100% 92%, 0 100%);
    margin-top: -60px;
}

.diagonal-band:nth-child(3) {
    clip-path: polygon(0 0, 100% 6%, 100% 100%, 0 94%);
    margin-top: -60px;
}

.diagonal-band:nth-child(4) {
    clip-path: polygon(0 10%, 100% 0, 100% 90%, 0 100%);
    margin-top: -60px;
}

.diagonal-band:nth-child(5) {
    clip-path: polygon(0 0, 100% 8%, 100% 100%, 0 92%);
    margin-top: -60px;
}

.diagonal-band:nth-child(6) {
    clip-path: polygon(0 6%, 100% 0, 100% 94%, 0 100%);
    margin-top: -60px;
}

.diagonal-band:nth-child(7) {
    clip-path: polygon(0 0, 100% 10%, 100% 100%, 0 90%);
    margin-top: -60px;
}

.diagonal-band:nth-child(8) {
    clip-path: polygon(0 5%, 100% 0, 100% 100%, 0 100%);
    margin-top: -60px;
}

/* Band color alternation */
.band-green {
    background-color: var(--forest-deep);
    color: var(--clean-white);
}

.band-white {
    background-color: var(--clean-white);
    color: var(--bark-dark);
}

.band-mint {
    background-color: var(--mint-light);
    color: var(--bark-dark);
}

.band-dark {
    background-color: var(--canopy-shadow);
    color: var(--clean-white);
}

/* Band border-animate frame */
.band-border {
    position: absolute;
    top: 40px;
    left: 40px;
    right: 40px;
    bottom: 40px;
    border: 2px solid transparent;
    pointer-events: none;
    z-index: 2;
    transition: border-color 600ms ease;
}

.band-green .band-border {
    border-color: transparent;
}

.band-white .band-border {
    border-color: transparent;
}

.band-mint .band-border {
    border-color: transparent;
}

/* Border-draw animation states */
.diagonal-band.border-visible .band-border {
    animation: borderDraw 600ms ease forwards;
}

.band-green.border-visible .band-border {
    border-color: var(--sprout-green);
}

.band-white.border-visible .band-border {
    border-color: var(--forest-deep);
}

.band-mint.border-visible .band-border {
    border-color: var(--organic-brown);
}

@keyframes borderDraw {
    0% {
        clip-path: polygon(0 0, 0 0, 0 0, 0 0);
    }
    25% {
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    }
    50% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 100% 100%);
    }
    75% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    100% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
}

/* Band content */
.band-content {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    z-index: 3;
}

.badge-label {
    display: inline-block;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
    opacity: 0.8;
}

.band-green .badge-label {
    color: var(--sprout-green);
}

.band-white .badge-label {
    color: var(--forest-deep);
}

.band-mint .badge-label {
    color: var(--organic-brown);
}

.achievement-data {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(20px, 2.5vw, 36px);
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    line-height: 1.2;
}

.band-description {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1vw, 16px);
    line-height: 1.7;
    max-width: 600px;
    margin-bottom: 24px;
    opacity: 0.85;
}

/* Achievement marker dots and connecting lines */
.achievement-markers {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 20px;
}

.marker-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--sprout-green);
    opacity: 0.3;
    transition: opacity 400ms ease, transform 300ms ease;
    flex-shrink: 0;
}

.marker-dot.illuminated {
    opacity: 1;
}

.marker-dot:hover {
    transform: scale(1.3);
}

.marker-line {
    width: 30px;
    height: 1px;
    background-color: var(--sprout-green);
    opacity: 0.3;
    flex-shrink: 0;
}

.marker-line.illuminated {
    opacity: 0.6;
}

.band-white .marker-dot,
.band-mint .marker-dot {
    background-color: var(--forest-deep);
}

.band-white .marker-line,
.band-mint .marker-line {
    background-color: var(--forest-deep);
}

/* ============================================
   HOVER INTERACTIONS
   ============================================ */

.diagonal-band:hover {
    filter: brightness(1.02);
}

.diagonal-band:hover .tech-motif {
    opacity: 0.3 !important;
}

/* ============================================
   FOOTER BAND
   ============================================ */

.footer-content {
    text-align: center;
    padding: 60px 40px;
    position: relative;
}

.footer-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(20px, 2vw, 32px);
    letter-spacing: -0.02em;
    color: var(--mint-light);
}

.footer-blobs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.blob-footer-1 {
    width: 100px;
    height: 100px;
    background-color: var(--forest-deep);
    opacity: 0.3;
    border-radius: 40% 60% 50% 50% / 50% 40% 60% 50%;
    position: absolute;
    top: 20%;
    left: 10%;
    animation: blobFloat1 8s ease-in-out infinite;
    transform: scale(1);
}

.blob-footer-2 {
    width: 70px;
    height: 70px;
    background-color: var(--sprout-green);
    opacity: 0.15;
    border-radius: 50% 50% 30% 70% / 60% 40% 60% 40%;
    position: absolute;
    bottom: 15%;
    right: 12%;
    animation: blobFloat2 10s ease-in-out infinite;
    transform: scale(1);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .diagonal-band {
        padding: 80px 20px;
    }

    .band-border {
        top: 20px;
        left: 20px;
        right: 20px;
        bottom: 20px;
    }

    .blob-1 { width: 120px; height: 120px; }
    .blob-2 { width: 80px; height: 80px; }
    .blob-3 { width: 60px; height: 60px; }
    .blob-4 { width: 100px; height: 100px; }
    .blob-5 { width: 40px; height: 40px; }

    .identity-upper {
        clip-path: polygon(0 0, 100% 0, 100% 40%, 0 65%);
    }

    .identity-lower {
        clip-path: polygon(0 65%, 100% 40%, 100% 100%, 0 100%);
    }
}

@media (max-width: 480px) {
    .diagonal-band {
        padding: 60px 16px;
        min-height: 40vh;
    }

    .band-border {
        top: 12px;
        left: 12px;
        right: 12px;
        bottom: 12px;
    }

    .marker-line {
        width: 16px;
    }
}
