/* home.css — manifesto page (/home).
   Layout only; colors, fonts and buttons come from style.css. */

/* ====== Hero ====== */

/* Out of flow so the hero starts at y=0 and the graph is not clipped by the
   header's band. No background of its own — it sits on the cloud. */
/* home.css only loads here, so this stays off the other pages: the graph
   reaches past the left edge and would otherwise add a scrollbar. */
body {
    overflow-x: hidden;
}

#footer {
    position: relative;
    z-index: 1;
    background: none;
}

#header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: none;
}

.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: flex-end;
    padding: 120px 40px 90px;
}

/* Oversized and anchored past the top-left corner, so it reads as something
   continuing beyond the screen.
   Pinned, then moved entirely from JS. Letting the browser scroll it natively
   while a script also nudged it meant two things moved the same element a
   frame apart, which is what made it judder. It still travels with the page —
   just at a fraction of the speed, see LAG in home.js. */
.hero-graph {
    position: fixed;
    top: -34vmin;
    left: -31vmin;
    width: 124vmin;
    height: 124vmin;
    pointer-events: none;
    z-index: 0;
}

.hero-graph canvas {
    position: absolute;
}

/* Same geometry as a profile page: the cloud is inset inside the radar box,
   otherwise particles spill past the polygon instead of filling it. */
#HomeEgo {
    top: 10%;
    left: 10%;
    width: 80%;
    height: 80%;
    z-index: 1;
}

#HomeChart {
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

/* Copy has to stay legible over the densest part of the cloud. */
.hero-copy {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}



/* Hero title — two phrases on two lines (the <br> in the markup). */
.hero-headline {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(21px, 3.4vw, 50px);
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--white);
}

.hero-sub {
    margin: 20px 0 0;
    max-width: 62ch;
    font-size: clamp(13px, 1.1vw, 16px);
    line-height: 1.5;
    color: var(--gray);
}

/* ====== Closing CTA — centred, with a glow ====== */
.home-cta {
    position: relative;
    border-top: 1px solid var(--dark-gray);
    padding: 110px 40px 130px;
    text-align: center;
}
/* Uneven teal glow — two offset radials, blurred, fading fully to transparent
   within its own box (≤ viewport, no overflow clip), so it melts into the
   page's own black background instead of hitting a hard edge. */
.home-cta::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(900px, 92vw);
    height: 480px;
    transform: translate(-50%, -50%);
    background:
        radial-gradient(46% 50% at 45% 53%, rgba(141,181,190,0.22), transparent 68%),
        radial-gradient(36% 42% at 61% 41%, rgba(141,181,190,0.13), transparent 70%);
    filter: blur(20px);
    pointer-events: none;
    z-index: 0;
}
/* Grain, masked to fade at its own edges so there's no rectangular seam. */
.home-cta::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(900px, 92vw);
    height: 480px;
    transform: translate(-50%, -50%);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.06;
    -webkit-mask: radial-gradient(60% 60% at 50% 50%, #000, transparent 75%);
            mask: radial-gradient(60% 60% at 50% 50%, #000, transparent 75%);
    pointer-events: none;
    z-index: 0;
}
.home-cta-inner {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.home-cta h2 {
    max-width: 16ch;
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(30px, 5vw, 62px);
    line-height: 1.03;
    letter-spacing: -0.03em;
    color: var(--white);
}
.home-cta p {
    max-width: 48ch;
    margin: 22px 0 36px;
    font-size: clamp(15px, 1.5vw, 19px);
    line-height: 1.6;
    color: var(--medium-gray);
}
/* Filled, prominent — not the outline used elsewhere. */
.home-cta-btn {
    padding: 16px 36px;
    font-size: 12px;
    background: var(--btn);
    color: var(--bg);
    border-color: var(--btn);
    box-shadow: 0 0 40px rgba(141,181,190,0.25);
}
.home-cta-btn:hover {
    background: var(--btn-hover);
    border-color: var(--btn-hover);
    color: var(--bg);
}

@media (max-width: 700px) {
    .home-cta { padding: 72px 20px 88px; }
}

.hero-source {
    margin-top: 22px;
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gray);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 40px;
}

/* ====== Standalone centred quote ====== */
/* position+z-index lift it above the fixed .hero-graph canvas, which would
   otherwise paint over it. Divider aligns with the manifesto rules below. */
.quote-block {
    position: relative;
    z-index: 3;
    max-width: 1320px;
    margin: 0 auto;
    padding: 130px 40px;
    border-top: 1px solid var(--dark-gray);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.q-text {
    max-width: 30ch;
    margin: 0;
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(16px, 1.7vw, 24px);
    line-height: 1.4;
    letter-spacing: -0.02em;
    color: var(--white);
}

.q-source {
    margin-top: 22px;
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gray);
}

/* ====== Manifesto ====== */

.manifest {
    position: relative;
    z-index: 1;
    background: none;
    padding: 0 40px 60px;
    max-width: 1400px;
    margin: 0 auto;
}

/* One thought per screenful. The rule above each line is the only ornament
   on the page. */
.line {
    padding: 90px 0 0;
    border-top: 1px solid var(--dark-gray);
    display: grid;
    grid-template-columns: 15ch 1fr;
    gap: 60px;
    margin-bottom: 90px;
}

.line-label {
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gray);
    padding-top: 12px;
}

