/* ===========================
   freedom.compare - styles.css
   Street-style protest aesthetics
   Hexagonal honeycomb layout
   =========================== */

/* --- 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;

    --font-display: 'Baloo 2', cursive;
    --font-body: 'Mukta', sans-serif;
    --font-mono: 'Azeret Mono', monospace;

    --hex-size: clamp(130px, 18vw, 200px);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

/* --- Hero Section --- */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--ocean-deep);
    overflow: hidden;
}

.hero-bg-circuit {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.hero-bg-circuit.visible {
    opacity: 0.18;
}

.circuit-svg {
    width: 100%;
    height: 100%;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 24px;
}

.hero-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    line-height: 1;
}

.hero-title-freedom {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(48px, 10vw, 120px);
    color: var(--freedom-white);
    letter-spacing: 0.02em;
    display: inline-block;
    min-height: 1.1em;
}

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

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

.hero-title-compare {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(32px, 6vw, 72px);
    color: var(--rally-orange);
    letter-spacing: 0.05em;
    opacity: 0;
    transform: scale(1.1);
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

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

/* Stencil-cut effect for .COMPARE */
.hero-title-compare::before {
    content: '';
    position: absolute;
    inset: -4px -8px;
    border: 3px dashed var(--rally-orange);
    border-radius: 6px;
    opacity: 0.3;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(14px, 1.8vw, 20px);
    color: var(--freedom-white);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease 2.4s, transform 0.6s ease 2.4s;
    margin-top: 20px;
}

body.loaded .hero-subtitle {
    opacity: 0.7;
    transform: translateY(0);
}

/* --- Stickers --- */
.hero-stickers {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.sticker {
    position: absolute;
    width: clamp(44px, 6vw, 72px);
    height: clamp(44px, 6vw, 72px);
    border-radius: 48% 52% 44% 56% / 50% 46% 54% 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    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);
}

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

.sticker-icon {
    width: 60%;
    height: 60%;
}

.sticker-1 { top: 12%; left: 8%; background: var(--rally-orange); color: var(--freedom-white); }
.sticker-2 { top: 8%; right: 12%; background: var(--justice-gold); color: var(--contrast-midnight); border-radius: 50% 46% 54% 50% / 48% 52% 48% 52%; }
.sticker-3 { top: 28%; left: 3%; background: var(--civic-teal); color: var(--freedom-white); }
.sticker-4 { top: 22%; right: 5%; background: var(--social-rose); color: var(--freedom-white); border-radius: 46% 54% 50% 50% / 52% 48% 52% 48%; }
.sticker-5 { bottom: 28%; left: 6%; background: var(--justice-gold); color: var(--contrast-midnight); }
.sticker-6 { bottom: 22%; right: 8%; background: var(--rally-orange); color: var(--freedom-white); border-radius: 52% 48% 46% 54% / 50% 54% 46% 50%; }
.sticker-7 { bottom: 12%; left: 15%; background: var(--social-rose); color: var(--freedom-white); }
.sticker-8 { bottom: 14%; right: 16%; background: var(--civic-teal); color: var(--freedom-white); border-radius: 44% 56% 52% 48% / 54% 46% 50% 50%; }

/* --- Scroll Hint --- */
.scroll-hint {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.6s ease 2.6s;
    color: var(--freedom-white);
}

body.loaded .scroll-hint {
    opacity: 0.5;
}

.scroll-hint-text {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.scroll-hint-arrow {
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* --- Section Common --- */
.section-header {
    text-align: center;
    padding: 0 24px;
    margin-bottom: 60px;
}

.section-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(32px, 6vw, 72px);
    color: var(--freedom-white);
    margin-bottom: 12px;
}

.section-desc {
    font-family: var(--font-body);
    font-size: clamp(15px, 1.6vw, 19px);
    color: var(--freedom-white);
    opacity: 0.65;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Honeycomb Section --- */
.honeycomb-section {
    position: relative;
    padding: 100px 24px 120px;
    background: var(--contrast-midnight);
    overflow: hidden;
}

.honeycomb-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Hexagonal cells via clip-path */
.hex-cell {
    width: var(--hex-size);
    height: calc(var(--hex-size) * 1.1547);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    position: relative;
    transition: transform 0.3s ease, z-index 0s;
    cursor: pointer;
    flex-shrink: 0;
}

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

.hex-inner {
    position: absolute;
    inset: 3px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hex-content {
    text-align: center;
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.hex-icon {
    width: 36px;
    height: 36px;
    display: block;
}

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

.hex-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(12px, 1.4vw, 16px);
    color: var(--freedom-white);
    line-height: 1.2;
}

.hex-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.7;
}

/* Category-specific hex coloring */
.hex-civil {
    background: var(--civic-teal);
}
.hex-civil .hex-inner {
    background: linear-gradient(135deg, rgba(27, 153, 139, 0.95), rgba(10, 46, 82, 0.9));
}
.hex-civil .hex-icon { color: var(--civic-teal); }

.hex-economic {
    background: var(--justice-gold);
}
.hex-economic .hex-inner {
    background: linear-gradient(135deg, rgba(240, 192, 64, 0.3), rgba(10, 46, 82, 0.95));
}
.hex-economic .hex-icon { color: var(--justice-gold); }

.hex-social {
    background: var(--social-rose);
}
.hex-social .hex-inner {
    background: linear-gradient(135deg, rgba(224, 87, 128, 0.3), rgba(10, 46, 82, 0.95));
}
.hex-social .hex-icon { color: var(--social-rose); }

/* Even row offset for honeycomb */
.hex-cell[data-row="2"] {
    margin-top: calc(var(--hex-size) * -0.29);
}

.hex-cell[data-row="3"] {
    margin-top: calc(var(--hex-size) * -0.29);
}

/* Circuit overlay */
.circuit-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* --- Comparison Section --- */
.comparisons-section {
    padding: 100px 24px 120px;
    background: var(--ocean-deep);
}

.comparison-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto 80px;
    flex-wrap: wrap;
}

.comparison-side {
    flex: 1;
    min-width: 260px;
    max-width: 400px;
}

.comparison-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.comparison-vs {
    width: 64px;
    height: 64px;
    color: var(--rally-orange);
}

.vs-icon {
    width: 100%;
    height: 100%;
}

.comparison-connector {
    height: 60px;
    color: var(--freedom-white);
    opacity: 0.2;
}

.connector-line {
    height: 100%;
    width: 4px;
}

/* --- Blob Shapes --- */
.blob {
    position: relative;
    padding: 32px 24px;
    text-align: center;
}

.blob-shape {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.12;
    animation: blobPulse 4s ease-in-out infinite;
}

.blob-left .blob-shape {
    border-radius: 62% 38% 46% 54% / 60% 44% 56% 40%;
    background: var(--civic-teal);
}

.blob-right .blob-shape {
    border-radius: 38% 62% 54% 46% / 44% 60% 40% 56%;
    background: var(--social-rose);
}

#blob-enterprise .blob-shape,
#blob-speech .blob-shape,
#blob-privacy .blob-shape {
    background: var(--civic-teal);
    border-radius: 62% 38% 46% 54% / 60% 44% 56% 40%;
}

#blob-enterprise .blob-shape {
    background: var(--justice-gold);
}

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

