/* ── CSS Custom Properties ── */
:root {
    --brand-lime: #d4ff70;
    --brand-dark: #050608;
    --brand-gray: #121418;
}

/* ── Base ── */
body {
    background-color: var(--brand-dark);
    color: white;
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

.mono {
    font-family: 'JetBrains Mono', monospace;
}

.glow-text {
    text-shadow: 0 0 20px rgba(212, 255, 112, 0.4);
}

.glass {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-gradient {
    background: radial-gradient(circle at 50% 50%, rgba(212, 255, 112, 0.08) 0%, transparent 70%);
}

/* ── Skip-to-content link (accessible) ── */
.skip-to-content {
    position: absolute;
    top: -100%;
    left: 0;
    z-index: 10000;
    padding: 0.75rem 1.5rem;
    background: var(--brand-lime);
    color: var(--brand-dark);
    font-weight: 800;
    text-decoration: none;
    transition: top 0.2s;
}
.skip-to-content:focus {
    top: 0;
}

/* ── Scan line ── */
.scan-line {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--brand-lime), transparent);
    position: absolute;
    animation: scan 6s linear infinite;
    opacity: 0.2;
}

@keyframes scan {
    0% { top: 0; }
    100% { top: 100%; }
}

/* ── Cursor-follower glow: disable on mobile (no hover) ── */
#cursor-glow {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(212, 255, 112, 0.04) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    will-change: left, top;
    transition: left 0.08s ease-out, top 0.08s ease-out;
}

@media (hover: none) and (pointer: coarse) {
    #cursor-glow { display: none; }
}

/* ── Subtle noise texture ── */
.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ── Animated oscilloscope waveform in hero ── */
.waveform-path {
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    animation: draw-wave 4s ease-in-out infinite alternate;
}

@keyframes draw-wave {
    0% { stroke-dashoffset: 800; }
    40% { stroke-dashoffset: 0; }
    60% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -800; }
}

/* ── Card border shimmer on hover ── */
.card-shimmer {
    position: relative;
    overflow: hidden;
}

.card-shimmer::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: conic-gradient(
        transparent 0deg,
        transparent 200deg,
        rgba(212, 255, 112, 0.15) 230deg,
        rgba(212, 255, 112, 0.3) 260deg,
        transparent 290deg,
        transparent 360deg
    );
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: -1;
    animation: shimmer-rotate 3s linear infinite;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
    padding: 2px;
}

.card-shimmer:hover::before,
.card-shimmer:active::before {
    opacity: 1;
}

@keyframes shimmer-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ── Staggered reveal animations ── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ── Pulsing radar dots ── */
.radar-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand-lime);
    box-shadow: 0 0 8px rgba(212, 255, 112, 0.6);
    animation: pulse-dot 2s ease-in-out infinite;
}

.radar-dot:nth-child(1) { top: 25%; left: 30%; animation-delay: 0s; }
.radar-dot:nth-child(2) { top: 55%; left: 65%; animation-delay: 0.7s; }
.radar-dot:nth-child(3) { top: 70%; left: 40%; animation-delay: 1.4s; }
.radar-dot:nth-child(4) { top: 40%; left: 70%; animation-delay: 0.3s; }
.radar-dot:nth-child(5) { top: 60%; left: 25%; animation-delay: 1.0s; }

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(2); opacity: 0.2; }
}

