/* Homepage. Loaded only on `/`, after site-v4.css and site-v5.css.
 *
 * One pinned sequence (`.hx`): the hero video tilts into a panel and separates
 * into three tinted glass layers, then a deck of rounded cards slides over the
 * stage. Everything below is the finished, static layout; pinned and
 * in-progress states apply only under `html.hp-motion`, set by the inline boot
 * script unless the visitor asked for reduced motion. home.js writes geometry
 * and adds state classes (`is-active`, `is-on`, `is-lit`).
 */

.home-page {
    --hx-g: 12px;
    --hx-top0: 72px;
    --hx-sticky: calc(72px + var(--hx-g));
    --hx-stage: #0f1d2b;
    --hp-gap: clamp(16px, 2vw, 32px);
    --hp-space: clamp(88px, 10vw, 148px);
    --hp-ease: cubic-bezier(.2, .7, .2, 1);
    --hp-ease-out: cubic-bezier(.16, 1, .3, 1);
    background: var(--paper);
}

/* ---------- Shared pieces ---------- */

.hx-title {
    margin: 0;
    font-size: clamp(30px, min(3.4vw, 5.6vh), 48px);
    font-weight: 500;
    line-height: 1.45;
    text-wrap: balance;
}

.hx-display {
    margin: 0;
    font-size: clamp(32px, min(4.2vw, 7vh), 60px);
    font-weight: 500;
    line-height: 1.38;
    text-wrap: balance;
}

.hx-lede {
    margin: 0;
    color: var(--slate);
    font-size: clamp(15.5px, 1.2vw, 17.5px);
    line-height: 2;
    text-wrap: pretty;
}

.hx-card-ink .hx-lede {
    color: rgba(255, 255, 255, .7);
}

.hx-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
}

.hx-link-ink {
    color: var(--ink);
}

.hx-link .ui-icon {
    width: 18px;
    height: 18px;
    transition: transform .35s var(--hp-ease);
}

.hx-link:hover .ui-icon {
    transform: translateX(-4px);
}

/* Words that light as they are read (split by home.js). */
.hp-motion .hx-w {
    opacity: .28;
    transition: opacity .45s var(--hp-ease);
}

.hp-motion .hx-w.is-lit {
    opacity: 1;
}

/* ---------- Navigation over dark surfaces ---------- */

.site-nav--overlay .brand {
    position: relative;
}

.site-nav--overlay .brand img {
    transition: opacity .35s;
}

.site-nav--overlay .brand-reversed {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.site-nav--overlay,
.site-nav--overlay .nav-link,
.site-nav--overlay .nav-cta {
    transition: background-color .35s, color .35s, border-color .35s;
}

.hp-nav-dark .home-page:not(.menu-open):not(.has-site-announcement) .site-nav--overlay {
    border-bottom-color: rgba(255, 255, 255, .06);
    background: rgba(15, 29, 43, .82);
}

.hp-nav-dark .home-page:not(.menu-open):not(.has-site-announcement) .site-nav--overlay .brand img {
    opacity: 0;
}

.hp-nav-dark .home-page:not(.menu-open):not(.has-site-announcement) .site-nav--overlay .brand .brand-reversed {
    opacity: 1;
}

.hp-nav-dark .home-page:not(.menu-open):not(.has-site-announcement) .site-nav--overlay .nav-link {
    color: #fff;
}

.hp-nav-dark .home-page:not(.menu-open):not(.has-site-announcement) .site-nav--overlay .nav-cta {
    background: #fff;
    color: var(--ink);
}

.hp-nav-dark .home-page:not(.menu-open):not(.has-site-announcement) .site-nav--overlay .menu-btn {
    border-color: rgba(255, 255, 255, .34);
}

.hp-nav-dark .home-page:not(.menu-open):not(.has-site-announcement) .site-nav--overlay .menu-btn span {
    background: #fff;
}

/* ---------- The sequence: static layout ---------- */

.hx {
    position: relative;
    isolation: isolate;
    background: var(--hx-stage);
    color: #fff;
}

.hx-stage {
    position: relative;
}

.hx-backdrop,
.hx-rail,
.hx-spacer,
.hx-layer,
.hx-deck-end {
    display: none;
}

.hx-hero {
    position: relative;
    height: 100vh;
    height: 100svh;
    min-height: 600px;
    max-height: 1100px;
    background: var(--paper);
}

.hx-scene {
    position: absolute;
    inset: 0;
    perspective: 1700px;
    perspective-origin: var(--hx-ox, 50%) var(--hx-oy, 40%);
    pointer-events: none;
}

.hx-rig {
    position: absolute;
    inset: var(--hx-top0) var(--hx-g) var(--hx-g);
    transform-style: preserve-3d;
}

.hx-plane {
    position: absolute;
    inset: 0;
    border-radius: var(--q-r-lg);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.hx-plane-video {
    overflow: hidden;
    background: var(--ink) url("../video/control-corridor-poster.jpg") center / cover no-repeat;
}

.hx-plane-video video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    filter: saturate(.7) brightness(var(--hx-bright, .95));
}

.hx-grade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(15, 29, 43, .82) 0%, rgba(15, 29, 43, .3) 42%, rgba(15, 29, 43, .22) 70%, rgba(15, 29, 43, .45) 100%),
        rgba(20, 36, 52, .18);
}