.line-body {
    /* Pinned to the content column: the figure above it takes an explicit
       grid-column, and auto-placement would otherwise drop the text into
       the label column on the next row. */
    grid-column: 2;
    max-width: 62ch;
}

.line-lead {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(23px, 2.75vw, 42px);
    line-height: 1.22;
    letter-spacing: -0.02em;
    color: var(--white);
}

/* Quoted statements: a hairline in the margin instead of quotation marks.
   Shared by the hero and the manifesto so both read the same. */
.line-quote,
.hero-quote {
    max-width: 34ch;
    margin: 0;
    padding-left: 28px;
    border-left: 1px solid var(--dark-gray);
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(21px, 2.5vw, 36px);
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: var(--white);
}

/* Right-aligned, so the rule swaps sides to stay against the text. Now sits
   below the headline + subheadline as supporting context. */
.hero-quote {
    max-width: 50%;
    margin-top: 44px;
    padding-left: 0;
    padding-right: 28px;
    border-left: none;
    border-right: 1px solid var(--dark-gray);
    font-size: clamp(17px, 1.9vw, 27px);
}

.line-body.is-wide .line-quote {
    max-width: 42ch;
}

.line-body.is-wide {
    max-width: none;
}

.line-lead em {
    font-style: normal;
    color: var(--medium-gray);
}

.line-body p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--medium-gray);
    margin-top: 26px;
    max-width: 56ch;
}

/* ====== Process flow ====== */

/* Three stops on one rail. The connector is a hairline behind the nodes, so
   the eye reads a single continuous track instead of three separate cards.
   Arrowheads sit on the rail itself, drawn in CSS. */
.flow {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0 28px;
    margin: 54px 0 0;
    padding: 0;
    list-style: none;
}

.flow-step {
    display: grid;
    grid-template-rows: auto auto auto auto;
    gap: 0;
}

/* Row that carries the rail: the line runs edge to edge, the node sits on
   top of it with a background disc punched out around the glyph. */
.flow-rail {
    position: relative;
    height: 26px;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.flow-rail::before {
    content: "";
    position: absolute;
    left: 13px;
    right: -28px;
    top: 50%;
    height: 1px;
    background: var(--dark-gray);
}

/* No rail past the last node. */
.flow-step:last-child .flow-rail::before { display: none; }

/* Arrowhead, two hairlines rotated into a chevron, parked before the next
   node so the direction of travel is unmistakable. */
.flow-rail::after {
    content: "";
    position: absolute;
    right: -30px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-top: 1px solid var(--dark-gray);
    border-right: 1px solid var(--dark-gray);
    transform: translateY(-50%) rotate(45deg);
}

.flow-step:last-child .flow-rail::after { display: none; }

.flow-node {
    position: relative;
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    fill: var(--bg);
    stroke: var(--btn);
    stroke-width: 1.2;
}

.flow-no {
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--gray);
    margin-bottom: 8px;
}

.flow-title {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--white);
    margin-bottom: 8px;
}

/* "later" marker: same size as the title but demoted to a caption. */
.flow-title i {
    font-style: normal;
    font-family: "JetBrains Mono", monospace;
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--medium-gray);
    vertical-align: middle;
}

.flow-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--medium-gray);
    max-width: 26ch;
}

/* Not shipped yet — drawn as an outline waiting to be filled in. */
.flow-step.is-later .flow-node {
    stroke: var(--dark-light);
    stroke-dasharray: 3 3;
}

.flow-step.is-later .flow-title { color: var(--medium-gray); }

/* Screenshot of a real matrix page, shown full width above the section that
   explains it. The border keeps it from bleeding into the dark background —
   the shot's own background is nearly the same colour as the page. */
