/* ==========================================================================
   Lean Value Tech — Homepage (rebuild)
   Loaded ONLY by index.html, after system.css. Every rule is scoped to
   .hx-* classes that exist nowhere else, so no other page can be affected.
   Design tokens come from system.css (:root --sys-* / --text-* / fonts).
   ========================================================================== */

html {
    scroll-padding-top: 92px;
}

/* Accent plumbing: 1 = cyan (Data) · 2 = indigo (AI) · 3 = violet (FDE) */
[data-accent="1"] { --acc: #22D3EE; }
[data-accent="2"] { --acc: #818CF8; }
[data-accent="3"] { --acc: #A78BFA; }

/* ==========================================================================
   01 · Full-screen hero
   ========================================================================== */
.hx-hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: calc(64px + 3.5rem) 0 7rem;
    background-image:
        radial-gradient(920px 540px at 80% 26%, rgba(129, 140, 248, 0.15), transparent 62%),
        radial-gradient(760px 520px at 88% 88%, rgba(34, 211, 238, 0.10), transparent 62%),
        radial-gradient(640px 460px at 4% 96%, rgba(167, 139, 250, 0.09), transparent 62%),
        linear-gradient(var(--sys-grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--sys-grid-line) 1px, transparent 1px);
    background-size: auto, auto, auto, 54px 54px, 54px 54px;
}

.hx-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 180px;
    background: linear-gradient(180deg, transparent, var(--sys-bg-0));
    pointer-events: none;
    z-index: 1;
}

.hx-hero-viz {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    will-change: transform;
}

.hx-hero-viz svg {
    width: 100%;
    height: 100%;
    display: block;
    -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.38) 0%, rgba(0, 0, 0, 1) 46%);
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.38) 0%, rgba(0, 0, 0, 1) 46%);
}

.hx-hero .container {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hx-hero-inner {
    max-width: 800px;
    padding: 2rem 0;
}

.hx-eyebrow {
    justify-content: flex-start;
    animation: hx-fadeup 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) 0.1s both;
}

.hx-eyebrow::before {
    content: "";
    width: 2.4rem;
    height: 1px;
    background: var(--sys-grad);
}

.hx-title {
    font-size: clamp(2.85rem, 7.4vw, 6rem);
    font-weight: 700;
    line-height: 1.03;
    letter-spacing: -0.022em;
    margin: 1.5rem 0 1.7rem;
    color: #FFFFFF;
}

.hx-line {
    display: block;
    animation: hx-rise 1.05s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.hx-line:nth-child(1) { animation-delay: 0.22s; }
.hx-line:nth-child(2) { animation-delay: 0.36s; }
.hx-line:nth-child(3) { animation-delay: 0.50s; }

.hx-sub {
    font-size: 1.07rem;
    line-height: 1.78;
    color: var(--text-secondary);
    max-width: 690px;
    animation: hx-fadeup 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) 0.78s both;
}

.hx-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2.5rem;
    animation: hx-fadeup 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) 0.95s both;
}

