:root {
    --void-black: #050508;
    --void-dark: #0A0A0F;
    --void-card: #0F0F18;
    --neon-cyan: #00D4FF;
    --neon-blue: #4D9FFF;
    --ease-quiet: cubic-bezier(.22, 1, .36, 1);
    --ease-precise: cubic-bezier(.4, 0, .2, 1);
    --ease-emphasis: cubic-bezier(.16, 1, .3, 1);
}

html,
body {
    background: var(--void-black);
    color: #fff;
}

body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--void-black);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.55);
}

::selection {
    background: var(--neon-cyan);
    color: var(--void-black);
}

/* ===== Custom Cursor (desktop only) ===== */
.cursor-dot,
.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    transition: width .25s ease, height .25s ease, background .25s ease;
}

.cursor-ring {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transition: transform .35s var(--ease-quiet), width .35s ease, height .35s ease, border-color .35s ease;
}

.cursor-grow .cursor-dot {
    width: 0;
    height: 0;
}

.cursor-grow .cursor-ring {
    width: 60px;
    height: 60px;
    border-color: var(--neon-cyan);
}

@media (hover: none),
(pointer: coarse) {

    .cursor-dot,
    .cursor-ring {
        display: none !important;
    }

    * {
        cursor: auto !important;
    }
}

/* ===== Glyph rain canvas ===== */
.glyph-rain {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.45;
}

/* ===== Hero scramble title ===== */
.hero-title {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 0.95;
}

.hero-title.is-decoding {
    text-shadow: 0 0 14px rgba(0, 212, 255, 0.55), 0 0 28px rgba(0, 212, 255, 0.3);
}

/* ===== Scrub blur manifesto ===== */
.manifesto .word {
    display: inline-block;
    opacity: 0;
    filter: blur(12px) brightness(30%);
    will-change: filter, opacity;
}

/* ===== Section label / headings ===== */
.section-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--neon-cyan);
}

.heading-1 {
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
}

.heading-2 {
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.05;
}

/* ===== Buttons ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--neon-cyan);
    color: var(--void-black);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 700;
    transition: all .4s var(--ease-quiet);
}

.btn-primary:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 212, 255, 0.35);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 500;
    transition: all .4s var(--ease-quiet);
}

.btn-secondary:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

/* ===== Feature row hover (hairline accent bar) ===== */
.feature-row {
    position: relative;
    transition: background .4s var(--ease-quiet);
}

.feature-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 0;
    background: var(--neon-cyan);
    transition: height 600ms var(--ease-quiet);
}

.feature-row:hover::before {
    height: 100%;
}

.feature-row:hover .feature-title {
    color: var(--neon-cyan);
}

.feature-row:hover .feature-desc {
    opacity: 1;
}

.feature-row:hover .feature-icon {
    color: var(--neon-cyan);
    transform: translateX(4px);
}

.feature-row .feature-title,
.feature-row .feature-icon {
    transition: color .4s var(--ease-quiet), transform .4s var(--ease-quiet);
}

.feature-row .feature-desc {
    transition: opacity .4s var(--ease-quiet);
}

/* ===== Service card ===== */
.service-card {
    background: var(--void-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all .5s var(--ease-quiet);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
    transform: translateX(-100%);
    transition: transform .9s var(--ease-quiet);
}

.service-card:hover::before {
    transform: translateX(100%);
}

.service-card:hover {
    border-color: rgba(0, 212, 255, 0.25);
    transform: translateY(-4px);
}

.service-card:hover .service-icon {
    color: var(--neon-cyan);
    transform: scale(1.08);
}

.service-icon {
    transition: all .4s var(--ease-quiet);
}

.service-card:hover .service-arrow {
    transform: translate(4px, -4px);
    color: var(--neon-cyan);
}

.service-arrow {
    transition: all .4s var(--ease-quiet);
}

/* ===== Portfolio card ===== */
.portfolio-card {
    position: relative;
    overflow: hidden;
}

.portfolio-img-wrap {
    overflow: hidden;
    position: relative;
}

/* About section image: landscape on mobile, portrait on desktop */
#about .portfolio-img-wrap {
    aspect-ratio: 16/9;
}

