/* Design tokens: the Rialyz design system ("industry", in the design artifact), with the
   values of the app's own stylesheet (internal/web/static/app.css), set larger for a
   public site. Retune the site here. */
:root {
    --font-body: "Barlow", system-ui, sans-serif;
    --font-heading: "Barlow Condensed", system-ui, sans-serif;

    --color-bg: #f2f2f3;
    --color-ink: #1d1f20;
    /* Each text tone keeps 4.5:1 on its ground (WCAG AA), the same values as the app. */
    --color-muted: rgba(29, 31, 32, 0.7);
    --color-faint: rgba(29, 31, 32, 0.63);
    --color-line: rgba(29, 31, 32, 0.18);
    --color-line-strong: rgba(29, 31, 32, 0.24);
    --color-tint: #e8f1ec;
    --color-paper: #f7f6f2;

    --color-accent: #1b5843;
    --color-accent-deep: #003828;
    --color-accent-wash: rgba(27, 88, 67, 0.06);
    --color-mint: #8fc9ae;
    --color-on-accent: #f2f2f3;
    --color-on-accent-muted: rgba(242, 242, 243, 0.75);
    --color-on-accent-faint: rgba(242, 242, 243, 0.58);
    --color-on-accent-line: rgba(242, 242, 243, 0.22);

    --mark-size: 11px;
    --mark-half: 5px;

    --color-danger: #8a2a1e;
    --color-danger-bg: rgba(150, 40, 30, 0.08);
    --color-danger-line: rgba(150, 40, 30, 0.45);

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 10px;
    --space-4: 12px;
    --space-5: 14px;
    --space-6: 16px;
    --space-7: 18px;
    --space-8: 20px;
    --space-9: 24px;
    --space-10: 28px;
    --space-11: 32px;
    --space-12: 36px;
    --space-13: 48px;
    --space-14: 56px;
    --space-15: 64px;
    --space-16: 72px;
    --gutter: 32px;
    --section-pad: 112px;

    --text-tag: 12px;
    --text-label: 13px;
    --text-small: 15px;
    --text-doc: 15px;
    --text-text: 17px;
    --text-body: 18px;
    --text-lede: 20px;
    --text-hero-lede: 22px;
    --text-faq: 24px;
    --text-card: 28px;
    --text-compare: 30px;
    --text-ask: 48px;
    --text-fact: 48px;
    --text-month: 56px;
    --text-step: 72px;
    --text-need: 88px;
    --text-title: clamp(44px, 6vw, 80px);
    --text-hero: clamp(60px, 11vw, 168px);
    --text-fee: clamp(88px, 12vw, 152px);
    --text-brand: 21px;
    --text-mark: 17px;
    --text-button: 17px;
    --text-nav: 15px;

    --track-kicker: 0.16em;
    --track-label: 0.14em;
    --track-button: 0.08em;
    --track-brand: 0.09em;

    --leading: 1.6;
    --leading-title: 0.92;
    --leading-hero: 0.86;
    --leading-card: 1.05;
    --measure: 44ch;
    --measure-short: 28ch;

    --rule: 2px;
    --kicker-rule: 28px;
    --bullet: 10px;
    --control-height: 52px;
    --topbar-height: 72px;
    --brand-mark: 30px;
    --faq-mark: 32px;
    --otp-width: 46px;
    --otp-height: 56px;
    --shadow-offset: 12px;
    --lift: -3px;
    --card-min: 260px;
    --page-width: 1180px;
    --article-width: 760px;
    --speed: 0.15s;
    --month-loop: 8s;
    --flow-loop: 18s;
    --steps-loop: 9s;
    --reveal: 0.6s;
}