.preview {
    /* Second grid column, above the text: .line lays out label | content,
       and without this the figure would drop into the label column. */
    grid-column: 2;
    /* Just short of the column, so it reads as sitting inside the block
       rather than defining its edge. Full width on phones. */
    width: 90%;
    margin: 0 0 34px;
    border: 1px solid var(--dark-gray);
    background: var(--bg);
    line-height: 0;
}

.preview img {
    display: block;
    width: 100%;
    height: auto;
}

/* Reads as table rows rather than a bullet list: a fixed label column, a
   description column, and a hairline between every pair. */
.rows {
    margin: 34px 0 0;
    border-top: 1px solid var(--dark-gray);
}

.rows-row {
    display: grid;
    grid-template-columns: 14ch 1fr;
    gap: 24px;
    padding: 15px 0;
    border-bottom: 1px solid var(--dark-gray);
}

.rows dt {
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gray);
    padding-top: 3px;
}

.rows dd {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text);
}


/* ====== Responsive ====== */

@media (max-width: 900px) {
    .line { grid-template-columns: 1fr; gap: 20px; padding-top: 64px; margin-bottom: 64px; }
    .line-label { padding-top: 0; }
    /* One column here — column 2 no longer exists. */
    .preview,
    .line-body { grid-column: 1; }
    .preview { width: 100%; margin-bottom: 26px; }
}

@media (max-width: 700px) {
    /* Sized off the viewport WIDTH here. vmax on a phone resolves to its
       height, so the graph was coming out roughly three screens wide. */
    .hero-graph {
        top: -38vw;
        left: -28vw;
        width: 132vw;
        height: 132vw;
    }

    .hero {
        padding: 88px 20px 56px;
    }

    .hero-copy {
        align-items: stretch;
        text-align: left;
    }

    .hero-headline { max-width: none; font-size: clamp(24px, 7.5vw, 34px); }
    .hero-sub { max-width: none; margin-top: 16px; }
    .hero-sub .d-br { display: none; }   /* desktop-only line break */
    .quote-block { padding: 80px 20px; }
    .q-text { font-size: 18px; }

    /* The 50% cap is a desktop measure — at this width it left the quote a
       column three words wide. */
    .hero-quote {
        max-width: none;
        padding-left: 18px;
        padding-right: 0;
        border-left: 1px solid var(--dark-gray);
        border-right: none;
        font-size: 19px;
        line-height: 1.35;
    }

    .line-quote,
    .line-body.is-wide .line-quote {
        max-width: none;
        padding-left: 18px;
        font-size: 19px;
    }

    .hero-source { margin-top: 16px; }
    /* Sized to its label, not stretched: the copy block is full width here,
       and a flex-grow button would follow it edge to edge. */
    .hero-actions { margin-top: 32px; justify-content: flex-start; }
    .hero-actions .button { flex: 0 0 auto; }

    .manifest { padding-left: 20px; padding-right: 20px; }
    .line-body p { font-size: 15px; }



    /* Stacked: the rail runs down the left instead of across. */
    .flow {
        grid-template-columns: 1fr;
        gap: 0;
        margin-top: 40px;
    }

    .flow-step {
        grid-template-columns: 26px 1fr;
        grid-template-areas:
            "rail no"
            "rail title"
            "rail text";
        column-gap: 16px;
        padding-bottom: 26px;
    }

    .flow-rail {
        grid-area: rail;
        grid-row: 1 / -1;
        height: auto;
        align-items: flex-start;
        margin-bottom: 0;
    }

    .flow-rail::before {
        left: 50%;
        right: auto;
        top: 26px;
        bottom: -26px;
        width: 1px;
        height: auto;
    }

    .flow-rail::after {
        left: 50%;
        right: auto;
        top: auto;
        bottom: -30px;
        transform: translateX(-50%) rotate(135deg);
    }

    .flow-no    { grid-area: no; }
    .flow-title { grid-area: title; }
    .flow-text  { grid-area: text; max-width: none; }

    .rows { margin-top: 26px; }
    .rows-row { grid-template-columns: 1fr; gap: 4px; padding: 13px 0; }
    .rows dt { padding-top: 0; }
    .rows dd { font-size: 15px; }
}

/* ====== Desktop typography ====== */

/* Only the display type comes down on wide screens — at full size the quotes
   read as a poster. Body copy, labels and table rows keep their size. */
@media (min-width: 901px) {
    .line-quote,
    .hero-quote { font-size: clamp(13px, 1.5vw, 22px); }

    /* One row, one line: wrapping turned the table back into a list. */
    .rows dd { white-space: nowrap; }
}
