/* ============================================
   sbom.day — Surrealist SBOM Gallery
   Palette: Retro-futuristic
   Layout: Hexagonal-honeycomb
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
    --warm-gray: #E8E0D4;
    --retro-teal: #0D9488;
    --amber-signal: #D97706;
    --paper-cream: #F5F0E8;
    --deep-charcoal: #2A2A28;
    --vintage-blue: #4A7B8B;
    --atomic-orange: #E87040;
    --footer-gray: #4A4440;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: clamp(16px, 1.5vw, 18px);
    line-height: 1.8;
    color: var(--deep-charcoal);
    background-color: var(--warm-gray);
    overflow-x: hidden;
}

/* ---------- Noise texture overlay (vintage paper) ---------- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ---------- Typography ---------- */
h1, h2, h3 {
    font-family: 'Cormorant Garamond', Garamond, serif;
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: clamp(28px, 4.5vw, 56px);
    font-weight: 600;
}

code, pre {
    font-family: 'Fira Code', monospace;
    font-weight: 400;
    font-size: 14px;
}

/* ---------- Section Titles ---------- */
.section-title {
    text-align: center;
    color: var(--deep-charcoal);
    margin-bottom: 0.5em;
    letter-spacing: 0.02em;
}

.section-intro {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem;
    color: var(--footer-gray);
    font-size: clamp(15px, 1.3vw, 17px);
}

/* ============================================
   THE MANIFEST — Hero Section
   ============================================ */
.manifest {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--warm-gray);
    overflow: hidden;
}

/* --- Floating hexagonal frames --- */
.hex-frames {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hex-frame {
    position: absolute;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.hex-frame.visible {
    opacity: 1;
}

.hex-frame-1 { top: 8%; left: 10%; }
.hex-frame-2 { top: 15%; right: 15%; }
.hex-frame-3 { bottom: 25%; left: 5%; }
.hex-frame-4 { top: 35%; right: 8%; }
.hex-frame-5 { bottom: 15%; right: 20%; }
.hex-frame-6 { top: 55%; left: 18%; }

/* --- Mixed-media collage snippets --- */
.collage-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.collage-snippet {
    position: absolute;
    background: var(--paper-cream);
    border: 1px solid var(--vintage-blue);
    padding: 12px 16px;
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    color: var(--vintage-blue);
    line-height: 1.6;
    transform: rotate(var(--rotation, 0deg));
    opacity: 0;
    box-shadow: 2px 3px 12px rgba(42, 42, 40, 0.08);
}

.collage-snippet.visible {
    opacity: 1;
}

.collage-snippet pre {
    font-size: 11px;
    white-space: pre;
    color: inherit;
}

.collage-snippet-1 {
    --rotation: -3deg;
    top: 20%;
    right: 6%;
    transform: rotate(-3deg) translateX(60px);
    transition: transform 0.8s ease, opacity 0.8s ease;
}

.collage-snippet-1.visible {
    transform: rotate(-3deg) translateX(0);
}

.collage-snippet-2 {
    --rotation: 2deg;
    bottom: 30%;
    left: 4%;
    transform: rotate(2deg) translateX(-60px);
    transition: transform 0.8s ease, opacity 0.8s ease;
}

.collage-snippet-2.visible {
    transform: rotate(2deg) translateX(0);
}

.collage-snippet-3 {
    --rotation: -1deg;
    bottom: 12%;
    right: 10%;
    border-color: var(--atomic-orange);
    color: var(--atomic-orange);
    transform: rotate(-1deg) translateY(40px);
    transition: transform 0.8s ease, opacity 0.8s ease;
}

.collage-snippet-3.visible {
    transform: rotate(-1deg) translateY(0);
}

/* --- Wordmark --- */
.wordmark {
    position: relative;
    z-index: 10;
    text-align: center;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.wordmark.visible {
    opacity: 1;
}

.wordmark-title {
    font-family: 'Cormorant Garamond', Garamond, serif;
    font-size: clamp(48px, 8vw, 120px);
    font-weight: 700;
    color: var(--deep-charcoal);
    letter-spacing: 0.15em;
    transition: letter-spacing 1s ease;
}

.wordmark-title.animate {
    letter-spacing: 0.06em;
}

.wordmark-subtitle {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: clamp(14px, 1.5vw, 18px);
    color: var(--vintage-blue);
    margin-top: 0.5em;
    font-style: italic;
    letter-spacing: 0.04em;
}

/* --- Scroll indicator --- */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: fadeInScroll 1s ease 1.5s forwards;
}

@keyframes fadeInScroll {
    to { opacity: 0.6; }
}

.scroll-line {
    animation: scrollPulse 2s ease infinite;
}

@keyframes scrollPulse {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(4px); opacity: 0.3; }
}

/* ============================================
   COMPONENT HONEYCOMB — Hexagonal Grid
   ============================================ */
.honeycomb-section {
    padding: 6rem 2rem;
    background-color: var(--paper-cream);
    position: relative;
}

/* Atomic border top */
.honeycomb-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        var(--atomic-orange) 0px,
        var(--atomic-orange) 8px,
        transparent 8px,
        transparent 16px,
        var(--retro-teal) 16px,
        var(--retro-teal) 24px,
        transparent 24px,
        transparent 32px
    );
}