@font-face {
    font-family: "Barlow";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/barlow-400-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Barlow";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/barlow-400-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Barlow";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("fonts/barlow-600-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Barlow";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("fonts/barlow-600-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Barlow Condensed";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("fonts/barlow-condensed-600-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Barlow Condensed";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("fonts/barlow-condensed-600-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Barlow Condensed";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("fonts/barlow-condensed-700-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Barlow Condensed";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("fonts/barlow-condensed-700-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ── base ── */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--topbar-height);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-ink);
    font-family: var(--font-body);
    font-size: var(--text-body);
    line-height: var(--leading);
}

h1,
h2,
h3 {
    margin: 0;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
}

p {
    margin: 0;
}

a {
    color: inherit;
}

:focus-visible {
    outline: var(--rule) solid var(--color-accent);
    outline-offset: 3px;
}

/* Every band of the page holds its content to the same width. */
.topbar-row,
.hero-body,
.section-body,
.footer-row {
    max-width: var(--page-width);
    margin: 0 auto;
    padding-inline: var(--gutter);
}

.skip-link {
    position: absolute;
    top: 0;
    left: -9999px;
    z-index: 40;
    padding: var(--space-3) var(--space-5);
    background: var(--color-ink);
    color: var(--color-bg);
}

.skip-link:focus {
    left: 0;
}

/* A short rule in front, so every section opens on the same mark. */
.kicker {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    color: var(--color-faint);
    font-size: var(--text-tag);
    font-weight: 600;
    letter-spacing: var(--track-kicker);
    text-transform: uppercase;
}

.kicker::before {
    content: "";
    flex: none;
    width: var(--kicker-rule);
    height: var(--rule);
    background: var(--color-accent);
}

/* ── buttons ── */

.button,
.button-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    min-height: var(--control-height);
    padding: 0 var(--space-10);
    border: 1px solid var(--color-accent-deep);
    border-radius: 0;
    background: var(--color-accent);
    color: var(--color-on-accent);
    font-family: var(--font-heading);
    font-size: var(--text-button);
    font-weight: 600;
    letter-spacing: var(--track-button);
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--speed);
}

.button:hover {
    background: var(--color-accent-deep);
}

.button-ghost {
    border-color: var(--color-line-strong);
    background: transparent;
    color: var(--color-ink);
}

.button-ghost:hover {
    border-color: var(--color-ink);
    background: var(--color-paper);
}

.button-arrow::after {
    content: "→";
    font-family: var(--font-body);
    transition: transform var(--speed);
}

.button-arrow:hover::after {
    transform: translateX(var(--space-1));
}

.button-block {
    width: 100%;
}

.button:disabled {
    border-color: var(--color-line);
    background: transparent;
    color: var(--color-faint);
    cursor: not-allowed;
}

/* The form disables its button while it sends (site.js): the spinner is what tells
   the user the press was taken, not lost. */
.button[aria-busy="true"]::after {
    content: "";
    width: var(--space-5);
    height: var(--space-5);
    border: var(--rule) solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: button-spin 700ms linear infinite;
}

@keyframes button-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .button[aria-busy="true"]::after {
        animation: none;
    }
}

/* ── frame: a bordered surface with the blueprint marks ── */

.frame {
    --frame-mark: var(--color-faint);
    position: relative;
    border: 1px solid var(--color-line-strong);
    background: var(--color-paper);
}

/* A cross straddles each corner: one overlay inset by half a mark, eight gradient
   layers, so the marks cost no empty elements in the markup. */
.frame::before {
    content: "";
    position: absolute;
    inset: calc(var(--mark-half) * -1 - 1px);
    pointer-events: none;
    background-repeat: no-repeat;
    background-image:
        linear-gradient(var(--frame-mark) 0 0),
        linear-gradient(var(--frame-mark) 0 0),
        linear-gradient(var(--frame-mark) 0 0),
        linear-gradient(var(--frame-mark) 0 0),
        linear-gradient(var(--frame-mark) 0 0),
        linear-gradient(var(--frame-mark) 0 0),
        linear-gradient(var(--frame-mark) 0 0),
        linear-gradient(var(--frame-mark) 0 0);
    background-size:
        1px var(--mark-size),
        var(--mark-size) 1px,
        1px var(--mark-size),
        var(--mark-size) 1px,
        1px var(--mark-size),
        var(--mark-size) 1px,
        1px var(--mark-size),
        var(--mark-size) 1px;
    background-position:
        left var(--mark-half) top 0,
        left 0 top var(--mark-half),
        right var(--mark-half) top 0,
        right 0 top var(--mark-half),
        left var(--mark-half) bottom 0,
        left 0 bottom var(--mark-half),
        right var(--mark-half) bottom 0,
        right 0 bottom var(--mark-half);
}

/* ── top bar ── */

.topbar-row {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    min-height: var(--topbar-height);
}

.brand {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    flex: none;
    width: var(--brand-mark);
    height: var(--brand-mark);
    border: 1px solid var(--color-accent-deep);
    color: var(--color-accent-deep);
    font-family: var(--font-heading);
    font-size: var(--text-mark);
    font-weight: 700;
}

.brand-name {
    font-family: var(--font-heading);
    font-size: var(--text-brand);
    font-weight: 700;
    letter-spacing: var(--track-brand);
    text-transform: uppercase;
}

.topbar-nav {
    display: flex;
    gap: var(--space-10);
    margin-left: auto;
}

.topbar-link {
    padding: var(--space-2) 0;
    border-bottom: var(--rule) solid transparent;
    color: var(--color-muted);
    font-family: var(--font-heading);
    font-size: var(--text-nav);
    font-weight: 600;
    letter-spacing: var(--track-button);
    text-decoration: none;
    text-transform: uppercase;
}

.topbar-link:hover,
.topbar-link[aria-current="page"] {
    border-bottom-color: var(--color-accent);
    color: var(--color-ink);
}

/* ── hero: light and plain, the title takes the full width ── */

.hero {
    position: relative;
    overflow: hidden;
}

.hero-body {
    position: relative;
    padding-top: var(--space-16);
}

/* The background: a pale blueprint grid, and small blocks of money that slide along
   three of its lines. It fades out to the left, so the title stays clean. */
.hero-flow {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 15%, #000 70%);
    mask-image: linear-gradient(90deg, transparent 15%, #000 70%);
}

.hero-flow-grid {
    stroke: var(--color-line);
    stroke-opacity: 0.5;
}

.hero-flow-lane {
    stroke: var(--color-accent);
    stroke-opacity: 0.18;
}

.hero-flow-coin {
    fill: var(--color-accent);
    fill-opacity: 0.35;
    animation: hero-flow var(--flow-loop) linear infinite;
}

/* Each block has its own speed and start, so the flow never looks like a pattern. */
.hero-flow-coin-1 {
    animation-duration: 16s;
}

.hero-flow-coin-2 {
    animation-duration: 16s;
    animation-delay: -8s;
}

.hero-flow-coin-3 {
    animation-duration: 22s;
    animation-delay: -5s;
}

.hero-flow-coin-4 {
    animation-duration: 22s;
    animation-delay: -16s;
}

.hero-flow-coin-5 {
    animation-duration: 19s;
    animation-delay: -11s;
}

.hero-flow-coin-6 {
    animation-duration: 19s;
    animation-delay: -2s;
}

@keyframes hero-flow {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(1300px);
    }
}

/* Without motion, the blocks stay where they are along their lines. */
@media (prefers-reduced-motion: reduce) {
    .hero-flow-coin {
        animation-play-state: paused;
    }
}

.hero-title {
    margin-top: var(--space-10);
    font-size: var(--text-hero);
    line-height: var(--leading-hero);
}

/* The title breaks on purpose: "Your pay," then "before payday." */
.hero-accent {
    display: block;
    color: var(--color-accent);
    font-style: normal;
}

.hero-lede {
    max-width: var(--measure);
    margin-top: var(--space-13);
    color: var(--color-muted);
    font-size: var(--text-hero-lede);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin-top: var(--space-11);
}

/* The three facts, in one thin row between two rules. */
.facts {
    display: flex;
    flex-wrap: wrap;
    margin: var(--space-16) 0 0;
    border-top: 1px solid var(--color-line-strong);
    border-bottom: 1px solid var(--color-line-strong);
}

.facts-item {
    display: flex;
    flex: 1 1 var(--card-min);
    flex-direction: row-reverse;
    justify-content: flex-end;
    align-items: baseline;
    gap: var(--space-6);
    padding: var(--space-9) 0;
}

.facts-item + .facts-item {
    padding-left: var(--space-11);
    border-left: 1px solid var(--color-line-strong);
}

.facts-value {
    margin: 0;
    color: var(--color-accent);
    font-family: var(--font-heading);
    font-size: var(--text-fact);
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

.facts-label {
    color: var(--color-faint);
    font-size: var(--text-label);
    font-weight: 600;
    letter-spacing: var(--track-label);
    text-transform: uppercase;
}

/* ── sections: the grounds alternate, so each one reads as its own block ── */

.section {
    border-top: 1px solid var(--color-line);
}

.section-body {
    padding-block: var(--section-pad);
}

.section-tint {
    background: var(--color-tint);
}

.section-paper {
    background: var(--color-paper);
}

.section-deep {
    border-top: 0;
    background: var(--color-accent-deep);
    color: var(--color-on-accent);
}

.section-deep .kicker {
    color: var(--color-on-accent-faint);
}

.section-deep .kicker::before {
    background: var(--color-mint);
}

.section-title {
    max-width: 16ch;
    margin-top: var(--space-7);
    font-size: var(--text-title);
    line-height: var(--leading-title);
}

.section-lede {
    max-width: var(--measure);
    margin-top: var(--space-9);
    color: var(--color-muted);
    font-size: var(--text-lede);
}

/* ── why Rialyz: three situations, the day number is the headline ── */

.need {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-10);
    margin-top: var(--space-14);
}

.need-card {
    flex: 1 1 var(--card-min);
    padding: var(--space-10) var(--space-10) var(--space-11);
    transition: border-color var(--speed), transform var(--speed);
}

.need-card:hover {
    border-color: var(--color-accent);
    transform: translateY(var(--lift));
}

.need-day {
    display: flex;
    align-items: baseline;
    gap: var(--space-3);
    padding-bottom: var(--space-8);
    border-bottom: 1px solid var(--color-line);
    color: var(--color-accent);
    font-family: var(--font-heading);
    font-size: var(--text-lede);
    font-weight: 700;
    letter-spacing: var(--track-button);
    line-height: 1;
    text-transform: uppercase;
}

.need-number {
    color: var(--color-accent-deep);
    font-size: var(--text-need);
    letter-spacing: 0;
    line-height: 0.8;
}

.need-number {
    display: inline-block;
    overflow: hidden;
    padding-block: 0.08em;
}

.need-roll {
    display: inline-block;
}

/* The cards rise one after the other when the section comes into view, and each day
   number rolls into place like a calendar page: the month goes by, the bills come in
   turn. site.js sets data-reveal on the page and data-shown on the block: without
   JavaScript, or with reduced motion, nothing is hidden. The rise uses `translate`,
   so it adds to the hover lift instead of replacing it. */
[data-reveal] .need-card {
    opacity: 0;
    translate: 0 var(--space-13);
    transition: opacity var(--reveal) ease-out, translate var(--reveal) ease-out, border-color var(--speed), transform var(--speed);
}

[data-reveal] .need-roll {
    opacity: 0;
    transform: translateY(100%);
    transition: opacity var(--reveal) ease-out, transform var(--reveal) ease-out;
    transition-delay: 0.2s;
}

[data-reveal] .need-card:nth-child(2) {
    transition-delay: 0.15s, 0.15s, 0s, 0s;
}

[data-reveal] .need-card:nth-child(2) .need-roll {
    transition-delay: 0.35s;
}

[data-reveal] .need-card:nth-child(3) {
    transition-delay: 0.3s, 0.3s, 0s, 0s;
}

[data-reveal] .need-card:nth-child(3) .need-roll {
    transition-delay: 0.5s;
}

[data-reveal] .need[data-shown] .need-card {
    opacity: 1;
    translate: none;
}

[data-reveal] .need[data-shown] .need-roll {
    opacity: 1;
    transform: none;
}

.need-title {
    margin-top: var(--space-9);
    font-size: var(--text-card);
    line-height: var(--leading-card);
}

.need-text {
    margin-top: var(--space-4);
    color: var(--color-muted);
    font-size: var(--text-text);
}

/* ── your options: without on paper, with on deep green ── */

.compare {
    display: flex;
    flex-wrap: wrap;
    margin-top: var(--space-14);
}

.compare-without,
.compare-with {
    flex: 1 1 var(--card-min);
    padding: var(--space-12);
}

.compare-without {
    border: 1px solid var(--color-line-strong);
    background: var(--color-paper);
}

.compare-with {
    border: 1px solid var(--color-accent-deep);
    background: var(--color-accent-deep);
    color: var(--color-on-accent);
}

.compare-title {
    font-size: var(--text-compare);
}

.compare-with .compare-title {
    color: var(--color-mint);
}

.compare-list {
    margin: var(--space-8) 0 0;
    padding: 0;
    list-style: none;
}

.compare-item {
    display: flex;
    gap: var(--space-5);
    padding: var(--space-6) 0;
    border-top: 1px solid var(--color-line);
    color: var(--color-muted);
    font-size: var(--text-text);
}

.compare-item::before {
    content: "";
    flex: none;
    width: var(--bullet);
    height: var(--bullet);
    margin-top: var(--space-2);
    border: 1px solid var(--color-faint);
}

.compare-lead {
    color: var(--color-ink);
    font-weight: 600;
}

.compare-with .compare-item {
    border-top-color: var(--color-on-accent-line);
    color: var(--color-on-accent-muted);
}

.compare-with .compare-item::before {
    border-color: var(--color-mint);
    background: var(--color-mint);
}

.compare-with .compare-lead {
    color: var(--color-on-accent);
}

/* ── your month: the month bar, then the three moments under their pins ── */

/* One loop tells the whole story. A "Today" needle runs along the month and the bar
   fills behind it. On day 14, 40.000 drops into the account. On payday the salary
   comes in, and the advance goes back. The coordinates are the SVG's own (1000
   wide): day 14 sits at 450, payday at the right end. */
.month-bar {
    display: block;
    width: 100%;
    height: auto;
    margin-top: var(--space-16);
    overflow: visible;
}

.month-hatch-line {
    fill: var(--color-accent);
}

.month-ticks {
    stroke: var(--color-line-strong);
}

.month-earned {
    fill: url(#month-hatch);
    stroke: var(--color-accent);
    transform-box: fill-box;
    transform-origin: left;
    animation: month-fill var(--month-loop) linear infinite;
}

.month-rail {
    fill: var(--color-ink);
}

.month-pin {
    fill: var(--color-bg);
    stroke: var(--color-ink);
    stroke-width: var(--rule);
}

.month-pin-ask {
    fill: var(--color-accent);
    stroke: var(--color-accent-deep);
}

.month-pin-payday {
    fill: var(--color-accent-deep);
    stroke: var(--color-accent-deep);
}

.month-account {
    fill: var(--color-paper);
    stroke: var(--color-line-strong);
}

.month-account-label {
    fill: var(--color-faint);
    font-size: var(--text-label);
    font-weight: 600;
    letter-spacing: var(--track-label);
    text-transform: uppercase;
}

.month-amount {
    fill: var(--color-accent);
    font-family: var(--font-heading);
    font-size: var(--text-lede);
    font-weight: 700;
    letter-spacing: var(--track-button);
    animation: month-amount var(--month-loop) linear infinite;
}

.month-today {
    animation: month-today var(--month-loop) linear infinite;
}

.month-today-tag,
.month-today-needle {
    fill: var(--color-ink);
}

.month-today-label {
    fill: var(--color-bg);
    font-family: var(--font-heading);
    font-size: var(--text-label);
    font-weight: 600;
    letter-spacing: var(--track-button);
    text-anchor: middle;
    text-transform: uppercase;
}

.month-money {
    animation: month-money var(--month-loop) ease-in-out infinite;
}

.month-money-block {
    fill: var(--color-accent);
    stroke: var(--color-accent-deep);
}

.month-salary {
    animation: month-salary var(--month-loop) ease-in-out infinite;
}

.month-salary-block {
    fill: var(--color-accent-deep);
    stroke: var(--color-accent-deep);
}

.month-money-label {
    fill: var(--color-on-accent);
    font-family: var(--font-heading);
    font-size: var(--text-text);
    font-weight: 600;
    letter-spacing: var(--track-button);
    text-anchor: middle;
    text-transform: uppercase;
}

@keyframes month-fill {
    0% {
        transform: scaleX(0);
    }

    45%,
    55% {
        transform: scaleX(0.45);
    }

    85%,
    100% {
        transform: scaleX(1);
    }
}

@keyframes month-today {
    0% {
        transform: translateX(0);
    }

    45%,
    55% {
        transform: translateX(450px);
    }

    85%,
    100% {
        transform: translateX(1000px);
    }
}

/* The advance: it leaves the day 14 pin, lands in the account, then on payday goes
   back to the bank. */
@keyframes month-money {
    0%,
    44% {
        opacity: 0;
        transform: translate(0, 0);
    }

    47% {
        opacity: 1;
        transform: translate(0, 0);
    }

    55%,
    89% {
        opacity: 1;
        transform: translate(-65px, 62px);
    }

    96% {
        opacity: 1;
        transform: translate(540px, 0);
    }

    98%,
    100% {
        opacity: 0;
        transform: translate(540px, 0);
    }
}

/* The amount shows while the advance sits in the account. */
@keyframes month-amount {
    0%,
    54% {
        opacity: 0;
    }

    57%,
    83% {
        opacity: 1;
    }

    85%,
    100% {
        opacity: 0;
    }
}

/* The salary comes in from the right on payday, and stays to the end of the loop. */
@keyframes month-salary {
    0%,
    84% {
        opacity: 0;
        transform: translateX(60px);
    }

    86% {
        opacity: 1;
        transform: translateX(0);
    }

    90%,
    96% {
        opacity: 1;
        transform: translateX(-440px);
    }

    100% {
        opacity: 0;
        transform: translateX(-440px);
    }
}

/* Without motion, the picture stops on day 14: the month half earned, the advance
   in the account. */
@media (prefers-reduced-motion: reduce) {
    .month-earned,
    .month-today,
    .month-money,
    .month-amount,
    .month-salary {
        animation: none;
    }

    .month-earned {
        transform: scaleX(0.45);
    }

    .month-today {
        transform: translateX(450px);
    }

    .month-money {
        transform: translate(-65px, 62px);
    }

    .month-salary {
        opacity: 0;
    }
}

.month {
    display: flex;
    margin-top: var(--space-2);
}

.month-moment {
    flex: 0 0 45%;
    padding-right: var(--space-10);
}

.month-moment-ask {
    flex: 1 1 auto;
}

.month-moment-payday {
    flex: 0 0 26%;
    padding-right: 0;
    text-align: right;
}

.month-day {
    font-family: var(--font-heading);
    font-size: var(--text-month);
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

.month-moment-ask .month-day {
    color: var(--color-accent);
}

.month-text {
    max-width: var(--measure-short);
    margin-top: var(--space-4);
    color: var(--color-muted);
    font-size: var(--text-text);
}

.month-moment-payday .month-text {
    margin-left: auto;
}

/* ── the fee: two big numbers on deep green ── */

.fee {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-10);
    margin-top: var(--space-14);
}

.fee-card {
    --frame-mark: var(--color-on-accent-faint);
    flex: 1 1 var(--card-min);
    padding: var(--space-12);
    border-color: var(--color-on-accent-line);
    background: transparent;
}

.fee-value {
    color: var(--color-mint);
    font-family: var(--font-heading);
    font-size: var(--text-fee);
    font-weight: 700;
    line-height: 0.85;
    text-transform: uppercase;
}

.fee-value {
    overflow: hidden;
    padding-block: 0.08em;
}

.fee-roll {
    display: inline-block;
}

/* The figure rolls up into place, like a counter, when the section comes into view
   (data-reveal and data-shown: see the cards of "Why Rialyz"). */
[data-reveal] .fee-roll {
    opacity: 0;
    transform: translateY(100%);
    transition: opacity var(--reveal) ease-out, transform var(--reveal) ease-out;
}

[data-reveal] .fee-card + .fee-card .fee-roll {
    transition-delay: 0.2s;
}

[data-reveal] .fee[data-shown] .fee-roll {
    opacity: 1;
    transform: none;
}

.fee-label {
    margin-top: var(--space-7);
    padding-bottom: var(--space-7);
    border-bottom: 1px solid var(--color-on-accent-line);
    color: var(--color-on-accent-faint);
    font-size: var(--text-label);
    font-weight: 600;
    letter-spacing: var(--track-kicker);
    text-transform: uppercase;
}

.fee-text {
    max-width: 34ch;
    margin-top: var(--space-7);
    color: var(--color-on-accent-muted);
}

/* ── how to start: big step numbers, the app fragments aligned at the bottom ── */

/* A grid with subgrid rows: the fragments start at the same height whatever the
   length of the text above them. Flexbox can't align across columns. */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(var(--card-min), 100%), 1fr));
    gap: var(--space-11);
    margin-top: var(--space-15);
}

.step {
    display: grid;
    grid-row: span 2;
    grid-template-rows: subgrid;
    gap: var(--space-10);
    align-items: start;
}

.step-number {
    color: transparent;
    font-family: var(--font-heading);
    font-size: var(--text-step);
    font-weight: 700;
    line-height: 1;
    -webkit-text-stroke: 1.5px var(--color-accent);
}

.step-title {
    margin-top: var(--space-5);
    font-size: var(--text-card);
    line-height: var(--leading-card);
}

.step-text {
    margin-top: var(--space-3);
    color: var(--color-muted);
    font-size: var(--text-text);
}

.step-fragment {
    margin-right: var(--shadow-offset);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--color-tint), var(--shadow-offset) var(--shadow-offset) 0 1px var(--color-line);
}

