:root {
    --background: 0 12% 5%;
    --foreground: 20 20% 96%;
    --card: 0 14% 9%;
    --card-foreground: 20 20% 96%;
    --popover: 0 14% 9%;
    --popover-foreground: 20 20% 96%;
    --primary: 355 88% 52%;
    --primary-foreground: 20 20% 98%;
    --secondary: 0 45% 15%;
    --secondary-foreground: 20 20% 96%;
    --muted: 0 10% 14%;
    --muted-foreground: 15 10% 65%;
    --accent: 16 92% 54%;
    --accent-foreground: 0 12% 6%;
    --destructive: 0 78% 58%;
    --destructive-foreground: 20 20% 96%;
    --border: 0 35% 22%;
    --input: 0 25% 16%;
    --ring: 355 88% 52%;
    --radius: .35rem;
    --hero-overlay: linear-gradient(180deg, hsla(0, 30%, 3%, .88) 0%, hsla(0, 45%, 8%, .74) 44%, hsla(16, 65%, 14%, .58) 100%);
    --section-dark: 0 20% 3%;
    --section-light: 20 18% 92%;
    --section-light-foreground: 0 25% 9%;
    --ember-gold: 38 100% 55%;
    --steel: 0 4% 60%;
}

body {
    background:
        radial-gradient(ellipse 80% 50% at 10% -10%, hsla(355, 88%, 45%, .18), transparent 50%),
        radial-gradient(ellipse 60% 40% at 95% 5%, hsla(16, 92%, 50%, .14), transparent 45%),
        radial-gradient(ellipse 70% 40% at 50% 110%, hsla(0, 60%, 20%, .14), transparent 50%),
        linear-gradient(180deg, hsl(0 12% 5%) 0%, hsl(0 13% 6%) 50%, hsl(0 15% 7%) 100%);
    color: hsl(var(--foreground));
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: .03;
    background-image:
        linear-gradient(hsla(355, 88%, 52%, .7) 1px, transparent 1px),
        linear-gradient(90deg, hsla(355, 88%, 52%, .7) 1px, transparent 1px);
    background-size: 40px 40px;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: .02;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        hsla(355, 88%, 52%, .12) 2px,
        hsla(355, 88%, 52%, .12) 4px
    );
}

main {
    position: relative;
    z-index: 1;
}

.text-gradient {
    background: linear-gradient(95deg, hsl(var(--primary)) 0%, hsl(var(--accent)) 55%, hsl(var(--ember-gold)) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradient-shift 6s ease-in-out infinite;
    filter: drop-shadow(0 0 18px hsl(var(--primary) / .35));
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

.neon-glow {
    text-shadow:
        0 0 6px hsl(var(--primary) / .9),
        0 0 18px hsl(var(--primary) / .45),
        0 0 36px hsl(var(--accent) / .3);
}

.section-light {
    background:
        linear-gradient(135deg, hsl(20 18% 92%) 0%, hsl(15 22% 90%) 42%, hsl(0 20% 93%) 100%);
    color: hsl(var(--section-light-foreground));
    position: relative;
    overflow: hidden;
}

.section-light::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .05;
    background-image:
        linear-gradient(hsla(355, 88%, 40%, .9) 1px, transparent 1px),
        linear-gradient(90deg, hsla(16, 92%, 40%, .9) 1px, transparent 1px);
    background-size: 56px 56px;
}

.section-light > .container {
    position: relative;
    z-index: 1;
}

.section-dark {
    background:
        linear-gradient(180deg, hsl(0 20% 3%) 0%, hsl(0 25% 6%) 50%, hsl(16 30% 9%) 100%);
    position: relative;
    overflow: hidden;
}

.section-dark::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, hsla(355, 88%, 45%, .10), transparent 55%),
        radial-gradient(ellipse 40% 30% at 100% 100%, hsla(16, 92%, 50%, .08), transparent 50%);
}

.section-dark > .container {
    position: relative;
    z-index: 1;
}

nav {
    background: hsl(var(--background) / .88) !important;
    box-shadow:
        0 0 32px hsl(var(--primary) / .10),
        0 1px 0 hsl(var(--primary) / .35),
        0 14px 40px hsl(0 60% 2% / .60);
    border-bottom: 1px solid hsl(var(--primary) / .20) !important;
}

nav::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, hsl(var(--primary)), hsl(var(--accent)), hsl(var(--primary)), transparent);
    opacity: .6;
}

.site-logo {
    border-radius: 4px;
    box-shadow:
        0 0 20px hsl(var(--primary) / .35),
        0 0 36px hsl(var(--accent) / .15);
    transition: box-shadow .3s, transform .3s;
}

.site-logo:hover {
    box-shadow:
        0 0 28px hsl(var(--primary) / .50),
        0 0 48px hsl(var(--accent) / .25);
    transform: scale(1.04);
}

.bg-card {
    background: hsl(var(--card) / .92);
    box-shadow:
        inset 0 1px 0 hsl(var(--primary) / .10),
        0 0 0 1px hsl(var(--border) / .70);
    backdrop-filter: blur(12px);
}

.neon-card {
    position: relative;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.neon-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 5%, hsl(var(--primary)), hsl(var(--accent)), transparent 95%);
    opacity: .75;
    z-index: 2;
}

