
* {
    scroll-behavior: smooth;
}

body {
    background: #FAFAF8;
}

::selection {
    background: #144b8a;
    color: #fff;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #F2F2EF;
}

::-webkit-scrollbar-thumb {
    background: #C9C9C1;
    border-radius: 10px;
    border: 2px solid #F2F2EF;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* Micro-dot mesh background */
.dot-mesh {
    background-image: radial-gradient(rgba(20, 22, 26, 0.10) 1px, transparent 1px);
    background-size: 22px 22px;
}

.dot-mesh-light {
    background-image: radial-gradient(rgba(20, 22, 26, 0.06) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Asymmetric clipped top bar */
.clip-topbar {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 1.5% 100%);
}

@media (max-width: 640px) {
    .clip-topbar {
        clip-path: none;
    }
}

/* Pulsing availability dot */
.pulse-dot {
    position: relative;
}

.pulse-dot::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    background: #FF6A00;
    animation: pulse-ring 2s cubic-bezier(.4, 0, .6, 1) infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: .55;
    }

    70% {
        transform: scale(2.4);
        opacity: 0;
    }

    100% {
        transform: scale(2.4);
        opacity: 0;
    }
}

/* Glass header */
.glass-nav {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border: 1px solid rgba(20, 22, 26, 0.06);
}

.glass-nav.scrolled {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 16px 40px -22px rgba(20, 22, 26, 0.35);
}

.icon-float {
    transition: transform .3s ease, color .3s ease;
}

.icon-float:hover {
    transform: translateY(-3px);
    color: #858CF8;
}

.nav-link {
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #4AB0CC;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 2px;
    background: #4AB0CC;
    transition: width .3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mega dropdown */
.mega-dropdown {
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 8px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
}

.has-mega:hover .mega-dropdown,
.has-mega:focus-within .mega-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

/* Hamburger -> X morph */
.bun-top,
.bun-bottom,
.bun-mid {
    transition: transform .35s cubic-bezier(.65, 0, .35, 1), opacity .25s ease;
    transform-origin: center;
}

.hamburger.open .bun-top {
    transform: translateY(6px) rotate(45deg);
}

.hamburger.open .bun-bottom {
    transform: translateY(-6px) rotate(-45deg);
}

.hamburger.open .bun-mid {
    opacity: 0;
}

/* Fullscreen mobile overlay */
.mobile-overlay {
    clip-path: circle(0% at 100% 0%);
    transition: clip-path .6s cubic-bezier(.65, 0, .35, 1);
}

.mobile-overlay.open {
    clip-path: circle(150% at 100% 0%);
}

.stagger-link {
    opacity: 0;
    transform: translateX(24px);
    transition: opacity .45s ease, transform .45s ease;
}

.mobile-overlay.open .stagger-link {
    opacity: 1;
    transform: translateX(0);
}

/* Blueprint corner brackets */
.blueprint-frame {
    position: relative;
}

.blueprint-frame::before,
.blueprint-frame::after,
.bp-tr,
.bp-bl {
    content: '';
    position: absolute;
    width: 26px;
    height: 26px;
    border-color: #2F6FED;
}

.blueprint-frame::before {
    top: -1px;
    left: -1px;
    border-top: 2px dashed;
    border-left: 2px dashed;
}

.blueprint-frame::after {
    bottom: -1px;
    right: -1px;
    border-bottom: 2px dashed;
    border-right: 2px dashed;
}

.bp-tr {
    top: -1px;
    right: -1px;
    border-top: 2px dashed #2F6FED;
    border-right: 2px dashed #2F6FED;
}

.bp-bl {
    bottom: -1px;
    left: -1px;
    border-bottom: 2px dashed #2F6FED;
    border-left: 2px dashed #2F6FED;
}

/* Typewriter cursor */
.type-cursor {
    display: inline-block;
    width: 3px;
    height: 0.85em;
    background: #FF6A00;
    margin-left: 4px;
    vertical-align: -0.1em;
    animation: caret 0.9s steps(1) infinite;
}

@keyframes caret {

    0%,
    49% {
        opacity: 1;
    }

    50%,
    100% {
        opacity: 0;
    }
}

/* CTA expand on hover */
.cta-expand .cta-arrow {
    transition: transform .35s cubic-bezier(.65, 0, .35, 1);
}

.cta-expand:hover .cta-arrow {
    transform: translateX(6px);
}

.cta-expand {
    transition: padding .35s ease, box-shadow .35s ease;
}

.cta-expand:hover {
    padding-right: 2.25rem;
}

/* Reveal on scroll */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1);
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Product card interactions */
.prod-card .prod-img {
    transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}

.prod-card:hover .prod-img {
    transform: scale(1.05) rotate(1deg);
}

.prod-card .spec-btn {
    transform: translateY(100%);
    transition: transform .4s cubic-bezier(.2, .7, .2, 1);
}

.prod-card:hover .spec-btn {
    transform: translateY(0);
}

.prod-card .radial-hover {
    opacity: 0;
    transition: opacity .5s ease;
}

.prod-card:hover .radial-hover {
    opacity: 1;
}

/* About floating border (opposite-direction parallax) */
.float-border {
    transition: transform .1s linear;
}

select {
    appearance: none;
    -webkit-appearance: none;
}

input::placeholder,
textarea::placeholder {
    color: #A6A9AE;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.link-arrow svg {
    transition: transform .25s ease;
}

.link-arrow:hover svg {
    transform: translateX(4px);
}

.counter-card {
    transition: transform .3s ease, box-shadow .3s ease;
}

.counter-card:hover {
    transform: translateY(-4px);
}
