/* =========================================================
   Home page redesign (site root, templates/page-home.php)
   Ported from the "Home Page Redesign" design canvas 2026-10-09; turned
   into side-scrolling full-screen panels 2026-10-16 (assets/js/home-page.js).
   Colors are theme.css tokens only, so both themes work.
   Class names are mh- prefixed to stay clear of Kadence's
   .wrap/.card/.btn/.hero rules (Kadence CSS still loads via wp_head).
   ========================================================= */

.myedh-home {
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.55;
}
.myedh-home h1,
.myedh-home h2,
.myedh-home h3,
.myedh-home p { margin: 0; }
.myedh-home a { text-decoration: none; }

.mh-wrap {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;   /* content above the fixed watermark layer */
}

/* ---------- Header (above the panels) ---------- */
.mh-bar {
    position: relative;
    z-index: 3;   /* above the hero content so the My Leagues dropdown overlaps it */
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
}
.mh-bar .mh-wrap {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.mh-bar img { height: 50px; width: auto; display: block; }
.mh-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 24px;
    font-weight: 600;
    font-size: 15px;
}
.myedh-home .mh-nav a { color: var(--color-text-primary); }
.myedh-home .mh-nav a:hover { color: var(--link); }

/* My Leagues dropdown (logged in), same list as the site header's */
.mh-menu { position: relative; }
.myedh-home .mh-menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--color-text-primary);
    font: inherit;
    cursor: pointer;
}
.myedh-home .mh-menu-toggle:hover,
.mh-menu.is-open .mh-menu-toggle { color: var(--link); }
.mh-menu-arrow { font-size: 11px; transition: transform .15s ease; }
.mh-menu.is-open .mh-menu-arrow { transform: rotate(180deg); }
.mh-menu-list {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 10;
    min-width: 220px;
    max-width: min(320px, calc(100vw - 32px));
    max-height: 60vh;
    overflow-y: auto;
    margin: 8px 0 0;
    padding: 6px 0;
    list-style: none;
    background: var(--header-bg);
    border: 1px solid var(--color-border-medium);
    border-radius: 8px;
    box-shadow: var(--shadow-pop);
}
/* the nav wraps on phones and My Leagues lands near the left edge */
@media (max-width: 640px) {
    .mh-menu-list { left: 0; right: auto; }
}
.mh-menu.is-open .mh-menu-list { display: block; }
@media (hover: hover) {
    .mh-menu:hover .mh-menu-list { display: block; }
    /* invisible strip over the 8px gap so hover survives the move from button to list */
    .mh-menu:hover::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        height: 10px;
    }
}
.myedh-home .mh-menu-list a,
.mh-menu-list span {
    display: block;
    padding: 9px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-primary);
    overflow-wrap: anywhere;
}
.mh-menu-list span { color: var(--color-text-muted); }
/* Active/Upcoming badges, same colors as the profile page's status pills */
.mh-menu-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 0 7px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 11px;
    font-style: normal;
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
    vertical-align: middle;
}
.mh-menu-badge.status-active {
    background: color-mix(in srgb, var(--color-success) 15%, transparent);
    border-color: color-mix(in srgb, var(--color-success) 40%, transparent);
    color: var(--text-c7ee2a8);
}
.mh-menu-badge.status-upcoming {
    background: var(--bg-info-15);
    border-color: var(--line-info-40);
    color: var(--text-info-soft);
}
.mh-menu-list .mh-menu-view-all {
    margin-top: 4px;
    border-top: 1px solid var(--color-border-medium);
}
.myedh-home .mh-menu-list .mh-menu-view-all a { font-size: 13px; font-weight: 600; color: var(--accent-text); }
.myedh-home .mh-menu-list a:hover {
    background: var(--hover-tint);
    color: var(--accent-text);
}

