/* ========================================
   The home page in F3 «Ink & Wash», layout V2 «Panorama» (T58, sales#66): every block is centred on white
   paper, and the watercolour picture of the block runs the full width of the window under its words. Tokens,
   buttons, header and footer: style.css. The pictures: assets/images/v2/ (the assets of T57, sales#65).
   ======================================== */

.home {
    overflow-x: clip;
}

.home .section {
    padding: var(--s8) 0;
    text-align: center;
    isolation: isolate;
}

@media (min-width: 960px) {
    .home .section { padding: var(--s9) 0; }
}

.home-h2 {
    margin-bottom: var(--s5);
    font-size: clamp(2rem, 4.6vw, 3.25rem);
    line-height: 1.1;
    letter-spacing: -0.025em;
}

.home-lead {
    max-width: 40rem;
    margin: 0 auto var(--s6);
    font-size: var(--fs-19);
    line-height: 1.55;
    color: var(--t2);
}

.home-lead a,
.home-trust a,
.home-next-steps a {
    color: var(--brand-blue-ink);
    text-decoration: underline;
    text-decoration-color: rgba(29, 78, 216, 0.35);
    text-underline-offset: 3px;
}

.home-lead a:hover,
.home-trust a:hover,
.home-next-steps a:hover {
    text-decoration-color: currentColor;
}

.home-note {
    margin-top: var(--s4);
    font-size: var(--fs-14);
    color: var(--t3);
}

.home-cta-row {
    display: flex;
    justify-content: center;
    margin-top: var(--s6);
}

/* a picture under the words of its block: the full width of the window, up to its own 1600 px; its top is
   white sky, so it rises under the words a little and the next block starts on its white bottom */
.home-panorama {
    display: block;
    position: relative;
    z-index: -1;
    width: 100%;
    max-width: 1600px;
    height: auto;
    margin: calc(-1 * clamp(16px, 12vw, 190px)) auto calc(-1 * var(--s8));
}

@media (min-width: 960px) {
    .home-panorama { margin-bottom: calc(-1 * var(--s9)); }
}

/* T65: on phones a panorama is shown larger, 120% of the window, cut at its white sides (.home clips them) */
@media (max-width: 759px) {
    .home-panorama {
        width: 120%;
        max-width: none;
        margin-left: -10%;
    }
}

/* ---------- first screen ---------- */
.home-hero {
    position: relative;
    isolation: isolate;
    padding-top: var(--s7);
    text-align: center;
}

@media (min-width: 960px) {
    .home-hero { padding-top: var(--s8); }
}

.home-hero-grid {
    position: relative;
    z-index: 1;
    max-width: 46rem;
    margin: 0 auto;
}

/* on wide screens the panorama rises under the words, as in V2; a soft white of paper keeps them legible */
@media (min-width: 960px) {
    .home-hero-grid::before {
        content: "";
        position: absolute;
        z-index: -1;
        inset: -8% -14%;
        background: radial-gradient(closest-side, rgba(255, 255, 255, 0.94) 62%, rgba(255, 255, 255, 0));
    }
}

.home-hero-title {
    font-size: clamp(2.5rem, 6.4vw, 4.75rem);
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.home-hero-sub {
    max-width: 40rem;
    margin: var(--s5) auto 0;
    font-size: var(--fs-19);
    line-height: 1.55;
    color: var(--t2);
}

.home-trust {
    margin-top: var(--s4);
    font-size: var(--fs-14);
    font-weight: 600;
    color: var(--t1);
}

.home-hero-buttons {
    display: flex;
    justify-content: center;
    margin-top: var(--s6);
}

.home-geo {
    max-width: 34rem;
    margin: var(--s4) auto 0;
    font-size: var(--fs-13);
    line-height: 1.5;
    color: var(--t3);
}

.home-hero-grid > * {
    animation: home-rise 0.8s var(--ease) both;
}

.home-hero-grid > :nth-child(2) { animation-delay: 0.06s; }
.home-hero-grid > :nth-child(3) { animation-delay: 0.12s; }
.home-hero-grid > :nth-child(4) { animation-delay: 0.18s; }
.home-hero-grid > :nth-child(5) { animation-delay: 0.24s; }

@keyframes home-rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

/* the panorama of the first screen (s01-hero): its three circles are the stops of the route, the names are
   set under them, at the circles' own places in the picture */
.flow {
    position: relative;
    max-width: 1600px;
    margin: calc(-1 * clamp(8px, 7vw, 120px)) auto 0;
}

@media (min-width: 960px) {
    .flow { margin-top: calc(-1 * min(24vw, 380px)); }
}

.flow-scene {
    display: block;
    width: 100%;
    height: auto;
}

.flow-nodes {
    list-style: none;
}

.flow-node {
    position: absolute;
    top: 83%;
    transform: translateX(-50%);
    white-space: nowrap;
}

.flow-node:nth-child(1) { left: 19.6%; }
.flow-node:nth-child(2) { left: 50%; }
.flow-node:nth-child(3) { left: 80.2%; }

.flow-node span {
    display: block;
    padding: 0 0.35em;
    font-family: var(--heading);
    font-size: clamp(0.875rem, 1.9vw, 1.6rem);
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.72);
    border-radius: var(--r-s);
}

