:root {
    --lv2-white: #ffffff;
    --lv2-glass: rgba(255, 255, 255, 0.14);
    --lv2-glass-border: rgba(255, 255, 255, 0.28);
    --lv2-pad: clamp(16px, 3vw, 40px);
}

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

html {
    height: 100%;
    overflow: hidden;
}

body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    font-family: 'Montserrat', system-ui, sans-serif;
    color: var(--lv2-white);
    -webkit-font-smoothing: antialiased;
}

.lv2 {
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Language switcher — liquid glass */
.lv2__lang {
    position: absolute;
    top: max(12px, env(safe-area-inset-top, 12px));
    right: var(--lv2-pad);
    z-index: 5;
    pointer-events: auto;
}

.lv2__lang-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 4px;
    border-radius: 999px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.22) 0%,
        rgba(255, 255, 255, 0.08) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.32);
    backdrop-filter: blur(18px) saturate(1.6);
    -webkit-backdrop-filter: blur(18px) saturate(1.6);
    box-shadow:
        0 8px 28px rgba(12, 40, 28, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.lv2__lang-glider {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 4px);
    border-radius: 999px;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.42) 0%,
        rgba(255, 255, 255, 0.18) 100%
    );
    box-shadow:
        0 4px 14px rgba(255, 255, 255, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.lv2__lang-switch[data-lang="kz"] .lv2__lang-glider {
    transform: translateX(100%);
}

.lv2__lang-btn {
    position: relative;
    z-index: 1;
    min-width: 44px;
    padding: 8px 14px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--lv2-white);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1;
    cursor: pointer;
    opacity: 0.72;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.lv2__lang-btn.is-active {
    opacity: 1;
}

.lv2__lang-btn:hover {
    opacity: 1;
}

.lv2__lang-btn:active {
    transform: scale(0.96);
}

.lv2__lang-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.85);
    outline-offset: 2px;
}

/* Background — плавная анимация orange · green · mint */
.lv2__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(
        -45deg,
        #ff7a28 0%,
        #ffb347 18%,
        #ff9f4a 32%,
        #2d9a6f 52%,
        #3cb88a 68%,
        #8ee4bc 82%,
        #ff8f3a 100%
    );
    background-size: 400% 400%;
    animation: lv2GradientFlow 16s ease-in-out infinite;
    overflow: hidden;
}

.lv2__bg::before,
.lv2__bg::after {
    content: '';
    position: absolute;
    inset: -50%;
    pointer-events: none;
}

.lv2__bg::before {
    background:
        radial-gradient(circle at 25% 30%, rgba(255, 180, 90, 0.9) 0%, transparent 48%),
        radial-gradient(circle at 78% 68%, rgba(26, 120, 85, 0.8) 0%, transparent 52%);
    animation: lv2MeshA 20s ease-in-out infinite;
}

.lv2__bg::after {
    background:
        radial-gradient(circle at 68% 22%, rgba(168, 240, 200, 0.75) 0%, transparent 46%),
        radial-gradient(circle at 18% 78%, rgba(255, 105, 40, 0.7) 0%, transparent 50%);
    animation: lv2MeshB 24s ease-in-out infinite;
}

.lv2__blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.55;
    mix-blend-mode: soft-light;
}

.lv2__blob--1 {
    width: 55vw;
    height: 55vw;
    max-width: 720px;
    max-height: 720px;
    background: #ffb347;
    top: -14%;
    right: -10%;
    animation: lv2Blob1 19s ease-in-out infinite;
}

.lv2__blob--2 {
    width: 48vw;
    height: 48vw;
    max-width: 620px;
    max-height: 620px;
    background: #2d9a6f;
    bottom: -12%;
    left: -8%;
    animation: lv2Blob2 22s ease-in-out infinite;
}

.lv2__blob--3 {
    width: 38vw;
    height: 38vw;
    max-width: 440px;
    max-height: 440px;
    background: #a8f0d0;
    top: 42%;
    left: 32%;
    animation: lv2Blob3 17s ease-in-out infinite;
}

@keyframes lv2GradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes lv2MeshA {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 1; }
    33% { transform: translate(10%, -8%) scale(1.14) rotate(10deg); opacity: 0.85; }
    66% { transform: translate(-6%, 7%) scale(0.92) rotate(-6deg); opacity: 1; }
}

