/* CSS Design System for AHS Developer */
:root {
    /* Color Palette - Concentrated minimalism */
    --bg-primary: #05070A;
    /* Deeper Black */
    --bg-secondary: #0A0D12;
    --accent-primary: #3B82F6;
    /* Electric Blue */

    /* Text Colors */
    --text-primary: #FFFFFF;
    --text-secondary: #94A3B8;
    --text-muted: #475569;

    /* Gradients */
    --gradient-accent: linear-gradient(135deg, #3B82F6 0%, #22D3EE 100%);
    --gradient-glow: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(34, 211, 238, 0) 70%);

    /* Typography Scale */
    --font-h1: clamp(32px, 8vw, 84px);
    --font-h2: clamp(28px, 6vw, 56px);
    --font-h3: clamp(22px, 4vw, 32px);
    --font-body: clamp(16px, 2vw, 18px);
    --font-button: 14px;

    /* Spacing */
    --section-spacing: clamp(120px, 18vw, 240px);
    --container-width: 1200px;
    --border-subtle: 1px solid rgba(255, 255, 255, 0.06);
    --border-radius: 12px;
    --btn-radius: 8px;

    /* Shadows & Effects */
    --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --glow-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body & Core Layout */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Grain Overlay for Premium Feel */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.04;
    pointer-events: none;
    z-index: 5000;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 40px;
    /* Consistent side breathing room */
}

/* Scroll Progress Bar */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--gradient-accent);
    z-index: 2000;
    width: 0%;
    transition: width 0.1s linear;
}

/* Animated Blobs */
.blob-container {
    position: fixed;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
    filter: blur(80px);
}

.blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    /* Further reduced opacity */
    mix-blend-mode: screen;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-primary);
    top: -200px;
    right: -100px;
    animation: moveCircle 30s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: #1E293B;
    /* Neutralized color */
    bottom: -150px;
    left: -100px;
    animation: moveCircle 35s infinite alternate-reverse cubic-bezier(0.4, 0, 0.2, 1);
}

.blob-3 {
    display: none;
    /* Removed for minimalism */
}

@keyframes moveCircle {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(100px, 150px) scale(1.2);
    }

    66% {
        transform: translate(-80px, 80px) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

h1,
h2,
h3 {
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-weight: 700;
}

h1 {
    font-size: var(--font-h1);
    letter-spacing: -0.04em;
    margin-bottom: 2rem;
}

h2 {
    font-size: var(--font-h2);
    margin-bottom: 1.5rem;
}

h3 {
    font-size: var(--font-h3);
    margin-bottom: 1rem;
}

p {
    color: var(--text-secondary);
    font-size: var(--font-body);
    max-width: 700px;
    line-height: 1.8;
}

/* Helper Classes */
.text-gradient {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.section {
    padding: var(--section-spacing) 0;
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 2.5rem 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav.sticky {
    background: rgba(5, 7, 10, 0.9);
    backdrop-filter: blur(20px);
    padding: 1.2rem 0;
    border-bottom: var(--border-subtle);
}

.logo {
    font-size: 1.1rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-primary);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    white-space: nowrap;
}

.nav-links a.active {
    color: var(--text-primary);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--accent-primary);
}

.nav-links {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 1px;
    background: var(--accent-primary);
    transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* Specific nav button refinement */
.nav-links .btn {
    padding: 10px 24px;
    font-size: 10px;
    letter-spacing: 0.15em;
    border-radius: 4px;
    margin-left: 1.5rem;
    /* Offset from links */
    font-weight: 700;
}

.nav-links .btn-primary {
    background-color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    color: white;
}

.nav-links .btn-primary:hover {
    background-color: transparent;
    color: var(--accent-primary);
    box-shadow: none;
}

/* Buttons */
.btn {
    padding: 0.8rem 1.6rem;
    border-radius: var(--btn-radius);
    font-weight: 600;
    font-size: var(--font-button);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: white;
}

.btn-primary:hover {
    box-shadow: var(--glow-shadow);
    transform: translateY(-2px);
    background-color: #2563EB;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
}

.btn-secondary:hover {
    background: var(--accent-primary);
    color: white;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 160px 0 100px;
    /* Accounts for fixed nav */
}

.hero-content {
    max-width: 800px;
}

.hero-content h1 {
    margin-bottom: 2.5rem;
}

.hero-content p {
    margin-bottom: 0;
}

.hero-tagline {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    display: block;
}

.hero-bg {
    position: absolute;
    top: 50%;
    right: -10%;
    transform: translateY(-50%);
    width: 60%;
    height: 80%;
    background: var(--gradient-glow);
    filter: blur(80px);
    z-index: 1;
    pointer-events: none;
}

/* Services / Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: transparent;
    padding: 0;
    border-radius: 0;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    border: none;
    border-top: var(--border-subtle);
    padding-top: 2.5rem;
    backdrop-filter: none;
}

.card:hover {
    transform: none;
    border-color: var(--accent-primary);
    box-shadow: none;
}

.card-icon {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    margin-bottom: 1.5rem;
    color: var(--accent-primary);
}

.card:hover .card-icon {
    background: transparent;
    color: var(--accent-primary);
    transform: translateX(10px);
}

.card-icon svg {
    width: 28px;
    height: 28px;
}

/* Footer */
footer {
    padding: 80px 0 40px;
    background: var(--bg-primary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-logo {
    margin-bottom: 1.5rem;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    font-size: 16px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul li a {
    text-decoration: none;
    color: var(--text-muted);
    transition: color 0.3s;
}

.footer-col ul li a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 14px;
}

/* Magnetic Button Interaction */
.magnetic-wrap {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Refined Stagger Reveal */
.reveal-stagger {
    opacity: 0;
    transform: translateY(30px) skewY(2deg);
    transition: opacity 1.2s cubic-bezier(0.23, 1, 0.32, 1),
        transform 1.2s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform, opacity;
}

.reveal-stagger.active {
    opacity: 1;
    transform: translateY(0) skewY(0deg);
}

/* Portfolio Case Study Hover */
.case-study {
    cursor: pointer;
}

.case-media {
    overflow: hidden;
}

.case-media::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    opacity: 0.1;
}

.case-study:hover .case-media::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Custom Cursor Glow */
.cursor-glow {
    position: fixed;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, rgba(34, 211, 238, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

/* Multi-page Specific Layouts */
.page-header {
    padding: 240px 0 120px;
    text-align: center;
}

.page-header h1 {
    margin-bottom: 2rem;
}

.page-header p {
    margin: 0 auto;
    font-size: 20px;
    opacity: 0.8;
    max-width: 600px;
}

/* Pricing Grid */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.price-card {
    border: var(--border-subtle);
    padding: 5rem 3.5rem;
    transition: all 0.5s ease;
    background: rgba(255, 255, 255, 0.01);
}

.price-card:hover {
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.02);
}

.price-card h4 {
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-size: 11px;
    color: var(--accent-primary);
    margin-bottom: 2.5rem;
}

.price-card .price {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 2.5rem;
    display: block;
    letter-spacing: -0.04em;
}

.price-card ul {
    list-style: none;
    margin-bottom: 4rem;
}

.price-card ul li {
    padding: 1.2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 14px;
}

/* Portfolio Grid */
.portfolio-grid {
    display: flex;
    flex-direction: column;
    gap: 160px;
}

.case-study {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 100px;
    align-items: center;
}

.case-study:nth-child(even) {
    direction: rtl;
}

.case-study:nth-child(even) .case-content {
    direction: ltr;
}

.case-media {
    aspect-ratio: 16 / 10;
    background: #0A0D12;
    border: var(--border-subtle);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.abstract-graphic {
    width: 80%;
    height: 80%;
    z-index: 2;
    filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.2));
}

.case-media::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(34, 211, 238, 0.1) 0%, transparent 50%);
    z-index: 1;
}

.case-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2v-4h4v-2h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2v-4h4v-2H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.case-metrics {
    display: flex;
    gap: 4rem;
    margin-top: 3rem;
}

.case-metrics div span {
    display: block;
    font-size: 40px;
    font-weight: 800;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.case-metrics div label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.mobile-menu-btn:hover {
    transform: scale(1.1);
}

/* Service Detailed */
.service-detailed {
    padding: 120px 0;
    border-top: var(--border-subtle);
}

.service-detailed h2 {
    margin-bottom: 2rem;
}

.service-grid-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
}

.service-grid-item ul {
    list-style: none;
    margin-top: 2rem;
}

.service-grid-item ul li {
    padding: 0.8rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.service-grid-item ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
}


/* Results Grid Perfection */
.results-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    text-align: center;
}

.result-item {
    padding: 4rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.005);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.result-item:hover {
    border-color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.03);
}