/* Hero copy: centred over the footage. */
.hx-hero-copy {
    position: absolute;
    z-index: 2;
    inset: var(--hx-top0) var(--hx-g) var(--hx-g);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(28px, 4vw, 56px);
    color: #fff;
    text-align: center;
}

.hx-eyebrow {
    margin: 0 0 18px;
    color: rgba(255, 255, 255, .82);
    font-size: 14.5px;
    font-weight: 500;
}

.hx-hero-main {
    max-width: 900px;
}

.hx-hero-copy h1 {
    margin: 0;
    font-size: clamp(38px, min(5.2vw, 8.6vh), 72px);
    font-weight: 500;
    line-height: 1.32;
    text-wrap: balance;
}

.hx-hero-main > p {
    max-width: 600px;
    margin: 22px auto 0;
    color: rgba(255, 255, 255, .84);
    font-size: clamp(15.5px, 1.25vw, 18px);
    line-height: 2;
    text-wrap: pretty;
}

.hx-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 32px;
}

.hx-cue {
    position: absolute;
    bottom: clamp(22px, 3vw, 36px);
    left: 50%;
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, .66);
    font-size: 13.5px;
    transform: translateX(-50%);
    white-space: nowrap;
}

.hx-cue i {
    position: relative;
    width: 1px;
    height: 24px;
    overflow: hidden;
    background: rgba(255, 255, 255, .25);
}

.hx-cue i::after {
    position: absolute;
    inset: 0;
    background: var(--copper);
    transform: translateY(-100%);
    animation: hx-cue 2.4s var(--hp-ease) infinite;
    content: "";
}

@keyframes hx-cue {
    0% { transform: translateY(-100%); }
    55%, 100% { transform: translateY(100%); }
}

/* Captions, as plain sections when nothing is pinned. */
.hx-captions {
    width: min(var(--shell), calc(100% - var(--gutter) * 2));
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(48px, 6vw, 80px) var(--hp-gap);
    margin-inline: auto;
    padding-block: var(--hp-space);
}

.hx-cap-intro,
.hx-cap-outro {
    grid-column: 1 / -1;
    max-width: 820px;
}

.hx-step-label {
    margin: 0;
    color: var(--slate-light);
    font-size: 14px;
    font-weight: 600;
}

.hx-cap h2,
.hx-cap h3 {
    margin: 10px 0 0;
    font-weight: 500;
    line-height: 1.45;
    text-wrap: balance;
}

.hx-cap h2 {
    margin-top: 0;
    font-size: clamp(28px, min(3vw, 4.8vh), 44px);
}

.hx-cap h3 {
    font-size: clamp(26px, min(2.8vw, 4.6vh), 40px);
}

.hx-cap p:not(.hx-step-label, .hx-statement) {
    max-width: 600px;
    margin: 12px 0 0;
    color: rgba(255, 255, 255, .72);
    font-size: clamp(15px, 1.15vw, 17px);
    line-height: 2;
    text-wrap: pretty;
}

.hx-cap .hx-statement {
    max-width: 760px;
    margin: 0;
    color: #fff;
    font-size: clamp(24px, min(2.6vw, 4.4vh), 38px);
    font-weight: 500;
    line-height: 1.6;
    text-wrap: balance;
}

.hx-cap .hx-link {
    margin-top: 18px;
}

/* Glass layers, tinted in the mark's three face colours so each reads clearly. */
.hx-layer {
    overflow: hidden;
    border: 1.5px solid rgba(255, 255, 255, .55);
    transition: border-color .5s;
}

.hx-layer-operations {
    background: rgba(91, 115, 132, .46);
}