@keyframes lv2MeshB {
    0%, 100% { transform: translate(0, 0) scale(1.02) rotate(0deg); opacity: 0.9; }
    33% { transform: translate(-9%, 6%) scale(1.16) rotate(-8deg); opacity: 1; }
    66% { transform: translate(7%, -5%) scale(0.94) rotate(5deg); opacity: 0.82; }
}

@keyframes lv2Blob1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-6vw, 5vh) scale(1.14); }
    66% { transform: translate(4vw, -4vh) scale(0.92); }
}

@keyframes lv2Blob2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(7vw, -6vh) scale(1.1); }
    66% { transform: translate(-5vw, 4vh) scale(1.06); }
}

@keyframes lv2Blob3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-4vw, -5vh) scale(1.18); }
    66% { transform: translate(5vw, 6vh) scale(0.9); }
}

.lv2__stage {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: clamp(8px, 1.5vh, 16px) 0;
}

.lv2__disc {
    position: absolute;
    width: min(92vmin, 94dvh);
    height: min(92vmin, 94dvh);
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.26), rgba(255, 200, 140, 0.18));
    box-shadow:
        0 48px 96px rgba(20, 80, 55, 0.2),
        inset 0 2px 12px rgba(255, 255, 255, 0.35);
    animation: lv2DiscFloat 6s ease-in-out infinite;
}

.lv2__mockup-scene {
    position: relative;
    z-index: 2;
    width: auto;
    height: min(88dvh, 960px);
    max-height: 88dvh;
    max-width: min(520px, 94vw);
    margin-top: -2vh;
    transition: transform 0.15s ease-out;
    animation: lv2MockupFloat 5s ease-in-out infinite;
    transform-style: preserve-3d;
}

.lv2__mockup-wrap {
    position: relative;
    height: 100%;
    width: auto;
    max-width: 100%;
}

.lv2__mockup {
    display: block;
    height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 40px 80px rgba(40, 0, 20, 0.42));
    user-select: none;
    pointer-events: none;
}

.lv2__chip {
    position: absolute;
    z-index: 4;
    padding: clamp(11px, 1.6vh, 16px) clamp(16px, 2.8vw, 30px);
    border-radius: 999px;
    font-size: clamp(0.92rem, 2vw, 1.28rem);
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 32px rgba(12, 52, 43, 0.24);
    animation: lv2ChipBob 4.5s ease-in-out infinite;
    pointer-events: none;
}

.lv2__chip--fresh {
    top: 8%;
    left: -55%;
    right: 0;
    width: fit-content;
    margin-inline: auto;
    background: rgba(255, 255, 255, 0.95);
    color: #145c49;
    border: 1px solid rgba(20, 92, 73, 0.14);
    animation-delay: -1.1s;
}

.lv2__chip--discount {
    top: 20%;
    right: -5%;
    background: rgba(18, 40, 32, 0.92);
    color: #fff;
    animation-delay: 0s;
}

.lv2__chip--delivery {
    bottom: 6%;
    left: 0;
    right: -20%;
    width: fit-content;
    margin-inline: auto;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.32);
    color: #fff;
    animation-delay: -3.3s;
}

.lv2__chip--price {
    bottom: 26%;
    left: -24%;
    background: linear-gradient(135deg, #ff7a28, #ffb347);
    color: #fff;
    animation-delay: -2.2s;
}

@keyframes lv2ChipBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes lv2DiscFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(3deg); }
}

@keyframes lv2MockupFloat {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -10px; }
}

.lv2__content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    width: 100%;
    padding:
        clamp(16px, 3vh, 28px)
        var(--lv2-pad)
        max(clamp(12px, 2vh, 24px), env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(16px, 3vw, 48px);
    align-items: end;
    pointer-events: none;
}

.lv2__content-left,
.lv2__content-right {
    width: 100%;
    min-width: 0;
}

.lv2__content-left,
.lv2__content-right,
.lv2__store {
    pointer-events: auto;
}

.lv2__eyebrow {
    margin: 0 0 clamp(10px, 1.8vh, 18px);
    font-size: clamp(0.78rem, 1.6vw, 1rem);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.88;
}

.lv2__title {
    margin: 0;
    font-size: clamp(2.25rem, 7.5vw, 5rem);
    font-weight: 800;
    line-height: 0.94;
    letter-spacing: -0.045em;
    text-shadow: 0 2px 28px rgba(0, 0, 0, 0.2);
}