@media (min-width: 1024px) {
    #about .portfolio-img-wrap {
        aspect-ratio: 4/5;
    }
}

.portfolio-img {
    transition: transform 1.2s var(--ease-quiet), filter .8s ease;
    filter: grayscale(40%);
}

.portfolio-card:hover .portfolio-img {
    transform: scale(1.06);
    filter: grayscale(0%);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(5, 5, 8, 0.92));
    pointer-events: none;
}

/* ===== Testimonial card ===== */
.testimonial-card {
    background: var(--void-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all .5s var(--ease-quiet);
}

.testimonial-card:hover {
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateY(-3px);
}

/* ===== Team card ===== */
.team-card {
    position: relative;
}

.team-img-wrap {
    overflow: hidden;
    position: relative;
    aspect-ratio: 3/4;
}

.team-img-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(5, 5, 8, 0.92));
    pointer-events: none;
}

.team-img {
    transition: all .8s var(--ease-quiet);
    filter: grayscale(100%);
}

.team-card:hover .team-img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

/* ===== Counter ===== */
.counter-num {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-feature-settings: 'tnum';
}

/* ===== FAQ accordion ===== */
.faq-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.faq-item::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 0;
    width: 2px;
    height: 0;
    background: var(--neon-cyan);
    transition: height .5s var(--ease-quiet);
}

.faq-item.open::before,
.faq-item:hover::before {
    height: 100%;
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .55s var(--ease-quiet), opacity .4s ease, padding .4s ease;
}

.faq-item.open .faq-content {
    max-height: 360px;
    opacity: 1;
    padding-bottom: 2rem;
}

.faq-item.open .faq-toggle {
    transform: rotate(45deg);
    color: var(--neon-cyan);
}

.faq-item.open .faq-question {
    color: var(--neon-cyan);
}

.faq-toggle,
.faq-question {
    transition: transform .4s var(--ease-quiet), color .4s ease;
}

/* ===== Form ===== */
.form-input,
.form-textarea,
.form-select {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding: 1rem 0;
    color: #fff;
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: border-color .4s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-bottom-color: var(--neon-cyan);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.5);
}

.form-input.invalid {
    border-bottom-color: #ff4d6d;
}

.form-error {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #ff4d6d;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 0.5rem;
    opacity: 0;
    transition: opacity .3s ease;
}

.form-error.show {
    opacity: 1;
}

/* ===== Marquee ===== */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.marquee-track {
    animation: marquee 50s linear infinite;
}

/* ===== Noise overlay (film grain) ===== */
.noise-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 100;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===== Mobile menu ===== */
.mobile-menu {
    transform: translateX(100%);
    transition: transform .55s var(--ease-quiet);
    will-change: transform;
}

.mobile-menu.open {
    transform: translateX(0);
}

/* Backdrop overlay */
.menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 8, 0.75);
    backdrop-filter: blur(4px);
    z-index: 59;
    opacity: 0;
    pointer-events: none;
    transition: opacity .45s var(--ease-quiet);
}

.menu-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

/* Hamburger bars — animated to X when menu is open */
.hamburger-bar {
    display: block;
    width: 22px;
    height: 1.5px;
    background: #fff;
    transition: transform .4s var(--ease-quiet), opacity .3s ease, width .3s ease;
    transform-origin: center;
}

.menu-open .hamburger-bar:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}

.menu-open .hamburger-bar:nth-child(2) {
    opacity: 0;
    width: 0;
}

.menu-open .hamburger-bar:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
}

/* Mobile nav link hover indicator */
.mobile-link {
    position: relative;
    padding-left: 0;
    transition: color .3s ease, padding-left .35s var(--ease-quiet);
}

.mobile-link::before {
    content: '/';
    position: absolute;
    left: 0;
    color: var(--neon-cyan);
    opacity: 0;
    transition: opacity .3s ease;
    font-size: 0.85em;
}

.mobile-link:hover {
    color: var(--neon-cyan);
    padding-left: 1.25rem;
}

.mobile-link:hover::before {
    opacity: 1;
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {

    .glyph-rain,
    .marquee-track {
        animation: none !important;
    }

    .glyph-rain {
        display: none;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}