/* ---------- Buttons ---------- */
.myedh-home .mh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 15px;
    box-sizing: border-box;
}
.myedh-home .mh-btn-primary { background: var(--brand-gold); color: var(--color-on-accent); }
.myedh-home .mh-btn-primary:hover { background: var(--color-accent-hover); color: var(--color-on-accent); }
.myedh-home .mh-btn-outline { border: 1px solid var(--outline-border); color: var(--link); }
.myedh-home .mh-btn-outline:hover { background: var(--hover-tint); }
.myedh-home .mh-btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }

/* ---------- Hero ---------- */
.mh-hero {
    position: relative;
    overflow: hidden;
    background: var(--hero-bg);
    border-bottom: 2px solid var(--brand-gold);
}
.mh-hero-body {
    flex: 1 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
    gap: 48px;
    align-items: center;
    align-content: center;
    padding-top: 72px;
    padding-bottom: 80px;
}
.mh-eyebrow {
    margin: 0 0 12px !important;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-text);
}
.myedh-home .mh-display {
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: 0.03em;
    line-height: 1.05;
}
.myedh-home .mh-hero h1 { font-size: clamp(40px, 5vw, 62px); color: var(--hero-title); }
.myedh-home .mh-lede { margin-top: 20px; font-size: 18px; color: var(--color-text-secondary); max-width: 540px; }
.mh-lede strong { color: var(--color-text-primary); font-weight: 600; }
.mh-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.myedh-home .mh-beta {
    margin-top: 18px;
    font-size: 14px;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}
.mh-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-gold); flex: none; }

/* ---------- Cards ---------- */
.mh-card {
    background: var(--color-bg-card);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}
.mh-preview { padding: 18px; }
.mh-preview-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 2px 4px 14px;
}
.myedh-home .mh-preview-head h3 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 22px;
    letter-spacing: 0.03em;
    color: var(--heading-color);
}
.mh-tag { font-size: 12px; color: var(--color-text-muted); }

.myedh-home .mh-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0; border: 0; }
.myedh-home .mh-table th {
    background: var(--thead-bg);
    color: var(--thead-text);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: left;
    padding: 10px 12px;
    border: 0;
}
.myedh-home .mh-table th:first-child { border-radius: 8px 0 0 0; }
.myedh-home .mh-table th:last-child { border-radius: 0 8px 0 0; text-align: right; }
.myedh-home .mh-table td {
    padding: 11px 12px;
    border: 0;
    border-bottom: 1px solid var(--color-border-subtle);
    color: var(--color-text-primary);
}
.myedh-home .mh-table td:last-child { text-align: right; font-weight: 700; }
.myedh-home .mh-table tr:nth-child(even) td { background: var(--color-bg-subtle); }
.myedh-home .mh-table .mh-rank { color: var(--accent-text); font-weight: 700; width: 28px; }
.mh-you {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    border: 1px solid var(--outline-border);
    color: var(--accent-text);
    font-size: 11px;
    font-weight: 700;
}

/* ---------- Content sections ---------- */
.mh-center { text-align: center; }
.myedh-home .hp-panel h2 { font-size: clamp(32px, 3.6vw, 44px); color: var(--heading-color); }
.myedh-home .mh-sub { margin: 12px auto 0; max-width: 620px; font-size: 17px; color: var(--color-text-secondary); }
.myedh-home .mh-sub-left { margin-left: 0; }

.mh-grid3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 20px;
    margin-top: 48px;
}
.mh-feature { padding: 26px 24px; }
.mh-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--hover-tint);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--link);
}
.mh-icon svg { width: 24px; height: 24px; }
.myedh-home .mh-feature h3 { margin: 18px 0 8px; font-size: 18px; color: var(--color-text-primary); }
.myedh-home .mh-feature p { font-size: 15px; color: var(--color-text-secondary); }