.hx-layer-data {
    background: rgba(43, 73, 108, .55);
}

.hx-layer-ai {
    background: rgba(201, 214, 226, .26);
}

.hx-layer.is-active {
    border-color: #fff;
}

.hx-layer-tag {
    position: absolute;
    z-index: 1;
    top: 7%;
    right: 4.5%;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 14px;
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

.hx-layer-tag b {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-size: 12px;
}

.hx-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}

.hx-art .la-frame,
.hx-art .la-line,
.hx-art .la-check {
    fill: none;
    stroke: #fff;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hx-art .la-frame {
    stroke-width: 6;
}

.hx-art .la-line {
    stroke: rgba(255, 255, 255, .85);
    stroke-width: 4.5;
}

.hx-art .la-check {
    stroke: var(--ink);
    stroke-width: 9;
}

.hx-art .la-fill {
    fill: #fff;
}

.hx-art .la-copper-fill {
    fill: var(--copper);
}

.la-draw {
    stroke-dasharray: 1 1;
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 1.4s var(--hp-ease) var(--d, 0s);
}

.la-fade {
    opacity: 0;
    transition: opacity .7s var(--hp-ease) var(--d, 0s);
}

.hx-layer.is-on .la-draw {
    stroke-dashoffset: 0;
}

.hx-layer.is-on .la-fade {
    opacity: 1;
}

/* ---------- The sequence: pinned ---------- */

.hp-motion .hx-stage {
    position: sticky;
    z-index: 0;
    top: 0;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    background: var(--hx-stage);
}

.hp-motion .hx-stage::after {
    position: absolute;
    z-index: 6;
    inset: 0;
    background: #08121b;
    opacity: calc(var(--hx-dim, 0) * .6);
    pointer-events: none;
    content: "";
}

.hp-motion .hx-backdrop {
    position: absolute;
    inset: 0;
    display: block;
    background: var(--paper);
}

.hp-motion .hx-hero {
    position: absolute;
    inset: 0;
    height: auto;
    min-height: 0;
    max-height: none;
    background: none;
}

.hp-motion .hx-rig,
.hp-motion .hx-plane {
    will-change: transform;
}

.hp-motion .hx-layer {
    display: block;
    opacity: 0;
}

.hp-motion .hx-captions {
    position: absolute;
    z-index: 3;
    inset: var(--hx-cap-top, 62%) 0 0;
    display: block;
    width: auto;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

.hp-motion .hx-cap {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    width: min(780px, calc(100% - var(--gutter) * 2));
    max-width: none;
    margin-inline: auto;
    opacity: 0;
    text-align: center;
    transform: translate3d(0, 24px, 0);
    transition: opacity .5s var(--hp-ease), transform .9s var(--hp-ease-out);
}

.hp-motion .hx-cap.is-past {
    transform: translate3d(0, -24px, 0);
}

.hp-motion .hx-cap.is-active {
    opacity: 1;
    transform: none;
    pointer-events: auto;
    transition-delay: .12s;
}

.hp-motion .hx-cap p,
.hp-motion .hx-cap h2,
.hp-motion .hx-cap h3 {
    margin-inline: auto;
}

.hp-motion .hx-rail {
    position: absolute;
    z-index: 3;
    bottom: clamp(18px, 3.4vh, 32px);
    left: 50%;
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    opacity: var(--hx-rail-o, 0);
    transform: translateX(-50%);
}

.hp-motion .hx-rail li {
    position: relative;
    width: clamp(88px, 10vw, 140px);
    padding-top: 12px;
    color: rgba(255, 255, 255, .46);
    font-size: 13px;
    text-align: center;
    transition: color .4s;
}

.hp-motion .hx-rail li::before,
.hp-motion .hx-rail li::after {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    border-radius: 3px;
    background: rgba(255, 255, 255, .16);
    content: "";
}

.hp-motion .hx-rail li::after {
    background: #fff;
    transform: scaleX(var(--f, 0));
    transform-origin: 100% 50%;
}

.hp-motion .hx-rail li.is-active {
    color: #fff;
}

.hp-motion .hx-spacer {
    display: block;
    height: 420vh;
    height: 420svh;
}

/* Hero intro: words rise once fonts are ready. */
.hp-motion .hx-hero-copy h1 .hx-w {
    display: inline-block;
    opacity: 0;
    filter: blur(10px);
    transform: translate3d(0, .3em, 0);
    transition: opacity 1s var(--hp-ease-out), filter 1.1s var(--hp-ease-out), transform 1.2s var(--hp-ease-out);
    transition-delay: calc(.15s + var(--i, 0) * 70ms);
}

.hp-motion .hx-hero-copy.is-in h1 .hx-w {
    opacity: 1;
    filter: none;
    transform: none;
}

.hp-motion .hx-intro {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
    transition: opacity 1s var(--hp-ease-out), transform 1.2s var(--hp-ease-out);
    transition-delay: var(--d, 0s);
}

.hp-motion .hx-hero-copy.is-in .hx-intro {
    opacity: 1;
    transform: none;
}

.hp-motion .hx-cue.hx-intro {
    transform: translate3d(-50%, 14px, 0);
}

.hp-motion .hx-hero-copy.is-in .hx-cue.hx-intro {
    transform: translateX(-50%);
}

/* ---------- The deck ---------- */

.hx-deck {
    position: relative;
    z-index: 1;
    display: grid;
    gap: var(--hx-g);
    padding: var(--hx-g);
}

.hx-card {
    position: relative;
    min-height: calc(100vh - var(--hx-sticky) - var(--hx-g));
    min-height: calc(100svh - var(--hx-sticky) - var(--hx-g));
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    border-radius: var(--q-r-lg);
}

.hx-card::after {
    position: absolute;
    z-index: 6;
    inset: 0;
    background: #08121b;
    opacity: calc(var(--hx-dim, 0) * .55);
    pointer-events: none;
    content: "";
}

.hx-card-inner {
    position: relative;
    z-index: 1;
    width: min(1240px, calc(100% - clamp(40px, 8vw, 128px)));
    margin-inline: auto;
    padding-block: clamp(40px, 7vh, 88px);
}

.hx-card-light {
    background: #fff;
    color: var(--ink);
}

.hx-card-ink {
    background: var(--ink);
    color: #fff;
}

.hx-card-mist {
    background: var(--mist);
    color: var(--ink);
}

.hx-card-head {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--hp-gap);
    row-gap: 20px;
    align-items: end;
}

