/* ==========================================================================
   ThreadNotes — marketing page sections
   Depends on core.css. Used by index.html, features.html, dungeon-ledger.html.
   ========================================================================== */

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

/* Split composition: the copy owns the left, the graph owns the right and
   bleeds off the edge. Nothing overlaps, so the graph runs at full strength
   and stays interactive. */

.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: min(90dvh, 52rem);
    padding-block: clamp(3.5rem, 9vh, 6.5rem) clamp(3rem, 7vh, 5rem);
    overflow: hidden;
}

.hero__graph {
    position: absolute;
    top: 0;
    left: 48%;
    /* <canvas> is a replaced element: with width/height auto it falls back to
       its intrinsic 300x150 instead of stretching to the offsets, so the size
       has to be stated outright. */
    width: 52%;
    height: 100%;
    z-index: 0;
    /* Vertical scrolling must always win over dragging a node. */
    touch-action: pan-y;
    /* Weighted to the right so the graph stays solid where it bleeds off the
       edge and dissolves on the side nearest the copy. */
    -webkit-mask-image: radial-gradient(80% 92% at 78% 50%, #000 46%, transparent 88%);
    mask-image: radial-gradient(80% 92% at 78% 50%, #000 46%, transparent 88%);
    opacity: 0;
    animation: hero-graph-in 1.6s var(--ease-out) 0.15s forwards;
}

@keyframes hero-graph-in {
    to { opacity: var(--hero-graph-opacity, 1); }
}

.hero__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

/* Keeps the copy clear of the graph column at every width. The ladder below
   widens it as the viewport grows; `ch` is unusable here because Space Grotesk
   has a very wide zero, which let the headline run under the graph. */
.hero__inner > * { max-width: 100%; }

.hero h1 {
    margin-bottom: var(--gap-lg);
    /* Slightly tighter than the global h1 ramp so it sits in one column. */
    font-size: clamp(2.6rem, 1.7rem + 4vw, 4.5rem);
}

.hero__lead {
    font-size: var(--step-1);
    color: var(--text-dim);
    line-height: 1.55;
    margin-bottom: clamp(2rem, 4vw, 2.75rem);
}

.hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap-sm);
}

.hero__meta {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: clamp(2rem, 4vw, 2.75rem);
    font-size: 0.875rem;
    color: var(--text-faint);
}

.hero__meta li {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.hero__meta svg {
    width: 1rem;
    height: 1rem;
    opacity: 0.75;
    flex-shrink: 0;
}

/* Staggered entrance for the hero stack. */
.hero__inner > * {
    opacity: 0;
    animation: hero-rise 0.9s var(--ease-out) forwards;
}

.hero__inner > *:nth-child(1) { animation-delay: 0.05s; }
.hero__inner > *:nth-child(2) { animation-delay: 0.15s; }
.hero__inner > *:nth-child(3) { animation-delay: 0.25s; }
.hero__inner > *:nth-child(4) { animation-delay: 0.35s; }
.hero__inner > *:nth-child(5) { animation-delay: 0.45s; }

@keyframes hero-rise {
    from { opacity: 0; transform: translateY(1.5rem); }
    to { opacity: 1; transform: none; }
}

.hero__hint {
    position: absolute;
    right: clamp(1.25rem, 4vw, 3rem);
    bottom: 1.5rem;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-faint);
    animation: bob 2.4s var(--ease-in-out) infinite;
}

@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(0.4rem); }
}

@media (min-width: 901px)  { .hero__inner > * { max-width: 23rem; } }
@media (min-width: 1150px) { .hero__inner > * { max-width: 29rem; } }
@media (min-width: 1400px) { .hero__inner > * { max-width: 30rem; } }

/* --- Proof strip ---------------------------------------------------------- */

.strip {
    position: relative;
    border-block: 1px solid var(--line);
    background: oklch(11% 0.02 275 / 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.strip__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap);
    padding-block: clamp(2rem, 4vw, 2.75rem);
}

.strip__stat {
    text-align: center;
    padding-inline: 0.5rem;
}

.strip__stat + .strip__stat { border-left: 1px solid var(--line); }

.strip__num {
    display: block;
    font-family: var(--font-display);
    font-size: var(--step-3);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.strip__label {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-faint);
}

