/*
 * Homepage visual storytelling — Phase C.
 *
 * Replaces the equal-card curriculum rhythm on the homepage with six editorial
 * chapters. Colour and lighting remain chapter-local so the page can change
 * visual temperature as the teaching story changes.
 */

.td-home-curriculum-story {
    padding: 0;
    background: #edf0ee;
}

.td-home-curriculum-story > .td-vs-container {
    max-width: none;
    padding-inline: 0;
}

.td-curriculum-story {
    overflow: clip;
}

.td-curriculum-story__intro {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(20rem, 0.65fr);
    gap: clamp(3rem, 8vw, 9rem);
    align-items: end;
    padding: clamp(7rem, 12vw, 12rem) max(6vw, calc((100vw - 1240px) / 2));
    color: #101518;
    background:
        radial-gradient(circle at 77% 24%, rgba(46, 100, 126, 0.065), transparent 30%),
        #edf0ee;
}

.td-curriculum-story__intro .td-vs-kicker {
    grid-column: 1 / -1;
    color: #68757d;
}

.td-curriculum-story__intro h2 {
    max-width: 11ch;
    margin: 0;
    color: #11171a;
    font-size: clamp(4rem, 7.7vw, 8.2rem);
    font-weight: 520;
    letter-spacing: -0.07em;
    line-height: 0.9;
}

.td-curriculum-story__intro > p:last-child {
    max-width: 31rem;
    margin: 0;
    color: rgba(42, 53, 59, 0.68);
    font-size: clamp(1rem, 1.45vw, 1.22rem);
    line-height: 1.65;
}

.td-curriculum-story__chapters {
    margin: 0;
}

.td-curriculum-story__chapter {
    --td-curriculum-ink: #edf1f2;
    --td-curriculum-muted: rgba(207, 216, 220, 0.65);
    --td-curriculum-line: rgba(207, 218, 224, 0.12);
    --td-curriculum-accent: #7fc3ee;
    --td-curriculum-visual-line: rgba(151, 199, 229, 0.21);

    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(22rem, 0.82fr) minmax(31rem, 1.18fr);
    gap: clamp(4rem, 8vw, 9rem);
    align-items: center;
    min-height: clamp(44rem, 82svh, 58rem);
    padding: clamp(6.5rem, 10vw, 10rem) max(6vw, calc((100vw - 1240px) / 2));
    overflow: hidden;
    color: var(--td-curriculum-ink);
    background: #0b1013;
}

.td-curriculum-story__chapter--reverse .td-curriculum-story__copy {
    order: 2;
}

.td-curriculum-story__chapter--reverse .td-curriculum-story__visual {
    order: 1;
}

.td-curriculum-story__chapter::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: min(54rem, 65vw);
    aspect-ratio: 1;
    border-radius: 50%;
    inset: 8% -16% auto auto;
    background: radial-gradient(circle, color-mix(in srgb, var(--td-curriculum-accent) 10%, transparent), transparent 68%);
    filter: blur(28px);
    pointer-events: none;
}

.td-curriculum-story__chapter--reverse::before {
    inset: 10% auto auto -20%;
}

.td-curriculum-story__chapter--distribution,
.td-curriculum-story__chapter--participation,
.td-curriculum-story__chapter--execution-review {
    --td-curriculum-ink: #12181b;
    --td-curriculum-muted: rgba(47, 60, 66, 0.68);
    --td-curriculum-line: rgba(21, 31, 36, 0.14);
    --td-curriculum-visual-line: rgba(28, 64, 80, 0.18);
    background: #e3e8e6;
}

.td-curriculum-story__chapter--distribution {
    --td-curriculum-accent: #3f7fa2;
    background:
        radial-gradient(circle at 17% 36%, rgba(50, 108, 137, 0.08), transparent 30%),
        #e2e7e5;
}

.td-curriculum-story__chapter--dynamic-value {
    --td-curriculum-accent: #89c7ed;
    background:
        radial-gradient(circle at 78% 50%, rgba(67, 146, 197, 0.11), transparent 32%),
        linear-gradient(180deg, #091117, #081015);
}

.td-curriculum-story__chapter--participation {
    --td-curriculum-accent: #9b6651;
    background:
        radial-gradient(circle at 25% 24%, rgba(156, 101, 79, 0.09), transparent 28%),
        #ebe7df;
}

.td-curriculum-story__chapter--risk-context {
    --td-curriculum-accent: #d0a24f;
    --td-curriculum-visual-line: rgba(218, 183, 112, 0.17);
    background:
        radial-gradient(circle at 76% 38%, rgba(208, 162, 79, 0.075), transparent 30%),
        #11120f;
}

.td-curriculum-story__chapter--execution-review {
    --td-curriculum-accent: #b27f34;
    background:
        radial-gradient(circle at 72% 54%, rgba(178, 127, 52, 0.075), transparent 30%),
        #e9ece9;
}

.td-curriculum-story__copy {
    position: relative;
    z-index: 2;
    max-width: 36rem;
}

.td-curriculum-story__meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-block-end: clamp(1.5rem, 3vw, 2.4rem);
    color: color-mix(in srgb, var(--td-curriculum-ink) 52%, transparent);
    font-family: var(--td-vs-font-mono);
    font-size: 0.64rem;
    font-weight: 650;
    letter-spacing: 0.095em;
    text-transform: uppercase;
}

