/* ========================================
   Home page in direction B «Точность» (fintwinpay#88, T44): report.md §3 B and §4 of the T39 critique,
   prototype concept-b/. The blocks and their words are those of e8a46a36: first screen, what you can do,
   currencies, who we are, risks, onboarding, next step. Tokens, buttons, header and footer: style.css.
   ======================================== */

.home-h2 {
    font-size: 34px;
    line-height: 1.05;
    letter-spacing: -0.035em;
    font-weight: 800;
    margin-bottom: var(--s5);
}

@media (min-width: 960px) {
    .home-h2 { font-size: var(--fs-48); margin-bottom: var(--s6); }
}

.home-lead {
    max-width: 44rem;
    font-size: var(--fs-16);
    line-height: 1.65;
    color: var(--t2);
}

@media (min-width: 640px) {
    .home-lead { font-size: var(--fs-19); line-height: 1.55; }
}

.home-lead 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-next-steps a:hover {
    text-decoration-color: currentColor;
}

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

.home-cta-row {
    margin-top: var(--s6);
}

/* sections on --bg-2 get the hairline of B above them */
.home .bg-light {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

/* ---------- first screen ---------- */
.home-hero {
    position: relative;
    overflow: hidden;
    padding: var(--s6) 0 var(--s8);
    background: radial-gradient(700px 420px at 85% 10%, var(--brand-blue-tint) 0%, rgba(234, 241, 254, 0) 70%), var(--bg);
}

/* a 48 px grid that fades out downwards */
.home-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(#eef2f7 1px, transparent 1px), linear-gradient(90deg, #eef2f7 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%);
    mask-image: linear-gradient(180deg, #000, transparent 85%);
    opacity: 0.7;
    pointer-events: none;
}

.home-hero .container {
    position: relative;
}

/* phone order (T41): title, subtitle, button, geography; then the registrations, then the window */
.home-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "title"
        "sub"
        "buttons"
        "geo"
        "trust"
        "flow";
}

.home-hero-title { grid-area: title; }
.home-hero-sub { grid-area: sub; }
.home-trust { grid-area: trust; }
.home-hero-buttons { grid-area: buttons; }
.home-hero .home-geo { grid-area: geo; }
.flow { grid-area: flow; }

/* wide: the registrations as a badge above the title, the title across the grid, then 5/7 —
   text on the left, the window of the operation on the right (report.md §3 B) */
@media (min-width: 960px) {
    .home-hero {
        padding: var(--s7) 0 var(--s9);
    }
    .home-hero-grid {
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        grid-template-rows: auto auto auto auto auto 1fr;
        grid-template-areas:
            "trust   trust"
            "title   title"
            "sub     flow"
            "buttons flow"
            "geo     flow"
            ".       flow";
        column-gap: var(--s8);
    }
}

.home-hero-title {
    margin: var(--s2) 0 0;
    font-size: 46px;
    line-height: 1.02;
    letter-spacing: -0.04em;
    font-weight: 800;
    color: var(--t1);
}

.home-hero-sub {
    margin-top: var(--s5);
    font-size: var(--fs-16);
    line-height: 1.55;
    color: var(--t2);
}

@media (min-width: 640px) {
    .home-hero-sub { font-size: var(--fs-19); }
}

/* the registrations: a badge of trust with a shield and no tick (T39 v2, verdict of the sales lens) */
.home-trust {
    justify-self: start;
    position: relative;
    max-width: 100%;
    margin-top: var(--s6);
    padding: 6px 14px 6px 30px;
    font-size: var(--fs-12);
    line-height: 1.5;
    font-weight: 600;
    color: var(--t2);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-m);
    box-shadow: var(--sh);
}

.home-trust::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 7px;
    width: 14px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 18' fill='none'%3E%3Cpath d='M8 1 2 3.5V8c0 4 2.6 7.3 6 8.6 3.4-1.3 6-4.6 6-8.6V3.5L8 1Z' fill='%233B75EF' fill-opacity='.14' stroke='%232563EB' stroke-width='1.4'/%3E%3C/svg%3E") center / contain no-repeat;
}