.otp {
    display: flex;
    gap: var(--space-2);
    padding: var(--space-8);
}

.otp-digit {
    display: grid;
    place-items: center;
    flex: 1;
    max-width: var(--otp-width);
    height: var(--otp-height);
    border: 1px solid var(--color-accent-deep);
    background: var(--color-accent-wash);
    font-family: var(--font-heading);
    font-size: var(--text-card);
    font-weight: 600;
}

.docs {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-6);
}

.docs-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--color-line-strong);
    background: var(--color-accent-wash);
}

.docs-name {
    font-family: var(--font-heading);
    font-size: var(--text-doc);
    font-weight: 600;
    text-transform: uppercase;
}

.docs-state {
    color: var(--color-accent);
    font-family: var(--font-heading);
    font-size: var(--text-tag);
    font-weight: 600;
    letter-spacing: var(--track-button);
    text-transform: uppercase;
    white-space: nowrap;
}

.ask {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-4);
    padding: var(--space-8);
}

.ask-question {
    font-family: var(--font-heading);
    font-size: var(--text-body);
    text-transform: uppercase;
}

.ask-amount {
    color: var(--color-accent-deep);
    font-family: var(--font-heading);
    font-size: var(--text-ask);
    font-weight: 600;
    line-height: 1;
}

/* The three steps play in turn, one loop for all: the code is typed, then the
   documents are attached one by one, then the amount comes. The number of the step
   that plays fills in green. Each element's window ends before the loop does, so
   nothing wraps into the next turn. Without the animation, every fragment shows its
   finished state. */
