:root {
    --max-width: 1100px;
    --accent: #111;
    --text: #222;
    --muted: #4b4a4a;
    --bg: #faf9f6;
}

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

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
}

body {
    margin: 0;
    font-family: "Inconsolata", sans-serif;
    line-height: 1.6;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    /* flex-direction: column; */
}

main,
header,
footer {
    position: relative;
    z-index: 1;
}

.full-section {
    padding-top: 40px;
}

@media (min-width: 769px) {
    .full-section {
        padding-top: 0;
        min-height: calc(100vh - 150px);
    }
}

main {
    flex: 1;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: min(800px, 92%);
    margin-inline: auto;
}

/* ---------- Header ---------- */

header {
    position: sticky;
    top: 0;
    backdrop-filter: blur(6px);
    /* background: var(--bg); */
    border-bottom: 2px solid #000000;
    z-index: 100;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;

    font-size: 2.5rem;
    font-family: "Bebas Neue", sans-serif;
    font-weight: 400;

    line-height: 1;
}

.logo img {
    height: 1em;
    width: auto;
    display: block;
    transform: translateY(-2px);
}

.nav-links {
    display: flex;
    gap: 2rem;
    font-size: 1rem;
}

.nav-links a {
    color: var(--muted);
    transition: color 200ms ease;
}

.nav-links a:hover {
    color: var(--accent);
}

/* ---------- Sections ---------- */

section {
    padding: 30px 0;
    scroll-margin-top: 70px;
    scroll-snap-align: start;
}

section:last-of-type {
    border-bottom: none;
}

h1,
h2 {
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.2rem, 5vw, 3rem);
}

h2 {
    font-size: clamp(1.4rem, 4vw, 1.8rem);
}

p {
    color: var(--muted);
    text-align: justify;
    font-size: 1.2rem;
}

/* ---------- Scroll Animation ---------- */

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 600ms ease,
        transform 600ms ease;
}

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

/* ---------- Footer ---------- */

footer {
    padding: 10px 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted);
}

/* ---------- Mid-dot ---------- */

.mid-dot {
    vertical-align: middle;
}

/* ---------- Pipeline ---------- */

.pipeline {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pipeline-step {
    flex: 1;
    padding: 1.4rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(15, 15, 15, 0.04);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.pipeline-step-optional {
    border: none;
    background: rgba(15, 15, 15, 0.04);
    outline: none;
    background-clip: padding-box;
    position: relative;
}

.pipeline-step-optional::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 8px;
    pointer-events: none;
    border: 1px dashed transparent;
    background-image:
        repeating-linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.2) 0,
            rgba(0, 0, 0, 0.2) 6px,
            transparent 6px,
            transparent 14px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.2) 0,
            rgba(0, 0, 0, 0.2) 6px,
            transparent 6px,
            transparent 14px
        ),
        repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.2) 0,
            rgba(0, 0, 0, 0.2) 6px,
            transparent 6px,
            transparent 14px
        ),
        repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.2) 0,
            rgba(0, 0, 0, 0.2) 6px,
            transparent 6px,
            transparent 14px
        );
    background-size:
        14px 1px,
        14px 1px,
        1px 14px,
        1px 14px;
    background-position: top, bottom, left, right;
    background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
}

.pipeline-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.25rem;
    flex-shrink: 0;
    color: rgba(0, 0, 0, 0.35);
    font-size: 1.4rem;
}

.pipeline-arrow::before {
    content: "→";
}

.step-icon {
    width: 26px;
    height: 26px;
    color: #111;
    flex-shrink: 0;
    margin: 0.15rem 0;
}

.step-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #111;
    margin: 0;
}

.step-desc {
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.45;
    text-align: left;
    margin: 0;
    flex: 1;
}

.step-tag {
    justify-content: center;
    display: inline-block;
    font-size: 0.6rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    border: 1px solid rgba(0, 0, 0, 0.25);
    padding: 0.1rem 0.35rem;
    color: var(--muted);
    width: fit-content;
    margin-top: 0.25rem;
    border-radius: 8px;
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
    .logo {
        font-size: 1.8rem;
    }

    .nav-links {
        gap: 1rem;
        font-size: 0.85rem;
    }

    section {
        padding: 50px 0;
    }

    .pipeline {
        flex-direction: column;
    }

    .pipeline-arrow {
        padding: 0.25rem 0;
    }

    .pipeline-arrow::before {
        content: "↓";
    }

    .pipeline-step {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.3rem 0.6rem;
        padding: 0.8rem 1rem;
    }

    .step-icon {
        flex-shrink: 0;
    }

    .step-title {
        flex: 1;
        min-width: 0;
    }

    .step-desc {
        width: 100%;
        flex: none;
    }

    .step-tag {
        width: 100%;
    }
}

/* ---------- Hero Page ---------- */

.hero {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    padding: 0;
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
}

.hero-inner {
    padding: 90px 0;
    /* gives breathing room on small screens */
}

.hero h1 {
    max-width: 18ch;
}

.hero-sub {
    margin-top: 1rem;
}

.scroll-cue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 2.5rem;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 999px;
    color: inherit;
    transition: transform 200ms ease;
}

/* background animation */
.blanket-overlay-webgl {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    z-index: 0;
}
