/* mybadge.page v2 — diagonal-sections, forest-green, organic-blobs */

* {
    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, body {
    background: var(--clean-white);
    color: var(--bark-dark);
    font-family: 'Space Grotesk', sans-serif;
    overflow-x: hidden;
}

body {
    line-height: 1.7;
    font-size: clamp(14px, 1vw, 16px);
}

/* ===========================
   IDENTITY SLASH (HERO 100vh)
   =========================== */
#identity-slash {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: var(--clean-white);
}

.identity-upper {
    position: absolute;
    inset: 0;
    background: var(--forest-deep);
    clip-path: polygon(0 0, 100% 0, 100% 55%, 0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.identity-lower {
    position: absolute;
    inset: 0;
    background: var(--clean-white);
    z-index: 1;
}

.site-title {
    color: var(--clean-white);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(36px, 6vw, 88px);
    letter-spacing: -0.02em;
    transform: translate(-15%, -20%) rotate(-3deg);
    opacity: 0;
    animation: fadeInTitle 1.2s ease 0.5s forwards;
}

@keyframes fadeInTitle {
    from { opacity: 0; transform: translate(-15%, -15%) rotate(-3deg); }
    to { opacity: 1; transform: translate(-15%, -20%) rotate(-3deg); }
}

/* Tech motifs in hero */
.tech-motifs {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.tech-motif {
    position: absolute;
    opacity: 0;
    transition: opacity 400ms ease;
}

#identity-slash.loaded .tech-motif {
    opacity: 0.15;
    animation: fadeInMotif 1.6s ease forwards;
}

@keyframes fadeInMotif {
    from { opacity: 0; }
    to { opacity: 0.15; }
}

#identity-slash.loaded .tech-motif:hover {
    opacity: 0.30;
}

/* Organic blobs */
.blob {
    position: absolute;
    transform: scale(0);
    transform-origin: center;
    transition: transform 800ms ease;
    will-change: transform, border-radius;
}

#identity-slash.loaded .blob {
    animation-fill-mode: forwards;
}

.blob-1 {
    width: 280px;
    height: 280px;
    background: var(--mint-light);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    top: 62%;
    left: 8%;
    animation: blobMorph1 9s ease-in-out infinite, scaleIn 1s ease 0.6s forwards;
}

.blob-2 {
    width: 200px;
    height: 200px;
    background: var(--sprout-green);
    opacity: 0.5;
    border-radius: 50% 50% 30% 70% / 60% 40% 60% 40%;
    top: 70%;
    left: 35%;
    animation: blobMorph2 11s ease-in-out infinite, scaleIn 1s ease 0.8s forwards;
}

.blob-3 {
    width: 340px;
    height: 340px;
    background: var(--mint-light);
    border-radius: 60% 40% 30% 70% / 40% 50% 50% 60%;
    top: 56%;
    left: 60%;
    animation: blobMorph3 13s ease-in-out infinite, scaleIn 1s ease 1s forwards;
}

.blob-4 {
    width: 160px;
    height: 160px;
    background: var(--sprout-green);
    opacity: 0.35;
    border-radius: 40% 60% 50% 50% / 70% 30% 70% 30%;
    top: 78%;
    left: 80%;
    animation: blobMorph4 8s ease-in-out infinite, scaleIn 1s ease 1.2s forwards;
}

.blob-5 {
    width: 120px;
    height: 120px;
    background: var(--mint-light);
    border-radius: 50% 50% 70% 30% / 60% 40% 60% 40%;
    top: 84%;
    left: 22%;
    animation: blobMorph5 10s ease-in-out infinite, scaleIn 1s ease 1.3s forwards;
}

.blob-6 {
    width: 90px;
    height: 90px;
    background: var(--sprout-green);
    opacity: 0.4;
    border-radius: 30% 70% 60% 40% / 40% 60% 40% 60%;
    top: 92%;
    left: 50%;
    animation: blobMorph6 12s ease-in-out infinite, scaleIn 1s ease 1.4s forwards;
}

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

@keyframes blobMorph1 {
    0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; transform: scale(1) translateY(0); }
    50% { border-radius: 50% 50% 40% 60% / 60% 40% 60% 40%; transform: scale(1.05) translateY(-12px); }
}

@keyframes blobMorph2 {
    0%, 100% { border-radius: 50% 50% 30% 70% / 60% 40% 60% 40%; transform: scale(1) translateY(0); }
    50% { border-radius: 70% 30% 50% 50% / 40% 60% 40% 60%; transform: scale(1.04) translateY(8px); }
}

@keyframes blobMorph3 {
    0%, 100% { border-radius: 60% 40% 30% 70% / 40% 50% 50% 60%; transform: scale(1) translateY(0); }
    50% { border-radius: 40% 60% 70% 30% / 60% 40% 60% 40%; transform: scale(1.03) translateY(-10px); }
}

@keyframes blobMorph4 {
    0%, 100% { border-radius: 40% 60% 50% 50% / 70% 30% 70% 30%; transform: scale(1) translateY(0); }
    50% { border-radius: 60% 40% 30% 70% / 30% 70% 30% 70%; transform: scale(1.06) translateY(6px); }
}