.mh-band {
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border-subtle);
    border-bottom: 1px solid var(--color-border-subtle);
}
.mh-split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
    gap: 48px;
    align-items: center;
}
.myedh-home .mh-checks { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.myedh-home .mh-checks li { display: flex; gap: 12px; margin: 0; font-size: 16px; color: var(--color-text-secondary); }
.mh-checks svg { width: 20px; height: 20px; flex: none; margin-top: 3px; color: var(--link); }

.mh-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.mh-kpi { padding: 18px; }
.mh-label { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-muted); }
.mh-num { font-size: 32px; font-weight: 700; color: var(--color-text-primary); line-height: 1.2; margin-top: 4px; }
.mh-note { font-size: 13px; color: var(--color-text-muted); }
.mh-round { padding: 16px; margin-top: 14px; }
.mh-round-head { display: flex; justify-content: space-between; align-items: baseline; }
.mh-round-head strong { font-size: 15px; }
.mh-pods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.mh-pod {
    border: 2px solid var(--brand-gold);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    color: var(--color-text-secondary);
}
.mh-pod b { display: block; color: var(--color-text-primary); font-size: 14px; margin-bottom: 4px; }

.mh-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 20px;
    margin-top: 48px;
}
.mh-step { padding: 28px 24px; position: relative; }
.mh-num-badge {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--brand-gold);
    color: var(--color-on-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 26px;
}
.myedh-home .mh-step h3 { margin: 18px 0 8px; font-size: 19px; color: var(--color-text-primary); }
.myedh-home .mh-step p { font-size: 15px; color: var(--color-text-secondary); }

/* ---------- Final CTA ---------- */
.mh-final {
    position: relative;
    overflow: hidden;
    background: var(--hero-bg);
    border-top: 2px solid var(--brand-gold);
    border-bottom: 2px solid var(--brand-gold);
    text-align: center;
}
.mh-final .mh-wrap { padding-top: 84px; padding-bottom: 84px; }
.myedh-home .mh-final h2 { font-size: clamp(34px, 4vw, 50px); color: var(--hero-title); }
.mh-final .mh-cta { justify-content: center; }

/* ---------- Footer (bottom of the last panel) ---------- */
.mh-footer {
    background: var(--footer-bg);
    border-top: 1px solid var(--color-border-subtle);
    color: var(--color-text-muted);
    font-size: 13px;
}
.mh-footer .mh-wrap {
    padding-top: 36px;
    padding-bottom: 36px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
    text-align: center;
}
.myedh-home .mh-footer a { color: var(--link); }
.mh-footer img { height: 44px; width: auto; }
.myedh-home .mh-legal { max-width: 760px; }

/* =========================================================
   Side-scrolling panels (2026-10-16)

   Animation model: a panel's graphics sit in their "before" state until
   the panel gets .is-shown (added by home-page.js when it becomes the
   current panel), then transition in with per-element delays. .is-shown is
   removed again once the panel is off screen, so returning replays it.
   ========================================================= */

/* ---------- Page shell: one screen, no page scroll ---------- */
html { scroll-behavior: auto; }
html,
body.myedh-home-page { height: 100%; overflow: hidden; }

