/* lovebot.dev — Hexagonal Honeycomb Design */
/* Colors: Deep Hive #0d0b07, Burnished Gold #c9a84c, Amber Glow #e8b931,
   Living Green #3a6b35, Sprout #7bc950, Honeycomb Cream #f5e6c8,
   Petal Blush #c8907e, Brass Shadow #2a1f0e */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #0d0b07;
    color: #f5e6c8;
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    line-height: 1.65;
    overflow-x: hidden;
}

/* ===== HEXAGONAL CLIP PATH ===== */
.hex {
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: perspective(800px) rotateX(2deg);
    filter: drop-shadow(2px 4px 6px rgba(13,11,7,0.5)) drop-shadow(-1px -2px 3px rgba(201,168,76,0.1));
}

.hex-border {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.hex-border-svg {
    width: 100%;
    height: 100%;
}

.hex-stroke {
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    animation: drawHex 1s ease-out forwards;
}

.hex-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.hex-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 15%;
    text-align: center;
}

.hex-motif {
    opacity: 0;
    animation: fadeMotif 0.6s ease-out forwards;
}

/* ===== NAVIGATION ===== */
.hex-nav {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.hex-nav-toggle {
    width: 48px;
    height: 52px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: linear-gradient(135deg, #2a1f0e, #0d0b07);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.hex-nav-toggle:hover {
    transform: scale(1.1);
    background: linear-gradient(135deg, #c9a84c, #e8b931);
}

.mascot-mini {
    position: relative;
    width: 24px;
    height: 24px;
}

.mascot-mini-eye {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #e8b931;
    top: 6px;
}

.mascot-mini-eye.left { left: 5px; }
.mascot-mini-eye.right { right: 5px; }

.mascot-mini-smile {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 5px;
    border-bottom: 2px solid #e8b931;
    border-radius: 0 0 10px 10px;
}

.hex-nav-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.hex-nav.open .hex-nav-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.hex-nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 48px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: linear-gradient(135deg, #2a1f0e, #0d0b07);
    text-decoration: none;
    color: #c9a84c;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: background 0.3s ease, transform 0.3s ease;
}

.hex-nav-item:hover {
    background: linear-gradient(135deg, #c9a84c, #e8b931);
    color: #0d0b07;
    transform: scale(1.1);
}

/* ===== CLUSTER 1: THE CORE (HERO) ===== */
.cluster {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.cluster-core {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d0b07 0%, #2a1f0e 50%, #0d0b07 100%);
}

.honeycomb-flower {
    position: relative;
    width: clamp(320px, 60vw, 600px);
    height: clamp(360px, 65vw, 680px);
}

.honeycomb-flower .hex {
    position: absolute;
    width: clamp(80px, 12vw, 160px);
    height: clamp(92px, 13.8vw, 184px);
    background: radial-gradient(circle, rgba(232,185,49,0.08) 0%, rgba(13,11,7,0.9) 70%);
}

.hex-center {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) perspective(800px) rotateX(2deg);
    z-index: 5;
}

/* Hexagonal flower positions - 6 surrounding cells */
.hex-pos-0 { left: 50%; top: 15%; transform: translate(-50%, -50%) perspective(800px) rotateX(2deg); }
.hex-pos-1 { left: 78%; top: 32%; transform: translate(-50%, -50%) perspective(800px) rotateX(2deg); }
.hex-pos-2 { left: 78%; top: 68%; transform: translate(-50%, -50%) perspective(800px) rotateX(2deg); }
.hex-pos-3 { left: 50%; top: 85%; transform: translate(-50%, -50%) perspective(800px) rotateX(2deg); }
.hex-pos-4 { left: 22%; top: 68%; transform: translate(-50%, -50%) perspective(800px) rotateX(2deg); }
.hex-pos-5 { left: 22%; top: 32%; transform: translate(-50%, -50%) perspective(800px) rotateX(2deg); }

/* Mascot CSS Art */
.mascot {
    position: relative;
    width: 60px;
    height: 60px;
    opacity: 0;
    transform: scale(0);
}

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

.mascot-face {
    position: relative;
    width: 100%;
    height: 100%;
}

.mascot-eye {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e8b931;
    top: 35%;
    transition: transform 0.15s ease;
}

.mascot-eye.left { left: 22%; }
.mascot-eye.right { right: 22%; }

.mascot-smile {
    position: absolute;
    bottom: 22%;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 10px;
    border-bottom: 3px solid #e8b931;
    border-radius: 0 0 22px 22px;
}

.mascot-antenna {
    position: absolute;
    top: -20px;
}

.mascot-antenna.left { left: 15px; }
.mascot-antenna.right { right: 15px; }

.antenna-stem {
    width: 2px;
    height: 16px;
    background: #3a6b35;
    margin: 0 auto;
}

.antenna-leaf {
    width: 10px;
    height: 14px;
    background: #7bc950;
    border-radius: 0 80% 0 80%;
    transform: rotate(-15deg);
    margin-left: 2px;
}

.mascot-antenna.right .antenna-leaf {
    transform: rotate(15deg) scaleX(-1);
}

/* Blink animation for end mascot */
.blink-eye {
    animation: blink 4s ease-in-out infinite;
}

.mascot-small {
    width: 36px;
    height: 36px;
    opacity: 1;
    transform: scale(1);
}

.mascot-small .mascot-eye {
    width: 8px;
    height: 8px;
}

.mascot-small .mascot-smile {
    width: 14px;
    height: 7px;
    border-bottom-width: 2px;
}

/* Hero wordmark */
.hero-wordmark {
    font-family: 'Fraunces', serif;
    font-weight: 800;
    font-size: clamp(2.4rem, 6vw, 5.2rem);
    font-variation-settings: 'WONK' 1, 'opsz' 144;
    color: #c9a84c;
    letter-spacing: 0.05em;
    margin-top: 40px;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-wordmark.visible {
    opacity: 1;
}

/* SVG motifs */
.gear-svg,
.leaf-svg {
    width: 50%;
    height: 50%;
}

.gear-svg {
    animation: rotateGear 20s linear infinite;
}

/* ===== CLUSTER 2: GROWTH RING ===== */
.cluster-growth {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    position: relative;
    background: linear-gradient(180deg, #0d0b07 0%, #0d0b07 100%);
}

.dissolution-zone {
    position: relative;
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

.drift-leaf {
    width: 30px;
    height: 30px;
    animation: driftLeaf 8s ease-in-out infinite;
}

.drift-leaf.dl2 { animation-delay: -2.5s; animation-duration: 10s; }
.drift-leaf.dl3 { animation-delay: -5s; animation-duration: 7s; }

.growth-ring-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    max-width: 900px;
    margin: 0 auto;
}

.hex-growth {
    width: clamp(80px, 12vw, 140px);
    height: clamp(92px, 13.8vw, 161px);
    background: radial-gradient(circle, rgba(232,185,49,0.06) 0%, rgba(13,11,7,0.95) 70%);
    opacity: 0;
    transform: translateY(30px) perspective(800px) rotateX(2deg);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.hex-growth.visible {
    opacity: 1;
    transform: translateY(0) perspective(800px) rotateX(2deg);
}

.hex-growth:hover {
    background: radial-gradient(circle, rgba(232,185,49,0.15) 0%, transparent 70%);
}

.counter-value {
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.9rem, 1.4vw, 1.1rem);
    color: #e8b931;
    display: block;
    line-height: 1.2;
}

.counter-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    color: #c9a84c;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 4px;
    display: block;
}

.unfurl-leaf,
.turning-gear {
    width: 60%;
    height: 60%;
}

.turning-gear {
    animation: rotateGear 20s linear infinite;
}

/* Vine connectors */
.vine-connector {
    position: absolute;
    width: 40%;
    height: 60px;
    opacity: 0.4;
}

.vine-connector.vc1 { bottom: 20%; left: 5%; }
.vine-connector.vc2 { bottom: 30%; right: 5%; }

.vine-path {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    transition: stroke-dashoffset 2s ease;
}

.vine-path.drawn {
    stroke-dashoffset: 0;
}

/* ===== CLUSTER 3: THE CANOPY ===== */
.cluster-canopy {
    min-height: 120vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    background: linear-gradient(180deg, #0d0b07 0%, #2a1f0e 50%, #0d0b07 100%);
    position: relative;
}

.canopy-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    max-width: 1000px;
    position: relative;
}

.hex-canopy {
    background: radial-gradient(circle, rgba(232,185,49,0.05) 0%, rgba(42,31,14,0.9) 70%);
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hex-canopy.visible {
    opacity: 1;
    transform: translateY(0) perspective(800px) rotateX(2deg);
}

.hex-large {
    width: clamp(200px, 30vw, 340px);
    height: clamp(230px, 34.5vw, 391px);
}

.hex-med {
    width: clamp(140px, 20vw, 240px);
    height: clamp(161px, 23vw, 276px);
}

.hex-sm {
    width: clamp(80px, 10vw, 130px);
    height: clamp(92px, 11.5vw, 150px);
}

.canopy-content {
    position: relative;
    z-index: 2;
}

.canopy-heading {
    font-family: 'Fraunces', serif;
    font-weight: 800;
    font-variation-settings: 'WONK' 1, 'opsz' 144;
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    color: #f5e6c8;
    line-height: 1.2;
    margin-bottom: 12px;
}

.canopy-subheading {
    font-family: 'Fraunces', serif;
    font-weight: 800;
    font-variation-settings: 'WONK' 1;
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: #c9a84c;
    margin-bottom: 8px;
}

.canopy-text {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(0.8rem, 1.2vw, 1rem);
    color: #f5e6c8;
    line-height: 1.65;
    opacity: 0.85;
}

.canopy-leaf-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

.hex-leaf-filled {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hex-leaf-filled svg {
    width: 70%;
    height: 70%;
}

/* Caveat annotations */
.caveat-annotation {
    font-family: 'Caveat', cursive;
    font-weight: 600;
    font-size: clamp(0.9rem, 1.4vw, 1.2rem);
    color: #c8907e;
    transform: rotate(-3deg);
    display: inline-block;
    opacity: 0.75;
    white-space: nowrap;
}

.caveat-annotation.ann1 {
    align-self: flex-start;
    margin-left: 10%;
}

.caveat-annotation.ann2 {
    align-self: flex-end;
    margin-right: 10%;
}

.slow-spin {
    width: 50%;
    height: 50%;
    animation: rotateGear 30s linear infinite;
}

/* ===== CLUSTER 4: HEARTBEAT GRID ===== */
.cluster-heartbeat {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: #0d0b07;
    position: relative;
}

.heartbeat-container {
    position: relative;
    width: clamp(300px, 60vw, 700px);
    height: clamp(300px, 60vw, 700px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.heart-grid {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(13, 1fr);
    grid-template-rows: repeat(13, 1fr);
    gap: 2px;
}

.heart-cell {
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: linear-gradient(135deg, rgba(201,168,76,0.3), rgba(232,185,49,0.15));
    animation: heartPulse 2s ease-in-out infinite;
    transform: scale(0);
    transition: transform 0.5s ease;
}

.heart-cell.visible {
    transform: scale(1);
}

.heart-counter-center {
    position: relative;
    z-index: 10;
    text-align: center;
    background: radial-gradient(circle, rgba(13,11,7,0.95) 0%, rgba(13,11,7,0.7) 60%, transparent 100%);
    padding: 30px;
    border-radius: 50%;
    width: 160px;
    height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.heart-counter-value {
    font-family: 'Space Mono', monospace;
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: #e8b931;
    display: block;
    line-height: 1;
}

.heart-counter-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    color: #c9a84c;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 8px;
    display: block;
}

/* ===== CLUSTER 5: ROOT SYSTEM ===== */
.cluster-roots {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: linear-gradient(180deg, #0d0b07 0%, #0d0b07 100%);
    position: relative;
}

.root-tendrils {
    display: flex;
    gap: 60px;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.root-tendril {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.hex-root {
    width: clamp(50px, 8vw, 80px);
    height: clamp(58px, 9.2vw, 92px);
    background: radial-gradient(circle, rgba(201,168,76,0.05) 0%, rgba(13,11,7,0.95) 70%);
    opacity: 0.7;
    transition: opacity 0.5s ease;
}

.hex-root.small {
    width: clamp(40px, 6vw, 60px);
    height: clamp(46px, 6.9vw, 69px);
    opacity: 0.5;
}

.hex-root.tiny {
    width: clamp(25px, 4vw, 40px);
    height: clamp(29px, 4.6vw, 46px);
    opacity: 0.3;
}

.hex-root svg {
    width: 60%;
    height: 60%;
}

.mascot-end-hex {
    opacity: 0.8;
}

.root-vines {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

.root-wordmark {
    font-family: 'Fraunces', serif;
    font-weight: 400;
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    color: #c9a84c;
    opacity: 0.6;
    margin-top: 60px;
    letter-spacing: 0.05em;
    position: relative;
    z-index: 2;
}

/* ===== KEYFRAME ANIMATIONS ===== */
@keyframes drawHex {
    to { stroke-dashoffset: 0; }
}

@keyframes fadeMotif {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes rotateGear {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes driftLeaf {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-8px) rotate(5deg); }
    50% { transform: translateY(4px) rotate(-3deg); }
    75% { transform: translateY(-4px) rotate(2deg); }
}

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

@keyframes blink {
    0%, 42%, 44%, 100% { transform: scaleY(1); }
    43% { transform: scaleY(0.1); }
}

/* Stagger delays for hex strokes */
.hex-surround[data-delay='0'] .hex-stroke { animation-delay: 0ms; }
.hex-surround[data-delay='1'] .hex-stroke { animation-delay: 150ms; }
.hex-surround[data-delay='2'] .hex-stroke { animation-delay: 300ms; }
.hex-surround[data-delay='3'] .hex-stroke { animation-delay: 450ms; }
.hex-surround[data-delay='4'] .hex-stroke { animation-delay: 600ms; }
.hex-surround[data-delay='5'] .hex-stroke { animation-delay: 750ms; }
.hex-center .hex-stroke { animation-delay: 900ms; }

/* Stagger motif fade-ins */
.hex-surround[data-delay='0'] .hex-motif { animation-delay: 1100ms; }
.hex-surround[data-delay='1'] .hex-motif { animation-delay: 1300ms; }
.hex-surround[data-delay='2'] .hex-motif { animation-delay: 1500ms; }
.hex-surround[data-delay='3'] .hex-motif { animation-delay: 1700ms; }
.hex-surround[data-delay='4'] .hex-motif { animation-delay: 1900ms; }
.hex-surround[data-delay='5'] .hex-motif { animation-delay: 2100ms; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .honeycomb-flower {
        width: 280px;
        height: 320px;
    }

    .honeycomb-flower .hex {
        width: 75px;
        height: 86px;
    }

    .growth-ring-grid {
        gap: 8px;
    }

    .hex-growth {
        width: 75px;
        height: 86px;
    }

    .hex-large {
        width: 200px;
        height: 230px;
    }

    .hex-med {
        width: 140px;
        height: 161px;
    }

    .hex-sm {
        width: 80px;
        height: 92px;
    }

    .root-tendrils {
        gap: 30px;
    }

    .heart-counter-center {
        width: 120px;
        height: 120px;
        padding: 20px;
    }
}