.lv2__lead {
    margin: 0 0 clamp(14px, 2.2vh, 24px);
    font-size: clamp(1.05rem, 2.4vw, 1.55rem);
    font-weight: 500;
    line-height: 1.45;
    opacity: 0.94;
    max-width: 34ch;
    margin-left: auto;
    text-align: right;
}

.lv2__lead-line {
    display: block;
}

.lv2__stores {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.lv2__store {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px 10px 14px;
    border-radius: 999px;
    background: var(--lv2-glass);
    border: 1px solid var(--lv2-glass-border);
    backdrop-filter: blur(16px) saturate(1.5);
    color: var(--lv2-white);
    text-decoration: none;
    transition: transform 0.25s ease, background 0.25s ease;
    min-width: 0;
}

.lv2__store:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.22);
}

.lv2__store svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.lv2__store span {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    font-size: 0.85rem;
    font-weight: 700;
}

.lv2__store span small {
    font-size: 0.55rem;
    font-weight: 500;
    opacity: 0.85;
}

.lv2__store[aria-disabled="true"] {
    opacity: 0.45;
    pointer-events: none;
}

.lv2-reveal {
    opacity: 0;
    transform: translateY(16px);
    animation: lv2Reveal 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: var(--d, 0ms);
}

@keyframes lv2Reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Tablet & mobile — grid: hero + bottom sheet ── */
@media (max-width: 1024px) {
    :root {
        --lv2-pad: clamp(16px, 4vw, 24px);
    }

    .lv2 {
        display: grid;
        grid-template-rows: minmax(0, 1fr) auto;
        grid-template-areas:
            "hero"
            "panel";
    }

    .lv2__stage {
        position: relative;
        inset: auto;
        grid-area: hero;
        min-height: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        padding:
            calc(env(safe-area-inset-top, 0px) + 52px)
            clamp(12px, 3vw, 20px)
            4px;
        overflow: visible;
    }

    .lv2__stage::after {
        display: none;
    }

    .lv2__content {
        position: relative;
        inset: auto;
        z-index: 4;
        grid-area: panel;
        display: flex;
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        margin-top: 0;
        padding:
            clamp(16px, 2.8vh, 20px)
            var(--lv2-pad)
            calc(10px + env(safe-area-inset-bottom, 0px));
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        pointer-events: auto;
    }

    .lv2__content-left,
    .lv2__content-right {
        max-width: 100%;
    }

    .lv2__content-right {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .lv2__eyebrow {
        margin-bottom: 8px;
        font-size: clamp(0.62rem, 2.4vw, 0.75rem);
        letter-spacing: 0.12em;
        opacity: 0.9;
    }

    .lv2__title {
        font-size: clamp(1.65rem, 6.2vw, 2.35rem);
        max-width: none;
        line-height: 0.98;
        letter-spacing: -0.03em;
    }

    .lv2__lead {
        display: none;
    }

    .lv2__stores {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .lv2__store {
        width: 100%;
        justify-content: center;
        min-height: 44px;
        padding: 8px 10px 8px 8px;
    }

    .lv2__store svg {
        width: 18px;
        height: 18px;
    }

    .lv2__store span {
        font-size: 0.72rem;
    }

    .lv2__store span small {
        font-size: 0.5rem;
    }

    .lv2__mockup-scene {
        height: min(100%, 520px);
        max-height: 100%;
        max-width: min(300px, 78vw);
        margin-top: 0;
        flex-shrink: 1;
    }

    .lv2__disc {
        width: min(86vw, 360px);
        height: min(86vw, 360px);
        top: 50%;
        left: 50%;
        margin-left: calc(min(86vw, 360px) * -0.5);
        margin-top: calc(min(86vw, 360px) * -0.5);
        animation: none;
    }

    .lv2__chip--fresh { left: -38%; }
    .lv2__chip--price { left: -16%; }
    .lv2__chip--delivery { right: -12%; }
}

/* ── Mobile refinements ── */
@media (max-width: 768px) {
    .lv2__lang {
        top: max(10px, env(safe-area-inset-top, 10px));
        right: clamp(12px, 3vw, 16px);
    }

    .lv2__lang-btn {
        min-width: 40px;
        padding: 7px 12px;
        font-size: 0.72rem;
    }

    .lv2__mockup-scene {
        max-width: min(288px, 76vw);
    }

    .lv2__disc {
        width: min(88vw, 340px);
        height: min(88vw, 340px);
        margin-left: calc(min(88vw, 340px) * -0.5);
        margin-top: calc(min(88vw, 340px) * -0.5);
    }

    .lv2__chip {
        font-size: clamp(0.72rem, 3.1vw, 0.88rem);
        padding: 7px 12px;
    }

    .lv2__chip--fresh {
        top: 16%;
        left: 12%;
        right: auto;
    }

    .lv2__chip--discount {
        top: 14%;
        right: -5%;
    }

    .lv2__chip--delivery {
        bottom: 11%;
        right: 11%;
        left: auto;
    }

    .lv2__chip--price {
        bottom: 20%;
        left: -10%;
    }

    .lv2__title {
        font-size: clamp(1.5rem, 7.2vw, 2rem);
    }
}

/* ── Small phones ── */
@media (max-width: 480px) {
    .lv2__stage {
        padding-top: calc(env(safe-area-inset-top, 0px) + 48px);
    }

    .lv2__mockup-scene {
        max-width: min(272px, 80vw);
    }

    .lv2__disc {
        width: min(90vw, 320px);
        height: min(90vw, 320px);
        margin-left: calc(min(90vw, 320px) * -0.5);
        margin-top: calc(min(90vw, 320px) * -0.5);
    }

    .lv2__chip {
        font-size: 0.66rem;
        padding: 6px 10px;
    }

    .lv2__chip--fresh { top: 16%; left: 12%; }
    .lv2__chip--discount { top: 14%; right: -5%; }
    .lv2__chip--delivery { bottom: 11%; right: 11%; }
    .lv2__chip--price { bottom: 20%; left: -10%; }

    .lv2__content {
        gap: 10px;
        padding-top: 14px;
        padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    }

    .lv2__content-right {
        gap: 0;
    }

    .lv2__title {
        font-size: clamp(1.38rem, 10vw, 3rem);
    }

    .lv2__stores {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .lv2__store {
        min-height: 42px;
        padding: 7px 8px;
    }

    .lv2__store span {
        font-size: 0.66rem;
    }
}

/* ── Landscape phones ── */
@media (max-height: 520px) and (orientation: landscape) {
    .lv2 {
        display: block;
    }

    .lv2__stage {
        position: absolute;
        inset: 0;
        padding-top: calc(env(safe-area-inset-top, 0px) + 40px);
        padding-bottom: 0;
    }

    .lv2__stage::after {
        display: none;
    }

    .lv2__mockup-scene {
        height: min(78dvh, 340px);
        max-width: min(240px, 32vh);
        margin-top: 0;
    }

    .lv2__disc {
        width: min(72vmin, 88dvh);
        height: min(72vmin, 88dvh);
    }

    .lv2__chip {
        font-size: 0.62rem;
        padding: 5px 9px;
    }

    .lv2__chip--fresh { top: 2%; left: -22%; }
    .lv2__chip--price { bottom: 20%; left: -10%; }

    .lv2__content {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        display: grid;
        margin-top: 0;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        padding: 12px var(--lv2-pad) max(8px, env(safe-area-inset-bottom));
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        border: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .lv2__content-left {
        grid-column: 1;
    }

    .lv2__content-right {
        grid-column: 2;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        align-items: flex-end;
    }

    .lv2__title {
        font-size: clamp(1.25rem, 4.5vh, 1.65rem);
    }

    .lv2__eyebrow {
        font-size: 0.58rem;
        margin-bottom: 4px;
    }

    .lv2__lead {
        display: none;
    }

    .lv2__stores {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 6px;
        width: auto;
    }

    .lv2__store {
        width: auto;
        min-height: auto;
        padding: 6px 10px 6px 8px;
    }

    .lv2__store span {
        font-size: 0.68rem;
    }

    .lv2__store span small {
        font-size: 0.48rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lv2__bg,
    .lv2__bg::before,
    .lv2__bg::after,
    .lv2__blob,
    .lv2__disc,
    .lv2__mockup-scene,
    .lv2__chip,
    .lv2-reveal {
        animation: none !important;
    }

    .lv2__disc {
        transform: none !important;
    }

    .lv2__bg {
        background-position: 50% 50%;
    }

    .lv2-reveal {
        opacity: 1;
        transform: none;
    }
}