.hp-root {
    --hp-ease: cubic-bezier(.65, 0, .35, 1);
    --hp-out: cubic-bezier(.22, 1, .36, 1);
    --hp-slide: 700ms;
    --hp-start: 280ms;   /* content waits for most of the slide before animating */
    height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
    height: calc(100svh - var(--wp-admin--admin-bar--height, 0px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.hp-bar { flex: none; }

.hp-viewport {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.hp-track {
    display: flex;
    height: 100%;
    transition: transform var(--hp-slide) var(--hp-ease);
    will-change: transform;
    touch-action: pan-y;   /* vertical scroll stays native; horizontal swipes come to the JS */
}
.hp-track.is-dragging { transition: none; }

.hp-panel {
    position: relative;
    flex: 0 0 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding: 40px 0 96px;   /* bottom room for the dots */
}
/* margin:auto instead of justify-content:center so a panel taller than the
   screen starts at its top and scrolls, instead of clipping its top off. */
.hp-panel > .mh-wrap,
.hp-panel > .hp-final-body { margin-top: auto; margin-bottom: auto; width: 100%; max-width: 1208px; box-sizing: border-box; }
.hp-panel > .hp-final-body { max-width: none; }

/* Keep content clear of the side arrows until the screen is wide enough
   that the 1208px content column leaves room for them anyway. */
@media (min-width: 769px) and (max-width: 1360px) {
    .hp-panel { padding-left: 72px; padding-right: 72px; }
}

.hp-hero,
.hp-final { background: var(--hero-bg); }
.hp-features,
.hp-how { background: var(--color-bg-primary); }
.hp-glance.mh-band,
.hp-panel.mh-hero,
.hp-panel.mh-final { border: 0; }
.hp-final .hp-final-body > .mh-wrap { padding-top: 0; padding-bottom: 0; }
.hp-hero .mh-hero-body { padding-top: 0; padding-bottom: 0; flex: none; }
.hp-final { padding-bottom: 0; }
.hp-final .mh-footer { margin-top: 24px; padding-bottom: 72px; }
.hp-final .mh-footer .mh-wrap { padding-top: 24px; padding-bottom: 8px; gap: 8px; }
.hp-final .mh-footer img { height: 36px; }
.hp-final .mh-footer .mh-legal { font-size: 12px; }

/* ---------- Watermark: one per panel, drifting at its own speed ---------- */
.hp-mark {
    position: absolute;
    right: 7%;
    top: 50%;
    width: 520px;
    height: 330px;
    object-fit: contain;
    opacity: var(--hero-emblem-opacity);
    pointer-events: none;
    z-index: 1;
    transform: translate(var(--hp-mark-x, 0px), -50%) rotate(-6deg);
    transition: transform var(--hp-slide) var(--hp-ease);
}
/* Panels to the left/right of the current one hold their mark further out,
   so while sliding the mark moves faster than the panel - a parallax drift. */
.hp-panel.is-before .hp-mark { --hp-mark-x: -260px; }
.hp-panel.is-after .hp-mark { --hp-mark-x: 260px; }

/* ---------- Arrows (desktop) ---------- */
.myedh-home .hp-arrow {
    position: absolute;
    top: 50%;
    z-index: 6;
    width: 52px;
    height: 52px;
    margin-top: -26px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--card-border);
    background: var(--color-bg-card);
    color: var(--link);
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity .25s ease, transform .2s ease, background .2s ease;
}
.hp-arrow svg { width: 22px; height: 22px; }
.myedh-home .hp-prev { left: 20px; }
.myedh-home .hp-next { right: 20px; }
.myedh-home .hp-arrow:hover { background: var(--brand-gold); color: var(--color-on-accent); border-color: var(--brand-gold); }
.myedh-home .hp-prev:hover { transform: translateX(-3px); }
.myedh-home .hp-next:hover { transform: translateX(3px); }
.myedh-home .hp-arrow:focus-visible { outline: 2px solid var(--brand-gold); outline-offset: 3px; }
.myedh-home .hp-arrow[disabled] { opacity: 0; pointer-events: none; }

/* Nudge on the first visit so the arrow reads as "there's more this way". */
.hp-root.is-hinting .hp-next { animation: hp-nudge 1.4s var(--hp-out) 1.2s 2; }
@keyframes hp-nudge {
    0%, 100% { transform: translateX(0); }
    40% { transform: translateX(8px); }
}

/* ---------- Dots ---------- */
.hp-dots {
    position: absolute;
    left: 50%;
    bottom: 24px;
    z-index: 6;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--color-bg-card);
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
}
.myedh-home .hp-dot {
    position: relative;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hp-dot::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--color-text-muted);
    opacity: .45;
    transition: width .35s var(--hp-out), background .25s ease, opacity .25s ease;
}
.hp-dot:hover::before { opacity: .9; }
.hp-dot[aria-current="true"] { width: 44px; }
.hp-dot[aria-current="true"]::before { width: 30px; background: var(--brand-gold); opacity: 1; }
.myedh-home .hp-dot { transition: width .35s var(--hp-out); }
.myedh-home .hp-dot:focus-visible { outline: 2px solid var(--brand-gold); outline-offset: 2px; border-radius: 999px; }

/* Label above the dot on hover/focus (pointer devices). */
.hp-dot-label {
    position: absolute;
    bottom: calc(100% + 14px);
    left: 50%;
    transform: translate(-50%, 4px);
    white-space: nowrap;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--color-bg-card);
    border: 1px solid var(--card-border);
    color: var(--color-text-primary);
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease, transform .15s ease;
}
.hp-dot:hover .hp-dot-label,
.hp-dot:focus-visible .hp-dot-label { opacity: 1; transform: translate(-50%, 0); }