.marquee {
    position: relative;
    overflow: hidden;
    padding-bottom: 1.5rem;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee__track {
    display: flex;
    width: max-content;
    gap: 0.75rem;
    animation: marquee 46s linear infinite;
}

.marquee:hover .marquee__track { animation-play-state: paused; }

@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.marquee__item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem;
    border-radius: var(--r-pill);
    border: 1px solid var(--line);
    background: oklch(100% 0 0 / 0.03);
    font-size: 0.85rem;
    color: var(--text-dim);
    white-space: nowrap;
}

.marquee__item::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--grad);
    flex-shrink: 0;
}

@supports not ((backdrop-filter: blur(4px)) or (-webkit-backdrop-filter: blur(4px))) {
    .strip { background: oklch(11% 0.02 275); }
    .graph-fact { background: oklch(13% 0.02 275); }
}

/* --- Feature grid --------------------------------------------------------- */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
    gap: var(--gap-lg);
}

.feature {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
    transform-style: preserve-3d;
}

@media (hover: hover) and (pointer: fine) {
    .feature:hover {
        transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(-6px);
    }
}

.feature h3 { font-size: var(--step-1); }

.feature p {
    color: var(--text-dim);
    font-size: 0.975rem;
    margin-top: -0.35rem;
}

.feature__viz {
    height: 6.5rem;
    border-radius: var(--r);
    border: 1px solid var(--line);
    background: oklch(11% 0.02 275 / 0.6);
    overflow: hidden;
    position: relative;
    display: grid;
    place-items: center;
}

/* Mini animation 1 — a note being written. */
.viz-type {
    width: 76%;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.viz-type i {
    display: block;
    height: 6px;
    border-radius: 3px;
    background: oklch(100% 0 0 / 0.14);
    transform-origin: left;
    animation: viz-line 3.6s var(--ease-out) infinite;
}

.viz-type i:nth-child(1) { width: 100%; animation-delay: 0s; }
.viz-type i:nth-child(2) { width: 78%; animation-delay: 0.35s; }
.viz-type i:nth-child(3) { width: 90%; animation-delay: 0.7s; background: var(--grad); }
.viz-type i:nth-child(4) { width: 54%; animation-delay: 1.05s; }

@keyframes viz-line {
    0% { transform: scaleX(0); opacity: 0; }
    22%, 72% { transform: scaleX(1); opacity: 1; }
    100% { transform: scaleX(1); opacity: 0.15; }
}

/* Mini animation 2 — collaborators arriving. */
.viz-people {
    display: flex;
    align-items: center;
}

.viz-people span {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: oklch(14% 0.02 275);
    border: 2px solid oklch(13% 0.02 275);
    margin-left: -0.55rem;
    animation: viz-pop 3.6s var(--ease-out) infinite;
}

.viz-people span:nth-child(1) { background: var(--violet); margin-left: 0; animation-delay: 0s; }
.viz-people span:nth-child(2) { background: var(--cyan); animation-delay: 0.4s; }
.viz-people span:nth-child(3) { background: oklch(80% 0.17 155); animation-delay: 0.8s; }
.viz-people span:nth-child(4) {
    background: transparent;
    color: var(--text-dim);
    border-color: var(--line-strong);
    animation-delay: 1.2s;
}

@keyframes viz-pop {
    0% { transform: scale(0.2); opacity: 0; }
    18%, 78% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1); opacity: 0.25; }
}

/* Mini animation 3 — two notes linking up. */
.viz-link {
    width: 78%;
    height: 3.4rem;
    position: relative;
}

.viz-link b {
    position: absolute;
    top: 50%;
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 50%;
    background: var(--violet);
    transform: translateY(-50%);
    box-shadow: var(--glow-violet);
}

.viz-link b:last-of-type {
    right: 0;
    background: var(--cyan);
    box-shadow: var(--glow-cyan);
}

.viz-link u {
    position: absolute;
    top: 50%;
    left: 0.85rem;
    right: 0.85rem;
    height: 1.5px;
    background: var(--grad);
    transform: translateY(-50%) scaleX(0);
    transform-origin: left;
    animation: viz-connect 3.6s var(--ease-out) infinite;
}

@keyframes viz-connect {
    0%, 12% { transform: translateY(-50%) scaleX(0); }
    45%, 80% { transform: translateY(-50%) scaleX(1); }
    100% { transform: translateY(-50%) scaleX(1); opacity: 0.2; }
}

/* --- Mock window ---------------------------------------------------------- */