.logo-container {
    width: 40px;
    height: 40px;
    background: #1a1d1a;
    border: 1px solid rgba(212, 255, 112, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-hover {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.card-hover:hover,
.card-hover:active {
    border-color: var(--brand-lime);
    background: rgba(212, 255, 112, 0.03);
    transform: translateY(-8px);
}

/* Fix for italic clipping on the heading */
.heading-italic-fix {
    padding-right: 0.15em;
    margin-right: -0.15em;
}

/* ── Status line typewriter ── */
.typewriter-cursor {
    display: inline-block;
    width: 8px;
    height: 14px;
    background: var(--brand-lime);
    margin-left: 4px;
    animation: blink-cursor 0.8s step-end infinite;
    vertical-align: middle;
}

@keyframes blink-cursor {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ── Hero waveform SVG container styling ── */
.hero-waveform {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 700px;
    height: 60px;
    opacity: 0.12;
}

/* ── Section stagger grid item base ── */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.stagger-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-item:nth-child(1) { transition-delay: 0.05s; }
.stagger-item:nth-child(2) { transition-delay: 0.15s; }
.stagger-item:nth-child(3) { transition-delay: 0.25s; }

/* ── Mobile hamburger menu overlay ── */
#mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(5, 6, 8, 0.97);
    backdrop-filter: blur(24px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

#mobile-menu-overlay.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu-overlay a {
    font-size: 1.25rem;
    color: white;
    text-decoration: none;
    transition: color 0.2s;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-weight: bold;
    font-size: 0.875rem;
}

#mobile-menu-overlay a:hover,
#mobile-menu-overlay a:active {
    color: var(--brand-lime);
}

/* Hamburger button */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 8px;
    z-index: 110;
    position: relative;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 767px) {
    .hamburger { display: flex; }
}

/* ── Responsive typography & spacing ── */
@media (max-width: 639px) {
    .hero-title {
        font-size: 2.5rem !important;
        line-height: 1.1 !important;
    }
    .section-heading {
        font-size: 2.25rem !important;
    }
    .section-padding {
        padding-top: 5rem !important;
        padding-bottom: 5rem !important;
    }
    .cta-heading {
        font-size: 2.75rem !important;
    }
}

@media (min-width: 640px) and (max-width: 767px) {
    .hero-title {
        font-size: 3.5rem !important;
    }
}

@media (max-width: 767px) {
    .hide-mobile { display: none !important; }
    .section-padding {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* ── Responsive grid: 1 col on tiny, 2 on sm, 3 on md+ ── */
@media (max-width: 639px) {
    .responsive-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
}

/* ── Contact CTA tags: wrap better on mobile ── */
@media (max-width: 767px) {
    .cta-tags {
        justify-content: center !important;
    }
}

/* ── Make buttons full-width and easier to tap on mobile ── */
@media (max-width: 479px) {
    .hero-btn {
        width: 100% !important;
        padding: 1rem 1.5rem !important;
        font-size: 0.75rem !important;
    }
    .status-line {
        font-size: 8px !important;
        letter-spacing: 0.4em !important;
        line-height: 1.6 !important;
    }
}

/* ── Prevent overflow on very small screens ── */
@media (max-width: 360px) {
    .hero-title {
        font-size: 2rem !important;
    }
    body { font-size: 14px; }
}

/* ── Reading progress bar ── */
#reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99999;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-lime), #a0e040);
    transition: width 0.1s linear;
}

/* ── Back-to-top button ── */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9998;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--brand-lime);
    color: var(--brand-dark);
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(20px);
    box-shadow: 0 4px 16px rgba(212, 255, 112, 0.3);
}
#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}
#back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(212, 255, 112, 0.5);
}

/* ── Exit-intent newsletter CTA ── */
#exit-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(5, 6, 8, 0.92);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
#exit-modal.open {
    opacity: 1;
    pointer-events: all;
}
#exit-modal .modal-box {
    background: #121418;
    border: 1px solid rgba(212, 255, 112, 0.15);
    border-radius: 16px;
    padding: 3rem 2.5rem;
    max-width: 480px;
    width: 90%;
    text-align: center;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
#exit-modal.open .modal-box {
    transform: scale(1);
}
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.modal-close:hover {
    background: rgba(255,255,255,0.1);
}

/* ── Share buttons bar ── */
.share-bar {
    display: inline-flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: white;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}
.share-btn:hover {
    background: var(--brand-lime);
    border-color: var(--brand-lime);
    color: var(--brand-dark);
}

/* ── Returning visitor badge ── */
#return-badge {
    position: fixed;
    bottom: 5rem;
    left: 1.5rem;
    z-index: 9997;
    background: rgba(212, 255, 112, 0.08);
    border: 1px solid rgba(212, 255, 112, 0.15);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 10px;
    color: var(--brand-lime);
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#return-badge.show {
    opacity: 1;
    transform: translateX(0);
}

