/* ==============================
   Responsive Breakpoints
   ============================== */

/* Tablet */
@media (max-width: 1024px) {
    h1 {
        font-size: var(--font-size-4xl);
    }

    h2 {
        font-size: var(--font-size-3xl);
    }

    .hero__grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
        text-align: center;
    }

    .hero__content {
        max-width: 100%;
    }

    .hero__buttons {
        justify-content: center;
    }

    .hero__image img {
        max-height: 380px;
    }

    .trust-metrics__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .benefits__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps-grid::before {
        display: none;
    }

    .step-card:not(:last-child)::after {
        display: none;
    }

    .pricing-layout {
        grid-template-columns: 1fr;
    }

    .assets-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .nokyc-grid {
        grid-template-columns: 1fr;
    }

    .security__grid {
        grid-template-columns: 1fr;
    }

    .security__panel {
        min-height: 240px;
    }

    .fees-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Ecosystem responsive */
    .ecosystem__card {
        grid-template-columns: 1fr;
        padding: var(--space-8) var(--space-6);
    }

    .ecosystem__card--reverse {
        direction: ltr;
    }

    /* Image first, text second on mobile for the reverse card */
    .ecosystem__card--reverse .ecosystem__visual {
        order: 1;
    }

    .ecosystem__card--reverse .ecosystem__content {
        order: 2;
    }

    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-8);
    }

    /* Feature carousel tablet — height is auto, no override needed */

    /* CTA band tablet */
    .cta-band__box {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }

    /* Image first, text second */
    .cta-band__image-side {
        order: 1;
    }

    .cta-band__text-side {
        order: 2;
    }

    .cta-band__content {
        align-items: center;
        text-align: center;
    }

    .cta-band__desc {
        max-width: 100%;
    }

    .cta-band__card-img {
        max-width: 400px;
    }

    .cta-band__trust {
        justify-content: center;
    }

    .header__nav {
        display: none;
    }

    .header {
        left: 12px;
        right: 12px;
        top: 10px;
    }

    .header__inner {
        padding: 0 var(--space-4) 0 var(--space-5);
    }

    .menu-toggle {
        display: flex;
    }

    .selection-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Step progress panel: compact horizontal mode on tablet/mobile */
    .apply-layout {
        flex-direction: column;
        max-width: 560px;
        align-items: stretch;
    }

    .apply-page {
        align-items: flex-start;
        justify-content: center;
        padding-top: var(--space-16);
    }

    .step-progress-panel {
        width: 100%;
        position: static;
        padding: var(--space-4) var(--space-5) var(--space-3);
    }

    .step-progress__header {
        display: none;
    }

    /* Horizontal row: each item is a flex column with circle + title */
    .step-progress__list {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        position: relative;
    }

    .step-progress__item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: var(--space-2);
        position: relative;
    }

    /* Connector drawn as a horizontal line via ::after, spanning from center to next item */
    .step-progress__item:not(:last-child)::after {
        content: '';
        position: absolute;
        top: 16px;
        /* half of 32px circle height */
        left: 50%;
        width: 100%;
        height: 2px;
        background: var(--color-border);
        z-index: 0;
        transition: background 0.35s ease;
    }

    .step-progress__item.is-complete:not(:last-child)::after {
        background: #12B76A;
    }

    .step-progress__indicator {
        flex-direction: column;
        align-items: center;
        width: auto;
        position: relative;
        z-index: 1;
    }

    /* Hide the original vertical connector */
    .step-progress__connector {
        display: none;
    }

    .step-progress__circle {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
        position: relative;
        z-index: 1;
    }

    .step-progress__circle .step-progress__icon {
        width: 14px;
        height: 14px;
    }

    .step-progress__content {
        padding: 0 2px;
        text-align: center;
        gap: 0;
    }

    .step-progress__step-num {
        display: none;
    }

    .step-progress__title {
        font-size: 10px;
        line-height: 1.3;
    }

    .step-progress__desc {
        display: none;
    }

    .wizard {
        width: 100%;
        max-width: 100%;
    }
}