.home-trust a {
    color: var(--t1);
    text-decoration: underline;
    text-decoration-color: var(--line-2);
    text-underline-offset: 2px;
}

.home-trust a:hover {
    color: var(--brand-blue-ink);
    text-decoration-color: currentColor;
}

@media (min-width: 960px) {
    .home-trust {
        margin-top: 0;
        border-radius: var(--r-pill);
    }
    .home-hero-title {
        margin-top: var(--s5);
        font-size: var(--fs-84);
        line-height: 0.98;
        letter-spacing: -0.045em;
    }
    .home-hero-sub {
        margin-top: var(--s7);
    }
}

.home-hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s3);
    margin-top: var(--s6);
}

@media (max-width: 639px) {
    .home-hero-buttons .btn { flex: 1 1 100%; }
}

.home-geo {
    margin-top: var(--s3);
    font-size: var(--fs-13);
    line-height: 1.55;
    color: var(--t3);
}

/* ---------- the window of the operation: the money path as a product, set in code ---------- */
.flow {
    position: relative;
    margin-top: var(--s7);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-l);
    box-shadow: var(--sh-window);
    overflow: hidden;
}

@media (min-width: 960px) {
    .flow { margin-top: var(--s7); align-self: start; }
}

.flow-bar {
    display: flex;
    gap: 6px;
    padding: var(--s4) var(--s5);
    border-bottom: 1px solid var(--line);
    background: var(--bg-2);
}

.flow-bar i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--line-2);
}

/* a tile of the window: one object of the client deck, white to light blue */
.flow-tile {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    flex: none;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(180deg, #fff, #F3F7FE);
    border: 1px solid var(--line);
    box-shadow: var(--sh);
}

.flow-tile img {
    width: 46px;
    height: 46px;
    object-fit: contain;
}

/* phone: the nodes from top to bottom along a vertical rail */
.flow-nodes {
    position: relative;
    list-style: none;
    display: grid;
    gap: var(--s4);
    padding: var(--s5);
}

.flow-nodes::before {
    content: "";
    position: absolute;
    left: calc(var(--s5) + 31px);
    top: calc(var(--s5) + 32px);
    bottom: calc(var(--s5) + 32px);
    width: 2px;
    background: linear-gradient(180deg, var(--line-2), var(--brand-blue));
}

.flow-node {
    display: flex;
    align-items: center;
    gap: var(--s4);
    font-size: var(--fs-14);
    font-weight: 700;
    line-height: 1.3;
    color: var(--t1);
}

/* the Reverse band: the one dark surface of the first screen */
.flow-reverse {
    margin: 0 var(--s5) var(--s5);
    padding: var(--s4);
    border-radius: var(--r-m);
    background: var(--ink);
    color: #fff;
    font-size: var(--fs-14);
    font-weight: 700;
    line-height: 1.5;
}

.flow-reverse::before {
    content: "⇄";
    margin-right: var(--s2);
    color: var(--brand-blue-light);
}

/* wide: left to right, a point runs along the rail */
@media (min-width: 640px) {
    .flow-nodes {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        padding: var(--s6) var(--s5) var(--s5);
    }
    .flow-nodes::before {
        left: 16.67%;
        right: 16.67%;
        top: calc(var(--s6) + 52px);
        bottom: auto;
        width: auto;
        height: 2px;
        background: linear-gradient(90deg, var(--line-2), var(--brand-blue));
    }
    .flow-nodes::after {
        content: "";
        position: absolute;
        top: calc(var(--s6) + 49px);
        left: 16.67%;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--brand-blue);
        box-shadow: 0 0 0 4px rgba(59, 117, 239, 0.18);
        animation: flow-run 3.6s var(--ease) infinite;
    }
    .flow-node {
        flex-direction: column;
        text-align: center;
        gap: var(--s3);
    }
    .flow-node .flow-tile {
        width: 104px;
        height: 104px;
        border-radius: 24px;
    }
    .flow-node .flow-tile img {
        width: 78px;
        height: 78px;
    }
}