.hx-card-head > :first-child {
    grid-column: 1 / span 8;
}

.hx-card-head > :last-child {
    grid-column: 9 / -1;
}

.hp-motion .hx-deck {
    display: block;
    padding: 0 var(--hx-g) var(--hx-g);
}

.hp-motion .hx-card {
    position: sticky;
    top: var(--hx-sticky);
    transform-origin: 50% 0;
    will-change: transform;
}

.hp-motion .hx-card[data-hx-card="ai"] {
    margin-top: 56vh;
    margin-top: 56svh;
}

.hp-motion .hx-card[data-hx-card="roshan"] {
    margin-top: 64vh;
    margin-top: 64svh;
}

/* Sticky cards cannot travel into padding, so the last card's dwell is a box. */
.hp-motion .hx-deck-end {
    display: block;
    height: 40vh;
    height: 40svh;
}

/* Engagement: three steps in order. */
.hx-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(12px, 1.4vw, 20px);
    margin: clamp(36px, 7vh, 72px) 0 clamp(28px, 4vh, 40px);
    padding: 0;
    list-style: none;
}

.hx-steps li {
    position: relative;
    padding: clamp(20px, 2.4vw, 30px);
    overflow: hidden;
    border-radius: var(--q-r-md);
    background: var(--q-panel);
}

.hx-steps li::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: var(--ink);
    transform: scaleX(var(--f, 1));
    transform-origin: 100% 50%;
    content: "";
}

.hx-step-no {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
}

.hx-steps h3 {
    margin: 18px 0 0;
    font-size: clamp(18px, 1.5vw, 21px);
    font-weight: 600;
    line-height: 1.6;
}

.hx-steps p {
    margin: 8px 0 0;
    color: var(--slate);
    font-size: 15px;
    line-height: 1.95;
    text-wrap: pretty;
}

.hp-motion .hx-steps li::before {
    transform: scaleX(var(--f, 0));
}

.hp-motion .hx-steps li > * {
    opacity: .42;
    transition: opacity .6s var(--hp-ease);
}

.hp-motion .hx-steps li.is-lit > * {
    opacity: 1;
}

/* AI integration: copy beside a second piece of footage. */
.hx-ai-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: center;
    gap: clamp(28px, 5vw, 80px);
}

.hx-ai-copy .hx-lede {
    margin-top: 18px;
}