.step-number {
    animation: step-on var(--steps-loop) linear infinite;
}

.step:nth-child(2) .step-number {
    animation-delay: calc(var(--steps-loop) / 3);
}

.step:nth-child(3) .step-number {
    animation-delay: calc(var(--steps-loop) * 2 / 3);
}

.otp-digit {
    animation: otp-type var(--steps-loop) steps(1, end) infinite backwards;
}

.otp-digit:nth-child(2) {
    animation-delay: 0.35s;
}

.otp-digit:nth-child(3) {
    animation-delay: 0.7s;
}

.otp-digit:nth-child(4) {
    animation-delay: 1.05s;
}

.otp-digit:nth-child(5) {
    animation-delay: 1.4s;
}

.otp-digit:nth-child(6) {
    animation-delay: 1.75s;
}

.docs-item {
    animation: docs-attach var(--steps-loop) ease-out infinite backwards;
    animation-delay: calc(var(--steps-loop) / 3);
}

.docs-item:nth-child(2) {
    animation-delay: calc(var(--steps-loop) / 3 + 0.6s);
}

.docs-item:nth-child(3) {
    animation-delay: calc(var(--steps-loop) / 3 + 1.2s);
}

.ask-amount {
    animation: ask-show var(--steps-loop) ease-out infinite backwards;
    animation-delay: calc(var(--steps-loop) * 2 / 3);
}