.honeycomb-grid {
    max-width: 1000px;
    margin: 0 auto;
}

.hex-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: -30px;
}

.hex-row-offset {
    margin-left: calc(100% / 6);
    margin-right: calc(-100% / 6);
}

.hex-cell {
    position: relative;
    min-height: 280px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: var(--warm-gray);
    transition: background-color 0.4s ease;
}

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

.hex-content {
    text-align: center;
    padding: 2.5rem 1.5rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease 0.2s, transform 0.3s ease 0.2s;
}

.hex-cell-reveal.revealed .hex-content {
    opacity: 1;
    transform: translateY(0);
}

.hex-cell-reveal .hex-cell-inner {
    background: var(--retro-teal);
    opacity: 0;
    transition: opacity 0.4s ease, background 0.4s ease;
}

.hex-cell-reveal.revealed .hex-cell-inner {
    background: var(--paper-cream);
    opacity: 1;
}

.hex-icon {
    margin-bottom: 0.8rem;
}

.hex-content h3 {
    font-family: 'Cormorant Garamond', Garamond, serif;
    font-size: clamp(18px, 2vw, 24px);
    font-weight: 700;
    color: var(--deep-charcoal);
    margin-bottom: 0.5rem;
}

.hex-content p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--footer-gray);
    margin-bottom: 0.8rem;
}

.hex-code {
    display: inline-block;
    background: var(--warm-gray);
    color: var(--retro-teal);
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 11px;
    border: 1px solid rgba(13, 148, 136, 0.2);
}

/* ============================================
   DEPENDENCY CHAIN — Surreal Visualization
   ============================================ */
.dependency-section {
    padding: 6rem 2rem;
    background: var(--warm-gray);
    position: relative;
    overflow: hidden;
}

/* Atomic border top */
.dependency-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        var(--retro-teal) 0px,
        var(--retro-teal) 12px,
        transparent 12px,
        transparent 20px,
        var(--amber-signal) 20px,
        var(--amber-signal) 28px,
        transparent 28px,
        transparent 36px
    );
}

.chain-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    perspective: 800px;
}

