/* ============================================
   freedom.compare - Styles
   Street-style protest aesthetics for education
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --ocean-deep: #0A2E52;
    --rally-orange: #FF6B35;
    --freedom-white: #F5F2EC;
    --justice-gold: #F0C040;
    --civic-teal: #1B998B;
    --social-rose: #E05780;
    --contrast-midnight: #0A0F1A;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Mukta', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.6vw, 19px);
    line-height: 1.7;
    color: var(--freedom-white);
    background: var(--ocean-deep);
    overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
}

.section-heading {
    font-size: clamp(32px, 5vw, 64px);
    text-align: center;
    margin-bottom: 0.3em;
    color: var(--freedom-white);
}

.section-intro {
    font-family: 'Mukta', sans-serif;
    font-weight: 400;
    text-align: center;
    max-width: 680px;
    margin: 0 auto 3rem;
    color: var(--freedom-white);
    opacity: 0.8;
}

/* --- HERO SECTION --- */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ocean-deep);
    overflow: hidden;
}

#hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-title {
    font-size: clamp(48px, 10vw, 120px);
    font-weight: 800;
    color: var(--freedom-white);
    letter-spacing: 0.04em;
    line-height: 1;
    min-height: 1.1em;
}

.hero-title .char {
    display: inline-block;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.15s, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-title .char.visible {
    opacity: 1;
    transform: scale(1);
}

.hero-subtitle {
    font-size: clamp(28px, 5vw, 64px);
    font-weight: 700;
    color: var(--rally-orange);
    letter-spacing: 0.12em;
    opacity: 0;
    transform: scale(1.1);
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin-top: -0.1em;
}

.hero-subtitle.visible {
    opacity: 1;
    transform: scale(1);
}

/* --- Wheat-Paste Stickers --- */
#stickers-container {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 700px;
    height: 400px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
}

.wheat-sticker {
    position: absolute;
    background: rgba(10, 46, 82, 0.6);
    border-radius: 8px 12px 10px 14px;
    padding: 6px;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wheat-sticker.visible {
    opacity: 1;
    transform: scale(1) rotate(var(--rot, 0deg));
}

.sticker-1 { top: 5%; left: 2%; --rot: -8deg; }
.sticker-2 { top: -5%; left: 50%; --rot: 5deg; }
.sticker-3 { top: 10%; right: 0%; --rot: -3deg; }
.sticker-4 { bottom: 15%; left: -2%; --rot: 6deg; }
.sticker-5 { bottom: 5%; left: 35%; --rot: -4deg; }
.sticker-6 { bottom: 10%; right: 2%; --rot: 8deg; }
.sticker-7 { top: 40%; left: -5%; --rot: -6deg; }
.sticker-8 { top: 35%; right: -3%; --rot: 4deg; }

/* --- Circuit Layer --- */
.circuit-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.circuit-line {
    stroke: var(--freedom-white);
    stroke-width: 1;
    opacity: 0.15;
    fill: none;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 1.5s ease;
}

.circuit-line.drawn {
    stroke-dashoffset: 0;
}

.circuit-node {
    fill: var(--freedom-white);
    opacity: 0.3;
}

/* --- HONEYCOMB SECTION --- */
#honeycomb-section {
    position: relative;
    padding: 6rem 2rem;
    background: var(--contrast-midnight);
    overflow: hidden;
}

#honeycomb-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 0;
}

.hex-cell {
    width: clamp(140px, 22vw, 200px);
    height: clamp(160px, 25vw, 230px);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transform: scale(1);
    transition: transform 0.3s ease, z-index 0s;
    z-index: 1;
}

.hex-cell:hover {
    transform: scale(1.15);
    z-index: 10;
}

.hex-cell.hex-civil {
    background: linear-gradient(135deg, var(--civic-teal), rgba(27, 153, 139, 0.7));
}

.hex-cell.hex-economic {
    background: linear-gradient(135deg, var(--justice-gold), rgba(240, 192, 64, 0.7));
}

.hex-cell.hex-social {
    background: linear-gradient(135deg, var(--social-rose), rgba(224, 87, 128, 0.7));
}

.hex-inner {
    text-align: center;
    padding: 1.5rem 0.8rem;
    color: var(--contrast-midnight);
}

.hex-icon {
    margin-bottom: 0.5rem;
    color: var(--contrast-midnight);
}

.hex-inner h3 {
    font-family: 'Baloo 2', cursive;
    font-size: clamp(13px, 1.8vw, 17px);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.3rem;
}

.hex-label {
    font-family: 'Azeret Mono', monospace;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.7;
}

/* Hex cells - scroll reveal */
.hex-cell {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.hex-cell.in-view {
    opacity: 1;
    transform: scale(1);
}

.hex-cell.in-view:hover {
    transform: scale(1.15);
}

/* --- COMPARISON SECTION --- */
#comparison-section {
    position: relative;
    padding: 6rem 2rem;
    background: var(--ocean-deep);
}