.blob-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(20px, 2.5vw, 28px);
    color: var(--freedom-white);
    position: relative;
    z-index: 1;
    margin-bottom: 8px;
}

.blob-desc {
    font-family: var(--font-body);
    font-size: clamp(14px, 1.4vw, 17px);
    color: var(--freedom-white);
    opacity: 0.75;
    line-height: 1.6;
    position: relative;
    z-index: 1;
    margin-bottom: 12px;
}

.blob-category-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 40px;
    position: relative;
    z-index: 1;
}

.tag-civil {
    background: rgba(27, 153, 139, 0.2);
    color: var(--civic-teal);
    border: 1px solid rgba(27, 153, 139, 0.4);
}

.tag-economic {
    background: rgba(240, 192, 64, 0.2);
    color: var(--justice-gold);
    border: 1px solid rgba(240, 192, 64, 0.4);
}

.tag-social {
    background: rgba(224, 87, 128, 0.2);
    color: var(--social-rose);
    border: 1px solid rgba(224, 87, 128, 0.4);
}

/* Comparison panel scroll reveal */
.comparison-panel {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* --- Network Section --- */
.network-section {
    padding: 100px 24px 120px;
    background: var(--contrast-midnight);
    position: relative;
}

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

.network-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.network-labels {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.network-label {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--freedom-white);
    transform: translate(-50%, -50%);
    white-space: nowrap;
    pointer-events: auto;
    cursor: default;
    padding: 3px 8px;
    border-radius: 4px;
    transition: background 0.2s ease, color 0.2s ease;
}

.network-label:hover {
    background: var(--rally-orange);
    color: var(--contrast-midnight);
}

.network-label.cat-civil { border-bottom: 2px solid var(--civic-teal); }
.network-label.cat-economic { border-bottom: 2px solid var(--justice-gold); }
.network-label.cat-social { border-bottom: 2px solid var(--social-rose); }

/* --- Closing Section --- */
.closing-section {
    position: relative;
    padding: 120px 24px;
    background: var(--ocean-deep);
    text-align: center;
    overflow: hidden;
}

.closing-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
}