/* Mobile */
@media (max-width: 640px) {

    /* Hero badge — allow wrapping on narrow screens */
    .hero__badge {
        white-space: normal;
        text-align: left;
        font-size: var(--font-size-xs);
        padding: var(--space-2) var(--space-3);
        line-height: 1.4;
    }

    /* Stats bar: 2×2 grid, no dividers */
    .stats-bar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--space-6) var(--space-4);
        align-items: start;
    }

    .stats-bar__divider {
        display: none;
    }

    .stats-bar__value {
        font-size: var(--font-size-xl);
        height: auto;
    }

    .stats-bar__pay img {
        height: 28px;
    }

    .stats-bar__pay {
        height: auto;
    }

    :root {
        --header-height: 54px;
    }

    h1 {
        font-size: var(--font-size-3xl);
    }

    h2 {
        font-size: var(--font-size-2xl);
    }

    h3 {
        font-size: var(--font-size-xl);
    }

    .section {
        padding: var(--space-12) 0;
    }

    .container {
        padding: 0 var(--space-4);
    }

    .hero {
        padding: var(--space-10) 0 var(--space-8);
    }

    .hero h1 {
        font-size: var(--font-size-3xl);
    }

    .hero__desc {
        font-size: var(--font-size-base);
    }

    .hero__buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .hero__image img {
        max-height: 280px;
    }

    .trust-metrics__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .benefits__grid {
        grid-template-columns: 1fr;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }

    .pricing-layout {
        grid-template-columns: 1fr;
    }

    .nokyc-grid,
    .security__grid {
        grid-template-columns: 1fr;
    }

    .security__panel {
        min-height: 200px;
        padding: var(--space-5);
    }

    .assets-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-3);
    }

    .fees-grid {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }

    .footer__grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .footer__bottom {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }

    .footer__bottom-links {
        justify-content: center;
        flex-wrap: wrap;
    }

    /* Cookie banner mobile */
    .cookie-banner {
        bottom: 12px;
        left: 12px;
        right: 12px;
        border-radius: var(--radius-xl);
        padding: var(--space-4) var(--space-5);
    }

    .cookie-banner__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-3);
    }

    .cookie-banner__desc {
        white-space: normal;
    }

    .cookie-banner__actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .cookie-banner__actions .btn {
        flex: 1;
        text-align: center;
    }

    /* Wizard mobile */
    .wizard {
        padding: var(--space-5);
    }

    /* Step panel mobile compact */
    .step-progress-panel {
        padding: var(--space-3) var(--space-4);
    }

    .step-progress__circle {
        width: 28px;
        height: 28px;
    }

    .step-progress__circle .step-progress__icon {
        width: 12px;
        height: 12px;
    }

    .step-progress__circle .step-progress__check {
        width: 12px;
        height: 12px;
    }

    .step-progress__title {
        font-size: 10px;
    }

    .selection-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-2);
    }

    .legal-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: var(--space-2);
    }

    .legal-tab {
        white-space: nowrap;
    }

    /* Header actions mobile */
    .header__actions .btn {
        display: none;
    }



    /* Feature carousel mobile */
    .feature-carousel-section {
        padding: var(--space-8) 0;
    }


    .cta-band {
        padding: var(--space-10) 0 var(--space-12);
    }

    .cta-band__card-img {
        max-width: 280px;
    }

    .cta-band__title {
        font-size: var(--font-size-3xl);
    }

    .cta-band__desc {
        font-size: var(--font-size-sm);
    }

    .section-header {
        margin-bottom: var(--space-8);
    }

    .section-header p {
        font-size: var(--font-size-base);
    }
}

/* Narrow mobile — VISA partnership block & hero badge extra fixes */
@media (max-width: 480px) {

    /* VISA partnership block: stack vertically */
    .visa-partnership-inner {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: var(--space-5) !important;
        padding: var(--space-6) var(--space-5) !important;
    }

    .visa-partnership-divider {
        display: none !important;
    }

    .visa-partnership-img-wrap {
        width: 140px !important;
        height: 78px !important;
    }

    /* Hero badge stays single-line if possible, wraps gracefully if not */
    .hero__badge {
        font-size: 11px;
        padding: 6px 10px 6px 8px;
        gap: 6px;
    }

    /* Narrow mobile: smaller circles, hide titles, adjust connector position */
    .step-progress__content {
        display: none;
    }

    .step-progress__circle {
        width: 26px;
        height: 26px;
    }

    .step-progress__item:not(:last-child)::after {
        top: 13px;
        /* half of 26px */
    }
}