.mock {
    border-radius: var(--r-lg);
    border: 1px solid var(--line-strong);
    background: oklch(14% 0.022 275);
    box-shadow: var(--shadow-3);
    overflow: hidden;
}

.mock__bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--line);
    background: oklch(17% 0.025 275);
}

.mock__dots {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}

.mock__dots i {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: oklch(35% 0.03 275);
}

.mock__title {
    font-size: 0.8rem;
    color: var(--text-faint);
    font-family: var(--font-mono);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mock__presence {
    margin-left: auto;
    display: flex;
    flex-shrink: 0;
}

.mock__presence span {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.6rem;
    font-weight: 700;
    color: oklch(14% 0.02 275);
    border: 2px solid oklch(17% 0.025 275);
    margin-left: -0.4rem;
}

.mock__presence span:first-child { margin-left: 0; }

.mock__pane {
    display: grid;
    grid-template-columns: 11rem 1fr;
    min-height: 17rem;
}

.mock__pane--plain { grid-template-columns: 1fr; }

.mock__side {
    border-right: 1px solid var(--line);
    padding: 0.9rem 0.75rem;
    background: oklch(12.5% 0.02 275);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.8rem;
}

.mock__side small {
    font-family: var(--font-mono);
    font-size: 0.63rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-faint);
    padding: 0.6rem 0.5rem 0.3rem;
}

.mock__side a,
.mock__side span[data-file] {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.5rem;
    border-radius: 7px;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mock__side [data-file]::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.45;
    flex-shrink: 0;
}

.mock__side [data-file].is-active {
    background: oklch(65% 0.24 295 / 0.16);
    color: var(--text);
}

.mock__doc {
    padding: 1.1rem 1.25rem;
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--text-dim);
    overflow: hidden;
}

.mock__text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-height: 8rem;
}

.mock__row {
    display: block;
    min-height: 1.35em;
    word-break: break-word;
}

.mk-link {
    color: var(--cyan);
    background: oklch(80% 0.16 205 / 0.12);
    border-radius: 4px;
    padding: 0.05em 0.2em;
}

.mk-h {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.mock__caret {
    display: inline-block;
    width: 2px;
    height: 1.05em;
    vertical-align: text-bottom;
    margin-left: 1px;
    background: var(--cyan);
    animation: blink 1.05s steps(2, start) infinite;
}

@keyframes blink {
    to { opacity: 0; }
}

/* --- Collaborative editor mock -------------------------------------------- */

.collab__doc {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-dim);
    min-height: 13rem;
}

.collab__line {
    position: relative;
    display: block;
    min-height: 1.5em;
    padding-left: 0.9rem;
    word-break: break-word;
}

.collab__line::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 3px;
    height: 0.9em;
    border-radius: 2px;
    background: var(--author, var(--violet));
    opacity: 0.55;
}

.collab__caret {
    display: inline-block;
    position: relative;
    width: 2px;
    height: 1.05em;
    vertical-align: text-bottom;
    background: var(--author, var(--violet));
    animation: blink 1.05s steps(2, start) infinite;
}

.collab__caret.is-idle { opacity: 0.4; animation: none; }

/* Name tag riding above each caret. */
.collab__caret::after {
    content: attr(data-author);
    position: absolute;
    left: -1px;
    bottom: calc(100% + 3px);
    padding: 0.1rem 0.4rem;
    border-radius: 5px 5px 5px 0;
    background: var(--author, var(--violet));
    color: oklch(14% 0.02 275);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.collab__caret.is-idle::after { opacity: 0.5; }

.author-violet { --author: oklch(72% 0.2 295); }
.author-cyan { --author: oklch(80% 0.16 205); }
.author-green { --author: oklch(80% 0.17 155); }

/* --- Permission chips ----------------------------------------------------- */

.perms {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.9rem 1.25rem;
    border-top: 1px solid var(--line);
    background: oklch(12.5% 0.02 275);
}

.perms__chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: var(--r-pill);
    border: 1px solid var(--line);
    font-size: 0.78rem;
    color: var(--text-faint);
    transition: color var(--dur-2) var(--ease-out),
                border-color var(--dur-2) var(--ease-out),
                background-color var(--dur-2) var(--ease-out);
}

.perms__chip::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.5;
}

.perms__chip.is-active {
    color: var(--text);
    border-color: var(--cyan);
    background: oklch(80% 0.16 205 / 0.12);
}