@keyframes step-on {
    0%,
    30% {
        color: var(--color-accent);
    }

    33%,
    100% {
        color: transparent;
    }
}

@keyframes otp-type {
    0% {
        border-color: var(--color-line-strong);
        background: transparent;
        color: transparent;
    }

    4%,
    75% {
        border-color: var(--color-accent-deep);
        background: var(--color-accent-wash);
        color: var(--color-ink);
    }

    78%,
    100% {
        border-color: var(--color-line-strong);
        background: transparent;
        color: transparent;
    }
}

@keyframes docs-attach {
    0% {
        border-style: dashed;
        background: transparent;
        opacity: 0.35;
    }

    4%,
    50% {
        border-style: solid;
        background: var(--color-accent-wash);
        opacity: 1;
    }

    53%,
    100% {
        border-style: dashed;
        background: transparent;
        opacity: 0.35;
    }
}

@keyframes ask-show {
    0% {
        opacity: 0;
        transform: translateY(var(--space-2));
    }

    4%,
    30% {
        opacity: 1;
        transform: none;
    }

    33%,
    100% {
        opacity: 0;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .step-number,
    .otp-digit,
    .docs-item,
    .ask-amount {
        animation: none;
    }
}

/* ── questions: the title on the left, the answers on the right ── */

.faq {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: var(--space-13) var(--space-15);
}

.faq-head {
    position: sticky;
    top: calc(var(--topbar-height) + var(--space-11));
    flex: 1 1 var(--card-min);
}

.faq-list {
    flex: 1.5 1 400px;
    border-top: var(--rule) solid var(--color-ink);
}

.faq-item {
    border-bottom: 1px solid var(--color-line-strong);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-9);
    padding: 22px 0;
    font-family: var(--font-heading);
    font-size: var(--text-faq);
    font-weight: 600;
    line-height: 1.15;
    text-transform: uppercase;
    list-style: none;
    cursor: pointer;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question:hover {
    color: var(--color-accent);
}

.faq-question::after {
    content: "+";
    display: grid;
    place-items: center;
    flex: none;
    width: var(--faq-mark);
    height: var(--faq-mark);
    border: 1px solid var(--color-line-strong);
    color: var(--color-accent);
    font-family: var(--font-body);
    font-size: var(--text-faq);
    font-weight: 400;
    line-height: 1;
}

.faq-item[open] .faq-question::after {
    content: "−";
    border-color: var(--color-accent-deep);
    background: var(--color-accent);
    color: var(--color-on-accent);
}

.faq-answer {
    max-width: 62ch;
    padding: 0 var(--space-14) 26px 0;
    color: var(--color-muted);
}

/* ── register your interest ── */

.join {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-13) var(--space-16);
}

