/* ==========================================================================
   continuum.quest -- surgical minimalism, the unbroken line
   Palette: strict monochrome
     #FAFAFA  background
     #0A0A0A  primary text / spine
     #3A3A3A  secondary text
     #6E6E6E  tertiary / captions
     #505050  hover accent
     #BFBFBF  inactive waypoint stroke
     #E0E0E0  hairline divider
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    background: #FAFAFA;
}

body {
    background: #FAFAFA;
    color: #0A0A0A;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 400;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* The Spine -- the central 1px black axis, fixed for its lifetime */
body::after {
    content: "";
    position: fixed;
    left: 50%;
    top: 0;
    transform: translateX(-0.5px);
    width: 1px;
    height: 100vh;
    background: #0A0A0A;
    z-index: 1;
    pointer-events: none;
}

/* Terminal arrowheads at top and bottom of the spine */
.spine-terminal {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    z-index: 3;
    pointer-events: none;
}

.spine-terminal--top {
    top: 0;
    border-bottom: 6px solid #0A0A0A;
}

.spine-terminal--bottom {
    bottom: 0;
    border-top: 6px solid #0A0A0A;
}

/* Counter -- viewport-locked technical readout */
.counter {
    position: fixed;
    top: 28px;
    right: 32px;
    font-family: 'JetBrains Mono', ui-monospace, 'Menlo', monospace;
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: #3A3A3A;
    z-index: 10;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
    user-select: none;
}

.counter-current {
    display: inline-block;
    transition: opacity 200ms ease;
    color: #0A0A0A;
    min-width: 1.3em;
    text-align: right;
}

.counter-divider {
    margin: 0 0.4em;
    color: #BFBFBF;
}

.counter-total {
    color: #6E6E6E;
}

.counter.flicker .counter-current {
    opacity: 0;
}

/* The continuum -- container of stations */
.continuum {
    position: relative;
    z-index: 2;
    width: 100%;
}

/* Each station is a full-viewport-height section */
.section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 96px 0;
}

.section--left {
    justify-content: flex-start;
}

.section--right {
    justify-content: flex-end;
}

/* Hairline divider between sections (very subtle) */
.section + .section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
}

/* Waypoint markers along the spine */
.waypoint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border: 1px solid #BFBFBF;
    background: #FAFAFA;
    border-radius: 50%;
    z-index: 4;
    transition:
        background-color 600ms ease-in-out,
        border-color 600ms ease-in-out,
        transform 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: default;
    pointer-events: auto;
}

.waypoint.is-active {
    background: #0A0A0A;
    border-color: #0A0A0A;
}

.waypoint:hover {
    transform: translate(-50%, -50%) scale(1.5);
    background: #505050;
    border-color: #505050;
}

.waypoint.is-active:hover {
    background: #0A0A0A;
    border-color: #0A0A0A;
}

/* Content blocks -- sized at 45% of viewport, edge against spine */
.content-block {
    position: relative;
    width: 45vw;
    max-width: 560px;
    padding: 0 56px;
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 800ms ease,
        transform 800ms ease,
        scale 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
}

.section--left .content-block {
    text-align: right;
    transform: translate(-20px, 20px);
    padding-right: 56px;
    padding-left: 24px;
}

.section--right .content-block {
    text-align: left;
    transform: translate(20px, 20px);
    padding-left: 56px;
    padding-right: 24px;
}

.content-block.is-visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* Scale-hover -- the primary interaction (1.5% bloom) */
.content-block:hover {
    transform: translate(0, 0) scale(1.015);
    transition:
        transform 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
        opacity 800ms ease;
}

.content-block:not(.is-visible):hover {
    /* Don't override the entrance animation */
    transform: translateY(20px);
}

.section--left .content-block:not(.is-visible):hover {
    transform: translate(-20px, 20px);
}

.section--right .content-block:not(.is-visible):hover {
    transform: translate(20px, 20px);
}

