/* ==========================================================================
   Home page (front-page.php). Classes are prefixed h- to stay clear of
   the legacy section styles in style.css.
   ========================================================================== */

.h-block { padding-block: clamp(64px, 9vw, 112px); }
.h-block-tight { padding-top: 0; }

.h-head { max-width: 720px; }
.h-head h2 { margin-top: 14px; color: var(--ink); }
.h-head p { margin-top: 16px; font-size: 1.1rem; line-height: 1.65; color: var(--ink-2); }

.h-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 24px;
    font-weight: 600;
    color: var(--teal-ink);
    text-decoration: none;
}
.h-link svg { width: 16px; height: 16px; transition: transform 0.2s ease; }
.h-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.h-link:hover svg { transform: translateX(3px); }

/* ---------- Hero ---------- */
.h-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, var(--arasync-mist) 0%, var(--arasync-white) 100%);
}

.h-orbit {
    position: absolute;
    right: -180px;
    top: -140px;
    width: 720px;
    height: 720px;
    border: 2px solid var(--teal-soft);
    border-radius: 50%;
    clip-path: polygon(0 0, 100% 0, 100% 72%, 0 72%);
    pointer-events: none;
}

.h-hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 56px;
    align-items: center;
    padding-block: clamp(48px, 7vw, 88px) clamp(64px, 8vw, 96px);
}

.h-hero h1 {
    margin-top: 18px;
    font-size: clamp(2.3rem, 5.2vw, 4rem);
    line-height: 1.06;
    color: var(--ink);
}

.h-hero h1 em { font-style: normal; color: var(--arasync-primary); }

.h-lede {
    margin-top: 22px;
    max-width: 34em;
    font-size: clamp(1.05rem, 1.6vw, 1.2rem);
    line-height: 1.65;
    color: var(--ink-2);
}

.h-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.h-actions .btn svg { width: 18px; height: 18px; }

.h-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    font-size: 0.9rem;
    color: var(--ink-3);
}
.h-note svg { flex: none; width: 18px; height: 18px; color: var(--arasync-primary); }

/* ---------- Programs strip ---------- */
.h-programs { border-block: 1px solid var(--arasync-line); background: var(--arasync-white); }

.h-programs-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 28px; padding-block: 22px; }
.h-programs-inner > p { margin: 0; font-size: 0.9rem; font-weight: 500; color: var(--ink-3); }

.h-prog-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.h-prog-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-radius: 999px;
    background: var(--arasync-mist);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--ink);
    text-decoration: none;
    transition: background 0.2s ease;
}
.h-prog-list a:hover { background: var(--teal-soft); }
.h-prog-list .code-tag { color: var(--teal-ink); }

/* ---------- Flow (a real sequence, so numbered) ---------- */
.h-flow {
    counter-reset: step;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    margin: 48px 0 0;
    padding: 0;
}

.h-flow li { position: relative; padding-right: 20px; }

.h-flow li::before {
    counter-increment: step;
    content: counter(step);
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 2px solid var(--arasync-primary);
    border-radius: 50%;
    background: var(--arasync-white);
    font: 700 1rem/1 var(--font-heading);
    color: var(--teal-ink);
}

.h-flow li::after {
    content: "";
    position: absolute;
    left: 40px;
    right: 0;
    top: 19px;
    height: 2px;
    background: var(--teal-soft);
}
.h-flow li:last-child::after { display: none; }
.has-motion .h-flow.is-scrubbed li::after { transform: scaleX(var(--seg, 1)); transform-origin: left center; }

.h-flow h3 { margin-top: 20px; font-size: 1.15rem; }
.h-flow h3 a { color: var(--ink); text-decoration: none; }
.h-flow h3 a:hover { color: var(--teal-ink); text-decoration: underline; text-underline-offset: 3px; }
.h-flow p { margin-top: 8px; font-size: 0.95rem; line-height: 1.6; color: var(--ink-2); }
.h-flow .code-tag { display: inline-block; margin-top: 12px; color: var(--ink-3); }

