/**
 * Karvi Partner – responsive overrides
 * Loaded after style.css. Covers mobile (≤767px), tablet (768–1023px), and touch/safe-area tweaks.
 */

/* ========== MOBILE BOTTOM BAR (phone) ========== */
.mobile-bottom-bar {
    display: none;
}

@media (max-width: 767px) {
    .mobile-bottom-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 90;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.55rem;
        padding: 0.65rem 0.75rem;
        padding-bottom: max(1rem, calc(env(safe-area-inset-bottom, 0px) + 0.75rem));
        background: color-mix(in srgb, var(--bg) 92%, transparent);
        border-top: 1px solid var(--border);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        box-shadow: 0 -8px 28px var(--shadow);
    }

    body.apply-modal-open .mobile-bottom-bar {
        display: none;
    }

    .theme-body {
        padding-bottom: calc(5.15rem + env(safe-area-inset-bottom, 0px));
    }

    .mobile-bottom-bar__btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.45rem;
        min-height: 3.25rem;
        padding: 0.85rem 0.85rem;
        border-radius: 999px;
        font-size: 0.8125rem;
        font-weight: 600;
        line-height: 1.2;
        text-decoration: none;
        white-space: nowrap;
    }

    .mobile-bottom-bar__btn .material-icons {
        font-size: 1.2rem;
    }

    .mobile-bottom-bar__btn--apply {
        background: var(--fg);
        color: var(--bg);
        border: 1px solid var(--fg);
    }

    .mobile-bottom-bar__btn--wa {
        background: #25d366;
        color: #fff;
        border: none;
        box-shadow: none;
    }

    .mobile-bottom-bar__btn--wa:hover {
        background: #20bd5a;
        color: #fff;
    }

    .mobile-bottom-bar__wa-icon {
        width: 1.2rem;
        height: 1.2rem;
        flex-shrink: 0;
    }

    #scroll-top {
        bottom: calc(5.35rem + env(safe-area-inset-bottom, 0px));
    }
}

/* ========== GLOBAL ========== */
@media (max-width: 1023px) {
    .theme-body .site-header__ticker,
    .theme-body .site-header__bar,
    .theme-body .site-header__drawer,
    .theme-body main section.hero-section,
    .theme-body main section:not(.hero-section) {
        background-attachment: scroll;
    }
}

img,
video {
    max-width: 100%;
    height: auto;
}

/* Safe areas for fixed controls */
#scroll-top {
    right: max(1rem, env(safe-area-inset-right, 0px));
    bottom: max(1rem, env(safe-area-inset-bottom, 0px));
}

@media (max-width: 767px) {
    #scroll-top {
        width: 2.75rem;
        height: 2.75rem;
        right: max(0.85rem, env(safe-area-inset-right, 0px));
    }

    .site-footer {
        margin-top: 3rem !important;
    }

    .site-footer .max-w-7xl {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    .site-footer .grid {
        gap: 2rem !important;
    }
}

/* ========== LEGAL PAGES ========== */
.legal-section {
    padding: 3.5rem 0 4rem;
}

@media (min-width: 640px) {
    .legal-section {
        padding: 4.5rem 0 5rem;
    }
}

.legal-content {
    color: var(--fg);
    line-height: 1.65;
    font-size: 0.9375rem;
}

.legal-content h1 {
    font-size: clamp(1.75rem, 6vw, 2.25rem);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 1.75rem;
    color: var(--fg);
}

.legal-content h2 {
    font-size: clamp(1.125rem, 4vw, 1.375rem);
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.65rem;
    color: var(--fg);
}