.content-inner {
    position: relative;
    z-index: 2;
}

/* Angular brackets -- 90deg corners pointing toward the spine */
.bracket {
    position: absolute;
    top: -8px;
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-weight: 500;
    font-size: 1.5em;
    line-height: 1;
    color: #0A0A0A;
    user-select: none;
    pointer-events: none;
    letter-spacing: 0;
}

.bracket--right {
    /* On left-aligned (left of spine) sections; bracket sits on the inner edge */
    right: 24px;
    transform: scale(1.5);
    transform-origin: top right;
}

.bracket--left {
    /* On right-aligned (right of spine) sections; bracket sits on the inner edge */
    left: 24px;
    transform: scale(1.5);
    transform-origin: top left;
}

/* Meta -- small label preceding the heading */
.meta {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #6E6E6E;
    margin-bottom: 24px;
    font-variant-numeric: tabular-nums;
}

/* Headings */
.heading-display {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-weight: 700;
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0A0A0A;
    line-height: 1.05;
    margin-bottom: 32px;
}

.heading-section {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-weight: 500;
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    letter-spacing: 0.03em;
    color: #0A0A0A;
    line-height: 1.2;
    margin-bottom: 28px;
}

/* Hairline rule between heading and body */
.rule {
    border: 0;
    border-top: 1px solid #E0E0E0;
    width: 100%;
    margin: 0 0 28px 0;
    height: 0;
}

.section--left .rule {
    margin-left: auto;
}

.section--right .rule {
    margin-right: auto;
}

/* Body text */
.body-text {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.75;
    color: #3A3A3A;
    margin-bottom: 28px;
    max-width: 52ch;
}

.section--left .body-text {
    margin-left: auto;
}

.section--right .body-text {
    margin-right: auto;
}

/* Captions -- monospaced footnotes */
.caption {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: lowercase;
    color: #6E6E6E;
    font-variant-numeric: tabular-nums;
}

.caption code {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.85em;
    color: #3A3A3A;
    background: transparent;
    padding: 0 2px;
}

/* Hover accent on textual links and code (purely aesthetic, no actual links) */
.body-text:hover {
    color: #0A0A0A;
}

.caption:hover {
    color: #505050;
}

/* ==========================================================================
   Responsive: below 768px the alternation collapses to a single column
   ========================================================================== */

@media (max-width: 768px) {
    body::after {
        opacity: 0.15;
    }

    .section,
    .section--left,
    .section--right {
        justify-content: center;
        padding: 80px 0;
    }

    .content-block,
    .section--left .content-block,
    .section--right .content-block {
        width: 88vw;
        max-width: 520px;
        padding: 0 24px;
        text-align: center;
        transform: translateY(20px);
    }

    .content-block.is-visible {
        transform: translate(0, 0);
    }

    .content-block:hover {
        transform: translate(0, 0) scale(1.015);
    }

    .section--left .body-text,
    .section--right .body-text,
    .section--left .rule,
    .section--right .rule {
        margin-left: auto;
        margin-right: auto;
    }

    .bracket--right {
        right: auto;
        left: 50%;
        transform: translateX(-50%) scale(1.5);
        transform-origin: top center;
        top: -32px;
    }

    .bracket--left {
        left: 50%;
        transform: translateX(-50%) scale(1.5);
        transform-origin: top center;
        top: -32px;
    }

    .heading-display {
        font-size: clamp(2rem, 9vw, 3.4rem);
    }

    .counter {
        top: 16px;
        right: 16px;
    }

    .waypoint {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 64px 0;
    }

    .content-block,
    .section--left .content-block,
    .section--right .content-block {
        padding: 0 16px;
    }

    .meta {
        margin-bottom: 16px;
    }

    .heading-display {
        margin-bottom: 24px;
    }

    .heading-section {
        margin-bottom: 20px;
    }

    .rule {
        margin-bottom: 20px;
    }
}