.hx-ai-steps {
    margin: clamp(22px, 4vh, 36px) 0 clamp(24px, 4vh, 34px);
    padding: 0;
    list-style: none;
    counter-reset: ai;
}

.hx-ai-steps li {
    position: relative;
    padding: 14px 44px 14px 0;
    border-top: 1px solid rgba(255, 255, 255, .12);
    counter-increment: ai;
}

.hx-ai-steps li::before {
    position: absolute;
    top: 16px;
    right: 0;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    color: #fff;
    font-size: 13px;
    content: counter(ai, persian);
}

.hx-ai-steps h3 {
    margin: 0;
    font-size: 17.5px;
    font-weight: 600;
    line-height: 1.7;
}

.hx-ai-steps p {
    margin: 2px 0 0;
    color: rgba(255, 255, 255, .64);
    font-size: 14.5px;
    line-height: 1.85;
}

.hx-ai-media {
    position: relative;
    aspect-ratio: 4 / 3.4;
    overflow: hidden;
    border-radius: var(--q-r-md);
    background: var(--steel);
}

.hx-ai-media video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    filter: saturate(.8);
}

.hx-ai-badge {
    position: absolute;
    right: 16px;
    bottom: 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--q-r-sm);
    background: #fff;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
}

.hx-ai-badge i {
    width: 8px;
    height: 8px;
    background: var(--copper);
}

/* ROSHAN: the six letters of the assessment, then the invitation. */
.hx-roshan {
    text-align: center;
}

.hx-roshan-body {
    max-width: 760px;
}

.hx-tiles {
    display: flex;
    justify-content: center;
    gap: clamp(6px, .8vw, 10px);
    margin: 0 0 clamp(28px, 5vh, 48px);
    padding: 0;
    list-style: none;
}