.flow-reverse {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--s2);
    margin: var(--s4) 20px 0;
    font-size: var(--fs-14);
    color: var(--t2);
}

@media (min-width: 960px) {
    /* the bottom of the panorama is white paper: the line stands just under the names of the stops */
    .flow-reverse { margin-top: calc(-1 * min(7vw, 110px)); }
}

.flow-reverse::before {
    content: "⇄";
    font-size: var(--fs-19);
    color: var(--brand-blue-dark);
}

/* T65 (sales#73): below 960 px the names of the stops stand under the circles of the picture itself. Their top
   was 83% of the whole figure, that is the picture AND the Reverse line under it; on a phone that line runs onto
   two lines, the figure grows, and the names fell ~50 px under the circles, onto the Reverse line. Here the list
   of names is a layer of the picture's own box (its ratio), so 84% is just under the circles at every width.
   Wide screens keep the placing of T58. */
@media (max-width: 959px) {
    .flow-nodes {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        aspect-ratio: 1600 / 1067;
    }

    .flow-node { top: 84%; }

    /* the bottom of the picture is white paper: the Reverse line comes up under the names, as on wide screens */
    .flow-reverse { margin-top: calc(-1 * 4vw); }
}

/* on phones the picture is shown larger: 120% of the window, cut at its white sides (the content of the
   pictures of T57 stands within their middle 85%); the three stops move with it, (x − 50%) × 1.2 + 50%, and the
   outer names keep 3.4rem of their centre off the edge of the window */
@media (max-width: 759px) {
    .flow {
        overflow: clip;
    }

    .flow-scene {
        width: 120%;
        max-width: none;
        margin-left: -10%;
    }

    .flow-nodes { aspect-ratio: 1600 / 1280.4; }

    .flow-node:nth-child(1) { left: max(13.52%, 3.4rem); }
    .flow-node:nth-child(3) { left: min(86.24%, 100% - 3.4rem); }

    /* the Reverse line runs onto two lines here: its arrow goes with the words, not alone at the left edge, the
       two lines are balanced (no lone last word), and the line stands ~30 px under the names at every width.
       Under the names the picture keeps 16% of its height, 0.8 × 1.2 × 16% = 12.8% of the window, of white
       paper; 48px − 12.8vw takes back all of it but ~30 px (0 at 375, −42 px at 700) */
    .flow-reverse {
        display: block;
        margin-top: calc(48px - 12.8vw);
        text-align: center;
        text-wrap: balance;
    }

    .flow-reverse::before {
        margin-right: var(--s2);
        vertical-align: -0.05em;
    }
}

/* ---------- What you can do: two cards, each with its route ---------- */
.home-actions {
    list-style: none;
    display: grid;
    gap: var(--s5);
    max-width: 68rem;
    margin: var(--s6) auto 0;
}

@media (min-width: 760px) {
    .home-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.home-actions li {
    display: flex;
    flex-direction: column;
    padding: var(--s4) var(--s4) var(--s6);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-l);
    box-shadow: var(--sh);
}

.home-actions-scene {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: var(--s4);
}

.home-actions p {
    max-width: 26rem;
    margin: 0 auto;
    padding: 0 var(--s2);
    font-size: var(--fs-16);
    line-height: 1.6;
}

.home-actions strong {
    font-weight: 700;
    color: var(--ink);
}

/* T65: on phones the picture of a card runs to the card's own edges (the card's padding was taking a tenth of
   its width); the picture is not cut, its route runs from edge to edge */
@media (max-width: 759px) {
    .home-actions li {
        padding: 0 0 var(--s6);
        overflow: hidden;
    }

    .home-actions p {
        padding: 0 var(--s4);
    }
}

/* ---------- currencies and networks: chips in ink, the two kinds of rails under them ---------- */
.currency-rows {
    display: grid;
    gap: var(--s5);
    max-width: 52rem;
    margin: 0 auto;
}

.currency-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: var(--s2);
    color: var(--t1);
    line-height: 1.5;
}

.currency-kind {
    flex-basis: 100%;
    font-size: var(--fs-12);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink);
}

.chip {
    display: inline-block;
    padding: 0.3rem 0.9rem;
    font-size: var(--fs-14);
    font-weight: 500;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--ink);
    border-radius: var(--r-pill);
}

.chip-sep {
    display: none;
}