/* =========================================================
   Panel animations
   ========================================================= */

/* Shared "rise in" for headings, copy and cards. --i staggers within a group. */
.hp-panel .hp-rise {
    opacity: 0;
    transform: translateY(22px);
}
.hp-panel.is-shown .hp-rise {
    opacity: 1;
    transform: none;
    transition: opacity .6s var(--hp-out), transform .6s var(--hp-out);
    transition-delay: calc(var(--hp-start) + var(--i, 0) * 90ms);
}

/* ---- 1. Hero: copy rises, scoreboard slides in, rows deal in, points count up ---- */
.hp-hero .mh-preview {
    opacity: 0;
    transform: translateX(60px) rotate(2deg);
}
.hp-hero.is-shown .mh-preview {
    opacity: 1;
    transform: none;
    transition: opacity .7s var(--hp-out), transform .8s var(--hp-out);
    transition-delay: calc(var(--hp-start) + 250ms);
}
.hp-hero .mh-table tbody tr {
    opacity: 0;
    transform: translateX(24px);
}
.hp-hero.is-shown .mh-table tbody tr {
    opacity: 1;
    transform: none;
    transition: opacity .45s var(--hp-out), transform .45s var(--hp-out);
    transition-delay: calc(var(--hp-start) + 650ms + var(--i, 0) * 110ms);
}
/* Your row glows once the table has filled in. */
.hp-hero.is-shown .mh-table tbody tr.hp-you td {
    animation: hp-glow 1.6s ease calc(var(--hp-start) + 1.9s) 1;
}
@keyframes hp-glow {
    0%, 100% { box-shadow: none; }
    35% { box-shadow: inset 0 0 0 999px var(--hover-tint); }
}
.hp-hero.is-shown .mh-dot { animation: hp-pulse 2s ease-in-out calc(var(--hp-start) + 1s) infinite; }
@keyframes hp-pulse {
    0%, 100% { box-shadow: 0 0 0 0 var(--brand-gold); }
    50% { box-shadow: 0 0 0 6px transparent; }
}

/* ---- 2. Features: cards pop up in turn, icons draw themselves ---- */
.hp-features .mh-feature {
    opacity: 0;
    transform: translateY(30px) scale(.97);
}
.hp-features.is-shown .mh-feature {
    opacity: 1;
    transform: none;
    transition: opacity .55s var(--hp-out), transform .55s var(--hp-out);
    transition-delay: calc(var(--hp-start) + 200ms + var(--i, 0) * 90ms);
}
/* Line icons draw on: the JS sets pathLength="1" on every shape, so a
   dash of 1 is exactly the whole outline whatever its real length. */
.hp-panel .hp-draw * {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
}
.hp-panel.is-shown .hp-draw * {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s ease-in-out;
    transition-delay: calc(var(--hp-start) + 450ms + var(--i, 0) * 90ms);
}

/* ---- 3. At a glance: checks tick, KPIs count, pods deal into the round ---- */
.hp-glance .mh-checks li { opacity: 0; transform: translateX(-16px); }
.hp-glance.is-shown .mh-checks li {
    opacity: 1;
    transform: none;
    transition: opacity .5s var(--hp-out), transform .5s var(--hp-out);
    transition-delay: calc(var(--hp-start) + 350ms + var(--i, 0) * 160ms);
}
.hp-glance .mh-kpi,
.hp-glance .mh-round { opacity: 0; transform: translateY(26px); }
.hp-glance.is-shown .mh-kpi,
.hp-glance.is-shown .mh-round {
    opacity: 1;
    transform: none;
    transition: opacity .55s var(--hp-out), transform .55s var(--hp-out);
    transition-delay: calc(var(--hp-start) + 250ms + var(--i, 0) * 130ms);
}
.hp-glance .mh-pod { opacity: 0; transform: translateY(14px) scale(.96); }
.hp-glance.is-shown .mh-pod {
    opacity: 1;
    transform: none;
    transition: opacity .45s var(--hp-out), transform .45s var(--hp-out);
    transition-delay: calc(var(--hp-start) + 900ms + var(--i, 0) * 160ms);
}