.hx-tile {
    width: clamp(52px, 6.4vw, 96px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.hx-tile b {
    width: 100%;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: var(--q-r-md);
    background: var(--ink);
    color: #fff;
    font: 500 clamp(22px, 2.6vw, 38px) / 1 var(--q-font);
    transition: background-color .5s var(--hp-ease), color .5s;
}

.hx-tile small {
    color: var(--slate);
    font-size: 12.5px;
    line-height: 1.5;
}

.hp-motion .hx-tile b {
    background: #fff;
    color: var(--slate-light);
}

.hp-motion .hx-tile.is-lit b {
    background: var(--ink);
    color: #fff;
}

.hp-motion .hx-tile.is-current b {
    background: var(--steel);
    color: #fff;
}

.hx-roshan .hx-lede {
    max-width: 560px;
    margin: 16px auto 0;
}

.hx-roshan .hp-btn {
    margin-top: 28px;
}

.hx-facts {
    display: flex;
    justify-content: center;
    margin: clamp(28px, 5vh, 48px) 0 0;
}

.hx-facts div {
    min-width: 130px;
    display: flex;
    flex-direction: column-reverse;
    padding: 2px 22px;
    border-inline-start: 1px solid rgba(20, 36, 52, .16);
}

.hx-facts div:first-child {
    border-inline-start: 0;
}

.hx-facts dd {
    margin: 0;
    font-size: clamp(26px, 2.4vw, 34px);
    font-weight: 600;
    line-height: 1.3;
}

.hx-facts dt {
    color: var(--slate);
    font-size: 13px;
}

/* ---------- Knowledge ---------- */

.hk {
    padding-block: var(--hp-space);
    background: var(--paper);
    color: var(--ink);
}

.hk-head h2 {
    font-size: clamp(30px, 3.2vw, 46px);
    font-weight: 500;
}

.hk-notes {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
}

.hk-note {
    display: flex;
    flex: 1 1 300px;
    gap: 14px;
    margin: 0;
    padding: 20px 22px;
    border-radius: var(--q-r-md);
    background: #fff;
    color: var(--slate);
}

.hk-note b {
    color: var(--ink);
    font-weight: 600;
}

.hk-quote {
    margin: clamp(72px, 9vw, 128px) 0 0;
    padding: 0;
    text-align: center;
}

.hk-quote p {
    max-width: 19em;
    margin: 0 auto;
    font-size: clamp(28px, 3.6vw, 52px);
    font-weight: 400;
    line-height: 1.5;
    text-wrap: balance;
}

/* ---------- Footer as the closing line ---------- */

.home-page .site-footer .footer-statement p {
    font-size: clamp(36px, 5.6vw, 76px);
}

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

@media (max-width: 1100px) {
    .hx-card-head > :first-child,
    .hx-card-head > :last-child {
        grid-column: 1 / -1;
    }

    .hx-card-head > :last-child {
        max-width: 640px;
    }

    .hx-ai-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .hx-ai-media {
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 860px) {
    .home-page {
        --hx-top0: 64px;
        --hx-sticky: calc(64px + var(--hx-g));
    }
}

/* Laptop heights: keep each card inside one screen. */
@media (min-width: 761px) and (max-height: 860px) {
    .hx-card-inner {
        padding-block: clamp(26px, 4.4vh, 40px);
    }

    .hx-steps {
        margin-block: 32px 24px;
    }

    .hx-steps li {
        padding: 20px;
    }

    .hx-ai-steps li {
        padding-block: 10px;
    }

    .hx-ai-steps p {
        font-size: 13.5px;
    }

    .hx-ai-media {
        aspect-ratio: 4 / 3.8;
    }
}

@media (max-width: 760px) {
    .home-page {
        --hx-g: 8px;
        --hp-space: 80px;
    }

    .hx-hero-copy {
        padding: 24px 20px 64px;
    }

    .hx-hero-copy h1 {
        font-size: clamp(32px, 9.6vw, 42px);
        line-height: 1.42;
    }

    .hx-hero-main > p {
        font-size: 15px;
    }

    .hx-actions,
    .hx-actions .hp-btn {
        width: 100%;
    }

    .hx-actions .hp-btn {
        justify-content: space-between;
    }

    .hx-cue {
        font-size: 12.5px;
    }

    .hx-captions {
        grid-template-columns: minmax(0, 1fr);
    }

    .hx-cap h2 {
        font-size: 26px;
    }

    .hx-cap h3 {
        font-size: 25px;
    }

    .hx-cap .hx-statement {
        font-size: 22px;
    }

    .hp-motion .hx-cap p:not(.hx-step-label, .hx-statement) {
        font-size: 15px;
        line-height: 1.95;
    }

    .hx-layer-tag {
        top: 6%;
        right: 4%;
        gap: 6px;
        padding: 3px 9px 3px 10px;
        font-size: 11.5px;
    }

    .hx-layer-tag b {
        width: 16px;
        height: 16px;
        font-size: 10px;
    }

    .hp-motion .hx-rail li {
        width: 26vw;
        font-size: 12px;
    }

    .hp-motion .hx-spacer {
        height: 400vh;
        height: 400svh;
    }

    .hx-card {
        border-radius: var(--q-r-md);
    }

    .hx-card-inner {
        width: calc(100% - 40px);
        padding-block: 40px;
    }

    .hx-display {
        font-size: 30px;
        line-height: 1.5;
    }

    .hx-title {
        font-size: 27px;
        line-height: 1.6;
    }

    .hx-steps {
        grid-template-columns: minmax(0, 1fr);
    }

    .hx-steps li {
        display: grid;
        grid-template-columns: 34px minmax(0, 1fr);
        column-gap: 14px;
        padding: 18px;
    }

    .hx-steps h3 {
        margin: 2px 0 0;
    }

    .hx-steps p {
        grid-column: 2;
        font-size: 14.5px;
    }

    .hx-ai-media {
        aspect-ratio: 16 / 10;
    }

    .hx-ai-badge {
        right: 10px;
        bottom: 10px;
        font-size: 13px;
    }

    .hx-tile small {
        display: none;
    }

    .hx-facts div {
        min-width: 0;
        flex: 1;
        padding: 2px 10px;
    }

    .hx-facts dt {
        font-size: 12px;
    }

    .home-page .site-footer .footer-statement p {
        font-size: 32px;
        line-height: 1.5;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hx-cue i::after {
        animation: none;
    }
}

.hp-motion .hx-ai-steps li {
    opacity: .45;
    transition: opacity .6s var(--hp-ease);
}

.hp-motion .hx-ai-steps li.is-lit {
    opacity: 1;
}

/* One tag at a time: only the layer being read names itself. */
.hp-motion .hx-layer-tag {
    opacity: 0;
    transition: opacity .4s var(--hp-ease);
}

.hp-motion .hx-layer.is-active .hx-layer-tag {
    opacity: 1;
}

.hp-motion .hx-rig.is-merged .hx-layer-tag {
    opacity: 0;
}

/* The scroll hint promises the layers, so it only shows when they will play. */
.hx-cue {
    display: none;
}

.hp-motion .hx-cue {
    display: flex;
}