/* ---------- One record around the person: the Solid Core ring closes (home-motion.js) ---------- */
.h-ring {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: clamp(24px, 4vw, 56px);
    align-items: center;
    margin-top: 40px;
    padding: clamp(20px, 3vw, 40px);
    border: 1px solid var(--arasync-line);
    border-radius: 20px;
    background: var(--arasync-white);
}
.h-ring { transition: background-color 0.6s ease, border-color 0.6s ease; }
.h-ring-copy .eyebrow { display: block; transition: color 0.6s ease; }
.h-ring-copy p { transition: color 0.6s ease; }
.h-ring.is-dark { background: var(--arasync-navy); border-color: var(--arasync-navy); }
.h-ring.is-dark .eyebrow { color: #9FCBC7; }
.h-ring.is-dark .h-ring-copy p { color: #fff; }
.h-ring.is-dark .h-ring-svg .h-ring-label { fill: #A9BAC6; }
.h-ring.is-dark .h-ring-svg .h-ring-person,
.h-ring.is-dark .h-ring-svg .h-ring-caption { fill: #8FD3CC; }
.h-ring-copy p {
    max-width: 30em;
    margin: 14px 0 0;
    font: 500 clamp(1.15rem, 2vw, 1.45rem)/1.4 var(--font-heading);
    letter-spacing: -0.01em;
    color: var(--ink);
}
/* ---------- Product moments: Document, Verify, Bill (tabs, home-motion.js) ---------- */
.h-moments { border-top: 1px solid var(--arasync-line); }

.h-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 36px;
    padding: 6px;
    border: 1px solid var(--arasync-line);
    border-radius: 14px;
    background: var(--arasync-mist);
    width: fit-content;
    max-width: 100%;
}
.h-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 18px;
    overflow: hidden;
    border: 0;
    border-radius: 10px;
    background: transparent;
    font: 600 0.95rem/1 var(--font-heading);
    color: var(--ink-2);
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.h-tab:hover { color: var(--ink); }
.h-tab[aria-selected="true"] { background: var(--arasync-white); color: var(--ink); box-shadow: 0 2px 10px -4px rgba(30, 43, 58, 0.25); }
.h-tab-step { font: 500 0.74rem/1 var(--font-mono); color: var(--teal-ink); }
/* Fills while a tab is on screen and about to hand over to the next one. */
.h-tab-progress {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 4px;
    height: 2px;
    border-radius: 2px;
    background: var(--arasync-primary);
    transform: scaleX(0);
    transform-origin: left center;
}
.h-tab.is-timing .h-tab-progress { transform: scaleX(1); transition: transform var(--h-tab-ms, 12000ms) linear; }

.h-tabpanel {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 56px;
    align-items: center;
    margin-top: 28px;
}
.h-tabpanel[hidden] { display: none; }
.h-tabpanel.is-entering { animation: h-panel-in 0.5s var(--ease-out, ease); }
@keyframes h-panel-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}
.h-moment-copy h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.2; color: var(--ink); }
.h-moment-copy > p { margin-top: 14px; font-size: 1.02rem; line-height: 1.65; color: var(--ink-2); }
.h-moment-points { display: grid; gap: 10px; list-style: none; margin: 22px 0 0; padding: 0; }
.h-moment-points li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 0.98rem; line-height: 1.5; color: var(--ink-2); }
.h-moment-points svg { width: 18px; height: 18px; margin-top: 3px; color: var(--arasync-primary); }

/* Wide screens: one row of moments that slides while the section holds. */
.h-moments.is-sliding { overflow-x: clip; }
.h-moments.is-sliding .h-track { display: flex; gap: 72px; width: max-content; }
.h-moments.is-sliding .h-tabpanel {
    flex: none;
    width: min(1136px, calc(100vw - 64px));
    transition: opacity 0.3s ease;
}

/* ---------- Safeguards ---------- */
.h-safe { background: var(--arasync-mist); }

.h-safe-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }

.h-human {
    padding: 18px 20px;
    border-left: 3px solid var(--arasync-primary);
    border-radius: 0 12px 12px 0;
    background: var(--arasync-white);
    font-size: 0.95rem !important;
}
.h-human b { color: var(--ink); }

.h-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }

.h-check {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--arasync-line);
    border-radius: 14px;
    background: var(--arasync-white);
}
.h-check h3 { font-size: 1.05rem; }
.h-check p { margin-top: 6px; font-size: 0.95rem; line-height: 1.6; color: var(--ink-2); }

.h-ic {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--teal-soft);
    color: var(--teal-ink);
}
.h-ic svg { width: 22px; height: 22px; }

/* ---------- Operator story ---------- */
.h-story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }

.h-quote {
    margin-top: 16px;
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 2.8vw, 2.1rem);
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.015em;
    color: var(--ink);
}
.h-quote span { color: var(--arasync-primary); }

.h-facts { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-top: 1px solid var(--arasync-line); }
.h-facts > div { padding: 22px 20px 22px 0; border-bottom: 1px solid var(--arasync-line); }
.h-facts > div:nth-child(odd) { border-right: 1px solid var(--arasync-line); }
.h-facts > div:nth-child(even) { padding-left: 20px; }
.h-facts dt { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 600; color: var(--ink); }
.h-facts dd { margin: 4px 0 0; font-size: 0.9rem; line-height: 1.55; color: var(--ink-2); }