.join > * {
    flex: 1 1 var(--card-min);
}

.join-card {
    padding: var(--space-10);
}

.join-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.field {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.field-label {
    color: var(--color-faint);
    font-size: var(--text-tag);
    font-weight: 600;
    letter-spacing: var(--track-label);
    text-transform: uppercase;
}

.field-input {
    width: 100%;
    min-height: var(--control-height);
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--color-line-strong);
    border-radius: 0;
    background: var(--color-bg);
    color: var(--color-ink);
    font: inherit;
}

.field-input:focus-visible {
    border-color: var(--color-accent);
    outline-offset: 0;
}

.gotcha {
    display: none;
}

.form-error {
    padding: var(--space-3) var(--space-5);
    border: 1px solid var(--color-danger-line);
    background: var(--color-danger-bg);
    color: var(--color-danger);
    font-size: var(--text-small);
}

.join-sent-title {
    font-family: var(--font-heading);
    font-size: var(--text-card);
    font-weight: 700;
    text-transform: uppercase;
}

.join-sent-text {
    margin-top: var(--space-2);
    color: var(--color-muted);
}

/* ── from the blog ── */

.blog-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: var(--space-9);
}

.posts {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-10);
    margin-top: var(--space-13);
}

.post {
    display: flex;
    flex: 1 1 var(--card-min);
    flex-direction: column;
    gap: var(--space-5);
    padding: var(--space-9) var(--space-9) var(--space-10);
    text-decoration: none;
    transition: border-color var(--speed);
}

