/**
 * Mobile-only hero / header revision (max-width: 767px).
 * Desktop layout is unchanged.
 */
@media (max-width: 767px) {
    :root {
        --promo-ticker-height: 2.125rem;
        --header-bar-height: 4.5rem;
        --sj-hero-top-offset: calc(var(--header-bar-height) + var(--promo-ticker-height));
    }

    /* ========== Header ========== */
    /* Logo swap stays in theme.css — do not override here. */

    #header .section-inner {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }

    #header .header-row {
        min-height: var(--header-bar-height);
        align-items: center;
    }

    .header-logo {
        height: 2rem;
        max-width: 8.75rem;
        width: auto;
    }

    .header-actions {
        column-gap: 0.5rem;
    }

    .header-blog-link {
        display: none !important;
    }

    .header-lang {
        position: relative;
        flex-shrink: 0;
    }

    .header-lang__select {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        cursor: pointer;
        z-index: 2;
        font-size: 16px;
    }

    .header-lang__code {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.2rem;
        min-width: 2.75rem;
        height: 2rem;
        padding: 0 0.45rem;
        border-radius: 0.5rem;
        border: 1px solid rgba(255, 255, 255, 0.12);
        background: rgba(26, 26, 26, 0.92);
        color: #fff;
        font-size: 0.6875rem;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        pointer-events: none;
    }

    .header-lang__code::after {
        content: "▾";
        font-size: 0.625rem;
        opacity: 0.72;
        margin-left: 0.1rem;
    }

    [data-theme="light"] .header-lang__code {
        background: rgba(255, 255, 255, 0.92);
        border-color: rgba(0, 0, 0, 0.12);
        color: #171717;
    }

    .header-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.5rem;
        height: 2.5rem;
        border-radius: 0.5rem;
        color: rgba(255, 255, 255, 0.88);
        background: transparent;
        border: 0;
        cursor: pointer;
        flex-shrink: 0;
    }

    [data-theme="light"] .header-menu-btn {
        color: #404040;
    }

    .header-menu-btn:hover,
    .header-menu-btn:focus-visible {
        background: rgba(255, 255, 255, 0.08);
        outline: none;
    }

    [data-theme="light"] .header-menu-btn:hover,
    [data-theme="light"] .header-menu-btn:focus-visible {
        background: rgba(0, 0, 0, 0.06);
    }

    .mobile-nav-panel {
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        background: rgba(13, 13, 13, 0.96);
        backdrop-filter: blur(12px);
        padding: 0.5rem 1rem 0.75rem;
    }

    [data-theme="light"] .mobile-nav-panel {
        background: rgba(255, 249, 245, 0.98);
        border-top-color: rgba(0, 0, 0, 0.06);
    }

    .mobile-nav-panel[hidden] {
        display: none !important;
    }

    .mobile-nav-panel:not([hidden]) {
        display: block;
    }

    .mobile-nav-link {
        display: block;
        padding: 0.75rem 0.25rem;
        font-size: 0.9375rem;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.88);
        text-decoration: none;
    }

    [data-theme="light"] .mobile-nav-link {
        color: #262626;
    }

    .mobile-nav-theme {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        margin-top: 0.25rem;
        padding: 0.65rem 0.25rem;
        border: 0;
        background: transparent;
        color: rgba(255, 255, 255, 0.72);
        font-size: 0.875rem;
        cursor: pointer;
    }

    [data-theme="light"] .mobile-nav-theme {
        color: #525252;
    }

    /* ========== Promo bar ========== */
    .promo-ticker {
        height: var(--promo-ticker-height);
        background-color: #242424 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
        text-decoration: none;
    }

    .promo-ticker__static {
        display: flex;
        align-items: center;
        justify-content: center;
        height: var(--promo-ticker-height);
        padding: 0 0.75rem;
        font-size: 0.6875rem;
        font-weight: 500;
        letter-spacing: 0.01em;
        line-height: 1.2;
        text-align: center;
        color: rgba(255, 255, 255, 0.78);
        white-space: nowrap;
    }

    .promo-ticker-viewport--scroll {
        display: none !important;
    }

    .promo-ticker-claim {
        display: none !important;
    }

    /* ========== Hero: swap desktop / mobile copy ========== */
    #hero.sj-hero .hero__copy--desktop {
        display: none !important;
    }

    #hero.sj-hero .hero__theme-toggle {
        display: none !important;
    }

    #hero.sj-hero {
        --sj-hero-text: #ffffff;
        --sj-hero-muted: rgba(255, 255, 255, 0.72);
        --sj-hero-accent: #ea580c;
        background: #0c0c0c !important;
        color: #fff;
        min-height: 100svh !important;
        min-height: 100dvh !important;
    }

    #hero.sj-hero .hero__container {
        position: relative;
        padding-top: var(--sj-hero-top-offset);
        min-height: 100svh;
        min-height: 100dvh;
    }

    #hero.sj-hero .hero__content {
        position: relative;
        z-index: 2;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: stretch !important;
        box-sizing: border-box;
        width: 100%;
        height: calc(100svh - var(--sj-hero-top-offset));
        height: calc(100dvh - var(--sj-hero-top-offset));
        min-height: calc(100svh - var(--sj-hero-top-offset)) !important;
        min-height: calc(100dvh - var(--sj-hero-top-offset)) !important;
        max-height: calc(100svh - var(--sj-hero-top-offset));
        max-height: calc(100dvh - var(--sj-hero-top-offset));
        padding: 1.25rem 1rem 1.5rem !important;
        overflow: visible;
    }

    #hero.sj-hero .hero__copy--mobile {
        --hero-type-scale: 1;
        --hero-text-gap: 0.7rem;
        display: flex !important;
        flex-direction: column;
        flex: 1 1 0%;
        min-height: 0;
        width: 100%;
    }

    #hero.sj-hero .hero__text-stack {
        flex: 1 1 0%;
        min-height: 0;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        gap: calc(var(--hero-text-gap) * var(--hero-type-scale));
        max-width: 22rem;
        width: 100%;
        padding-bottom: 1.25rem;
    }

    #hero.sj-hero .hero__eyebrow {
        margin: 0;
        font-family: Inter, 'SF Pro Display', sans-serif;
        font-size: calc(0.6875rem * var(--hero-type-scale));
        font-weight: 700;
        letter-spacing: 0.1em;
        line-height: 1.25;
        text-transform: uppercase;
        color: var(--sj-hero-accent) !important;
        max-width: 16rem;
    }

    #hero.sj-hero .hero__headline {
        margin: 0;
        max-width: 18.5rem;
        font-family: Georgia, "Times New Roman", serif;
        font-size: calc(2.05rem * var(--hero-type-scale));
        font-weight: 500;
        letter-spacing: -0.03em;
        line-height: 1.03;
        color: #fff !important;
    }

    #hero.sj-hero .hero__support {
        margin: 0;
        max-width: 20.625rem;
        font-size: calc(0.975rem * var(--hero-type-scale));
        line-height: 1.45;
        color: rgba(255, 255, 255, 0.72) !important;
    }

    #hero.sj-hero .hero__support > span {
        display: block;
    }

    #hero.sj-hero .hero__support > span + span {
        margin-top: 0.75rem;
    }

    #hero.sj-hero .hero__mobile-actions {
        position: relative;
        z-index: 3;
        flex: 0 0 auto;
        flex-shrink: 0;
        margin-top: 0;
        padding-top: 0;
        width: 100%;
        max-width: 22rem;
    }

    #hero.sj-hero .hero__cta-primary {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 3.5rem;
        padding: 0 1.25rem;
        border-radius: 0.875rem;
        background: #ea580c;
        color: #fff !important;
        font-family: Inter, 'SF Pro Display', sans-serif;
        font-size: 1.0625rem;
        font-weight: 700;
        letter-spacing: 0.01em;
        line-height: 1.2;
        text-decoration: none;
        box-shadow: none;
        border: 0;
        transition: background-color 0.15s ease, transform 0.15s ease;
    }

    #hero.sj-hero .hero__cta-primary:hover,
    #hero.sj-hero .hero__cta-primary:focus-visible {
        background: #dc4a04;
        color: #fff !important;
        transform: translateY(-1px);
    }

    #hero.sj-hero .hero__cta-primary:active {
        transform: translateY(0);
        background: #c2410c;
    }

    #hero.sj-hero .hero__availability {
        margin: 0.7rem 0 0;
        font-size: 0.8125rem;
        line-height: 1.35;
        text-align: center;
        color: rgba(255, 255, 255, 0.62) !important;
    }

    #hero.sj-hero .hero__store-badges {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.625rem !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0.9rem 0 0 !important;
        padding: 0 !important;
    }

    #hero.sj-hero .hero__store-badge {
        display: block;
        flex: 1 1 0;
        min-width: 0;
        max-width: 9.75rem;
        line-height: 0;
        text-decoration: none;
        opacity: 1;
        filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.35));
        transition: transform 0.15s ease, opacity 0.15s ease;
    }

    #hero.sj-hero .hero__store-badge:hover,
    #hero.sj-hero .hero__store-badge:focus-visible {
        transform: translateY(-1px);
        opacity: 0.95;
    }

    #hero.sj-hero .hero__store-badge img {
        display: block;
        width: 100%;
        height: auto;
        max-height: 2.5rem;
        object-fit: contain;
        object-position: center;
    }

    #hero.sj-hero .hero__store-badge--apple img {
        max-height: 2.5rem;
    }

    #hero.sj-hero .hero__store-badge--google img {
        max-height: 2.75rem;
    }

    /* Background photo + contrast gradient */
    #hero.sj-hero .hero__media {
        position: absolute !important;
        inset: 0;
        z-index: 0;
        order: unset;
        width: 100%;
        height: 100%;
        min-height: 100svh !important;
        margin: 0 !important;
        aspect-ratio: unset !important;
        overflow: hidden;
        pointer-events: none;
        background: #0c0c0c;
    }

    #hero.sj-hero .hero__image {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        min-height: 100svh !important;
        object-fit: cover;
        object-position: 48% 24%;
        transform: scale(1);
        transform-origin: 48% 26%;
        opacity: 1;
        filter: none;
    }

    #hero.sj-hero .hero__media::before {
        display: block !important;
        content: "";
        position: absolute;
        inset: 0;
        z-index: 1;
        pointer-events: none;
        background: linear-gradient(
            180deg,
            rgba(12, 12, 12, 0.58) 0%,
            rgba(12, 12, 12, 0.78) 55%,
            rgba(12, 12, 12, 0.96) 100%
        );
    }

    [data-theme="light"] #hero.sj-hero .hero__media::before {
        background: linear-gradient(
            180deg,
            rgba(12, 12, 12, 0.58) 0%,
            rgba(12, 12, 12, 0.78) 55%,
            rgba(12, 12, 12, 0.96) 100%
        );
    }

    /* Dark: match light overlay (override legacy radial in index.html) */
    [data-theme="dark"] #hero.sj-hero .hero__media::before {
        background: linear-gradient(
            180deg,
            rgba(12, 12, 12, 0.58) 0%,
            rgba(12, 12, 12, 0.78) 55%,
            rgba(12, 12, 12, 0.96) 100%
        ) !important;
    }
}

@media (max-width: 767px) and (max-height: 740px) {
    #hero.sj-hero .hero__mobile-actions {
        padding-top: 0;
    }
}

@media (min-width: 768px) {
    .promo-ticker__static {
        display: none;
    }

    .header-lang__code {
        display: none;
    }

    .header-lang__select {
        position: static;
        opacity: 1;
        width: auto;
        height: auto;
    }

    .header-menu-btn,
    .mobile-nav-panel {
        display: none !important;
    }

    #hero.sj-hero .hero__copy--mobile {
        display: none !important;
    }
}