.closing-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(32px, 5vw, 60px);
    color: var(--freedom-white);
    margin-bottom: 20px;
}

.closing-text {
    font-family: var(--font-body);
    font-size: clamp(16px, 1.8vw, 20px);
    color: var(--freedom-white);
    opacity: 0.7;
    line-height: 1.8;
    max-width: 560px;
    margin: 0 auto;
}

.closing-stickers {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.sticker-closing {
    width: 50px;
    height: 50px;
    opacity: 0.2;
}

.sticker-c1 {
    top: 15%;
    left: 10%;
    background: var(--rally-orange);
    color: var(--freedom-white);
}

.sticker-c2 {
    bottom: 20%;
    right: 8%;
    background: var(--civic-teal);
    color: var(--freedom-white);
    border-radius: 50% 46% 54% 50% / 48% 52% 48% 52%;
}

.sticker-c3 {
    top: 25%;
    right: 15%;
    background: var(--justice-gold);
    color: var(--contrast-midnight);
    border-radius: 46% 54% 48% 52% / 52% 48% 52% 48%;
}

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

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

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

/* --- Closing scroll reveal --- */
.closing-content {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.closing-content.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    :root {
        --hex-size: clamp(100px, 28vw, 150px);
    }

    .honeycomb-grid {
        gap: 8px;
    }

    .comparison-panel {
        flex-direction: column;
        gap: 16px;
    }

    .comparison-divider {
        flex-direction: row;
        gap: 12px;
    }

    .comparison-connector {
        height: auto;
        width: 60px;
    }

    .connector-line {
        height: 4px;
        width: 100%;
    }

    .sticker {
        width: 40px;
        height: 40px;
    }

    .network-canvas-wrap {
        height: 400px;
    }

    .hero-stickers .sticker:nth-child(n+6) {
        display: none;
    }
}

@media (max-width: 480px) {
    :root {
        --hex-size: 110px;
    }

    .hex-cell[data-row="2"],
    .hex-cell[data-row="3"] {
        margin-top: calc(var(--hex-size) * -0.25);
    }

    .section-header {
        margin-bottom: 40px;
    }

    .closing-section {
        padding: 80px 20px;
    }
}

/* --- Parallax sticker drift utility --- */
.sticker[data-parallax] {
    will-change: transform;
}

/* --- Wheat-paste sticker torn-edge visual --- */
.sticker::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.08);
    pointer-events: none;
}