.h-proof { display: flex; flex-wrap: wrap; gap: 20px 48px; margin-top: 28px; }
.h-proof > div { display: grid; gap: 6px; max-width: 14em; }
.h-proof b { font: 500 clamp(2.2rem, 4vw, 3rem)/1 var(--font-heading); letter-spacing: -0.04em; color: var(--arasync-primary); }
.h-proof span { font-size: 0.9rem; line-height: 1.45; color: var(--ink-2); }
.h-proof-note { margin: 12px 0 0; font-size: 0.78rem; color: var(--ink-3); }

/* ---------- Field + office ---------- */
.h-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 48px; }

.h-card { padding: 28px; border: 1px solid var(--arasync-line); border-radius: 18px; background: var(--arasync-white); }
.h-card .eyebrow { display: block; }
.h-card h3 { margin-top: 12px; font-size: 1.4rem; }
.h-card ul { list-style: none; display: grid; gap: 12px; margin: 20px 0 0; padding: 0; }
.h-card li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 0.95rem; line-height: 1.5; color: var(--ink-2); }
.h-card li svg { width: 18px; height: 18px; margin-top: 2px; color: var(--arasync-primary); }

.h-card-dark { background: var(--arasync-navy); border-color: var(--arasync-navy); }
.h-card-dark h3 { color: #fff; }
.h-card-dark li { color: #C3D1DA; }
.h-card-dark .eyebrow { color: #9FCBC7; }
.h-card-dark li svg { color: #8FD3CC; }

/* ---------- Connections ---------- */
.h-conn { border-top: 1px solid var(--arasync-line); }
.h-conn-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: center; }
.h-conn-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; list-style: none; margin: 0; padding: 0; }
.h-conn-list li { padding: 18px; border: 1px solid var(--arasync-line); border-radius: 12px; }
.h-conn-list b { display: block; font-family: var(--font-heading); font-size: 1.05rem; color: var(--ink); }
.h-conn-list span { font-size: 0.85rem; line-height: 1.5; color: var(--ink-3); }

/* ---------- Security ---------- */
.h-security { background: var(--arasync-mist); }
.h-sec-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; list-style: none; margin: 40px 0 0; padding: 0; }
.h-sec-row li { padding-top: 16px; border-top: 2px solid var(--arasync-navy); }
.h-sec-row b { display: block; font-family: var(--font-heading); font-size: 1.05rem; color: var(--ink); }
.h-sec-row span { display: block; margin-top: 6px; font-size: 0.9rem; line-height: 1.55; color: var(--ink-2); }

/* ---------- CTA ---------- */
.h-cta { position: relative; overflow: hidden; background: var(--arasync-navy); color: #fff; }
.h-cta::before {
    content: "";
    position: absolute;
    left: -160px;
    bottom: -260px;
    width: 560px;
    height: 560px;
    border: 2px solid rgba(47, 125, 122, 0.5);
    border-radius: 50%;
    pointer-events: none;
}
.h-cta-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
    padding-block: clamp(64px, 8vw, 88px);
}
.h-cta-logo { height: 50px; width: auto; }
.h-cta h2 { margin-top: 28px; color: #fff; font-size: clamp(2rem, 4vw, 3rem); }
.h-cta p { margin-top: 16px; max-width: 32em; font-size: 1.1rem; line-height: 1.6; color: #C3D1DA; }
.h-cta-actions { display: flex; flex-direction: column; gap: 12px; }
.h-cta-actions small { text-align: center; font-size: 0.82rem; color: #9FB2BF; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .h-hero-grid,
    .h-safe-grid,
    .h-story-grid,
    .h-conn-grid,
    .h-cta-inner,
    .h-tabpanel,
    .h-ring { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .h-orbit { width: 460px; height: 460px; right: -220px; top: -120px; }
    .h-duo { grid-template-columns: 1fr; }
    .h-sec-row { grid-template-columns: 1fr 1fr; }

    .h-flow { grid-template-columns: 1fr; gap: 28px; }
    .h-flow li { padding: 0 0 0 60px; }
    .h-flow li::before { position: absolute; left: 0; top: 0; }
    .h-flow li::after { left: 19px; right: auto; top: 40px; bottom: -28px; width: 2px; height: auto; }
    .h-flow h3 { margin-top: 6px; }
}

@media (max-width: 560px) {
    .h-actions .btn { flex: 1 1 100%; }
    .h-conn-list,
    .h-sec-row,
    .h-facts { grid-template-columns: 1fr; }
    .h-facts > div:nth-child(odd) { border-right: 0; }
    .h-facts > div:nth-child(even) { padding-left: 0; }
    .h-card { padding: 22px; }
}

@media (max-width: 960px) {
    .has-motion .h-flow.is-scrubbed li::after { transform: scaleY(var(--seg, 1)); transform-origin: center top; }
}

@media (prefers-reduced-motion: reduce) {
    .h-link svg { transition: none; }
    .h-tab-progress,
    .h-tabpanel { animation: none !important; transition: none !important; }
}