.post:hover {
    border-color: var(--color-accent);
}

.post:hover .post-title {
    color: var(--color-accent);
}

.post-art {
    height: 120px;
    margin: calc(var(--space-9) * -1) calc(var(--space-9) * -1) var(--space-2);
    border-bottom: 1px solid var(--color-line-strong);
    background: repeating-linear-gradient(135deg, var(--color-tint) 0 10px, transparent 10px 20px);
}

.post-tag {
    align-self: flex-start;
    padding: 3px var(--space-2);
    border: 1px dashed var(--color-faint);
    color: var(--color-faint);
    font-size: var(--text-tag);
    font-weight: 600;
    letter-spacing: var(--track-label);
    text-transform: uppercase;
}

.post-title {
    font-size: var(--text-faq);
    line-height: 1.1;
}

.post-text {
    color: var(--color-muted);
    font-size: var(--text-small);
}

/* The illustration takes the place of the striped art, edge to edge in the card. */
.post-image {
    display: block;
    width: calc(100% + var(--space-9) * 2);
    height: 120px;
    margin: calc(var(--space-9) * -1) calc(var(--space-9) * -1) var(--space-2);
    border-bottom: 1px solid var(--color-line-strong);
    object-fit: cover;
}

/* An article not written yet: shown, but not a link. */
.post-soon {
    border-style: dashed;
    background: transparent;
}

.post-soon .post-art {
    background: none;
}

/* ── an article page ── */