@keyframes blobMorph5 {
    0%, 100% { border-radius: 50% 50% 70% 30% / 60% 40% 60% 40%; transform: scale(1) translateY(0); }
    50% { border-radius: 70% 30% 50% 50% / 40% 60% 40% 60%; transform: scale(1.05) translateY(-8px); }
}

@keyframes blobMorph6 {
    0%, 100% { border-radius: 30% 70% 60% 40% / 40% 60% 40% 60%; transform: scale(1) translateY(0); }
    50% { border-radius: 60% 40% 30% 70% / 50% 50% 60% 40%; transform: scale(1.07) translateY(-6px); }
}

/* ============================
   DIAGONAL ACHIEVEMENT BANDS
   ============================ */
.diagonal-band {
    position: relative;
    width: 100%;
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding: 80px 8vw;
    overflow: hidden;
    transition: clip-path 400ms ease;
}

.band-green {
    background: var(--forest-deep);
    color: var(--clean-white);
    clip-path: polygon(0 8%, 100% 0, 100% 92%, 0 100%);
    margin-top: -4vh;
}

.band-white {
    background: var(--clean-white);
    color: var(--bark-dark);
    clip-path: polygon(0 6%, 100% 0, 100% 94%, 0 100%);
    margin-top: -4vh;
}

.band-mint {
    background: var(--mint-light);
    color: var(--bark-dark);
    clip-path: polygon(0 5%, 100% 0, 100% 95%, 0 100%);
    margin-top: -4vh;
}

.diagonal-band:hover {
    clip-path: polygon(0 9%, 100% 1%, 100% 91%, 0 99%);
}

.band-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    transform: rotate(-2deg);
    padding: 40px;
}

.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: 16px;
    opacity: 0.85;
}

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

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

.achievement-data {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(24px, 3vw, 48px);
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 22px;
}

.band-description {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1.05vw, 17px);
    line-height: 1.7;
    max-width: 560px;
    margin-bottom: 28px;
    opacity: 0.9;
}

/* Achievement markers */
.achievement-markers {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.marker-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sprout-green);
    opacity: 0.3;
    transition: opacity 300ms ease, transform 300ms ease;
}

.diagonal-band.in-view .marker-dot {
    opacity: 1;
}

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

.marker-line {
    display: inline-block;
    width: 28px;
    height: 1px;
    background: var(--sprout-green);
    opacity: 0.5;
}

/* Border-animate frames */
.band-border {
    position: absolute;
    inset: 14px;
    pointer-events: none;
    z-index: 1;
    border: 0 solid transparent;
    transition:
        border-top-width 600ms ease,
        border-right-width 600ms ease 200ms,
        border-bottom-width 600ms ease 400ms,
        border-left-width 600ms ease 600ms;
}

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

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

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

.diagonal-band.in-view .band-border {
    border-top-width: 1px;
    border-right-width: 1px;
    border-bottom-width: 1px;
    border-left-width: 1px;
}

/* Tech motifs in bands */
.band-tech-motifs {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.band-tech-motifs .tech-motif {
    opacity: 0;
    transition: opacity 600ms ease;
}

.diagonal-band.in-view .band-tech-motifs .tech-motif {
    opacity: 0.15;
}

.diagonal-band:hover .band-tech-motifs .tech-motif {
    opacity: 0.30;
}

.band-green .band-tech-motifs .tech-motif polyline,
.band-green .band-tech-motifs .tech-motif circle,
.band-green .band-tech-motifs .tech-motif line,
.band-green .band-tech-motifs .tech-motif polygon {
    stroke: var(--mint-light);
}

/* Floating organic blob inside green bands */
.band-green::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    background: var(--canopy-shadow);
    opacity: 0.6;
    border-radius: 60% 40% 50% 50% / 40% 60% 40% 60%;
    top: 18%;
    right: -80px;
    animation: blobMorph3 10s ease-in-out infinite;
    z-index: 0;
}

.band-mint::before {
    content: "";
    position: absolute;
    width: 200px;
    height: 200px;
    background: var(--sprout-green);
    opacity: 0.18;
    border-radius: 50% 50% 30% 70% / 60% 40% 60% 40%;
    bottom: 14%;
    left: -60px;
    animation: blobMorph2 11s ease-in-out infinite;
    z-index: 0;
}

/* ============
   PAGE FOOTER
   ============ */
.page-footer {
    background: var(--canopy-shadow);
    color: var(--mint-light);
    padding: 50px 8vw;
    text-align: center;
    margin-top: -4vh;
    clip-path: polygon(0 8%, 100% 0, 100% 100%, 0 100%);
}

.footer-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.8;
}

/* =============
   RESPONSIVE
   ============= */
@media (max-width: 768px) {
    .site-title {
        transform: translate(-5%, -25%) rotate(-3deg);
        font-size: clamp(28px, 9vw, 48px);
    }
    .diagonal-band {
        padding: 60px 6vw;
        min-height: 60vh;
    }
    .band-content {
        padding: 24px;
        transform: rotate(-1deg);
    }
    .blob-1 { width: 200px; height: 200px; }
    .blob-3 { width: 240px; height: 240px; left: 50%; }
    .blob-4 { width: 110px; height: 110px; }
}