.td-curriculum-story__meta span:first-child {
    color: var(--td-curriculum-accent);
}

.td-curriculum-story__meta span:first-child::after {
    content: "";
    display: inline-block;
    width: clamp(2rem, 5vw, 4.5rem);
    height: 1px;
    margin-inline-start: 1rem;
    vertical-align: middle;
    background: color-mix(in srgb, var(--td-curriculum-accent) 45%, transparent);
}

.td-curriculum-story__copy h3 {
    max-width: 10ch;
    margin: 0;
    color: var(--td-curriculum-ink);
    font-size: clamp(3.2rem, 5.7vw, 6.3rem);
    font-weight: 520;
    letter-spacing: -0.065em;
    line-height: 0.92;
}

.td-curriculum-story__copy > p {
    max-width: 33rem;
    margin: clamp(1.4rem, 2.5vw, 2rem) 0 0;
    color: var(--td-curriculum-muted);
    font-size: clamp(1rem, 1.28vw, 1.14rem);
    line-height: 1.64;
}

.td-curriculum-story__disciplines {
    margin: clamp(2.5rem, 5vw, 4.5rem) 0 0;
    padding: 0;
    list-style: none;
    border-block-start: 1px solid var(--td-curriculum-line);
}

.td-curriculum-story__disciplines li {
    display: grid;
    grid-template-columns: minmax(8rem, 0.42fr) minmax(0, 0.58fr);
    gap: clamp(1rem, 2vw, 2rem);
    padding-block: 1.15rem;
    border-block-end: 1px solid var(--td-curriculum-line);
}

.td-curriculum-story__disciplines strong {
    color: color-mix(in srgb, var(--td-curriculum-ink) 91%, transparent);
    font-size: 0.95rem;
    font-weight: 620;
    letter-spacing: -0.02em;
}

.td-curriculum-story__disciplines span {
    color: color-mix(in srgb, var(--td-curriculum-ink) 48%, transparent);
    font-size: 0.82rem;
    line-height: 1.5;
}

.td-curriculum-story__visual {
    position: relative;
    z-index: 1;
    width: min(100%, 48rem);
    margin: 0;
    justify-self: center;
}

.td-curriculum-story__visual::before {
    content: "";
    position: absolute;
    inset: 9% 5%;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--td-curriculum-accent) 14%, transparent), transparent 68%);
    filter: blur(34px);
    opacity: 0.75;
    pointer-events: none;
}