.perms__chip.is-active::before {
    opacity: 1;
    box-shadow: 0 0 8px currentColor;
}

/* --- Split rows (copy beside a visual) ------------------------------------ */

.split {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}

.split--flip .split__visual { order: -1; }

.split__copy h2 { font-size: var(--step-3); }

.split__copy p {
    margin-top: var(--gap);
    color: var(--text-dim);
}

.split__list {
    margin-top: var(--gap-lg);
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}

.split__list li {
    display: grid;
    grid-template-columns: 1.6rem 1fr;
    gap: 0.85rem;
    align-items: start;
}

.split__list strong {
    display: block;
    color: var(--text);
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.split__list span { color: var(--text-dim); font-size: 0.95rem; }

.tick {
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--grad-soft);
    border: 1px solid var(--line-strong);
    color: var(--cyan);
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.tick svg { width: 0.8rem; height: 0.8rem; }

/* --- Sticky steps --------------------------------------------------------- */

.steps {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: clamp(2rem, 6vw, 5rem);
    align-items: start;
}

.steps__copy {
    display: flex;
    flex-direction: column;
    gap: clamp(3rem, 12vh, 7.5rem);
    padding-block: clamp(0.5rem, 4vh, 2.5rem);
}

.step {
    position: relative;
    padding-left: 3.75rem;
    opacity: 0.4;
    transition: opacity var(--dur-3) var(--ease-out);
}

.step.is-active { opacity: 1; }

.step__num {
    position: absolute;
    left: 0;
    top: 0;
    width: 2.6rem;
    height: 2.6rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-dim);
    transition: all var(--dur-3) var(--ease-out);
}

.step.is-active .step__num {
    border-color: transparent;
    background: var(--grad);
    color: oklch(14% 0.02 275);
    font-weight: 700;
    box-shadow: var(--glow-violet);
}

/* Connector line running between the step markers. */
.step:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 1.3rem;
    top: 3rem;
    bottom: calc(-1 * clamp(3rem, 14vh, 9rem) - 0.5rem);
    width: 1px;
    background: linear-gradient(var(--line-strong), transparent);
}

.step h3 { font-size: var(--step-2); }

.step p {
    margin-top: 0.75rem;
    color: var(--text-dim);
}

.step code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    padding: 0.1em 0.35em;
    border-radius: 5px;
    background: oklch(80% 0.16 205 / 0.12);
    color: var(--cyan);
}

.steps__visual {
    position: sticky;
    top: calc(var(--header-h) + 2.5rem);
    display: grid;
}

.steps__panel {
    grid-area: 1 / 1;
    opacity: 0;
    transform: scale(0.97) translateY(0.75rem);
    transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out);
    pointer-events: none;
}

.steps__panel.is-active {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

/* --- Graph deep-dive ------------------------------------------------------ */

.graph-band {
    position: relative;
    overflow: hidden;
    border-block: 1px solid var(--line);
}

.graph-band__canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    touch-action: pan-y;
    /* Fade only into the neighbouring sections — an elliptical mask here erased
       most of the graph. */
    -webkit-mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent);
    mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent);
}

/* Keeps the heading legible where it crosses the densest part of the graph. */
.graph-band__inner .section-head {
    position: relative;
}

.graph-band__inner .section-head::before {
    content: '';
    position: absolute;
    inset: -2rem -3rem;
    z-index: -1;
    background: radial-gradient(60% 70% at 50% 50%,
        oklch(13% 0.02 275 / 0.88), transparent 78%);
    pointer-events: none;
}

.graph-band__inner {
    position: relative;
    z-index: 1;
    pointer-events: none;
    padding-block: clamp(5rem, 12vw, 9rem);
}

.graph-band__inner > * { pointer-events: auto; }

.graph-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
    gap: var(--gap);
    margin-top: clamp(2.5rem, 5vw, 4rem);
}

.graph-fact {
    padding: 1.35rem;
    border-radius: var(--r);
    border: 1px solid var(--line);
    background: oklch(13% 0.02 275 / 0.78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.graph-fact h3 { font-size: var(--step-1); margin-bottom: 0.5rem; }
.graph-fact p { color: var(--text-dim); font-size: 0.93rem; }

/* --- FAQ ------------------------------------------------------------------ */

.faq {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 52rem;
    margin-inline: auto;
}

.faq details {
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
    transition: border-color var(--dur-2) var(--ease-out);
}

.faq details[open] { border-color: var(--line-strong); }

.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gap);
    padding: 1.15rem 1.35rem;
    min-height: 3.5rem;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: var(--step-0);
    font-weight: 600;
    letter-spacing: -0.015em;
    list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
    content: '';
    width: 0.7rem;
    height: 0.7rem;
    flex-shrink: 0;
    border-right: 2px solid var(--text-faint);
    border-bottom: 2px solid var(--text-faint);
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out);
}