.result-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.result-item:hover::before {
    opacity: 1;
}

.result-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.result-label {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-weight: 700;
}

/* Testimonials Section */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 6rem;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 3.5rem;
    position: relative;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.testimonial-card:hover {
    border-color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.02);
    transform: translateY(-10px);
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 2rem;
    left: 2rem;
    font-size: 80px;
    font-family: serif;
    color: var(--accent-primary);
    opacity: 0.1;
    line-height: 1;
}

.testimonial-text {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 2.5rem;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.author-info h4 {
    font-size: 14px;
    margin-bottom: 0.2rem;
    letter-spacing: 0.05em;
}

.author-info span {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

@media (max-width: 992px) {
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 1024px) {
    :root {
        --section-spacing: 120px;
    }

    .container {
        padding: 0 30px;
    }

    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem;
    }
}

@media (max-width: 992px) {

    .case-study,
    .service-grid-item {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .results-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--bg-primary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 1001;
        gap: 2.5rem;
        overflow-y: auto;
        padding: 40px 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        font-size: 18px;
        letter-spacing: 0.2em;
    }

    .nav-links .btn {
        margin-left: 0;
        margin-top: 1rem;
        width: 80%;
        max-width: 300px;
        justify-content: center;
        padding: 1rem;
        font-size: 11px;
    }

    .mobile-menu-btn {
        display: block;
        z-index: 1002;
        position: relative;
    }

    .hero-content {
        text-align: center;
    }

    .hero-content p {
        margin: 0 auto;
    }

    .hero-content div {
        justify-content: center;
        flex-direction: column;
        align-items: center;
        gap: 1.1rem !important;
    }

    .page-header {
        padding: 180px 0 80px;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .case-metrics {
        gap: 2rem;
        flex-wrap: wrap;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
}

@media (max-width: 580px) {
    .container {
        padding: 0 20px;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .case-media {
        aspect-ratio: 1 / 1;
    }

    .case-metrics div span {
        font-size: 32px;
    }
}

@media (max-width: 380px) {
    .container {
        padding: 0 15px;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .nav-links a {
        font-size: 14px;
        letter-spacing: 0.15em;
    }

    .nav-links .btn {
        padding: 0.8rem;
        margin-top: 0.5rem;
    }

    .logo {
        font-size: 0.9rem;
        letter-spacing: 0.1em;
    }

    .case-metrics {
        gap: 1.5rem;
    }

    .case-metrics div span {
        font-size: 28px;
    }

    .price-card {
        padding: 3rem 1.5rem;
    }

    .price-card .price {
        font-size: 42px;
    }
}


/* Subtle Link Underline */
.nav-links a::after {
    height: 1px;
    bottom: -8px;
}