.chain-visualization {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* --- Chain nodes --- */
.chain-node {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}

.chain-node-hex {
    background: var(--paper-cream);
    border: 2px solid var(--retro-teal);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    padding: 1.5rem 2rem;
    min-width: 120px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chain-node-hex:hover {
    transform: scale(1.05);
}

.chain-node-root .chain-node-hex {
    border-color: var(--amber-signal);
    min-width: 150px;
    min-height: 120px;
    background: linear-gradient(135deg, var(--paper-cream), rgba(217, 119, 6, 0.08));
}

.chain-node-vuln .chain-node-hex {
    border-color: var(--atomic-orange);
    background: linear-gradient(135deg, var(--paper-cream), rgba(232, 112, 64, 0.1));
}

.chain-node-name {
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    font-weight: 400;
    color: var(--deep-charcoal);
    display: block;
}

.chain-node-version {
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    color: var(--vintage-blue);
    display: block;
    margin-top: 2px;
}

.chain-node-cve {
    font-family: 'Fira Code', monospace;
    font-size: 10px;
    color: var(--atomic-orange);
    display: block;
    margin-top: 4px;
    font-weight: 400;
}

/* --- Chain levels --- */
.chain-level {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.chain-connector {
    width: 2px;
    height: 30px;
    background: linear-gradient(to bottom, var(--retro-teal), transparent);
    margin-bottom: 0.5rem;
    position: relative;
}

.chain-connector::before,
.chain-connector::after {
    content: '';
    position: absolute;
    bottom: 0;
    width: 40%;
    height: 2px;
    background: var(--retro-teal);
}

.chain-connector::before {
    right: 50%;
    transform-origin: right;
    transform: scaleX(1);
}

.chain-connector::after {
    left: 50%;
    transform-origin: left;
    transform: scaleX(1);
}

.chain-nodes {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Surreal perspective depth */
.chain-level-2 {
    transform: perspective(800px) translateZ(-30px);
    opacity: 0.9;
}

.chain-level-3 {
    transform: perspective(800px) translateZ(-80px);
    opacity: 0.7;
}

.chain-node-fading .chain-node-hex {
    border-style: dashed;
    border-color: var(--vintage-blue);
}

/* --- Infinity fade --- */
.chain-infinity {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 1.5rem;
    opacity: 0.5;
    font-family: 'Cormorant Garamond', Garamond, serif;
    font-size: 2rem;
    color: var(--vintage-blue);
    letter-spacing: 0.3em;
}

.chain-infinity-count {
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    letter-spacing: 0;
    color: var(--footer-gray);
}

/* --- Collage overlay on chain --- */
.chain-collage-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.collage-float {
    position: absolute;
    background: rgba(245, 240, 232, 0.85);
    border: 1px solid var(--vintage-blue);
    padding: 10px 14px;
    font-size: 10px;
    color: var(--vintage-blue);
    opacity: 0;
    transition: opacity 0.8s ease;
    box-shadow: 2px 2px 10px rgba(42, 42, 40, 0.06);
}

.collage-float pre {
    font-size: 10px;
    white-space: pre;
    color: inherit;
}

.collage-float.visible {
    opacity: 0.7;
}

.collage-float-1 {
    top: 10%;
    right: -2%;
    transform: rotate(-2deg);
}

.collage-float-2 {
    bottom: 15%;
    left: -1%;
    transform: rotate(1.5deg);
}

/* ============================================
   TODAY'S EXHIBITION
   ============================================ */
.exhibition-section {
    padding: 6rem 2rem;
    background: var(--paper-cream);
    position: relative;
}

/* Atomic border top */
.exhibition-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        var(--atomic-orange) 0px,
        var(--atomic-orange) 6px,
        transparent 6px,
        transparent 10px,
        var(--vintage-blue) 10px,
        var(--vintage-blue) 16px,
        transparent 16px,
        transparent 24px
    );
}

.exhibition-card {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

.exhibition-frame {
    background: var(--warm-gray);
    border: 2px solid var(--retro-teal);
    padding: 3rem;
    position: relative;
}

/* Decorative corner hexagons */
.exhibition-frame::before,
.exhibition-frame::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 23px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: var(--retro-teal);
}

.exhibition-frame::before {
    top: -12px;
    left: -12px;
}

.exhibition-frame::after {
    bottom: -12px;
    right: -12px;
}

.exhibition-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.exhibition-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
    padding: 1rem 0;
    border-right: 2px solid var(--retro-teal);
    padding-right: 1.5rem;
}

.exhibition-day {
    font-family: 'Cormorant Garamond', Garamond, serif;
    font-size: 42px;
    font-weight: 700;
    color: var(--retro-teal);
    line-height: 1;
}

.exhibition-month {
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    color: var(--vintage-blue);
    letter-spacing: 0.2em;
    margin-top: 4px;
}

.exhibition-piece {
    flex: 1;
}

.exhibition-piece-title {
    font-family: 'Cormorant Garamond', Garamond, serif;
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 700;
    color: var(--deep-charcoal);
    margin-bottom: 0.8rem;
}

.exhibition-piece-desc {
    font-size: 15px;
    line-height: 1.8;
    color: var(--footer-gray);
    margin-bottom: 1.5rem;
}

/* --- SBOM art layers (surreal stacking) --- */
.exhibition-sbom-art {
    position: relative;
    height: 160px;
    perspective: 600px;
}

.sbom-art-layer {
    position: absolute;
    left: 0;
    background: var(--paper-cream);
    border: 1px solid var(--vintage-blue);
    padding: 6px 14px;
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    color: var(--deep-charcoal);
    transition: transform 0.4s ease;
    box-shadow: 1px 2px 8px rgba(42, 42, 40, 0.06);
}

.sbom-art-layer code {
    font-size: 12px;
}

.sbom-art-layer-1 {
    top: 0;
    z-index: 5;
    border-color: var(--retro-teal);
    transform: translateZ(0) rotate(-1deg);
}

.sbom-art-layer-2 {
    top: 28px;
    left: 20px;
    z-index: 4;
    opacity: 0.9;
    transform: translateZ(-10px) rotate(0.5deg);
}

.sbom-art-layer-3 {
    top: 56px;
    left: 40px;
    z-index: 3;
    opacity: 0.75;
    transform: translateZ(-20px) rotate(-0.5deg);
}

.sbom-art-layer-4 {
    top: 84px;
    left: 60px;
    z-index: 2;
    opacity: 0.55;
    border-color: var(--amber-signal);
    transform: translateZ(-30px) rotate(1deg);
}

.sbom-art-layer-5 {
    top: 112px;
    left: 80px;
    z-index: 1;
    opacity: 0.35;
    border-color: var(--atomic-orange);
    color: var(--atomic-orange);
    transform: translateZ(-40px) rotate(-1.5deg);
}

/* --- Retro-pattern border under exhibition --- */
.exhibition-border-pattern {
    height: 12px;
    margin-top: 2rem;
    background: repeating-linear-gradient(
        90deg,
        transparent 0px,
        transparent 4px,
        var(--atomic-orange) 4px,
        var(--atomic-orange) 8px,
        transparent 8px,
        transparent 16px,
        var(--retro-teal) 16px,
        var(--retro-teal) 20px,
        transparent 20px,
        transparent 28px,
        var(--amber-signal) 28px,
        var(--amber-signal) 32px,
        transparent 32px,
        transparent 40px
    );
    opacity: 0.6;
}

/* ============================================
   ARCHIVE FOOTER
   ============================================ */
.archive-footer {
    background: var(--footer-gray);
    padding: 4rem 2rem 3rem;
    position: relative;
    overflow: hidden;
}

.footer-hex-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    justify-content: space-around;
    align-items: center;
    opacity: 0.15;
}