.td-curriculum-story__visual svg {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.td-curriculum-svg-grid path,
.td-curriculum-svg-ledger path,
.td-curriculum-svg-profile path,
.td-curriculum-svg-band,
.td-curriculum-svg-vwap,
.td-curriculum-svg-delta path,
.td-curriculum-svg-response,
.td-curriculum-svg-timeline,
.td-curriculum-svg-risk-bracket,
.td-curriculum-svg-permission,
.td-curriculum-svg-review-loop,
.td-curriculum-svg-review-arrow {
    fill: none;
    vector-effect: non-scaling-stroke;
}

.td-curriculum-svg-grid path {
    stroke: var(--td-curriculum-visual-line);
    stroke-width: 1;
}

.td-curriculum-svg-ledger path {
    stroke: color-mix(in srgb, var(--td-curriculum-accent) 48%, transparent);
    stroke-width: 8;
    stroke-linecap: round;
}

.td-curriculum-svg-auction,
.td-curriculum-svg-response,
.td-curriculum-svg-vwap,
.td-curriculum-svg-permission,
.td-curriculum-svg-review-loop {
    fill: none;
    stroke: color-mix(in srgb, var(--td-curriculum-accent) 86%, white 14%);
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    filter: drop-shadow(0 0 8px color-mix(in srgb, var(--td-curriculum-accent) 23%, transparent));
}

.td-curriculum-svg-node,
.td-curriculum-svg-node--focus,
.td-curriculum-svg-events circle,
.td-curriculum-svg-permission-nodes circle {
    fill: color-mix(in srgb, var(--td-curriculum-accent) 72%, white 28%);
}

.td-curriculum-svg-node--focus {
    filter: drop-shadow(0 0 9px color-mix(in srgb, var(--td-curriculum-accent) 48%, transparent));
}

.td-curriculum-svg-profile path {
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.td-curriculum-svg-profile--time path {
    stroke: color-mix(in srgb, var(--td-curriculum-accent) 38%, transparent);
    stroke-width: 6;
}

.td-curriculum-svg-profile--volume path {
    stroke: color-mix(in srgb, var(--td-curriculum-accent) 72%, transparent);
    stroke-width: 9;
}

.td-curriculum-svg-value-line {
    stroke: color-mix(in srgb, var(--td-curriculum-accent) 38%, transparent);
    stroke-width: 1;
    stroke-dasharray: 5 9;
    vector-effect: non-scaling-stroke;
}

.td-curriculum-svg-band {
    stroke: color-mix(in srgb, var(--td-curriculum-accent) 29%, transparent);
    stroke-width: 1.2;
    stroke-dasharray: 4 7;
}

.td-curriculum-svg-vwap {
    stroke-width: 2.4;
}

.td-curriculum-svg-delta path {
    stroke: color-mix(in srgb, var(--td-curriculum-accent) 61%, transparent);
    stroke-width: 9;
    stroke-linecap: round;
}

.td-curriculum-svg-response {
    stroke-width: 1.8;
}

.td-curriculum-svg-absorption {
    fill: color-mix(in srgb, var(--td-curriculum-accent) 8%, transparent);
    stroke: color-mix(in srgb, var(--td-curriculum-accent) 43%, transparent);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.td-curriculum-svg-timeline,
.td-curriculum-svg-risk-bracket {
    stroke: color-mix(in srgb, var(--td-curriculum-accent) 61%, transparent);
    stroke-width: 1.5;
}

.td-curriculum-svg-events circle {
    opacity: 0.72;
}

.td-curriculum-svg-events circle:last-child {
    opacity: 1;
    filter: drop-shadow(0 0 9px color-mix(in srgb, var(--td-curriculum-accent) 42%, transparent));
}

.td-curriculum-svg-risk-zone {
    fill: color-mix(in srgb, var(--td-curriculum-accent) 9%, transparent);
    stroke: color-mix(in srgb, var(--td-curriculum-accent) 35%, transparent);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.td-curriculum-svg-permission-nodes circle {
    opacity: 0.66;
}

.td-curriculum-svg-permission-nodes circle:nth-child(5) {
    opacity: 1;
    filter: drop-shadow(0 0 9px color-mix(in srgb, var(--td-curriculum-accent) 45%, transparent));
}

.td-curriculum-svg-review-loop {
    stroke-width: 1.3;
    stroke-dasharray: 6 7;
    opacity: 0.65;
}

.td-curriculum-svg-review-arrow {
    stroke: color-mix(in srgb, var(--td-curriculum-accent) 70%, transparent);
    stroke-width: 1.4;
}

.td-curriculum-story__outro {
    display: grid;
    min-height: clamp(30rem, 58svh, 44rem);
    place-items: center;
    padding: clamp(6rem, 10vw, 10rem) max(6vw, calc((100vw - 1240px) / 2));
    color: #eef1f2;
    background: #080c0f;
}

.td-curriculum-story__outro p {
    max-width: 17ch;
    margin: 0;
    color: rgba(238, 241, 242, 0.93);
    font-size: clamp(3.4rem, 7vw, 7.8rem);
    font-weight: 510;
    letter-spacing: -0.07em;
    line-height: 0.92;
    text-align: center;
}

.td-home-curriculum-story .td-home-section-link {
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0 1rem 6rem;
    background: #080c0f;
}

@media (max-width: 62rem) {
    .td-curriculum-story__intro {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .td-curriculum-story__intro .td-vs-kicker {
        grid-column: auto;
    }

    .td-curriculum-story__intro h2 {
        max-width: 12ch;
    }

    .td-curriculum-story__chapter {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: clamp(3rem, 7vw, 5rem);
    }

    .td-curriculum-story__chapter--reverse .td-curriculum-story__copy,
    .td-curriculum-story__chapter--reverse .td-curriculum-story__visual {
        order: initial;
    }

    .td-curriculum-story__copy {
        max-width: 46rem;
    }

    .td-curriculum-story__copy h3 {
        max-width: 12ch;
    }

    .td-curriculum-story__visual {
        width: min(100%, 42rem);
    }
}

@media (max-width: 48rem) {
    .td-curriculum-story__intro,
    .td-curriculum-story__chapter,
    .td-curriculum-story__outro {
        padding-inline: clamp(1rem, 4vw, 1.5rem);
    }

    .td-curriculum-story__intro {
        padding-block: clamp(5.5rem, 16vw, 8rem);
        gap: 2rem;
    }

    .td-curriculum-story__intro h2 {
        font-size: clamp(3.2rem, 13vw, 5rem);
    }

    .td-curriculum-story__chapter {
        padding-block: clamp(5rem, 15vw, 7.5rem);
    }

    .td-curriculum-story__copy h3 {
        font-size: clamp(3rem, 12vw, 4.6rem);
    }

    .td-curriculum-story__disciplines li {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }

    .td-curriculum-story__disciplines span {
        max-width: 31rem;
    }

    .td-curriculum-story__visual {
        width: 100%;
    }

    .td-curriculum-story__outro {
        min-height: 30rem;
    }

    .td-curriculum-story__outro p {
        font-size: clamp(3.1rem, 14vw, 5.2rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .td-curriculum-story *,
    .td-curriculum-story *::before,
    .td-curriculum-story *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}