.neon-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity .3s;
    background: radial-gradient(circle at 50% 0%, hsl(var(--primary) / .08), transparent 70%);
}

.neon-card:hover::after {
    opacity: 1;
}

.neon-frame {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
}

.neon-frame::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    border-radius: inherit;
    box-shadow:
        inset 0 0 0 1px hsl(var(--primary) / .25),
        inset 0 -40px 60px hsla(0, 60%, 4%, .55);
}

.neon-frame img {
    display: block;
    transition: transform .6s ease, filter .4s ease;
}

.neon-frame:hover img {
    transform: scale(1.04);
    filter: saturate(1.15) contrast(1.08) brightness(1.05);
}

#hero {
    background: hsl(0 12% 4%);
}

#hero img {
    filter: saturate(1.15) contrast(1.10) brightness(.80);
}

#hero .hero-grid {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image:
        linear-gradient(hsla(355, 88%, 52%, .12) 1px, transparent 1px),
        linear-gradient(90deg, hsla(355, 88%, 52%, .12) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 70% 60% at center, black 15%, transparent 72%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at center, black 15%, transparent 72%);
}

#hero .hero-scanline {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        hsla(355, 88%, 52%, .03) 3px,
        hsla(355, 88%, 52%, .03) 6px
    );
}

.review-thumb {
    position: relative;
    overflow: hidden;
}

.review-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, hsla(0, 50%, 4%, .85) 100%);
    pointer-events: none;
}

#services .group:hover,
#stats .bg-card:hover,
.grid button.bg-card:hover,
.neon-card:hover {
    transform: translateY(-3px);
    box-shadow:
        0 0 32px hsl(var(--primary) / .20),
        0 8px 32px hsl(0 60% 2% / .50),
        0 0 0 1px hsl(var(--primary) / .50),
        inset 0 0 24px hsl(var(--primary) / .05);
    border-color: hsl(var(--primary) / .55) !important;
}

.btn-neon {
    position: relative;
    background: linear-gradient(135deg, hsl(355 88% 44%) 0%, hsl(6 88% 42%) 55%, hsl(16 92% 46%) 100%);
    box-shadow:
        0 0 24px hsl(var(--primary) / .45),
        0 0 48px hsl(var(--accent) / .18),
        inset 0 1px 0 hsl(355 88% 70% / .30);
    border: 1px solid hsl(var(--primary) / .55);
    transition: box-shadow .3s, transform .2s;
    overflow: hidden;
}

.btn-neon::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, hsl(16 92% 80% / .15) 50%, transparent 60%);
    transform: translateX(-100%);
    transition: transform .5s ease;
}

.btn-neon:hover::before {
    transform: translateX(100%);
}

.btn-neon:hover {
    box-shadow:
        0 0 36px hsl(var(--primary) / .65),
        0 0 72px hsl(var(--accent) / .30),
        inset 0 1px 0 hsl(355 88% 70% / .40);
    transform: translateY(-2px);
}

#contact.bg-primary {
    position: relative;
    background:
        linear-gradient(135deg, hsl(355 88% 34%) 0%, hsl(6 75% 28%) 45%, hsl(16 92% 38%) 100%);
    box-shadow: inset 0 0 100px hsl(var(--primary) / .12);
    overflow: hidden;
}

#contact.bg-primary::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, hsla(355, 88%, 55%, .15), transparent 40%),
        radial-gradient(circle at 80% 50%, hsla(16, 92%, 55%, .12), transparent 40%);
    pointer-events: none;
}

#contact.bg-primary > .container {
    position: relative;
    z-index: 1;
}

.stat-number {
    text-shadow:
        0 0 12px hsl(var(--primary) / .70),
        0 0 28px hsl(var(--primary) / .35);
}

.tech-badge {
    display: inline-block;
    font-family: 'Share Tech Mono', monospace;
    font-size: .68rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    padding: .3rem .85rem;
    border: 1px solid hsl(var(--primary) / .45);
    color: hsl(var(--primary));
    background: hsl(var(--primary) / .07);
    box-shadow:
        0 0 14px hsl(var(--primary) / .22),
        inset 0 0 12px hsl(var(--primary) / .05);
    border-radius: 2px;
}

.nav-link:hover {
    text-shadow: 0 0 10px hsl(var(--primary) / .4);
}

input:focus,
textarea:focus {
    box-shadow:
        0 0 0 1px hsl(var(--primary) / .50),
        0 0 16px hsl(var(--primary) / .15) !important;
}

footer {
    box-shadow: inset 0 1px 0 hsl(var(--primary) / .12);
}

.content-identity-line {
    opacity: .68;
}

@keyframes neon-pulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 14px hsl(var(--primary) / .22), inset 0 0 12px hsl(var(--primary) / .05);
    }
    50% {
        opacity: .75;
        box-shadow: 0 0 22px hsl(var(--primary) / .35), inset 0 0 16px hsl(var(--primary) / .08);
    }
}

.neon-pulse {
    animation: neon-pulse 3s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .text-gradient,
    .neon-pulse {
        animation: none;
    }

    .neon-card:hover,
    .btn-neon:hover {
        transform: none;
    }
}
