/* ============================================================
   mybadge.id - Graffiti-Botanical / Translucent Frost
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
    --frost-base: #E8EDF2;
    --frost-layer: #C5D3E0;
    --midnight: #1A1520;
    --candle-amber: #D4920B;
    --spray-neon: #39FF14;
    --botanical-ink: #2D5A3D;
    --condensation: #B8A9C9;
    --frost-highlight: #A8E6CF;
    --candle-tip: #FFF3D6;

    --font-display: 'Libre Baskerville', Georgia, serif;
    --font-body: 'Nunito Sans', 'Segoe UI', sans-serif;
    --font-tag: 'Permanent Marker', cursive;

    --gutter: clamp(1rem, 2.5vw, 2.5rem);
    --section-pad: clamp(3rem, 8vh, 8rem);

    --scroll-progress: 0;
    --frost-opacity: 0.02;
    --candle-intensity: 1;
}

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

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

body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.7;
    letter-spacing: 0.01em;
    color: var(--midnight);
    background-color: var(--frost-base);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.svg-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* --- Frost Texture Overlay --- */
.frost-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: var(--frost-opacity);
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='3'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23f)' opacity='0.6'/%3E%3C/svg%3E");
    background-size: 400px 400px;
    mix-blend-mode: overlay;
    transition: opacity 0.5s ease;
}

/* --- Frost Veil Gradient (global overlay) --- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(200,211,224,0.5) 0%, rgba(232,237,242,0.2) 100%);
    pointer-events: none;
    z-index: 999;
    opacity: calc(1 - var(--scroll-progress) * 0.6);
    transition: opacity 0.3s ease;
}

/* --- Candle Radial Gradient --- */
.candle-radial {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 0;
}

.hero-candle {
    background: radial-gradient(ellipse at 50% 85%, rgba(212,146,11,0.18) 0%, rgba(212,146,11,0) 60%);
    opacity: 0;
    animation: candleFadeIn 1.5s ease 1.8s forwards;
}

.z-alpha-candle {
    background: radial-gradient(ellipse at 30% 70%, rgba(212,146,11,0.1) 0%, rgba(212,146,11,0) 50%);
}

.z-beta-candle {
    background: radial-gradient(ellipse at 70% 70%, rgba(212,146,11,0.1) 0%, rgba(212,146,11,0) 50%);
}

.z-gamma-candle {
    background: radial-gradient(ellipse at 50% 50%, rgba(212,146,11,0.14) 0%, rgba(212,146,11,0) 55%);
}

@keyframes candleFadeIn {
    to { opacity: 1; }
}

/* --- Candle Pulse Animation --- */
@keyframes candlePulse {
    0% { opacity: 0.18; }
    25% { opacity: 0.22; }
    50% { opacity: 0.16; }
    75% { opacity: 0.2; }
    100% { opacity: 0.18; }
}

.hero-candle {
    animation: candleFadeIn 1.5s ease 1.8s forwards, candlePulse 4s ease-in-out 3.3s infinite;
}

/* ============================================================
   HERO: THE GREENHOUSE CANOPY
   ============================================================ */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
}

.hero-frost-pane {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(200,211,224,0.3);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    z-index: 0;
}

/* Botanical elements in hero */
.hero-fern {
    position: absolute;
    bottom: 0;
    left: 5%;
    width: 200px;
    height: 400px;
    z-index: 1;
    opacity: 0;
}

.hero-fern .fern-path {
    stroke-dasharray: 3000;
    stroke-dashoffset: 3000;
}

.hero-fern.animate {
    opacity: 1;
}

.hero-fern.animate .fern-path {
    animation: drawFern 1.5s ease-in-out 0.3s forwards;
}

@keyframes drawFern {
    to {
        stroke-dashoffset: 0;
    }
}

.hero-ivy {
    position: absolute;
    top: 15%;
    right: 0;
    width: 350px;
    height: 200px;
    z-index: 1;
    opacity: 0.35;
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    opacity: 0;
    animation: heroContentIn 0.6s ease 0.8s forwards;
}

@keyframes heroContentIn {
    to { opacity: 1; }
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-style: italic;
    font-size: clamp(3rem, 8vw, 7rem);
    color: var(--midnight);
    letter-spacing: -0.02em;
    line-height: 1.15;
    display: inline-block;
}

.hero-title .letter {
    display: inline-block;
    transform: rotate(var(--r, 0deg));
    transition: transform 0.3s ease;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: clamp(1rem, 2.2vw, 1.4rem);
    color: var(--midnight);
    margin-top: 1.5rem;
    opacity: 0;
    animation: subtitleIn 0.5s ease 2s forwards;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4em;
}

@keyframes subtitleIn {
    to { opacity: 1; }
}

.subtitle-word {
    position: relative;
    display: inline-block;
}

.subtitle-word::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--spray-neon);
    transform: scaleX(0);
    transform-origin: left;
}

