/* sbom.study — Geological SBOM Explorer */

:root {
    --marble-light: #f0ebe3;
    --ink: #2c2a25;
    --marble-mid: #e8e2d8;
    --marble-dark: #d6cfc4;
    --teal-stone: #5b8a7a;
    --terracotta: #c4785a;
    --teal-bright: #7aaa8e;
    --white: #ffffff;
    --shadow-warm: #9b9485;

    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--marble-light);
    color: var(--ink);
    font-family: var(--font-body);
    overflow-x: hidden;
}

/* Sections — diagonal strata */
.section {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.section-inner {
    width: 100%;
    max-width: 1200px;
    padding: 4rem 2rem;
    position: relative;
    z-index: 2;
}

/* Diagonal clip overlaps */
.section-hero {
    background: var(--marble-light);
    clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%);
    z-index: 5;
}

.section-what {
    background: var(--marble-mid);
    clip-path: polygon(0 3%, 100% 0, 100% 97%, 0 100%);
    margin-top: -5vh;
    z-index: 4;
}

.section-why {
    background: var(--marble-dark);
    clip-path: polygon(0 0, 100% 4%, 100% 96%, 0 100%);
    margin-top: -5vh;
    z-index: 3;
}

.section-standard {
    background: var(--marble-mid);
    clip-path: polygon(0 5%, 100% 0, 100% 100%, 0 97%);
    margin-top: -5vh;
    z-index: 2;
}

.section-begin {
    background: var(--ink);
    color: var(--marble-light);
    clip-path: polygon(0 0, 100% 3%, 100% 100%, 0 100%);
    margin-top: -5vh;
    z-index: 1;
}

/* Hero */
.hero-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(3rem, 7vw, 6.5rem);
    letter-spacing: 0.04em;
    color: var(--ink);
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s ease-out 0.3s forwards;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: var(--shadow-warm);
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s ease-out 0.6s forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll indicator */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    opacity: 0;
    animation: fadeUp 1s ease-out 1s forwards;
}

.scroll-line {
    display: block;
    width: 2px;
    height: 40px;
    background: var(--teal-stone);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { transform: scaleY(1); opacity: 0.5; }
    50% { transform: scaleY(1.5); opacity: 1; }
}

.scroll-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--shadow-warm);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Marble veins — canvas overlay */
.marble-veins {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.15;
}

/* Section headings */
.section-heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: 0.02em;
    margin-bottom: 1.5rem;
    color: inherit;
}

.section-body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    line-height: 1.75;
    max-width: 640px;
    margin-bottom: 2rem;
    color: inherit;
    opacity: 0.85;
}

/* Content slab — neomorphic raised panel */
.content-slab {
    position: relative;
    z-index: 2;
}

/* Neomorphic cards */
.neo-card {
    background: var(--marble-mid);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    box-shadow:
        8px 8px 16px var(--shadow-warm),
        -8px -8px 16px var(--white);
    margin-bottom: 1.5rem;
}

.section-begin .neo-card {
    background: #3a3733;
    box-shadow:
        8px 8px 16px rgba(0,0,0,0.4),
        -8px -8px 16px rgba(255,255,255,0.05);
}

.code-specimen {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    display: block;
    padding: 0.3rem 0;
    color: var(--teal-stone);
}

.section-begin .code-specimen {
    color: var(--teal-bright);
}

/* Cursor blink */
.cursor-blink {
    display: inline-block;
    width: 8px;
    height: 1.1em;
    background: var(--teal-bright);
    animation: blink 1s step-end infinite;
    vertical-align: middle;
    margin-top: 0.5rem;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Dependency graph SVGs */
.dep-graph {
    width: 100%;
    max-width: 400px;
    height: auto;
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    opacity: 0.6;
}

.dep-graph-bg {
    max-width: 500px;
    opacity: 0.3;
    right: 0;
}

.dep-node {
    fill: var(--teal-stone);
    opacity: 0.8;
}

.dep-node-root {
    fill: var(--terracotta);
    opacity: 1;
}

.dep-node-vuln {
    fill: var(--terracotta);
    opacity: 1;
}

.dep-edge {
    stroke: var(--teal-stone);
    stroke-width: 1.5;
    fill: none;
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
}

.dep-edge-vuln {
    stroke: var(--terracotta);
    stroke-width: 2;
    fill: none;
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
}

/* Stats row */
.stat-row {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.neo-stat {
    background: var(--marble-mid);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    box-shadow:
        6px 6px 12px var(--shadow-warm),
        -6px -6px 12px var(--white);
    display: flex;
    flex-direction: column;
    min-width: 180px;
}

.stat-number {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2.5rem;
    color: var(--terracotta);
    line-height: 1;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--shadow-warm);
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* Format cards */
.format-blocks {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.format-card {
    display: flex;
    flex-direction: column;
    min-width: 160px;
    flex: 1;
}

.format-label {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--teal-stone);
}

.format-desc {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--shadow-warm);
    margin-top: 0.25rem;
}

/* CTA card */
.cta-card {
    display: inline-block;
}

/* Particle canvas */
#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .dep-graph {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        margin: 2rem auto;
        opacity: 0.4;
    }

    .section-inner {
        padding: 3rem 1.5rem;
    }

    .stat-row {
        flex-direction: column;
    }

    .format-blocks {
        flex-direction: column;
    }
}
