/* LASER BEND — mobile & touch */

html {
    -webkit-text-size-adjust: 100%;
}

body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

body > header {
    padding-top: env(safe-area-inset-top);
}

/* ——— Burger menu ——— */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

body.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

body.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
}

body.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

body.nav-open .nav-backdrop {
    display: block;
}

body.nav-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .navbar {
        position: relative;
        justify-content: flex-start;
    }

    .navbar .logo {
        order: 1;
        z-index: 1002;
        margin-left: 0;
        margin-right: auto;
    }

    .navbar .nav-links {
        order: 2;
        margin-left: 0;
    }

    .navbar .nav-toggle {
        order: 3;
        z-index: 1002;
        margin-left: clamp(8px, 2vw, 12px);
        flex-shrink: 0;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        z-index: 1001;
        width: min(300px, 88vw);
        height: 100%;
        height: 100dvh;
        margin: 0;
        padding: calc(env(safe-area-inset-top) + 72px) 24px calc(env(safe-area-inset-bottom) + 24px);
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        overflow-y: auto;
        flex-wrap: nowrap;
        background: rgba(14, 14, 16, 0.98);
        border-left: 1px solid var(--glass-border);
        box-shadow: -20px 0 60px rgba(0, 0, 0, 0.45);
        transform: translateX(105%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        -webkit-overflow-scrolling: touch;
    }

    body.nav-open .nav-links {
        transform: translateX(0);
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 14px 12px;
        font-size: 1.05rem;
        border-radius: 12px;
    }

    .nav-links a.is-active {
        background: rgba(255, 87, 34, 0.1);
    }

    .nav-links a.is-active::after {
        display: none;
    }

    body > header.is-scrolled,
    body > header {
        background: rgba(11, 11, 12, 0.92);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--glass-border);
    }

    /* ——— Hero (главная) ——— */
    .hero-immersive.hero-carousel {
        min-height: 100svh;
        min-height: 100dvh;
        align-items: flex-end;
    }

    .hero-immersive .hero-inner {
        padding: calc(var(--header-h) + 20px) 20px max(32px, env(safe-area-inset-bottom));
        width: 100%;
    }

    .hero-overlay--video,
    .hero-immersive .hero-overlay {
        background:
            linear-gradient(180deg, rgba(11, 11, 12, 0.25) 0%, rgba(11, 11, 12, 0.45) 38%, rgba(11, 11, 12, 0.92) 72%, rgba(11, 11, 12, 0.98) 100%);
    }

    .hero-video {
        object-position: center 22%;
        transform: scale(1.2);
        filter: contrast(1.04) saturate(1.08) brightness(0.82);
    }

    .hero-has-video .hero-video-layer::after {
        background: radial-gradient(ellipse 90% 50% at 50% 28%, rgba(255, 87, 34, 0.15), transparent 60%);
    }

    .hero-glow {
        top: 28%;
        width: 100%;
        height: 45vh;
    }

    .glare-text {
        font-size: clamp(1.85rem, 8.5vw, 2.35rem) !important;
        line-height: 1.08;
    }

    .hero-content p,
    .carousel-content.hero-content p {
        font-size: 1rem;
        margin-bottom: 16px;
    }

    .trust-line {
        font-size: 0.8rem;
        line-height: 1.45;
        margin-bottom: 20px;
    }

    .hero-eyebrow,
    .reveal-text .tagline {
        font-size: 0.68rem;
        padding: 5px 12px;
        margin-bottom: 14px;
    }

    .hero-cta-group,
    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .hero-cta-group .btn-premium,
    .hero-cta-group .btn-outline,
    .hero-actions .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
        padding: 15px 20px;
    }

    .materials-marquee {
        padding: 12px 0;
    }

    .marquee__item {
        font-size: 0.7rem;
        padding: 0 18px;
    }

    .process-steps--premium {
        grid-template-columns: 1fr !important;
    }

    .process-step {
        padding: 20px 16px;
    }

    .page-home .bento-card {
        min-height: 120px;
        padding: 20px;
    }

    .page-home .home-highlights--volume .bento-card {
        transform: none !important;
    }

    .page-home .home-highlights--volume .bento-card.is-raised {
        transform: none !important;
    }

    .page-home > .cta-premium {
        margin: 28px 16px;
        padding: 32px 20px;
        border-radius: 20px;
        width: auto;
        max-width: none;
        border-left: 1px solid rgba(255, 87, 34, 0.2);
        border-right: 1px solid rgba(255, 87, 34, 0.2);
    }

    .page-home > .cta-premium h2 {
        font-size: 1.45rem;
    }

    .footer-premium__inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-premium__links {
        justify-content: center;
    }

    .mesh-blob {
        filter: blur(60px);
        opacity: 0.85;
    }

    .atmosphere__dust {
        opacity: 0.45;
    }

    /* Внутренние страницы */
    .page-hero {
        min-height: auto;
        padding: calc(var(--header-h) + 28px) 20px 36px;
    }

    .page-hero h1 {
        font-size: clamp(1.65rem, 7vw, 2rem);
    }

    .page-hero__lead {
        font-size: 0.95rem;
    }

    .page-hero__illo {
        max-height: 100px;
        opacity: 0.15;
    }

    .section-shell {
        padding-left: 0;
        padding-right: 0;
    }

    /* ——— Глобально: без горизонтального скролла ——— */
    html {
        overflow-x: clip;
    }

    body {
        overflow-x: clip;
    }

    .nav-links {
        overflow-x: hidden !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        padding-bottom: 0;
    }

    /* ——— CTA (услуги и внутренние — на всю ширину) ——— */
    .page-services .services-premium > .services-cta,
    .page-inner .inner-premium > .cta-premium {
        width: calc(100% + 32px) !important;
        max-width: none !important;
        margin-left: -16px !important;
        margin-right: -16px !important;
        margin-top: 28px !important;
        padding: 28px 20px !important;
        border-radius: 0;
        border-left: none;
        border-right: none;
        box-sizing: border-box;
    }

    .page-services .services-premium > .services-cta h2,
    .page-inner .inner-premium > .cta-premium h2,
    .page-home > .cta-premium h2 {
        font-size: clamp(1.35rem, 5.5vw, 1.65rem);
    }

    .page-services .services-premium > .services-cta p,
    .page-inner .inner-premium > .cta-premium p,
    .page-home > .cta-premium p {
        font-size: 0.92rem;
        margin-bottom: 20px;
    }

    .cta-premium__actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 10px;
    }

    .cta-premium__actions .btn {
        width: 100%;
        justify-content: center;
        min-height: 48px;
        padding: 14px 20px;
    }

    .footer-premium {
        padding: 28px 16px calc(20px + env(safe-area-inset-bottom));
    }

    .footer-premium__links {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .footer-premium__links a {
        padding: 8px 12px;
        font-size: 0.95rem;
    }

    /* ——— Главная: секции ——— */
    .process-strip--premium {
        padding: clamp(36px, 8vw, 48px) 16px;
    }

    .process-strip--premium h2,
    .section-shell > h2 {
        font-size: clamp(1.4rem, 5.5vw, 1.75rem);
        padding: 0 4px;
    }

    .process-strip__lead,
    .home-highlights__lead {
        font-size: 0.9rem;
        padding: 0 4px;
        margin-bottom: 24px;
    }

    .home-highlights--volume {
        padding: clamp(36px, 8vw, 48px) 16px;
    }

    .bento-grid {
        gap: 12px;
    }

    .bento-grid--home .bento-card,
    .bento-grid--stats .bento-card {
        min-height: 110px;
        padding: 18px 16px;
    }

    .process-card {
        padding: 16px;
        gap: 0 12px;
        grid-template-columns: 72px 1fr;
    }

    .process-card__icon-wrap {
        width: 64px;
        height: 64px;
    }

    .process-card__icon {
        width: 40px;
        height: 40px;
    }

    .process-card p {
        font-size: 0.82rem;
    }

    .page-hero--clean.page-hero--services,
    .page-hero--clean.page-hero--inner {
        padding: calc(var(--header-h) + 12px) 16px 18px;
    }

    .page-hero--clean .page-hero__content h1,
    .page-services .page-hero__content h1,
    .page-inner .page-hero__content h1 {
        font-size: clamp(1.5rem, 6.5vw, 1.85rem);
    }

    .page-hero .trust-line {
        font-size: 0.75rem;
        line-height: 1.4;
    }

    /* ——— Услуги (детали в services-premium.css @768) ——— */
    .services-premium {
        padding-bottom: 32px;
    }

    .services-jump {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 16px;
    }

    .services-jump a {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .page-services .services-overview .bento-card h3 {
        font-size: 1rem;
    }

    .page-services .services-overview .bento-card p {
        font-size: 0.85rem;
        line-height: 1.45;
    }

    .page-services .feat-card {
        padding: 18px 16px;
        border-radius: 18px;
    }

    .page-services .feat-card h3 {
        font-size: 1.05rem;
    }

    .page-services .feat-card li {
        font-size: 0.88rem;
    }

    /* ——— Внутренние страницы ——— */
    .inner-premium {
        padding: 12px 16px 28px;
    }

    .calculator-container {
        max-width: none;
        width: 100%;
        padding: 22px 16px;
        border-radius: 18px;
    }

    #order-form label {
        font-size: 0.88rem;
    }

    #order-form select,
    #order-form input {
        min-height: 48px;
        font-size: 16px;
    }

    #order-form button {
        width: 100%;
        min-height: 50px;
        margin-top: 12px;
        font-size: 1rem;
    }

    .result {
        font-size: 1.05rem;
        margin-top: 20px;
    }

    .page-inner .carousel {
        height: min(52vh, 400px);
        border-radius: 16px;
        max-width: 100%;
    }

    .carousel-prev,
    .carousel-next {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }

    .carousel-prev {
        left: 8px;
    }

    .carousel-next {
        right: 8px;
    }

    .carousel-item p {
        margin: 10px;
        padding: 10px 12px;
        font-size: 0.85rem;
        line-height: 1.35;
    }

    .page-inner .about-content {
        padding: 20px 16px;
        border-radius: 18px;
    }

    .page-inner .about-content img {
        width: 100%;
    }

    .page-inner .about > h3 {
        margin-top: 28px;
        margin-bottom: 16px;
        font-size: 1.25rem;
    }

    .page-inner .why-us-container {
        gap: 12px;
        margin-top: 20px;
    }

    .page-inner .why-us-item {
        padding: 16px;
        border-radius: 18px;
    }

    .page-inner .why-us-item__photo {
        aspect-ratio: 16 / 10;
        min-height: 180px;
        margin-bottom: 12px;
    }

    .page-inner .why-us-item__photo img,
    .page-inner .why-us-item > img {
        width: 100%;
        height: 100%;
        min-height: 180px;
        max-height: 220px;
        object-fit: cover;
        object-position: center;
    }

    .page-inner .why-us-item h4 {
        margin-top: 0;
    }

    .page-inner .contact-info {
        padding: 20px 16px;
        text-align: left;
        border-radius: 18px;
    }

    .page-inner .contact-info p {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 10px;
        text-align: left;
    }

    .page-inner .map-container {
        margin-top: 20px;
        padding: 16px;
        border-radius: 18px;
    }

    .page-inner #map {
        height: min(48vh, 300px) !important;
        min-height: 220px;
    }

    /* Без 3D-наклона на тач-устройствах */
    .process-card,
    .process-card.is-raised,
    .page-services .feat-card,
    .page-services .feat-card.is-raised,
    .page-services .services-overview .bento-card,
    .page-services .services-overview .bento-card.is-raised,
    .page-inner .why-us-item,
    .page-inner .why-us-item.is-raised,
    .page-home .home-highlights--volume .bento-card,
    .page-home .home-highlights--volume .bento-card.is-raised {
        transform: none !important;
    }
}

@media (max-width: 480px) {
    :root {
        --header-h: 60px;
    }

    .logo {
        padding: 3px 6px;
        box-shadow:
            0 2px 6px rgba(0, 0, 0, 0.4),
            0 6px 16px rgba(0, 0, 0, 0.26);
    }

    .logo img {
        height: 28px;
        max-width: 84px;
    }

    .footer-premium__logo img {
        height: 30px;
        max-width: min(100%, 280px);
    }

    .glare-text {
        font-size: 1.75rem !important;
    }

    .bento-card h3 {
        font-size: 1.05rem;
    }

    .bento-card--stat strong {
        font-size: 1.5rem;
    }
}