@keyframes flow-run {
    0% { left: 16.67%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { left: calc(83.33% - 8px); opacity: 0; }
}

/* the first screen comes in with a step: badge, title, text, window */
.home-hero-grid > * {
    animation: home-in 0.7s var(--ease) both;
}

.home-hero-title { animation-delay: 0.08s; }
.home-hero-sub, .home-hero-buttons, .home-hero .home-geo { animation-delay: 0.16s; }
.flow { animation-delay: 0.24s; }

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

/* ---------- what you can do: the two directions as cards with their path ---------- */
.home-actions {
    list-style: none;
    display: grid;
    gap: var(--s4);
}

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

.home-actions li {
    display: flex;
    flex-direction: column;
    gap: var(--s5);
    padding: var(--s6);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-l);
    box-shadow: var(--sh);
    transition: border-color 0.25s, box-shadow 0.25s var(--ease);
}

.home-actions li:hover {
    border-color: #bfd2fb;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 24px 48px -20px rgba(37, 99, 235, 0.25);
}

.home-actions-scheme {
    display: flex;
    align-items: center;
}

.home-actions-scheme .flow-tile {
    width: 72px;
    height: 72px;
    border-radius: 18px;
}

.home-actions-scheme .flow-tile img {
    width: 54px;
    height: 54px;
}

.home-actions-rail {
    position: relative;
    flex: 0 1 96px;
    height: 2px;
    margin: 0 -1px;
    background: linear-gradient(90deg, var(--line-2), var(--brand-blue));
}

.home-actions-rail::after {
    content: "";
    position: absolute;
    right: -1px;
    top: -4px;
    border: 5px solid transparent;
    border-left: 7px solid var(--brand-blue);
    border-right: 0;
}

.home-actions p {
    font-size: var(--fs-16);
    line-height: 1.6;
    color: var(--t2);
}

@media (min-width: 960px) {
    .home-actions p { font-size: var(--fs-19); line-height: 1.55; }
}

.home-actions strong {
    font-weight: 800;
    color: var(--t1);
}

/* ---------- currencies and networks: chips, not form fields ---------- */
.currency-rows {
    display: grid;
    gap: var(--s4);
}

@media (min-width: 960px) {
    .currency-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.currency-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s2);
    padding: var(--s5);
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--r-l);
    color: var(--t1);
}

.currency-kind {
    flex: 1 1 100%;
    margin-bottom: var(--s1);
    font-size: var(--fs-12);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--t2);
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    font-size: var(--fs-14);
    font-weight: 700;
    line-height: 1.4;
    color: var(--t1);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
}

/* a sentence with chips in it (sales#57, T50): one run of text, the chips inline */
.currency-line {
    line-height: 2.6;
}

/* the separators of the approved words stay in the text and are not drawn: the chips separate */
.chip-sep,
.kv-sep {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- who we are: the formula with its registry links, the company card ---------- */
.home-about-grid {
    display: grid;
    gap: var(--s6);
}

@media (min-width: 960px) {
    .home-about-grid {
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        gap: var(--s8);
        align-items: start;
    }
}

.home-company-card {
    list-style: none;
    display: grid;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-l);
    box-shadow: var(--sh);
    padding: var(--s2) var(--s6);
}

.home-company-card li {
    display: grid;
    gap: var(--s1);
    padding: var(--s4) 0;
}

.home-company-card li + li {
    border-top: 1px solid var(--line);
}

.kv-k {
    font-size: var(--fs-12);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--t2);
}

.kv-v {
    font-size: var(--fs-16);
    font-weight: 600;
    line-height: 1.5;
    color: var(--t1);
}