.article {
    max-width: var(--article-width);
    margin: 0 auto;
    padding: var(--space-16) var(--gutter) var(--section-pad);
}

.article-back {
    color: var(--color-accent);
}

.article-title {
    margin-top: var(--space-7);
    font-size: var(--text-title);
    line-height: var(--leading-title);
}

.article-lede {
    margin-top: var(--space-9);
    color: var(--color-muted);
    font-size: var(--text-hero-lede);
}

.article-meta {
    margin-top: var(--space-9);
    padding-top: var(--space-6);
    border-top: 1px solid var(--color-line-strong);
    color: var(--color-faint);
    font-size: var(--text-label);
    letter-spacing: var(--track-label);
    text-transform: uppercase;
}

.article-image {
    display: block;
    width: 100%;
    height: auto;
    margin-top: var(--space-13);
}

.article-body {
    margin-top: var(--space-13);
}

.article-body h2 {
    margin-top: var(--space-13);
    font-size: var(--text-card);
    line-height: var(--leading-card);
}

.article-body p {
    margin-top: var(--space-6);
}

.article-steps {
    margin: var(--space-6) 0 0;
    padding: 0;
    list-style: none;
    counter-reset: article-steps;
}

.article-steps li {
    display: flex;
    gap: var(--space-6);
    padding: var(--space-5) 0;
    border-top: 1px solid var(--color-line);
}

.article-steps li::before {
    counter-increment: article-steps;
    content: counter(article-steps, decimal-leading-zero);
    flex: none;
    color: var(--color-accent);
    font-family: var(--font-heading);
    font-size: var(--text-lede);
    font-weight: 700;
}

.article-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
    margin-top: var(--space-15);
    padding: var(--space-10);
}

.article-cta-title {
    font-family: var(--font-heading);
    font-size: var(--text-card);
    font-weight: 700;
    text-transform: uppercase;
}

.article-cta-text {
    color: var(--color-muted);
}

/* ── footer ── */

.footer {
    background: var(--color-accent-deep);
    color: var(--color-on-accent);
}

.footer-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-9);
    padding-block: var(--space-13);
}

.footer-brand {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-5);
}

.footer .brand-mark {
    border-color: var(--color-mint);
    color: var(--color-mint);
}

.footer-tag {
    padding-left: var(--space-5);
    border-left: 1px solid var(--color-on-accent-line);
    color: var(--color-on-accent-faint);
    font-size: var(--text-tag);
    font-weight: 600;
    letter-spacing: var(--track-kicker);
    text-transform: uppercase;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4) var(--space-9);
    font-size: var(--text-small);
}

.footer-links a {
    color: var(--color-on-accent-muted);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--color-on-accent);
    text-decoration: underline;
}

.footer :focus-visible {
    outline-color: var(--color-mint);
}

/* ── narrow screens ── */

@media (max-width: 860px) {
    :root {
        --gutter: 20px;
        --section-pad: 80px;
        --text-fact: 36px;
        --text-need: 60px;
        --text-month: 48px;
        --text-hero-lede: 19px;
    }

    .topbar-nav {
        display: none;
    }

    .topbar .button {
        margin-left: auto;
        padding-inline: var(--space-6);
    }

    .hero-body {
        padding-top: var(--space-14);
    }

    .hero-actions > * {
        flex: 1 1 auto;
    }

    .facts-item + .facts-item {
        padding-left: 0;
        border-top: 1px solid var(--color-line-strong);
        border-left: 0;
    }

    .facts-item {
        padding: var(--space-6) 0;
    }

    .need-card,
    .compare-without,
    .compare-with,
    .fee-card {
        padding: var(--space-10) var(--space-8);
    }

    .steps {
        gap: var(--space-14);
    }

    .step {
        grid-row: auto;
        grid-template-rows: auto;
    }

    /* The month turns into a vertical line with the three moments on it. */
    .month-bar {
        display: none;
    }

    .month {
        flex-direction: column;
        margin: var(--space-13) 0 0 var(--space-4);
        border-left: var(--rule) solid var(--color-ink);
    }

    .month-moment,
    .month-moment-payday {
        position: relative;
        flex: none;
        padding: 0 0 40px var(--space-11);
        text-align: left;
    }

    .month-moment-payday {
        padding-bottom: 0;
    }

    .month-moment-payday .month-text {
        margin-left: 0;
    }

    .month-moment::before {
        content: "";
        position: absolute;
        top: var(--space-2);
        left: -11px;
        width: var(--space-8);
        height: var(--space-8);
        border: var(--rule) solid var(--color-ink);
        background: var(--color-bg);
    }

    .month-moment-ask::before {
        border-color: var(--color-accent-deep);
        background: var(--color-accent);
    }

    .month-moment-payday::before {
        border-color: var(--color-accent-deep);
        background: var(--color-accent-deep);
    }

    .faq-head {
        position: static;
    }

    .faq-answer {
        padding-right: 0;
    }

    .post-art {
        height: var(--space-15);
    }
}