.comparison-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto 5rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.comparison-panel.in-view {
    opacity: 1;
    transform: translateY(0);
}

.comparison-left,
.comparison-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.comparison-vs {
    flex-shrink: 0;
}

/* Organic Blobs */
.blob {
    width: clamp(160px, 25vw, 260px);
    height: clamp(160px, 25vw, 260px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: blobPulse 4s ease-in-out infinite;
    position: relative;
}

.blob-left {
    border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%;
    background: linear-gradient(135deg, var(--civic-teal), rgba(27, 153, 139, 0.6));
}

.blob-right {
    border-radius: 45% 55% 40% 60% / 55% 45% 60% 40%;
    background: linear-gradient(135deg, var(--social-rose), rgba(224, 87, 128, 0.6));
}

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

.blob-content h3 {
    font-family: 'Baloo 2', cursive;
    font-size: clamp(16px, 2vw, 22px);
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: var(--freedom-white);
}

.blob-content p {
    font-size: clamp(11px, 1.2vw, 14px);
    line-height: 1.5;
    color: var(--freedom-white);
    opacity: 0.85;
}

.blob-label {
    font-family: 'Azeret Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--freedom-white);
    opacity: 0.6;
    margin-top: 0.8rem;
}

/* Second comparison panel uses different blob colors */
.comparison-panel:nth-child(3) .blob-left {
    background: linear-gradient(135deg, var(--justice-gold), rgba(240, 192, 64, 0.6));
    border-radius: 55% 45% 60% 40% / 45% 55% 45% 55%;
}

.comparison-panel:nth-child(3) .blob-right {
    background: linear-gradient(135deg, var(--social-rose), rgba(224, 87, 128, 0.6));
    border-radius: 40% 60% 45% 55% / 60% 40% 55% 45%;
}

/* Third comparison panel */
.comparison-panel:nth-child(4) .blob-left {
    background: linear-gradient(135deg, var(--rally-orange), rgba(255, 107, 53, 0.6));
    border-radius: 50% 50% 45% 55% / 55% 45% 50% 50%;
}

.comparison-panel:nth-child(4) .blob-right {
    background: linear-gradient(135deg, var(--civic-teal), rgba(27, 153, 139, 0.6));
    border-radius: 45% 55% 50% 50% / 50% 50% 55% 45%;
}

/* --- CONNECTIONS / NETWORK SECTION --- */
#connections-section {
    position: relative;
    padding: 6rem 2rem;
    background: var(--contrast-midnight);
    overflow: hidden;
}

#network-canvas {
    position: relative;
    max-width: 900px;
    height: 500px;
    margin: 0 auto;
}

.network-node {
    position: absolute;
    left: var(--nx);
    top: var(--ny);
    transform: translate(-50%, -50%) scale(1);
    width: 80px;
    height: 80px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 2;
}

.network-node:hover {
    transform: translate(-50%, -50%) scale(1.2);
    z-index: 10;
}

.network-node span {
    font-family: 'Azeret Mono', monospace;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--contrast-midnight);
}

.node-civil {
    background: var(--civic-teal);
}

.node-social {
    background: var(--social-rose);
}

.node-economic {
    background: var(--justice-gold);
}

#network-lines {
    z-index: 1;
}

.network-line {
    stroke: var(--freedom-white);
    stroke-width: 1.2;
    opacity: 0.2;
    fill: none;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    transition: stroke-dashoffset 1.2s ease;
}

.network-line.drawn {
    stroke-dashoffset: 0;
}

.network-dot {
    fill: var(--freedom-white);
    opacity: 0.35;
}

/* --- Network reveal --- */
#network-canvas {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

#network-canvas.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* --- FOOTER --- */
#site-footer {
    background: var(--ocean-deep);
    border-top: 2px solid rgba(245, 242, 236, 0.1);
    padding: 3rem 2rem;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-title {
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--freedom-white);
}

.footer-dot {
    color: var(--rally-orange);
}

.footer-tagline {
    font-family: 'Mukta', sans-serif;
    font-size: 0.85rem;
    color: var(--freedom-white);
    opacity: 0.6;
    margin-top: 0.2rem;
}

.footer-note p {
    font-family: 'Azeret Mono', monospace;
    font-size: 0.7rem;
    color: var(--freedom-white);
    opacity: 0.4;
    max-width: 300px;
    text-align: right;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .comparison-panel {
        flex-direction: column;
    }

    #stickers-container {
        width: 340px;
        height: 300px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-note p {
        text-align: center;
    }

    #network-canvas {
        height: 400px;
    }

    .network-node {
        width: 60px;
        height: 60px;
    }

    .network-node span {
        font-size: 0.55rem;
    }
}

@media (max-width: 480px) {
    #honeycomb-grid {
        gap: 0.8rem;
    }

    .hex-cell {
        width: clamp(110px, 40vw, 160px);
        height: clamp(125px, 45vw, 185px);
    }

    .blob {
        width: clamp(130px, 40vw, 200px);
        height: clamp(130px, 40vw, 200px);
        padding: 1rem;
    }
}