.subtitle-word.animate::after {
    animation: underlineDraw 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes underlineDraw {
    to { transform: scaleX(1); }
}

/* ============================================================
   CANDLE FLAME DIVIDERS
   ============================================================ */
.candle-divider {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    z-index: 2;
}

.candle-flame {
    width: 24px;
    height: 48px;
    animation: flicker 2.5s ease-in-out infinite;
    filter: drop-shadow(0 2px 6px #FFF3D6);
}

@keyframes flicker {
    0% { transform: scaleX(1) scaleY(1); }
    20% { transform: scaleX(0.97) scaleY(1.02); }
    50% { transform: scaleX(1.04) scaleY(0.98); }
    70% { transform: scaleX(0.96) scaleY(1.01); }
    100% { transform: scaleX(1) scaleY(1); }
}

.candle-light-pool {
    width: 120px;
    height: 40px;
    background: radial-gradient(ellipse, rgba(212,146,11,0.1) 0%, transparent 70%);
    margin-top: -5px;
}

/* ============================================================
   Z-BAND SECTIONS
   ============================================================ */
.z-band {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.z-alpha,
.z-beta {
    min-height: 80vh;
    padding: var(--section-pad) var(--gutter);
    display: flex;
    align-items: center;
}

.z-gamma {
    min-height: 100vh;
    padding: var(--section-pad) var(--gutter);
}

/* --- Z-Band Alpha: Left content --- */
.z-alpha {
    justify-content: flex-start;
}

.z-content-left {
    width: 55%;
    max-width: 700px;
    padding-left: var(--gutter);
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.z-content-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.z-alpha-botanical {
    position: absolute;
    right: 8%;
    bottom: 15%;
    width: 250px;
    height: 250px;
    z-index: -1;
    opacity: 0.45;
}

.z-alpha-line {
    position: absolute;
    top: 10%;
    right: 5%;
    width: 2px;
    height: 0;
    background: var(--spray-neon);
    transform: rotate(-45deg);
    transform-origin: top right;
    transition: height 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.z-alpha-line.visible {
    height: 70%;
}

/* --- Z-Band Beta: Right content --- */
.z-beta {
    justify-content: flex-end;
}

.z-content-right {
    width: 55%;
    max-width: 700px;
    padding-right: var(--gutter);
    text-align: right;
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.z-content-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.z-beta-botanical {
    position: absolute;
    left: 8%;
    top: 50%;
    transform: translateY(-50%);
    width: 160px;
    height: 300px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.z-beta-botanical.visible {
    opacity: 0.6;
}

/* --- Section Headings with underline-draw --- */
.section-heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-style: italic;
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    color: var(--midnight);
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--candle-amber);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.z-content-right .section-heading::after {
    transform-origin: right;
}

.section-heading.draw::after {
    transform: scaleX(1);
}

/* Body text */
.body-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.7;
    letter-spacing: 0.01em;
    color: var(--midnight);
    max-width: 38em;
    margin-bottom: 1.2rem;
}

.z-content-right .body-text {
    margin-left: auto;
}

/* ============================================================
   Z-BAND GAMMA: BADGES
   ============================================================ */
.z-gamma {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--gutter);
}

.badge {
    position: relative;
    width: clamp(200px, 28vw, 320px);
    height: clamp(200px, 28vw, 320px);
    background: rgba(200,211,224,0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 2px solid var(--candle-amber);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 30px rgba(26,21,32,0.12), 0 1px 3px rgba(26,21,32,0.08);
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.5s ease, transform 0.5s ease, backdrop-filter 0.35s ease-out, background 0.35s ease-out, box-shadow 0.35s ease-out;
    cursor: default;
    overflow: hidden;
    z-index: 2;
}

.badge.visible {
    opacity: 1;
    transform: scale(1);
}

.badge:hover {
    background: rgba(200,211,224,0.5);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 4px 30px rgba(26,21,32,0.12), 0 1px 3px rgba(26,21,32,0.08), 0 0 20px rgba(212,146,11,0.2);
}

.badge:hover .badge-botanical {
    opacity: 0.25;
}

.badge:hover .badge-title::after {
    transform: scaleX(1);
}

.badge-botanical {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    opacity: 0.15;
    transition: opacity 0.35s ease-out;
    pointer-events: none;
}

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

.badge-label {
    font-family: var(--font-tag);
    font-size: clamp(0.9rem, 2vw, 1.4rem);
    color: var(--spray-neon);
    transform: rotate(-2deg);
    text-shadow: 0 0 4px rgba(57,255,20,0.5);
    position: relative;
    z-index: 1;
    margin-bottom: 0.3rem;
}

.badge-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-style: italic;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    color: var(--midnight);
    letter-spacing: -0.02em;
    line-height: 1.15;
    position: relative;
    z-index: 1;
    margin-bottom: 0.5rem;
}

.badge-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--spray-neon);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.badge-text {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: clamp(0.85rem, 1.4vw, 0.95rem);
    line-height: 1.5;
    color: var(--midnight);
    position: relative;
    z-index: 1;
}

/* Badge Z-diagonal positioning */
.badge-1 {
    align-self: flex-start;
}

.badge-2 {
    align-self: center;
    margin: 0 auto;
}

.badge-3 {
    align-self: flex-end;
}

/* Staggered animation for badges */
.badge-1.visible { transition-delay: 0ms; }
.badge-2.visible { transition-delay: 120ms; }
.badge-3.visible { transition-delay: 240ms; }

/* ============================================================
   TAG WALL (FOOTER)
   ============================================================ */
.tag-wall {
    position: relative;
    width: 100%;
    min-height: 60vh;
    background: var(--midnight);
    padding: var(--section-pad) var(--gutter);
    overflow: hidden;
    z-index: 1;
}

.tag-wall-content {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 50vh;
}

/* Graffiti Tags */
.graffiti-tag {
    font-family: var(--font-tag);
    font-size: clamp(0.9rem, 2vw, 1.4rem);
    position: absolute;
    display: inline-block;
    pointer-events: none;
}

.tag-1 {
    top: 8%;
    left: 12%;
    color: var(--spray-neon);
    transform: rotate(-3deg);
    text-shadow: 0 0 4px rgba(57,255,20,0.5);
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    opacity: 0.85;
}

.tag-2 {
    top: 15%;
    right: 18%;
    color: var(--candle-amber);
    transform: rotate(4deg);
    text-shadow: 0 0 4px rgba(212,146,11,0.5);
    font-size: clamp(1rem, 2vw, 1.5rem);
    opacity: 0.7;
}

.tag-3 {
    top: 35%;
    left: 5%;
    color: var(--spray-neon);
    transform: rotate(2deg);
    text-shadow: 0 0 4px rgba(57,255,20,0.5);
    font-size: clamp(0.9rem, 1.8vw, 1.3rem);
    opacity: 0.6;
}

.tag-4 {
    top: 28%;
    right: 8%;
    color: var(--candle-amber);
    transform: rotate(-5deg);
    text-shadow: 0 0 4px rgba(212,146,11,0.5);
    font-size: clamp(1.3rem, 3vw, 2rem);
    opacity: 0.8;
}

.tag-5 {
    top: 55%;
    left: 25%;
    color: var(--spray-neon);
    transform: rotate(1deg);
    text-shadow: 0 0 4px rgba(57,255,20,0.5);
    font-size: clamp(0.85rem, 1.5vw, 1.1rem);
    opacity: 0.5;
}

.tag-6 {
    top: 50%;
    right: 30%;
    color: var(--candle-amber);
    transform: rotate(-2deg);
    text-shadow: 0 0 4px rgba(212,146,11,0.5);
    opacity: 0.65;
}

.tag-7 {
    bottom: 25%;
    left: 50%;
    color: var(--spray-neon);
    transform: rotate(3deg);
    text-shadow: 0 0 4px rgba(57,255,20,0.5);
    font-size: clamp(1.1rem, 2.2vw, 1.6rem);
    opacity: 0.55;
}

.tag-8 {
    bottom: 15%;
    right: 15%;
    color: var(--candle-amber);
    transform: rotate(-4deg);
    text-shadow: 0 0 4px rgba(212,146,11,0.5);
    font-size: clamp(0.9rem, 1.6vw, 1.2rem);
    opacity: 0.45;
}

/* Footer credit */
.footer-credit {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.footer-domain {
    font-family: var(--font-display);
    font-weight: 700;
    font-style: italic;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    color: var(--frost-base);
    letter-spacing: -0.02em;
    margin-bottom: 0.3rem;
}

.footer-tagline {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: clamp(0.9rem, 1.6vw, 1.1rem);
    color: var(--condensation);
}

/* Footer links */
.footer-links {
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2rem;
}

.footer-link {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(0.85rem, 1.4vw, 1rem);
    color: var(--frost-layer);
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--spray-neon);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.footer-link:hover {
    color: var(--frost-highlight);
}

.footer-link:hover::after {
    transform: scaleX(1);
}

/* Rough underline SVG */
.rough-underline {
    position: absolute;
    bottom: 35%;
    left: 10%;
    width: 200px;
    height: 10px;
    opacity: 0.4;
}

/* Neon Bleed accent */
.tag-wall::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, rgba(57,255,20,0.03) 0%, rgba(57,255,20,0) 100%);
    pointer-events: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .z-content-left,
    .z-content-right {
        width: 90%;
        max-width: none;
        padding-left: var(--gutter);
        padding-right: var(--gutter);
    }

    .z-alpha {
        justify-content: center;
    }

    .z-beta {
        justify-content: center;
    }

    .z-content-right {
        text-align: left;
    }

    .z-content-right .body-text {
        margin-left: 0;
    }

    .z-content-right .section-heading::after {
        transform-origin: left;
    }

    .z-alpha-botanical {
        display: none;
    }

    .z-beta-botanical {
        display: none;
    }

    .z-gamma {
        flex-direction: column;
        align-items: center;
    }

    .badge {
        width: clamp(220px, 70vw, 300px);
        height: clamp(220px, 70vw, 300px);
    }

    .badge-1,
    .badge-2,
    .badge-3 {
        align-self: center;
    }

    .footer-links {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-fern {
        width: 140px;
        height: 280px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(2.2rem, 12vw, 3.5rem);
    }

    .badge {
        width: 240px;
        height: 240px;
        padding: 1.5rem;
    }

    .footer-links {
        gap: 0.8rem;
    }
}