/* Watch-the-film CTA: glass pill with gradient ring + play glyph */
.btn-film {
    position: relative;
    color: #FFFFFF;
    background: rgba(10, 15, 30, 0.55);
    border: 1px solid transparent;
    background-image:
        linear-gradient(rgba(10, 15, 30, 0.72), rgba(10, 15, 30, 0.72)),
        var(--sys-grad);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.btn-film .btn-film-play {
    display: inline-block;
    margin-right: 0.55rem;
    font-size: 0.8em;
    background: var(--sys-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.btn-film:hover {
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 14px 36px -10px rgba(129, 140, 248, 0.5);
}

.hx-scroll {
    position: absolute;
    left: 50%;
    bottom: 1.7rem;
    transform: translateX(-50%);
    z-index: 3;
    opacity: 0.55;
    transition: opacity 0.3s ease;
}

.hx-scroll:hover { opacity: 0.95; }

.hx-scroll svg {
    width: 24px;
    height: 40px;
    display: block;
}

.hx-scroll rect {
    stroke: rgba(148, 178, 255, 0.5);
    stroke-width: 2;
}

.hx-scroll-dot {
    fill: var(--sys-cyan);
    animation: hx-drop 2.2s ease-in-out infinite;
}

/* --- Hero SVG animation pieces --- */
.js .hx-orbit {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
}

.hx-orbit {
    animation: hx-draw 2.4s cubic-bezier(0.6, 0.05, 0.3, 1) both;
}

.hx-beam {
    stroke-dasharray: 3 7;
    animation: hx-fadein 1.4s ease 0.5s both, hx-beamflow 1.1s linear infinite;
}

.hx-node {
    transform-box: fill-box;
    transform-origin: center;
    animation: hx-pop 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.35) both;
}

.hx-olabel {
    animation: hx-fadein 1.1s ease both;
}

.hx-ring {
    transform-box: fill-box;
    transform-origin: center;
}

.hx-ring-a { animation: hx-spin 70s linear infinite; }
.hx-ring-b { animation: hx-spin-rev 110s linear infinite; }

.hx-star {
    opacity: 0.3;
    animation: hx-twinkle 3.8s ease-in-out infinite alternate;
}

.hx-pulse {
    filter: drop-shadow(0 0 6px rgba(148, 178, 255, 0.85));
}

/* ==========================================================================
   02 · System overview strip
   ========================================================================== */
.hx-strip {
    position: relative;
    z-index: 2;
    border-top: 1px solid rgba(148, 178, 255, 0.10);
    border-bottom: 1px solid rgba(148, 178, 255, 0.10);
    background: rgba(10, 15, 30, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hx-strip-row {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}

.hx-chip {
    position: relative;
    flex: 1 1 0;
    display: flex;
    align-items: baseline;
    gap: 0.85rem;
    padding: 1.35rem 0.6rem;
    color: var(--text-primary);
    transition: background 0.3s ease;
}

.hx-chip::after {
    content: "";
    position: absolute;
    left: 0.6rem;
    right: 0.6rem;
    bottom: -1px;
    height: 2px;
    background: var(--sys-grad);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.hx-chip:hover { background: rgba(148, 178, 255, 0.045); }
.hx-chip:hover::after,
.hx-chip.current::after { transform: scaleX(1); }

.hx-chip-no {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1;
}

.hx-chip-no.c1 { color: #22D3EE; }
.hx-chip-no.c2 { color: #818CF8; }
.hx-chip-no.c3 { color: #A78BFA; }

.hx-chip-name {
    font-family: var(--font-heading);
    font-size: 1.12rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.hx-chip-role {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}

.hx-chip-arrow {
    align-self: center;
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* ==========================================================================
   03 · The System — stacked layers with light flows
   ========================================================================== */
.hx-stack {
    max-width: 1060px;
    margin: 0 auto;
}

.hx-layer {
    position: relative;
    border-radius: 20px;
    border: 1px solid var(--sys-glass-border);
    background: var(--sys-glass);
    padding: 2.5rem 2.6rem;
    overflow: hidden;
    scroll-margin-top: 96px;
}

.hx-layer::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    background: var(--acc);
    box-shadow: 0 0 18px var(--acc);
    opacity: 0.85;
}

.hx-layer::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--acc), transparent 55%);
    opacity: 0.5;
}

.hx-ghost {
    position: absolute;
    top: 0.4rem;
    right: 1.6rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 8.2rem;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px var(--acc);
    opacity: 0.13;
    pointer-events: none;
    user-select: none;
}

.hx-layer-main {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.85fr);
    grid-template-areas:
        "head head"
        "def points"
        "note points"
        "link points";
    column-gap: 2.6rem;
}

.hx-layer-head { grid-area: head; }
.hx-layer-def { grid-area: def; }
.hx-points { grid-area: points; }
.hx-layer-note { grid-area: note; }
.hx-layer-link { grid-area: link; }

.hx-layer-tag {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.32em;
    color: var(--acc);
}

.hx-layer h3 {
    font-size: clamp(1.5rem, 2.6vw, 1.95rem);
    font-weight: 700;
    margin: 0.55rem 0 1rem;
}

.hx-layer-def {
    color: var(--text-secondary);
    font-size: 1.02rem;
    line-height: 1.78;
    max-width: 56ch;
}

.hx-points {
    list-style: none;
    align-self: start;
    border-left: 1px solid rgba(148, 178, 255, 0.12);
    padding-left: 1.6rem;
}

.hx-points li {
    position: relative;
    padding: 0.5rem 0 0.5rem 1.3rem;
    color: #CBD6E8;
    font-size: 0.97rem;
    line-height: 1.55;
}

.hx-points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.02rem;
    width: 7px;
    height: 7px;
    background: var(--acc);
    transform: rotate(45deg);
    box-shadow: 0 0 10px var(--acc);
}

.hx-points strong { color: #FFFFFF; }

.hx-layer-note {
    margin-top: 1.15rem;
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--text-muted);
    max-width: 56ch;
}

.hx-layer-link {
    display: inline-block;
    margin-top: 1.3rem;
    font-weight: 600;
    font-size: 0.98rem;
    color: var(--acc);
}

.hx-layer-link:hover { color: #FFFFFF; }

/* Flow connector between layers — runs only once the section is revealed */
.hx-flow {
    display: flex;
    justify-content: flex-start;
    padding-left: calc(50% - 20px);
    height: 56px;
}

.hx-flow svg {
    width: 40px;
    height: 56px;
    display: block;
}

.hx-flow-track {
    stroke: rgba(148, 178, 255, 0.15);
    stroke-width: 2;
}

.hx-flow-line {
    stroke-width: 2;
    stroke-dasharray: 4 6;
    opacity: 0.35;
    animation: hx-dashmove 0.8s linear infinite;
    animation-play-state: paused;
}

.hx-flow:nth-of-type(1) .hx-flow-line { stroke: #22D3EE; }
.hx-flow:nth-of-type(2) .hx-flow-line { stroke: #818CF8; }

.hx-flow-pulse { opacity: 0; }

.hx-system.in .hx-flow-line {
    opacity: 0.9;
    animation-play-state: running;
}

.hx-system.in .hx-flow-pulse { opacity: 0.95; }

/* ==========================================================================
   04 · The Method — SVG path + four steps
   ========================================================================== */
.hx-method {
    background: rgba(255, 255, 255, 0.02);
}

.hx-mpath {
    max-width: 1200px;
    margin: 0.5rem auto 1.6rem;
}

.hx-mpath svg {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
}

.hx-mtrack {
    stroke: rgba(148, 178, 255, 0.14);
    stroke-width: 2;
}

.js .hx-mline {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    stroke-width: 2;
    transition: stroke-dashoffset 1.7s cubic-bezier(0.6, 0.05, 0.3, 1) 0.25s;
}

.hx-mline {
    stroke-width: 2;
}

.js .hx-method.in .hx-mline { stroke-dashoffset: 0; }

.hx-mnodes circle {
    fill: #0A0F1E;
    stroke: url(#hx-mpath-grad);
    stroke-width: 2;
}

.hx-mpulse {
    opacity: 0;
    filter: drop-shadow(0 0 6px rgba(148, 178, 255, 0.9));
    transition: opacity 0.7s ease 1.1s;
}

.hx-method.in .hx-mpulse { opacity: 0.95; }

.hx-chain {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.4rem;
}

.hx-step {
    position: relative;
    padding: 1.9rem 1.55rem;
    border-radius: 16px;
    border: 1px solid var(--sys-glass-border);
    background: var(--sys-glass);
    overflow: hidden;
}

.hx-step-no {
    display: block;
    font-family: var(--font-heading);
    font-size: 3.1rem;
    font-weight: 700;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1.2px rgba(148, 178, 255, 0.38);
}

.hx-step-zh {
    display: block;
    margin: 1rem 0 0.45rem;
    font-family: var(--font-heading);
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: 0.22em;
}

.hx-step:nth-child(1) .hx-step-zh { color: #22D3EE; }
.hx-step:nth-child(2) .hx-step-zh { color: #818CF8; }
.hx-step:nth-child(3) .hx-step-zh { color: #A78BFA; }
.hx-step:nth-child(4) .hx-step-zh { color: #C4B5FD; }

.hx-step h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.hx-step p {
    color: var(--text-secondary);
    font-size: 0.93rem;
    line-height: 1.7;
}

/* ==========================================================================
   05 · Three Practices — deep-entry cards
   ========================================================================== */
.hx-practice-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
}

.hx-practice {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 2.4rem 2.1rem 2.1rem;
    border-radius: 20px;
    border: 1px solid var(--sys-glass-border);
    background: var(--sys-glass);
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.hx-practice::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--acc);
    box-shadow: 0 2px 16px var(--acc);
    opacity: 0.75;
}

.hx-practice:hover {
    transform: translateY(-6px);
    border-color: var(--acc);
    box-shadow: 0 24px 50px -22px rgba(3, 6, 14, 0.9), 0 0 0 1px rgba(148, 178, 255, 0.05);
}

.hx-practice-tag {
    font-family: var(--font-heading);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.32em;
    color: var(--acc);
}

.hx-practice h3 {
    font-size: 1.42rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0.85rem 0 0.75rem;
}

.hx-practice-lead {
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.7;
}

.hx-practice ul {
    list-style: none;
    margin: 1.25rem 0 1.7rem;
}

.hx-practice li {
    position: relative;
    padding: 0.42rem 0 0.42rem 1.3rem;
    color: #CBD6E8;
    font-size: 0.95rem;
    line-height: 1.55;
}

.hx-practice li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.95rem;
    width: 7px;
    height: 7px;
    background: var(--acc);
    transform: rotate(45deg);
}

.hx-practice-link {
    margin-top: auto;
    font-weight: 600;
    font-size: 0.98rem;
    color: var(--acc);
}

.hx-practice-link:hover { color: #FFFFFF; }

/* ==========================================================================
   06 · Proof strip
   ========================================================================== */
.hx-proof {
    border-top: 1px solid rgba(148, 178, 255, 0.10);
    border-bottom: 1px solid rgba(148, 178, 255, 0.10);
    padding: 3.8rem 0;
    background: linear-gradient(180deg, rgba(148, 178, 255, 0.035), rgba(148, 178, 255, 0.008));
}

.hx-proof-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.2rem;
    text-align: center;
}

.hx-stat-no {
    display: block;
    font-family: var(--font-heading);
    font-size: clamp(2.7rem, 5.2vw, 3.9rem);
    font-weight: 700;
    line-height: 1;
    background: var(--sys-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hx-stat-label {
    display: block;
    max-width: 300px;
    margin: 0.65rem auto 0;
    color: var(--text-secondary);
    font-size: 0.94rem;
    line-height: 1.6;
}

.hx-proof-creds {
    margin-top: 2.8rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    gap: 0.5rem 1.1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.97rem;
    line-height: 1.7;
}

.hx-cred-sep { color: var(--sys-indigo); }

/* ==========================================================================
   07 · The Film — 16:9 player with an EN / 中文 edition switch
   ========================================================================== */
.hx-film {
    background-image:
        radial-gradient(880px 480px at 50% 0%, rgba(129, 140, 248, 0.10), transparent 65%),
        linear-gradient(var(--sys-grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--sys-grid-line) 1px, transparent 1px);
    background-size: auto, 54px 54px, 54px 54px;
}

.hx-film-switch {
    display: flex;
    justify-content: center;
    gap: 0.45rem;
    margin: 0.4rem auto 1.7rem;
    padding: 0.4rem;
    width: fit-content;
    max-width: 100%;
    border-radius: 999px;
    border: 1px solid var(--sys-glass-border);
    background: rgba(10, 15, 30, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hx-film-lang {
    appearance: none;
    border: none;
    cursor: pointer;
    padding: 0.55rem 1.5rem;
    border-radius: 999px;
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    background: transparent;
    transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.hx-film-lang:hover { color: #FFFFFF; }

.hx-film-lang.is-active {
    color: #051019;
    background: var(--sys-grad);
    box-shadow: 0 6px 20px -6px rgba(34, 211, 238, 0.55);
}

.hx-player {
    position: relative;
    max-width: 1060px;
    margin: 0 auto;
    border-radius: 20px;
    border: 1px solid var(--sys-glass-border);
    background: #04060C;
    overflow: hidden;
    box-shadow:
        0 34px 80px -30px rgba(2, 4, 10, 0.95),
        0 0 0 1px rgba(148, 178, 255, 0.04),
        0 0 64px -18px rgba(129, 140, 248, 0.35);
}

.hx-player::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--sys-grad);
    z-index: 2;
    pointer-events: none;
}

.hx-player video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #04060C;
}

.hx-film-caption {
    margin-top: 1.3rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

.hx-film-credit {
    margin-top: 0.45rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    opacity: 0.75;
}

.hx-film-credit a {
    color: inherit;
    text-decoration: underline;
}

/* ==========================================================================
   08 · New book teaser band — title + notify-me signup
   ========================================================================== */
.hx-book {
    position: relative;
    padding: 3.4rem 0;
    border-top: 1px solid rgba(148, 178, 255, 0.10);
    border-bottom: 1px solid rgba(148, 178, 255, 0.10);
    background:
        radial-gradient(760px 340px at 12% 50%, rgba(167, 139, 250, 0.13), transparent 62%),
        radial-gradient(680px 320px at 88% 50%, rgba(34, 211, 238, 0.10), transparent 62%),
        linear-gradient(180deg, rgba(148, 178, 255, 0.03), rgba(148, 178, 255, 0.008));
    overflow: hidden;
}

.hx-book-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 2.6rem;
    align-items: center;
    max-width: 1060px;
    margin: 0 auto;
}

.hx-book-tag {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: #A78BFA;
}

.hx-book-title {
    font-size: clamp(1.85rem, 3.4vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.12;
    margin: 0.7rem 0 0.8rem;
    color: #FFFFFF;
}

.hx-book-line {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 46ch;
}

.hx-book-pub {
    margin-top: 0.9rem;
    font-size: 0.92rem;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.hx-book-pub strong { color: #C4B5FD; font-weight: 600; }

.hx-book-form {
    position: relative;
    padding: 1.7rem 1.7rem 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--sys-glass-border);
    background: var(--sys-glass);
}

.hx-book-label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 0.95rem;
}

.hx-book-row {
    display: flex;
    gap: 0.7rem;
}

.hx-book-row input[type="email"] {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.9rem 1.1rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 178, 255, 0.28);
    background: rgba(5, 8, 15, 0.65);
    color: #FFFFFF;
    font-family: var(--font-body);
    font-size: 0.97rem;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.hx-book-row input[type="email"]::placeholder { color: var(--text-muted); }

.hx-book-row input[type="email"]:focus {
    border-color: rgba(34, 211, 238, 0.65);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.16);
}

.hx-book-row .btn {
    flex: 0 0 auto;
    padding: 0.9rem 1.5rem;
}

/* ==========================================================================
   Focus visibility for homepage elements
   ========================================================================== */
.hx-chip:focus-visible,
.hx-layer-link:focus-visible,
.hx-practice-link:focus-visible,
.hx-scroll:focus-visible,
.btn-film:focus-visible,
.hx-film-lang:focus-visible {
    outline: 2px solid var(--sys-cyan);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ==========================================================================
   Keyframes
   ========================================================================== */
@keyframes hx-draw {
    from { stroke-dashoffset: 1; opacity: 0; }
    to { stroke-dashoffset: 0; opacity: 1; }
}

@keyframes hx-rise {
    from { opacity: 0; transform: translateY(48px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes hx-fadeup {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes hx-fadein {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes hx-pop {
    from { opacity: 0; transform: scale(0.2); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes hx-beamflow {
    to { stroke-dashoffset: -20; }
}

@keyframes hx-dashmove {
    to { stroke-dashoffset: -10; }
}

@keyframes hx-spin {
    to { transform: rotate(360deg); }
}

@keyframes hx-spin-rev {
    to { transform: rotate(-360deg); }
}

@keyframes hx-twinkle {
    from { opacity: 0.12; }
    to { opacity: 0.75; }
}

@keyframes hx-drop {
    0% { transform: translateY(0); opacity: 0; }
    25% { opacity: 1; }
    70% { transform: translateY(13px); opacity: 1; }
    100% { transform: translateY(16px); opacity: 0; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
    .hx-mpath { display: none; }
    .hx-chain { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
    .hx-hero-viz { opacity: 0.75; }
    .hx-layer-main {
        grid-template-columns: 1fr;
        grid-template-areas: "head" "def" "points" "note" "link";
        row-gap: 0.4rem;
    }
    .hx-points {
        border-left: none;
        border-top: 1px solid rgba(148, 178, 255, 0.12);
        padding-left: 0;
        padding-top: 0.9rem;
        margin-top: 0.8rem;
    }
    .hx-points li { padding-left: 1.3rem; }
    .hx-practice-grid { grid-template-columns: 1fr; }
    .hx-practice { max-width: 640px; }
}

@media (max-width: 860px) {
    .hx-hero {
        padding: calc(64px + 2.2rem) 0 6rem;
        align-items: flex-start;
    }
    .hx-hero-viz { opacity: 0.5; }
    .hx-scroll { display: none; }
    .hx-strip-row {
        flex-wrap: wrap;
        gap: 0;
    }
    .hx-chip {
        flex: 1 1 100%;
        padding: 1rem 0.4rem;
        border-bottom: 1px solid rgba(148, 178, 255, 0.07);
    }
    .hx-chip:last-child { border-bottom: none; }
    .hx-chip-arrow { display: none; }
    .hx-layer { padding: 2rem 1.5rem; }
    .hx-ghost { font-size: 5.2rem; right: 1rem; }
    .hx-flow { padding-left: calc(50% - 20px); }
}

@media (max-width: 760px) {
    .hx-proof-stats { grid-template-columns: 1fr; gap: 1.8rem; }
    .hx-book-inner { grid-template-columns: 1fr; gap: 1.6rem; }
    .hx-book { padding: 2.6rem 0; }
}

@media (max-width: 520px) {
    .hx-book-row { flex-direction: column; }
    .hx-book-row .btn { width: 100%; }
    .hx-film-lang { padding: 0.5rem 1.1rem; }
}

@media (max-width: 640px) {
    .hx-title { font-size: clamp(2.35rem, 11.4vw, 3rem); }
    .hx-sub { font-size: 1rem; }
    .hx-cta .btn { flex: 1 1 100%; }
    .hx-chain {
        grid-template-columns: 1fr;
        margin-left: 0.3rem;
        border-left: 1px dashed rgba(148, 178, 255, 0.25);
        padding-left: 1.3rem;
    }
    .hx-step-no { font-size: 2.3rem; }
}

/* ==========================================================================
   Reduced motion — everything lands in its final, fully readable state
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .hx-orbit,
    .hx-beam,
    .hx-node,
    .hx-olabel,
    .hx-line,
    .hx-sub,
    .hx-cta,
    .hx-eyebrow {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .js .hx-orbit { stroke-dashoffset: 0 !important; }
    .js .hx-mline { stroke-dashoffset: 0 !important; transition: none; }

    .hx-ring-a,
    .hx-ring-b,
    .hx-star,
    .hx-scroll-dot,
    .hx-flow-line {
        animation: none !important;
    }

    .hx-flow-line { opacity: 0.8; }

    /* SMIL pulses cannot be paused by CSS — remove them entirely. */
    .hx-pulse,
    .hx-mpulse,
    .hx-flow-pulse {
        display: none !important;
    }

    .hx-mpulse { display: none !important; }
}

/* ==========================================================================
   15 · Film moved to top — fullscreen pill button (appended 2026-10-16)
   ========================================================================== */
.hx-film-fs {
    appearance: none;
    cursor: pointer;
    padding: 0.55rem 1.3rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 178, 255, 0.35);
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    background: rgba(148, 178, 255, 0.06);
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
    white-space: nowrap;
}

.hx-film-fs:hover {
    color: #FFFFFF;
    border-color: rgba(34, 211, 238, 0.65);
    background: rgba(34, 211, 238, 0.12);
}

.hx-film-fs:focus-visible {
    outline: 2px solid var(--cyan, #22D3EE);
    outline-offset: 2px;
}

@media (max-width: 560px) {
    .hx-film-switch {
        flex-wrap: wrap;
        border-radius: 22px;
    }

    .hx-film-fs {
        padding: 0.55rem 1.05rem;
    }
}

/* ==========================================================================
   16 · Origins star route — six stations on one glowing orbit (2026-10-16)
   ========================================================================== */
.hx-route {
    max-width: 1060px;
    margin: 0.4rem auto 2rem;
}

.hx-route-svg {
    display: block;
    width: 100%;
    height: auto;
}

.hx-route-star {
    fill: #BFD4FF;
}

.hx-route-star.tw {
    animation: hxRouteTwinkle 3.6s ease-in-out infinite;
}

@keyframes hxRouteTwinkle {
    0%, 100% { opacity: 0.22; }
    50% { opacity: 0.9; }
}

.hx-route-halo {
    fill-opacity: 0.26;
    animation: hxRouteBreathe 3.4s ease-in-out infinite;
}

@keyframes hxRouteBreathe {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 1; }
}

.hx-route-core {
    filter: drop-shadow(0 0 5px currentColor);
}

.hx-route-label {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.28em;
    fill: var(--text-secondary);
    text-anchor: middle;
}

.hx-route-endlabel {
    font-family: var(--font-heading);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.3em;
    fill: #C4B5FD;
    text-anchor: middle;
}

/* Small screens: keep the chart wide enough to stay legible (gentle
   horizontal pan inside its own box) and open up label spacing. */
@media (max-width: 720px) {
    .hx-route {
        overflow-x: auto;
        scrollbar-width: none;
    }

    .hx-route::-webkit-scrollbar { display: none; }

    .hx-route-svg {
        min-width: 660px;
    }

    .hx-route-label {
        font-size: 18px;
        letter-spacing: 0.18em;
    }

    .hx-route-endlabel {
        font-size: 15px;
        letter-spacing: 0.18em;
        transform: translateX(-42px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hx-route-star.tw,
    .hx-route-halo {
        animation: none !important;
    }

    /* SMIL pulses cannot be paused by CSS — remove them entirely. */
    .hx-route-pulse {
        display: none !important;
    }
}

/* ==========================================================================
   17 · Film player inside the hero — muted autoplay edition (2026-10-16)
   ========================================================================== */
.hx-hero-film {
    margin: 3.4rem auto 0;
    max-width: 1060px;
    animation: hx-fadeup 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) 1.1s both;
}

/* The switch row sits on the hero's starfield — deepen its glass a touch */
.hx-hero .hx-film-switch {
    margin-top: 0;
    background: rgba(6, 10, 22, 0.72);
}

/* Sound toggle pill — same family as the fullscreen pill, cyan-forward
   because it is the one action autoplay visitors are meant to find */
.hx-film-sound {
    appearance: none;
    cursor: pointer;
    padding: 0.55rem 1.3rem;
    border-radius: 999px;
    border: 1px solid rgba(34, 211, 238, 0.55);
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: #D9F7FF;
    background: rgba(34, 211, 238, 0.14);
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
    white-space: nowrap;
}

.hx-film-sound:hover {
    color: #FFFFFF;
    border-color: rgba(34, 211, 238, 0.85);
    background: rgba(34, 211, 238, 0.22);
}

.hx-film-sound.is-on {
    color: var(--text-secondary);
    border-color: rgba(148, 178, 255, 0.35);
    background: rgba(148, 178, 255, 0.06);
}

.hx-film-sound:focus-visible {
    outline: 2px solid var(--cyan, #22D3EE);
    outline-offset: 2px;
}

/* Caption + credit read against the starfield inside the hero */
.hx-hero .hx-film-caption { color: var(--text-secondary); }
.hx-hero .hx-film-credit { opacity: 0.85; }

/* Four pills in the row now — allow wrapping before the small breakpoint */
@media (max-width: 820px) {
    .hx-film-switch {
        flex-wrap: wrap;
        border-radius: 22px;
        justify-content: center;
    }
}

@media (max-width: 720px) {
    .hx-hero-film { margin-top: 2.4rem; }

    .hx-film-sound {
        padding: 0.55rem 1.05rem;
    }
}

/* ==========================================================================
   18 · Core Ideas — idea chips above the worldview film (2026-10-16)
   ========================================================================== */
.hx-idea-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem;
    margin: 0 auto 2.1rem;
}

.hx-idea-chip {
    padding: 0.45rem 1.15rem;
    border-radius: 999px;
    border: 1px solid var(--sys-glass-border);
    background: rgba(10, 15, 30, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    white-space: nowrap;
}

@media (max-width: 720px) {
    .hx-idea-chip {
        font-size: 0.8rem;
        padding: 0.4rem 0.9rem;
    }
}
