:root {
    --accent: #f97316;
    --bg: #09090b;
}

* {
    box-sizing: border-box;
}

html {
    width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    width: 100%;
    min-width: 320px;
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

img, svg, iframe {
    max-width: 100%;
}

iframe {
    display: block;
}

header {
    isolation: isolate;
}

header .container {
    max-width: 1280px;
}

header a[href^="tel:"] {
    white-space: nowrap;
    letter-spacing: -0.02em;
}

.glass-input,
button,
a {
    -webkit-tap-highlight-color: transparent;
}

.glass-input:invalid {
    box-shadow: none;
}

.form-field-error {
    border-color: rgba(248, 113, 113, 0.85) !important;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.12) !important;
}

.consult-icon {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: var(--accent);
    background: rgba(249, 115, 22, 0.14);
    border: 1px solid rgba(249, 115, 22, 0.32);
    box-shadow: inset 0 0 18px rgba(249, 115, 22, 0.10), 0 0 24px rgba(249, 115, 22, 0.10);
}

.tilt-wrapper {
    touch-action: pan-y;
}

.tilt-element {
    transform-origin: center center;
}

@keyframes clusterMobileFloat {
    0%, 100% { transform: perspective(1000px) rotateX(0deg) rotateY(0deg) translate3d(0, 0, 0); }
    50% { transform: perspective(1000px) rotateX(3deg) rotateY(-5deg) translate3d(0, -8px, 0); }
}

@media (hover: none) and (pointer: coarse) {
    .tilt-element {
        animation: clusterMobileFloat 5s ease-in-out infinite;
    }
}

@media (max-width: 1023px) {
    header .container {
        flex-wrap: wrap !important;
        gap: 0.7rem !important;
    }

    header nav.hidden {
        display: flex !important;
        order: 3;
        width: 100%;
        gap: 1rem !important;
        overflow-x: auto;
        padding-top: 0.55rem;
        padding-bottom: 0.2rem;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    header nav.hidden::-webkit-scrollbar {
        display: none;
    }

    header nav.hidden a {
        flex: 0 0 auto;
        white-space: nowrap;
        font-size: 0.82rem !important;
    }

    main {
        padding-top: 9.5rem !important;
    }
}

@media (max-width: 767px) {
    body {
        font-size: 15px;
    }

    header .container {
        padding: 0.75rem 0.9rem !important;
    }

    header svg.w-10.h-10 {
        width: 2rem !important;
        height: 2rem !important;
    }

    header .text-2xl {
        font-size: 1.25rem !important;
        line-height: 1 !important;
    }

    header a[href^="tel:"] {
        font-size: 0.86rem !important;
    }

    header a[href^="https://wa.me"],
    header a[href^="tg://resolve"] {
        width: 2.15rem !important;
        height: 2.15rem !important;
        min-width: 2.15rem !important;
    }

    header a[href^="https://wa.me"] svg,
    header a[href^="tg://resolve"] svg {
        width: 1rem !important;
        height: 1rem !important;
    }

    main .container {
        width: 100%;
    }

    h1 {
        word-break: normal;
    }

    .glass {
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .hover-glow:hover,
    .hover-glow:focus,
    .hover-glow:focus-within {
        transform: none !important;
    }

    .tilt-wrapper {
        height: 250px !important;
        max-width: 100% !important;
        margin-top: 0.5rem;
    }

    .tilt-wrapper img {
        width: 112% !important;
        max-width: 112% !important;
        transform: translateY(0) scale(1.15) !important;
    }

    form input,
    form select,
    form button {
        font-size: 16px !important;
    }

    footer .container {
        gap: 1.75rem !important;
    }

    footer iframe {
        min-height: 160px;
    }
}

@media (max-width: 389px) {
    header .container {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        gap: 0.55rem !important;
    }

    header a[href^="tel:"] {
        font-size: 0.78rem !important;
        letter-spacing: -0.04em;
    }

    header a[href^="https://wa.me"],
    header a[href^="tg://resolve"] {
        width: 1.9rem !important;
        height: 1.9rem !important;
        min-width: 1.9rem !important;
    }

    header .gap-2 {
        gap: 0.35rem !important;
    }
}

@media (max-width: 350px) {
    header a[href^="tg://resolve"] {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