.faq details[open] summary::after {
    transform: rotate(-135deg) translate(-2px, -2px);
    border-color: var(--cyan);
}

.faq summary:hover { color: var(--cyan); }

.faq__answer {
    padding: 0 1.35rem 1.35rem;
    color: var(--text-dim);
    font-size: 0.975rem;
}

.faq__answer a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }

.faq details[open] .faq__answer {
    animation: faq-open var(--dur-2) var(--ease-out);
}

@keyframes faq-open {
    from { opacity: 0; transform: translateY(-0.4rem); }
    to { opacity: 1; transform: none; }
}

/* --- Closing CTA ---------------------------------------------------------- */

.cta-band {
    position: relative;
    padding-block: clamp(4rem, 9vw, 7rem);
    overflow: hidden;
    text-align: center;
    border-top: 1px solid var(--line);
    background:
        radial-gradient(60% 120% at 50% 0%, oklch(65% 0.24 295 / 0.28), transparent 70%),
        radial-gradient(50% 100% at 80% 100%, oklch(80% 0.16 205 / 0.2), transparent 70%);
}

.cta-band h2 {
    font-size: var(--step-4);
    max-width: 18ch;
    margin-inline: auto;
}

.cta-band p {
    margin: var(--gap) auto clamp(2rem, 4vw, 2.75rem);
    max-width: 40rem;
    color: var(--text-dim);
    font-size: var(--step-1);
}

.cta-band__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap-sm);
    justify-content: center;
}

.cta-band__note {
    margin-top: var(--gap-lg);
    font-size: 0.85rem;
    color: var(--text-faint);
}

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

@media (max-width: 900px) {
    .split,
    .steps {
        grid-template-columns: 1fr;
    }

    .split--flip .split__visual { order: 0; }

    /* Pinning fights small viewports — stack the steps with their visuals. */
    .steps__copy {
        gap: 0;
        padding-block: 0;
    }

    .steps__visual {
        position: static;
        display: none;
    }

    .step {
        opacity: 1;
        padding-left: 0;
        padding-top: 3.5rem;
    }

    .step:not(:last-child) { margin-bottom: 2.5rem; }
    .step:not(:last-child)::before { display: none; }

    .step__num {
        top: 0;
        width: 2.4rem;
        height: 2.4rem;
        background: var(--grad);
        border-color: transparent;
        color: oklch(14% 0.02 275);
        font-weight: 700;
    }

    .step__inline {
        display: block;
        margin-top: var(--gap-lg);
    }

    .mock__pane { grid-template-columns: 1fr; }
    .mock__side { display: none; }
}

@media (min-width: 901px) {
    .step__inline { display: none; }
}

@media (max-width: 900px) {
    .hero {
        min-height: 0;
        padding-block: 3rem 2.5rem;
    }

    .hero__graph {
        position: relative;
        inset: auto;
        order: 2;
        width: 100%;
        height: clamp(15rem, 42vw, 22rem);
        margin-top: clamp(2rem, 5vw, 3rem);
        border-radius: var(--r-lg);
        -webkit-mask-image: radial-gradient(80% 80% at 50% 50%, #000 55%, transparent 96%);
        mask-image: radial-gradient(80% 80% at 50% 50%, #000 55%, transparent 96%);
    }

    .hero__inner { order: 1; }
    .hero__inner > * { max-width: 100%; }
    .hero h1 { max-width: 16ch; }
    .hero__hint { display: none; }
}

@media (max-width: 620px) {
    .strip__stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .strip__stat + .strip__stat {
        border-left: 0;
        border-top: 1px solid var(--line);
        padding-top: 1.5rem;
    }

    .hero__cta .btn,
    .hero__cta .tip,
    .cta-band__actions .btn,
    .cta-band__actions .tip { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .marquee__track { animation: none; transform: none; }
    .hero__graph { opacity: 1; animation: none; }
    .hero__inner > * { opacity: 1; animation: none; }
    .steps__panel { transition: none; }
}