.legal-content p,
.legal-content li {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.legal-content a {
    color: var(--fg);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-content > .reveal,
.legal-content .space-y-6 > * + * {
    margin-top: 1.25rem;
}

/* ========== FORMS (contact + partner + modal) ========== */
@media (max-width: 767px) {
    .partner-form__lang {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .partner-form__row--3 {
        grid-template-columns: 1fr;
    }

    .partner-form__footer {
        align-items: stretch;
    }

    .partner-form__submit {
        width: 100%;
        justify-content: center;
    }

    .contact-page__title,
    .partner-form__title {
        font-size: clamp(1.65rem, 7vw, 2.15rem);
    }

    .contact-page__head {
        margin-bottom: 1.75rem;
    }
}

@media (min-width: 640px) and (max-width: 1023px) {
    .partner-form__row--3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .partner-form__row--3 > .partner-form__field:last-child:nth-child(3) {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1024px) {
    .partner-form__row--3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Apply modal – small screens */
@media (max-width: 767px) {
    .apply-modal {
        align-items: flex-end;
        padding: 0;
    }

    .apply-modal__dialog {
        width: 100%;
        max-height: min(94dvh, calc(100dvh - env(safe-area-inset-top, 0px) - 0.5rem));
        border-radius: 1.25rem 1.25rem 0 0;
        transform: translateY(100%);
    }

    .apply-modal.is-open .apply-modal__dialog {
        transform: translateY(0);
    }

    .apply-modal__card {
        padding: 1.35rem 1rem 1.25rem;
    }

    .apply-modal__close {
        top: 0.65rem;
        right: 0.65rem;
    }
}

/* ========== COMPARE TABLE ========== */
.compare-table__mob-brand,
.compare-table__mob-keys {
    display: none;
}

@media (max-width: 1023px) {
    .compare-table {
        height: auto;
        max-height: none;
        min-height: 0;
        overflow: visible;
    }

    .compare-table__viewport {
        height: auto !important;
        min-height: 0 !important;
    }

    .compare-table__shell {
        flex: none !important;
        min-height: 0 !important;
    }

    .compare-table__scroll {
        flex: none !important;
        min-height: 0 !important;
        overflow-x: auto;
        overflow-y: visible;
    }
}

@media (max-width: 767px) {
    .compare-table {
        padding-bottom: 0.75rem;
        background: var(--bg);
    }

    .compare-table__viewport {
        padding-top: 0.25rem;
        padding-bottom: 1.25rem;
    }

    .compare-table__head {
        padding-bottom: 1rem !important;
    }

    .compare-table__head h2 {
        font-size: clamp(1.4rem, 5.8vw, 1.8rem);
    }

    .compare-table__intro {
        font-size: 0.875rem;
        line-height: 1.5;
        max-width: 22rem;
    }

    .compare-table__mob-keys {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .compare-table__mob-tag {
        display: inline-flex;
        align-items: center;
        padding: 0.4rem 0.75rem;
        border-radius: 999px;
        font-size: 0.625rem;
        font-weight: 800;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        line-height: 1.2;
    }

    .compare-table__mob-tag--karvi {
        color: var(--bg);
        background: var(--fg);
        border: 1.5px solid var(--fg);
    }

    .compare-table__mob-tag--others {
        color: var(--muted);
        background: transparent;
        border: 1.5px dashed color-mix(in srgb, var(--muted) 55%, var(--border));
    }

    .compare-table__scroll {
        overflow: visible;
        margin: 0;
    }

    .compare-table__scroll::before,
    .compare-table__scroll::after {
        display: none;
    }

    .compare-table__grid {
        min-width: 0;
        width: 100%;
        display: block;
    }

    .compare-table__grid colgroup,
    .compare-table__grid thead {
        display: none;
    }

    .compare-table__grid tbody {
        display: flex;
        flex-direction: column;
        gap: 0.85rem;
    }

    .compare-table__row {
        display: block;
        padding: 1rem 1rem 0.85rem;
        border: 1px solid var(--border);
        border-left: 3px solid var(--fg);
        border-radius: 0 1rem 1rem 0;
        background: var(--bg);
        box-shadow: 0 4px 18px color-mix(in srgb, var(--shadow) 40%, transparent);
    }

    .compare-table__row:hover .compare-table__label,
    .compare-table__row:hover .compare-table__cell--others,
    .compare-table__row:hover .compare-table__cell--karvi {
        background: transparent;
    }

    .compare-table__label {
        display: block;
        width: 100%;
        padding: 0 0 0.75rem !important;
        margin: 0;
        border: none;
        background: transparent;
        color: var(--fg) !important;
        font-size: 0.8125rem !important;
        font-weight: 900;
        letter-spacing: 0.04em;
        text-transform: none;
        line-height: 1.3;
        text-align: left;
    }

    .compare-table__label span {
        font-size: inherit !important;
        color: inherit !important;
        font-weight: inherit;
    }

    .compare-table__cell {
        display: block;
        width: 100%;
        padding: 0 !important;
        margin: 0 0 0.5rem;
        border: none !important;
    }

    .compare-table__cell--others {
        margin-bottom: 0;
    }

    .compare-table__cell--karvi {
        padding: 0.7rem 0.8rem !important;
        border-radius: 0.65rem;
        border: 1.5px solid var(--fg) !important;
        background: color-mix(in srgb, var(--fg) 5%, var(--bg));
    }

    .compare-table__cell--others {
        padding: 0.7rem 0.8rem !important;
        border-radius: 0.65rem;
        border: 1px dashed color-mix(in srgb, var(--muted) 45%, var(--border)) !important;
        background: color-mix(in srgb, var(--fg) 1.5%, var(--bg));
    }

    .compare-table__mob-brand {
        display: block;
        font-size: 0.58rem;
        font-weight: 800;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        margin-bottom: 0.3rem;
        color: var(--muted);
    }

    .compare-table__mob-brand--karvi {
        color: var(--fg);
    }

    .compare-table__value {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        justify-content: flex-start;
        text-align: left;
        gap: 0.55rem;
        width: 100%;
    }

    .compare-table__value span:not(.material-icons) {
        font-size: 0.8125rem !important;
        line-height: 1.4;
        font-weight: 600;
        flex: 1;
    }

    .compare-table__icon {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 1.5rem !important;
        height: 1.5rem !important;
        min-width: 1.5rem;
        margin: 0.05rem 0 0 !important;
        border-radius: 0.4rem;
        font-size: 0.9rem !important;
    }

    .compare-table__value--karvi .compare-table__icon {
        background: var(--fg);
        color: var(--bg) !important;
        opacity: 1;
    }

    .compare-table__value--others .compare-table__icon {
        background: transparent;
        color: var(--muted) !important;
        border: 1px solid var(--border);
        opacity: 0.65;
    }

    .compare-table__value--others span:not(.material-icons) {
        color: var(--muted);
        font-weight: 500;
    }

    .compare-table__cta {
        display: none;
    }
}

/* ========== HOME TEAM ========== */
@media (max-width: 1023px) {
    .home-team {
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .home-team__viewport {
        height: auto;
    }

    .home-team__grid {
        height: auto;
        padding-bottom: 1rem;
    }
}

@media (max-width: 767px) {
    .home-team__grid {
        gap: 1.15rem 0.65rem;
    }

    .team-profile__shell {
        --team-photo-size: min(100%, 7.25rem);
        padding-bottom: 1.25rem;
    }

    .team-profile__name {
        font-size: 0.72rem;
        margin-bottom: 0.75rem;
    }

    .team-profile__wa-number {
        font-size: 0.68rem;
    }

    .team-profile:nth-child(5),
    .team-profile:nth-child(6) {
        grid-column: auto;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .team-profile__shell {
        --team-photo-size: min(100%, 8.5rem);
    }
}

/* ========== BRANDS PAGE ========== */
@media (max-width: 767px) {
    .brands-simple {
        height: auto !important;
        min-height: calc(var(--brand-count, 3) * 72svh);
    }

    .brands-simple__pin {
        position: sticky;
        top: var(--header-total-h, 0px);
        height: calc(100dvh - var(--header-total-h, 0px));
        min-height: 28rem;
        overflow: hidden;
    }

    .brands-simple__grid {
        min-height: 0;
        height: 100%;
    }

    .brands-simple__slides {
        min-height: 12rem;
    }

    .brand-slide {
        width: min(94vw, 960px);
    }

    .brands-simple__aside {
        padding: 1rem 1.15rem;
    }

    .brands-simple__details {
        min-height: 7.5rem;
    }
}

/* ========== CONTACT SHOWCASE ========== */
@media (max-width: 767px) {
    .contact-showcase {
        padding: 2.25rem 0 2.75rem;
        overflow: hidden;
    }

    .contact-showcase__layout--duo {
        gap: 1.5rem;
    }

    .contact-showcase__panel {
        min-height: 0;
        transform: none !important;
    }

    .contact-showcase__panel--office,
    .contact-showcase__panel--map {
        transform: none;
    }

    .contact-showcase__panel:hover {
        transform: translateY(-2px);
    }

    .contact-showcase__frame {
        transform: translate(0.35rem, 0.35rem) !important;
    }

    .contact-showcase__panel--map .contact-showcase__frame {
        transform: translate(-0.35rem, -0.35rem) !important;
    }

    .contact-showcase__clip {
        min-height: 14rem;
        aspect-ratio: 4 / 5;
    }

    .contact-details {
        padding: 2rem 0 2.75rem;
    }

    .contact-details__card {
        padding: 1.15rem 1rem 1.25rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .contact-showcase__panel {
        transform: rotate(-1.25deg);
    }

    .contact-showcase__panel--map {
        transform: rotate(1.25deg);
    }
}

/* ========== PARTNER PROCESS – mobile: heading direct, cards on scroll ========== */
@media (max-width: 767px) {
    .partner-process__track {
        height: auto !important;
        min-height: 0 !important;
    }

    .partner-process__pin {
        position: relative;
        top: auto;
        height: auto;
        overflow: visible;
    }

    .partner-process__glow {
        opacity: 0.5;
    }

    .partner-process__frame {
        height: auto;
    }

    .partner-process__grid {
        display: flex;
        flex-direction: column;
        height: auto;
        padding: 2rem 0 2.5rem;
        gap: 1.25rem;
        align-items: stretch;
    }

    .partner-process__panel {
        display: contents;
        max-width: none;
    }

    .partner-process__header {
        order: 1;
        text-align: center;
        padding: 0 0.15rem;
    }

    .partner-process__heading {
        font-size: clamp(1.5rem, 6.5vw, 1.85rem);
        margin-top: 0.25rem;
    }

    .partner-process__lede {
        font-size: 0.875rem;
        margin-top: 0.4rem;
    }

    .partner-process__live,
    .partner-process__nav,
    .partner-process__scroll-hint {
        display: none !important;
    }

    .partner-process__scene {
        order: 2;
        width: 100%;
        height: auto;
        min-height: 0;
    }

    .partner-process__steps {
        position: relative;
        display: flex;
        flex-direction: column;
        gap: 0;
        inset: auto;
        padding: 0;
    }

    .partner-process__block {
        position: relative;
        width: 100%;
        top: auto !important;
        bottom: auto !important;
        padding: 0 0 0 1.35rem;
        margin-bottom: 0;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(18px) !important;
        transition:
            max-height 0.65s cubic-bezier(0.16, 1, 0.3, 1),
            opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
            margin 0.5s cubic-bezier(0.16, 1, 0.3, 1),
            transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
            visibility 0s linear 0.55s;
    }

    .partner-process__block.is-inview {
        max-height: 22rem;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        margin-bottom: 0.9rem;
        transform: translateY(0) !important;
        transition:
            max-height 0.65s cubic-bezier(0.16, 1, 0.3, 1),
            opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
            margin 0.5s cubic-bezier(0.16, 1, 0.3, 1),
            transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
            visibility 0s linear 0s;
    }

    .partner-process__block::before,
    .partner-process__block::after {
        opacity: 0;
        transition: opacity 0.4s ease 0.15s;
    }

    .partner-process__block.is-inview::before,
    .partner-process__block.is-inview::after {
        opacity: 1;
    }

    .partner-process__block::before {
        content: '';
        position: absolute;
        left: 0.2rem;
        top: 1.35rem;
        width: 0.55rem;
        height: 0.55rem;
        border-radius: 50%;
        background: var(--bg);
        border: 2px solid var(--border);
        z-index: 2;
    }

    .partner-process__block.is-inview::before {
        border-color: var(--fg);
        background: var(--fg);
    }

    .partner-process__block:not(:last-child)::after {
        content: '';
        position: absolute;
        left: 0.44rem;
        top: 2rem;
        bottom: -0.15rem;
        width: 2px;
        background: var(--border);
        z-index: 1;
    }

    .partner-process__block.is-inview:not(:last-child)::after {
        background: linear-gradient(180deg, var(--fg) 0%, var(--border) 100%);
    }

    .partner-process__block-riser {
        display: none;
    }

    .partner-process__block-tread {
        padding: 1rem;
        gap: 0.75rem;
        border-radius: 0.85rem;
        box-shadow: 0 4px 0 color-mix(in srgb, var(--fg) 8%, transparent), 0 12px 28px var(--shadow);
    }

    .partner-process__block-desc {
        font-size: 0.8125rem;
        line-height: 1.45;
        margin-top: 0.2rem;
    }

    .partner-process__block.is-inview:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
    .partner-process__block,
    .partner-process__block.is-inview {
        max-height: none;
        opacity: 1;
        visibility: visible;
        margin-bottom: 0.9rem;
        transform: none !important;
        transition: none;
    }
}

/* ========== PARTNER / ABOUT SECTIONS ========== */
@media (max-width: 767px) {
    .partner-hero,
    .about-hero {
        padding: 3.25rem 0 2.75rem;
    }

    .partner-hero__title,
    .about-hero__title {
        font-size: clamp(1.85rem, 8vw, 2.5rem);
    }

    .partner-multi__body {
        gap: 1.5rem;
    }

    .partner-multi__visual {
        min-height: 12rem;
    }

    .partner-benefits__grid {
        gap: 1rem;
    }

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

    .about-hero__actions .btn-solid,
    .about-hero__actions a {
        justify-content: center;
        text-align: center;
    }

    .about-pillars .grid,
    .about-facts .grid,
    .about-brands .grid {
        gap: 1.25rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .partner-multi__body {
        grid-template-columns: 1fr;
    }

    .partner-multi__visual {
        max-height: 22rem;
    }
}

/* ========== HOME PAGE – hero (phone) ========== */
@media (max-width: 767px) {
    .page-home .hero-actions {
        display: none !important;
    }

    .page-home .hero-section {
        --hero-gap-top: 80px;
        --hero-gap-below-shape: 100px;
        --hero-mobile-sphere: min(58vw, 195px);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 0;
        min-height: 0;
        height: auto;
        max-height: none;
        padding-bottom: 50px;
        overflow-x: hidden;
        overflow-y: visible;
    }

    .page-home .hero-sphere {
        position: relative;
        top: auto;
        right: auto;
        flex: 0 0 auto;
        width: 100%;
        margin: 0;
        padding: calc(var(--header-total-h) + var(--hero-gap-top)) 0.75rem var(--hero-gap-below-shape);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .page-home .hero-sphere__stage {
        width: var(--hero-mobile-sphere);
        height: var(--hero-mobile-sphere);
        max-width: 100%;
        flex-shrink: 0;
    }

    .page-home .hero-sphere__badge {
        width: 3rem;
        height: 3rem;
        margin: -1.5rem 0 0 -1.5rem;
    }

    .page-home .hero-sphere__badge img {
        width: 1.5rem;
        height: 1.5rem;
    }

    .page-home .hero-content-wrap {
        flex: 0 0 auto;
        width: 100%;
        min-height: 0 !important;
        height: auto;
        margin: 0;
        padding-top: 0 !important;
        justify-content: flex-start;
        align-items: center;
    }

    .page-home .hero-content {
        width: 100%;
        max-width: none;
        padding: 0 1rem 0 !important;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .page-home .hero-content > p.text-xs {
        margin-bottom: 0.45rem !important;
        font-size: 0.625rem;
        letter-spacing: 0.22em;
        justify-content: center;
    }

    .page-home .hero-content > p.text-xs .w-8 {
        width: 1.25rem;
    }

    .page-home .hero-title {
        font-size: clamp(1.5rem, 7.2vw, 1.85rem) !important;
        margin-bottom: 0.5rem !important;
        line-height: 1.08 !important;
        text-align: center;
    }

    .page-home .hero-title .underline {
        text-decoration-thickness: 2px;
        text-underline-offset: 4px;
    }

    .page-home .hero-content > p.theme-muted {
        font-size: 1rem !important;
        margin-bottom: 0 !important;
        margin-left: auto;
        margin-right: auto;
        line-height: 1.4 !important;
        max-width: none;
        text-align: center;
    }

    .page-home .hero-content .flex.flex-wrap {
        gap: 0.5rem !important;
    }

    .page-home .hero-content .btn-solid,
    .page-home .hero-content .whatsapp-cta {
        padding: 0.625rem 1rem !important;
        font-size: 0.8125rem !important;
    }

    .page-home .hero-content .btn-solid .material-icons {
        font-size: 1.05rem;
    }

    .page-home .hero-content .whatsapp-cta__text {
        min-width: 0;
    }
}

@media (max-width: 767px) and (max-height: 740px) {
    .page-home .hero-section {
        --hero-mobile-sphere: min(54vw, 170px);
    }

    .page-home .hero-title {
        font-size: clamp(1.35rem, 6.5vw, 1.6rem) !important;
    }

    .page-home .hero-content > p.theme-muted {
        display: none;
    }
}

/* ========== HOME PAGE – hero (tablet) ========== */
@media (min-width: 768px) and (max-width: 1023px) {
    .page-home .hero-section {
        display: flex;
        flex-direction: column;
        min-height: auto;
        overflow: hidden;
    }

    .page-home .hero-sphere {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        margin: 0 auto;
        padding: calc(var(--header-total-h) + 2rem) 1.5rem 2.5rem;
        align-items: center;
    }

    .page-home .hero-sphere__stage {
        width: min(42vw, 340px);
        height: min(42vw, 340px);
    }

    .page-home .hero-content-wrap {
        min-height: 0 !important;
        padding-top: 0 !important;
    }

    .page-home .hero-content {
        padding-top: 0 !important;
        padding-bottom: 2.5rem !important;
    }
}

/* ========== HOME PAGE – sections (phone) ========== */
@media (max-width: 767px) {
    .page-home .hero-section + section {
        padding-top: 0;
    }

    .page-home section.py-6 {
        padding-top: 0;
        padding-bottom: 1.25rem;
    }

    .page-home section.py-20 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .page-home section.py-24 {
        padding-top: 3.25rem;
        padding-bottom: 3.25rem;
    }

    .page-home .stat-number {
        font-size: clamp(1.75rem, 8vw, 2.25rem);
    }

    .page-home #why-karvi .grid {
        gap: 1.25rem;
    }

    .page-home #why-karvi .card-theme {
        padding: 1.5rem;
    }

    .page-home .partner-steps__head {
        margin-bottom: 2rem !important;
    }

    .page-home .partner-steps__stage {
        padding: 1.5rem 0 2rem;
    }

    .page-home section.py-24 .text-4xl {
        font-size: clamp(1.75rem, 7vw, 2.25rem);
    }
}

/* ========== MOBILE FLAT CARDS (3D off, readable layout) ========== */
@media (max-width: 767px) {
    .partner-steps__stage,
    .partner-benefits__stage,
    .values-3d__stage,
    .about-hero__stats-stage,
    .about-facts__stage {
        perspective: none !important;
        overflow: visible;
        padding-top: 0.25rem;
        padding-bottom: 1.25rem;
    }

    .partner-steps__grid,
    .partner-benefits__grid,
    .values-3d__grid,
    .about-hero__stats-grid,
    .about-facts__grid {
        transform-style: flat;
        gap: 0.85rem;
    }

    .partner-steps__card,
    .partner-benefits__card,
    .values-3d__card,
    .about-hero__stat-card,
    .about-facts__card {
        animation: none !important;
        transform: none !important;
    }

    .partner-steps__card-inner,
    .partner-benefits__inner,
    .values-3d__card-inner,
    .about-hero__stat-inner,
    .about-facts__inner {
        transform: none !important;
        will-change: auto;
        box-shadow: 0 8px 24px color-mix(in srgb, var(--shadow) 55%, transparent);
    }

    .partner-steps__num,
    .partner-steps__icon,
    .partner-steps__title,
    .partner-steps__text,
    .partner-benefits__icon,
    .values-3d__icon,
    .values-3d__title,
    .values-3d__text,
    .about-hero__stat-icon,
    .about-facts__icon,
    .about-facts__value,
    .about-facts__label {
        transform: none !important;
    }

    /* —— Partner steps (How to become partner) —— */
    .partner-steps__rail {
        display: none;
    }

    .partner-steps__stage {
        padding: 0.5rem 0 1.5rem;
    }

    .partner-steps__grid {
        gap: 0.75rem;
    }

    .partner-steps__card-inner {
        padding: 1.2rem 1.1rem 1.15rem;
        border-left: 3px solid var(--fg);
        border-radius: 0 1rem 1rem 0;
    }

    .partner-steps__num {
        top: 0.85rem;
        right: 0.9rem;
        font-size: 2.25rem;
        opacity: 0.12;
    }

    .partner-steps__icon {
        width: 2.75rem;
        height: 2.75rem;
        margin-bottom: 0.85rem;
        box-shadow: 3px 5px 0 var(--shadow);
    }

    .partner-steps__icon .material-icons {
        font-size: 1.4rem;
    }

    .partner-steps__title {
        font-size: 1.05rem;
        margin-bottom: 0.45rem;
    }

    .partner-steps__text {
        font-size: 0.875rem;
        line-height: 1.5;
    }

    /* —— Partner benefits —— */
    .partner-benefits__grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .partner-benefits__inner {
        padding: 1.15rem 1.05rem 1.1rem;
        border-radius: 1rem;
    }

    .partner-benefits__icon {
        width: 2.65rem;
        height: 2.65rem;
        margin-bottom: 0.75rem;
    }

    .partner-benefits__title {
        font-size: 1rem;
    }

    .partner-benefits__text {
        font-size: 0.875rem;
        line-height: 1.45;
    }

    /* —— About values 3D —— */
    .values-3d__grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .values-3d__card-inner {
        padding: 1.2rem 1.05rem 1.1rem;
        border-radius: 1rem;
        text-align: left;
        align-items: flex-start;
    }

    .values-3d__icon {
        width: 2.65rem;
        height: 2.65rem;
        margin-bottom: 0.75rem;
    }

    .values-3d__title {
        font-size: 1.05rem;
        text-align: left;
    }

    .values-3d__text {
        font-size: 0.875rem;
        text-align: left;
        line-height: 1.5;
    }

    /* —— About hero stats —— */
    .about-hero__stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .about-hero__stat-inner {
        padding: 1.25rem 1rem 1.15rem;
        border-radius: 1rem;
    }

    .about-hero__stat-icon {
        width: 2.75rem;
        height: 2.75rem;
        margin-bottom: 0.75rem;
    }

    /* —— About facts —— */
    .about-facts__grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .about-facts__inner {
        padding: 1.25rem 1rem 1.1rem;
        border-radius: 1rem;
    }

    .about-facts__icon {
        width: 2.65rem;
        height: 2.65rem;
        margin-bottom: 0.65rem;
    }

    .about-facts__value {
        font-size: clamp(1.65rem, 7vw, 2rem);
    }

    .about-facts__label {
        font-size: 0.8125rem;
    }

    /* —— Home feature cards (Why Karvi) —— */
    #why-karvi .card-theme {
        padding: 1.35rem 1.2rem;
        border-radius: 1rem;
    }

    #why-karvi .card-theme .material-icons {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    #why-karvi .card-theme h3 {
        font-size: 1.05rem;
    }

    #why-karvi .card-theme p {
        font-size: 0.875rem;
        line-height: 1.5;
    }

    .page-home .partner-steps {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .page-home .partner-steps__head {
        margin-bottom: 1.5rem !important;
    }
}

/* ========== INNER PAGE TYPOGRAPHY ========== */
@media (max-width: 767px) {
    .main-inner section.py-20,
    .about-page section.py-20,
    .partner-page section.py-20 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}