.footer-hex {
    animation: floatHex 8s ease-in-out infinite;
}

.footer-hex:nth-child(2) {
    animation-delay: -3s;
}

.footer-hex:nth-child(3) {
    animation-delay: -5s;
}

@keyframes floatHex {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

.footer-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.footer-wordmark {
    font-family: 'Cormorant Garamond', Garamond, serif;
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 700;
    color: var(--paper-cream);
    letter-spacing: 0.1em;
    margin-bottom: 0.3rem;
}

.footer-tagline {
    font-family: 'Source Serif 4', Georgia, serif;
    font-style: italic;
    color: var(--retro-teal);
    font-size: 15px;
    margin-bottom: 1.5rem;
}

.footer-meta {
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    color: rgba(245, 240, 232, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
}

.footer-separator {
    color: var(--retro-teal);
}

.atomic-border-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        var(--retro-teal) 0px,
        var(--retro-teal) 10px,
        transparent 10px,
        transparent 14px,
        var(--atomic-orange) 14px,
        var(--atomic-orange) 20px,
        transparent 20px,
        transparent 24px
    );
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .hex-row {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 0;
    }

    .hex-row-offset {
        margin-left: 0;
        margin-right: 0;
    }

    .hex-cell {
        min-height: 240px;
        clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    }

    .chain-nodes {
        gap: 0.5rem;
    }

    .chain-node-hex {
        min-width: 90px;
        min-height: 80px;
        padding: 1rem 1.2rem;
    }

    .chain-node-name {
        font-size: 11px;
    }

    .chain-node-version {
        font-size: 9px;
    }

    .chain-level-2,
    .chain-level-3 {
        transform: none;
    }

    .exhibition-content {
        flex-direction: column;
        gap: 1rem;
    }

    .exhibition-date {
        flex-direction: row;
        gap: 0.8rem;
        border-right: none;
        border-bottom: 2px solid var(--retro-teal);
        padding-right: 0;
        padding-bottom: 0.8rem;
    }

    .exhibition-frame {
        padding: 1.5rem;
    }

    .collage-snippet {
        display: none;
    }

    .hex-frame-3,
    .hex-frame-4,
    .hex-frame-6 {
        display: none;
    }

    .collage-float {
        display: none;
    }
}

@media (max-width: 480px) {
    .honeycomb-section,
    .dependency-section,
    .exhibition-section {
        padding: 4rem 1rem;
    }

    .chain-node-hex {
        min-width: 75px;
        min-height: 65px;
        padding: 0.8rem 1rem;
    }

    .sbom-art-layer {
        font-size: 10px;
        padding: 4px 10px;
    }

    .sbom-art-layer code {
        font-size: 10px;
    }

    .exhibition-sbom-art {
        height: 130px;
    }

    .sbom-art-layer-2 { left: 10px; }
    .sbom-art-layer-3 { left: 20px; }
    .sbom-art-layer-4 { left: 30px; }
    .sbom-art-layer-5 { left: 40px; }
}