/* ── Mobile adjustments for added elements ── */
@media (max-width: 767px) {
    #back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    #return-badge {
        bottom: 4rem;
        left: 1rem;
        font-size: 8px;
        padding: 0.4rem 0.75rem;
        max-width: 160px;
    }
    #exit-modal .modal-box {
        padding: 2rem 1.5rem;
    }
}

/* ── FAQ Accordion ── */
.faq-question {
    cursor: pointer;
    user-select: none;
}
.faq-question::-webkit-details-marker {
    display: none;
}
.faq-item {
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.faq-item:last-child {
    border-bottom: none;
}
.faq-item[open] .faq-chevron {
    transform: rotate(180deg);
}
.faq-chevron {
    transition: transform 0.3s ease;
}

/* ── Trust Bar ── */
.trust-logo {
    height: 28px;
    opacity: 0.35;
    filter: grayscale(1) brightness(1.5);
    transition: opacity 0.3s ease, filter 0.3s ease;
}
.trust-logo:hover {
    opacity: 0.6;
    filter: grayscale(0) brightness(1);
}
@media (max-width: 639px) {
    .trust-logo {
        height: 20px;
    }
}

/* ── Testimonial Carousel ── */
.testimonial-card {
    min-width: 100%;
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.testimonial-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid rgba(212,255,112,0.3);
    background: transparent;
    cursor: pointer;
    transition: background 0.3s ease;
}
.testimonial-dot.active {
    background: var(--brand-lime);
}

/* ── Cookie Consent Banner ── */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99996;
    background: #121418;
    border-top: 1px solid rgba(212, 255, 112, 0.1);
    padding: 1rem 1.5rem;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}
#cookie-banner.show {
    transform: translateY(0);
}
@media (min-width: 768px) {
    #cookie-banner .cookie-content {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 2rem;
    }
}

/* ── Blog Preview Cards ── */
.blog-card {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.blog-card:hover {
    border-color: var(--brand-lime);
    background: rgba(212, 255, 112, 0.03);
    transform: translateY(-4px);
}

/* ═══════════════════════════════════════════
   ACCESSIBILITY & USER EXPERIENCE
   ═══════════════════════════════════════════ */

/* ── Focus-visible for keyboard users ── */
:focus-visible {
    outline: 2px solid var(--brand-lime);
    outline-offset: 3px;
}

/* ── Remove default focus for mouse users ── */
:focus:not(:focus-visible) {
    outline: none;
}

/* ── Smooth scroll (CSS-based) ── */
html {
    scroll-behavior: smooth;
}

/* ── Respect reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    .stagger-item {
        opacity: 1 !important;
        transform: none !important;
    }
    .scan-line,
    .waveform-path,
    .radar-dot,
    .typewriter-cursor,
    .card-shimmer::before {
        animation: none !important;
    }
    #cursor-glow {
        display: none !important;
    }
    .noise-overlay {
        opacity: 0 !important;
    }
}

/* ── Improved contrast on status text ── */
.status-line {
    color: #b8e050;
}

/* ── Print styles ── */
@media print {
    body {
        background: white !important;
        color: black !important;
    }
    nav,
    #cursor-glow,
    .noise-overlay,
    #mobile-menu-overlay,
    .scan-line,
    .hero-waveform,
    .radar-dot,
    .typewriter-cursor {
        display: none !important;
    }
    .glass {
        background: #f5f5f5 !important;
        border: 1px solid #ccc !important;
        backdrop-filter: none !important;
    }
    .hero-gradient {
        background: none !important;
    }
    .reveal,
    .stagger-item {
        opacity: 1 !important;
        transform: none !important;
    }
    a {
        color: #000 !important;
        text-decoration: underline !important;
    }
}

@keyframes ring-expand {
    0% { transform: translate(-50%,-50%) scale(0); opacity: 1; }
    100% { transform: translate(-50%,-50%) scale(2); opacity: 0; }
}