/* ---------- risks: plain statements on white, the review in a note; no warning object ---------- */
.home-risks-grid {
    display: grid;
    gap: var(--s5);
}

@media (min-width: 960px) {
    .home-risks-grid > div {
        display: grid;
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        column-gap: var(--s8);
        align-items: start;
    }
    .home-risks-grid .home-h2 { grid-row: 1 / span 2; }
}

.home-risk-list {
    list-style: none;
    border-top: 1px solid var(--line);
}

.home-risk-list li {
    position: relative;
    padding: var(--s4) 0 var(--s4) var(--s6);
    border-bottom: 1px solid var(--line);
    font-size: var(--fs-16);
    line-height: 1.6;
    color: var(--t1);
}

.home-risk-list li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: calc(var(--s4) + 9px);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1.5px solid var(--t3);
}

.home-review {
    margin-top: var(--s5);
    padding: var(--s4) var(--s5);
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--r-m);
    font-size: var(--fs-14);
    line-height: 1.6;
    color: var(--t2);
}

/* ---------- onboarding: the five steps as a stepper — across at 960+, down on phones ---------- */
.home-steps {
    position: relative;
    list-style: none;
    counter-reset: step;
    display: grid;
    gap: var(--s3);
    margin-top: var(--s6);
}

.home-steps::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 16px;
    bottom: 16px;
    width: 2px;
    background: var(--line-2);
}

.home-steps li {
    counter-increment: step;
    position: relative;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: var(--s4);
    align-items: center;
    font-size: var(--fs-16);
    font-weight: 600;
    line-height: 1.45;
    color: var(--t1);
}

.home-steps li::before {
    content: counter(step);
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: var(--fs-13);
    font-weight: 800;
    color: #fff;
    background: var(--brand-blue-ink);
    box-shadow: 0 0 0 4px var(--bg-2);
}

/* the contract step: the dark ink and the heaviest weight */
.home-step-contract {
    font-weight: 800 !important;
}

.home-step-contract::before {
    background: var(--ink) !important;
    box-shadow: 0 0 0 4px var(--bg-2), 0 0 0 5px var(--brand-blue-light) !important;
}

@media (min-width: 960px) {
    .home-steps {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: var(--s5);
        padding: var(--s6);
        background: var(--bg);
        border: 1px solid var(--line);
        border-radius: var(--r-l);
        box-shadow: var(--sh);
    }
    .home-steps::before {
        left: calc(var(--s6) + 16px);
        right: calc(var(--s6) + 16px);
        top: calc(var(--s6) + 15px);
        bottom: auto;
        width: auto;
        height: 2px;
        background: linear-gradient(90deg, var(--line-2), var(--brand-blue));
    }
    .home-steps li {
        grid-template-columns: none;
        align-items: start;
        gap: var(--s3);
    }
    .home-steps li::before {
        box-shadow: 0 0 0 6px var(--bg);
    }
    .home-step-contract::before {
        box-shadow: 0 0 0 6px var(--bg), 0 0 0 7px var(--brand-blue-light) !important;
    }
}

/* ---------- next step: a white card with the two actions ---------- */
.home-next-inner {
    padding: var(--s6) var(--s5);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-l);
    box-shadow: var(--sh);
}

@media (min-width: 960px) {
    .home-next-inner {
        display: grid;
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        column-gap: var(--s8);
        align-items: start;
        padding: var(--s7);
    }
    .home-next-inner .home-h2 { grid-row: 1 / span 3; margin-bottom: 0; }
}

.home-next-steps {
    padding-left: 1.25rem;
    font-size: var(--fs-16);
    line-height: 1.8;
    color: var(--t1);
}

.home-next .home-geo {
    margin-top: var(--s4);
}

.home-next-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s3);
    margin-top: var(--s5);
}

@media (max-width: 639px) {
    .home-next-buttons .btn { flex: 1 1 0; padding: 0 var(--s4); }
}

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