/* ---- 4. How it works: a gold line runs through the steps as they land ---- */
.hp-how .mh-steps { position: relative; }
/* Runs from the first badge's centre to the last one's: badges sit 24px in
   from each card's left edge (52px wide), cards are a 3-column grid, 20px gap. */
.hp-how .mh-steps::before {
    content: "";
    position: absolute;
    top: 53px;   /* badge centre: step padding 28 + half the 52px badge */
    left: 50px;
    right: calc((100% - 40px) / 3 - 50px);
    height: 2px;
    background: var(--brand-gold);
    transform: scaleX(0);
    transform-origin: left center;
    z-index: 2;
    pointer-events: none;
    opacity: .7;
}
.hp-how.is-shown .mh-steps::before {
    transform: scaleX(1);
    transition: transform 1.4s var(--hp-ease) calc(var(--hp-start) + 300ms);
}
.hp-how .mh-step { opacity: 0; transform: translateY(30px); }
.hp-how.is-shown .mh-step {
    opacity: 1;
    transform: none;
    transition: opacity .55s var(--hp-out), transform .55s var(--hp-out);
    transition-delay: calc(var(--hp-start) + 200ms + var(--i, 0) * 380ms);
}
.hp-how .mh-num-badge { position: relative; z-index: 3; transform: scale(.4); }
.hp-how.is-shown .mh-num-badge {
    transform: scale(1);
    transition: transform .55s cubic-bezier(.34, 1.56, .64, 1);
    transition-delay: calc(var(--hp-start) + 350ms + var(--i, 0) * 380ms);
}
/* The line only makes sense with the three steps in one row. */
@media (max-width: 1000px) {
    .hp-how .mh-steps::before { display: none; }
}

/* ---- 5. Final: headline settles in, buttons follow ---- */
.hp-final h2.hp-rise { transform: scale(.92); }
.hp-final.is-shown h2.hp-rise { transform: none; transition-duration: .9s; }

/* ---------- Small screens: swipe + dots, no arrows ---------- */
@media (max-width: 768px) {
    .myedh-home .hp-arrow { display: none; }
    .hp-panel { padding: 28px 0 88px; }
    .hp-dots { bottom: 16px; }
    .hp-dot-label { display: none; }
    .hp-mark { width: 280px; height: 178px; right: -72px; }
    .hp-panel.is-before .hp-mark { --hp-mark-x: -120px; }
    .hp-panel.is-after .hp-mark { --hp-mark-x: 120px; }
}

/* ---------- Reduced motion: instant jumps, everything already in place ---------- */
@media (prefers-reduced-motion: reduce) {
    .hp-track,
    .hp-mark { transition: none; }
    .hp-panel .hp-rise,
    .hp-panel .mh-preview,
    .hp-panel .mh-table tbody tr,
    .hp-panel .mh-feature,
    .hp-panel .mh-checks li,
    .hp-panel .mh-kpi,
    .hp-panel .mh-round,
    .hp-panel .mh-pod,
    .hp-panel .mh-step,
    .hp-panel .mh-num-badge { opacity: 1 !important; transform: none !important; transition: none !important; }
    .hp-panel .hp-draw * { stroke-dashoffset: 0; transition: none !important; }
    .hp-how .mh-steps::before { transform: scaleX(1); transition: none !important; }
    .hp-panel *,
    .hp-root.is-hinting .hp-next { animation: none !important; }
}
