.hero-services {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
    row-gap: 2.75rem;
}

@media (max-width: 1024px) {
    .hero-services {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .hero-services {
        grid-template-columns: 1fr;
    }
}

/* Base styles, animations, and global typography */

@keyframes fadeIn {
    0% { 
        opacity: 0; 
        transform: translateY(20px);
    }
    100% { 
        opacity: 1; 
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.fade-in.visible {
    visibility: visible;
    animation: fadeIn 0.28s ease-out forwards;
}

body {
    font-family: "IBM Plex Mono", monospace;
    font-weight: 300;
    background-color: #fcfcfc;
    color: #111;
    letter-spacing: 0.01em;
}

#mainContent {
    background: repeating-linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.04) 0px,
        rgba(0, 0, 0, 0.04) 1px,
        transparent 1px,
        transparent 160px
    );
}

.page-shell {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.85);
    box-shadow: 16px 16px 0px 0px rgba(0, 0, 0, 0.08);
    padding: 4rem 3rem;
}

.mono-heading {
    font-size: clamp(2.5rem, 4vw, 4.5rem);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 500;
    color: #000;
    margin-bottom: 1.5rem;
}

.meta-label {
    font-size: 0.75rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: #555;
}

.divider-line {
    width: 100%;
    height: 1px;
    background: rgba(0, 0, 0, 0.12);
}

.outline-box {
    border: 1px solid rgba(0, 0, 0, 0.35);
    padding: 2rem;
    background: #fff;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.outline-box:hover {
    transform: translate(-12px, -12px);
    box-shadow: 24px 24px 0 rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.6);
}

.outline-box dt {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

.outline-box dd {
    flex: 1;
    font-size: 0.85rem;
    line-height: 1.7;
    color: #555;
}

.outline-box--muted {
    background: #f7f7f5;
}

.tag-capsule {
    display: inline-flex;
    align-items: center;
    border: 1px solid #000;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #000;
}

.button-primary {
    background: linear-gradient(45deg, #000, #1a1a1a, #000);
    background-size: 200% 200%;
    color: #fff;
    border: 1px solid #000;
    padding: 0.9rem 1.8rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    animation: aiPulse 3s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
}

.button-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.2), transparent);
    animation: aiScan 2s linear infinite;
}

.button-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(0, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 0, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(0, 255, 0, 0.05) 0%, transparent 50%);
    animation: aiGlow 4s ease-in-out infinite alternate;
    pointer-events: none;
}

.button-primary:hover {
    background: linear-gradient(45deg, #1a1a1a, #333, #1a1a1a);
    background-size: 200% 200%;
    color: #00ffff;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    transform: translateY(-2px);
    animation: aiPulse 1s ease-in-out infinite;
}

.button-primary:hover::before {
    animation: aiScan 1s linear infinite;
}

/* Compact variant for inline usage within small text */
.button-primary.button-compact, .button-primary--compact {
    padding: 0.4rem 0.6rem;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    line-height: 1.2;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.08);
}

/* Extra-tight variant for very small inline usage */
.button-primary.button-xtight, .button-primary--xtight {
    padding: 0.2rem 0.3rem;
    font-size: 0.5rem;
    letter-spacing: 0.14em;
    line-height: 0.8;
    box-shadow: 0 0 6px rgba(0, 255, 255, 0.06);
}

@keyframes aiPulse {
    0%, 100% { 
        background-position: 0% 50%;
        box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
    }
    50% { 
        background-position: 100% 50%;
        box-shadow: 0 0 25px rgba(0, 255, 255, 0.2);
    }
}

@keyframes aiScan {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes aiGlow {
    0% { opacity: 0.3; }
    100% { opacity: 0.7; }
}

/* Apply AI effect to other black buttons */
.bg-indigo-600, .bg-indigo-500, 
button[class*="bg-black"], 
button[class*="bg-indigo"] {
    background: linear-gradient(45deg, #000, #1a1a1a, #000) !important;
    background-size: 200% 200% !important;
    color: #fff !important;
    border: 1px solid #000 !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
    animation: aiPulse 3s ease-in-out infinite !important;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1) !important;
}

.bg-indigo-600::before, .bg-indigo-500::before,
button[class*="bg-black"]::before, 
button[class*="bg-indigo"]::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.2), transparent) !important;
    animation: aiScan 2s linear infinite !important;
}

.bg-indigo-600::after, .bg-indigo-500::after,
button[class*="bg-black"]::after, 
button[class*="bg-indigo"]::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: 
        radial-gradient(circle at 20% 20%, rgba(0, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 0, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(0, 255, 0, 0.05) 0%, transparent 50%) !important;
    animation: aiGlow 4s ease-in-out infinite alternate !important;
    pointer-events: none !important;
}

.bg-indigo-600:hover, .bg-indigo-500:hover,
button[class*="bg-black"]:hover, 
button[class*="bg-indigo"]:hover {
    background: linear-gradient(45deg, #1a1a1a, #333, #1a1a1a) !important;
    background-size: 200% 200% !important;
    color: #00ffff !important;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3) !important;
    transform: translateY(-2px) !important;
    animation: aiPulse 1s ease-in-out infinite !important;
}

.bg-indigo-600:hover::before, .bg-indigo-500:hover::before,
button[class*="bg-black"]:hover::before, 
button[class*="bg-indigo"]:hover::before {
    animation: aiScan 1s linear infinite !important;
}

.button-secondary {
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.8rem;
    padding: 0.9rem 1.5rem;
    border: 1px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    text-decoration: none;
    position: relative;
    white-space: nowrap;
}

.button-secondary:hover {
    border-color: rgba(0, 0, 0, 0.4);
    color: #111;
}

.grid-lines {
    position: relative;
    isolation: isolate;
}

.grid-lines::before,
.grid-lines::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
    pointer-events: none;
    mix-blend-mode: multiply;
}

.grid-lines::after {
    transform: skewX(-12deg);
    opacity: 0.35;
}

/* Global scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #040404;
}

::-webkit-scrollbar-thumb {
    background: #333333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #444444;
}

/* Content visibility transitions */
.content-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.27s cubic-bezier(0.4,0,0.2,1);
}

.content-visible {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.27s cubic-bezier(0.4,0,0.2,1);
}