/* ---------- who we are ---------- */
.home-about-grid {
    display: grid;
    justify-items: center;
}

.home-about .home-lead {
    font-size: var(--fs-16);
    font-weight: 600;
    color: var(--t1);
}

.home-company-card {
    list-style: none;
    display: grid;
    gap: var(--s3);
    max-width: 40rem;
    text-align: left;
}

.home-company-card li {
    position: relative;
    padding-left: var(--s6);
    font-size: var(--fs-16);
    line-height: 1.55;
    color: var(--t2);
}

.home-company-card li::before,
.home-risk-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.8em;
    width: 14px;
    height: 2px;
    background: var(--aqua);
    border-radius: 2px;
}

.kv-k {
    font-weight: 700;
    color: var(--t1);
}

.home-panorama-about {
    max-width: 1200px;
    margin-top: calc(-1 * clamp(0px, 4vw, 64px));
}

/* ---------- risks: a framed card ---------- */
.home-risks-grid {
    display: flex;
    justify-content: center;
}

.home-risks-grid > div {
    max-width: 44rem;
}

.home-risk-list {
    list-style: none;
    display: grid;
    gap: var(--s3);
    padding: var(--s6);
    text-align: left;
    background: var(--bg);
    border: 1px solid var(--ink);
    border-radius: var(--r-l);
}

.home-risk-list li {
    position: relative;
    padding-left: var(--s6);
    line-height: 1.55;
    color: var(--t1);
}

.home-review {
    margin-top: var(--s5);
    font-size: var(--fs-14);
    line-height: 1.6;
    color: var(--t2);
}

/* ---------- onboarding: five steps, each with its drawing (the icons of T57); on wide screens on one line
   of ink, a dot under each step ---------- */
.home-steps {
    list-style: none;
    position: relative;
    display: grid;
    gap: var(--s4);
    max-width: 68rem;
    margin: 0 auto;
}

.home-steps li {
    position: relative;
    display: grid;
    grid-template-columns: 72px 1fr;
    align-items: center;
    gap: var(--s4);
    font-size: var(--fs-16);
    font-weight: 600;
    line-height: 1.4;
    text-align: left;
    color: var(--t1);
}

.home-steps li::before {
    content: "";
    width: 72px;
    height: 72px;
    background: no-repeat center / contain;
}

.home-steps li:nth-child(1)::before { background-image: url("../images/v2/ic-ob-register-128.webp"); }
.home-steps li:nth-child(2)::before { background-image: url("../images/v2/ic-ob-identity-128.webp"); }
.home-steps li:nth-child(3)::before { background-image: url("../images/v2/ic-ob-compliance-128.webp"); }
.home-steps li:nth-child(4)::before { background-image: url("../images/v2/ic-ob-agreement-128.webp"); }
.home-steps li:nth-child(5)::before { background-image: url("../images/v2/ic-ob-activated-128.webp"); }

@media (min-width: 960px) {
    .home-steps {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .home-steps::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 143px;
        height: 2px;
        background: var(--ink);
        border-radius: 2px;
    }

    .home-steps li {
        grid-template-columns: none;
        grid-template-rows: 128px 32px auto;
        justify-items: center;
        align-items: start;
        gap: 0;
        text-align: center;
    }

    .home-steps li::before {
        width: 128px;
        height: 128px;
    }

    .home-steps li::after {
        content: "";
        grid-row: 2;
        align-self: center;
        width: 12px;
        height: 12px;
        background: var(--bg);
        border: 2px solid var(--ink);
        border-radius: 50%;
    }

    .home-steps li:nth-child(1)::before { background-image: url("../images/v2/ic-ob-register-256.webp"); }
    .home-steps li:nth-child(2)::before { background-image: url("../images/v2/ic-ob-identity-256.webp"); }
    .home-steps li:nth-child(3)::before { background-image: url("../images/v2/ic-ob-compliance-256.webp"); }
    .home-steps li:nth-child(4)::before { background-image: url("../images/v2/ic-ob-agreement-256.webp"); }
    .home-steps li:nth-child(5)::before { background-image: url("../images/v2/ic-ob-activated-256.webp"); }

    /* the step that is the contract: its dot in the aqua of F3 */
    .home-steps .home-step-contract::after {
        background: var(--aqua);
        border-color: var(--aqua);
    }
}

.home-onboarding .home-note {
    margin-top: var(--s6);
}

/* ---------- next step ---------- */
.home-next-inner {
    max-width: 40rem;
    margin: 0 auto;
}

.home-next-steps {
    list-style: none;
    display: grid;
    gap: var(--s2);
    font-size: var(--fs-19);
    color: var(--t1);
}

.home-next-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--s3);
    margin-top: var(--s6);
}

/* ---------- motion off on request ---------- */
@media (prefers-reduced-motion: reduce) {
    .home-hero-grid > * { animation: none; }
}
