/* ============================================================
   TechTools – Professional Stylesheet
   Architecture: BEM methodology, mobile-first approach
   ============================================================ */

/* ── CSS Custom Properties ── */
:root {
    /* Colors */
    --color-bg:             #0a0a0f;
    --color-bg-alt:         #111118;
    --color-bg-card:        #16161f;
    --color-bg-card-hover:  #1c1c28;
    --color-surface:        #1e1e2a;
    --color-border:         rgba(255, 255, 255, 0.06);
    --color-border-hover:   rgba(255, 255, 255, 0.12);

    --color-text:           #e4e4eb;
    --color-text-secondary: #8888a0;
    --color-text-muted:     #55556a;

    --color-primary:        #6c5ce7;
    --color-primary-light:  #a29bfe;
    --color-primary-dark:   #5241c5;
    --color-accent:         #00cec9;
    --color-accent-light:   #55efc4;

    --gradient-primary:     linear-gradient(135deg, #6c5ce7 0%, #a29bfe 50%, #00cec9 100%);
    --gradient-text:        linear-gradient(135deg, #a29bfe 0%, #00cec9 100%);
    --gradient-card:        linear-gradient(135deg, rgba(108, 92, 231, 0.08) 0%, rgba(0, 206, 201, 0.04) 100%);
    --gradient-glow:        radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(108, 92, 231, 0.06), transparent 40%);

    /* Typography */
    --font-primary:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono:            'JetBrains Mono', 'Fira Code', monospace;

    --fs-xs:   0.75rem;     /* 12px */
    --fs-sm:   0.875rem;    /* 14px */
    --fs-base: 1rem;        /* 16px */
    --fs-md:   1.125rem;    /* 18px */
    --fs-lg:   1.25rem;     /* 20px */
    --fs-xl:   1.5rem;      /* 24px */
    --fs-2xl:  2rem;        /* 32px */
    --fs-3xl:  2.5rem;      /* 40px */
    --fs-4xl:  3rem;        /* 48px */
    --fs-5xl:  3.5rem;      /* 56px */
    --fs-6xl:  4.5rem;      /* 72px */

    --fw-light:    300;
    --fw-regular:  400;
    --fw-medium:   500;
    --fw-semibold: 600;
    --fw-bold:     700;
    --fw-black:    900;

    --lh-tight:   1.1;
    --lh-snug:    1.25;
    --lh-normal:  1.6;

    /* Spacing */
    --space-xs:  0.25rem;
    --space-sm:  0.5rem;
    --space-md:  1rem;
    --space-lg:  1.5rem;
    --space-xl:  2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    --space-5xl: 8rem;

    /* Layout */
    --container-max:    1280px;
    --container-pad:    1.5rem;
    --header-height:    4.5rem;

    /* Borders & Radius */
    --radius-sm:  0.375rem;
    --radius-md:  0.5rem;
    --radius-lg:  0.75rem;
    --radius-xl:  1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm:   0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md:   0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg:   0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-xl:   0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(108, 92, 231, 0.3);

    /* Transitions */
    --transition-fast:   150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base:   250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow:   400ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 500ms cubic-bezier(0.175, 0.885, 0.32, 1.275);

    /* Premium easing curves */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-in-out-quart: cubic-bezier(0.76, 0, 0.24, 1);
}


/* ── Reset & Base ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-padding-top: var(--header-height);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    font-size: var(--fs-base);
    line-height: var(--lh-normal);
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
    /* Safe area padding for notch devices (iPhone X+) */
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

body.no-scroll {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

input, textarea, select {
    font: inherit;
    color: inherit;
    /* Prevent iOS zoom on focus for inputs < 16px */
    font-size: max(16px, 1em);
}

/* iOS safe areas for fixed elements */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .header {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }

    .back-to-top {
        bottom: calc(2rem + env(safe-area-inset-bottom));
        right: calc(2rem + env(safe-area-inset-right));
    }

    .footer {
        padding-bottom: calc(var(--space-xl) + env(safe-area-inset-bottom));
    }
}

::selection {
    background: rgba(108, 92, 231, 0.3);
    color: #fff;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--color-text-muted);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-secondary);
}


/* ── Utility ── */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-pad);
}

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}


/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.5rem;
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    line-height: 1;
    border-radius: var(--radius-lg);
    transition: all 0.4s var(--ease-out-expo);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.btn--primary {
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.btn--primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.btn--primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(108, 92, 231, 0.45);
}

.btn--primary:hover::before {
    opacity: 1;
}

.btn--primary:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.35);
}

.btn--outline {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border-hover);
}

.btn--outline:hover {
    border-color: var(--color-primary-light);
    color: var(--color-primary-light);
    background: rgba(108, 92, 231, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(108, 92, 231, 0.1);
}

.btn--lg {
    padding: 1rem 2rem;
    font-size: var(--fs-base);
}

.btn--sm {
    padding: 0.5rem 1rem;
    font-size: var(--fs-xs);
}

.btn__icon {
    width: 18px;
    height: 18px;
    transition: transform var(--transition-fast);
}

.btn:hover .btn__icon {
    transform: translateX(3px);
}


/* ── Section Headers ── */
.section-header {
    text-align: center;
    margin-bottom: var(--space-4xl);
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.section-header__tag {
    display: inline-block;
    padding: 0.375rem 1rem;
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-primary-light);
    background: rgba(108, 92, 231, 0.1);
    border: 1px solid rgba(108, 92, 231, 0.2);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-lg);
    position: relative;
    overflow: hidden;
}

.section-header__tag::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(162, 155, 254, 0.1), transparent);
    animation: shimmer-tag 4s ease-in-out infinite;
}

@keyframes shimmer-tag {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(50%); }
}

.section-header__title {
    font-size: clamp(var(--fs-2xl), 5vw, var(--fs-4xl));
    font-weight: var(--fw-bold);
    line-height: var(--lh-tight);
    margin-bottom: var(--space-lg);
}

.section-header__desc {
    font-size: var(--fs-md);
    color: var(--color-text-secondary);
    line-height: var(--lh-normal);
}


/* ── Image Placeholders ── */
.image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    width: 100%;
    max-width: 100%;
    aspect-ratio: 3 / 2;
    background: var(--color-bg-card);
    border: 2px dashed var(--color-border-hover);
    border-radius: 20px;
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
    text-align: center;
    padding: var(--space-xl);
}

.image-placeholder svg {
    width: 48px;
    height: 48px;
    opacity: 0.4;
}

.image-placeholder--large {
    aspect-ratio: 4 / 3;
}

.image-placeholder--portrait {
    aspect-ratio: 4 / 5;
}

.image-placeholder--avatar {
    width: 56px;
    height: 56px;
    aspect-ratio: 1;
    border-radius: var(--radius-full);
    font-size: var(--fs-sm);
    font-weight: var(--fw-bold);
    padding: 0;
    border: 2px solid var(--color-border-hover);
    background: var(--gradient-card);
    color: var(--color-primary-light);
}

.image-placeholder--avatar svg {
    display: none;
}


/* ── Preloader ── */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    transition: opacity 0.8s var(--ease-out-quart),
                visibility 0.8s var(--ease-out-quart);
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader__inner {
    text-align: center;
}

.preloader__logo {
    font-family: var(--font-mono);
    font-size: var(--fs-2xl);
    font-weight: var(--fw-bold);
    margin-bottom: var(--space-xl);
}

.preloader__bracket {
    color: var(--color-primary-light);
}

.preloader__text {
    color: var(--color-text);
}

.preloader__bar {
    width: 200px;
    height: 3px;
    background: var(--color-surface);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.preloader__progress {
    height: 100%;
    width: 0%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    animation: preload-progress 1.5s ease-in-out forwards;
}

@keyframes preload-progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}


/* ── Header ── */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: background 0.4s var(--ease-out-quart),
                border-color 0.4s var(--ease-out-quart),
                box-shadow 0.4s var(--ease-out-quart),
                transform 0.4s var(--ease-out-expo);
    will-change: transform;
}

.header.header--hidden {
    transform: translateY(-100%);
}

.header.scrolled {
    border-bottom-color: var(--color-border);
    background: rgba(10, 10, 15, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.header__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.header__logo {
    font-family: var(--font-mono);
    font-size: var(--fs-lg);
    font-weight: var(--fw-bold);
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.header__logo-bracket {
    color: var(--color-primary-light);
}

.header__logo-text {
    color: var(--color-text);
}

/* ── Desktop Nav ── */
.header__desktop-nav {
    display: flex;
    align-items: center;
}

.header__nav-list {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.header__nav-link {
    padding: 0.5rem 0.75rem;
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--color-text-secondary);
    border-radius: var(--radius-md);
    transition: color 0.3s var(--ease-out-expo),
                background 0.3s var(--ease-out-expo);
    display: block;
    position: relative;
}

.header__nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: transform 0.4s var(--ease-out-expo),
                opacity 0.3s ease;
    opacity: 0;
}

.header__nav-link:hover {
    color: var(--color-text);
}

.header__nav-link.active {
    background: rgba(108, 92, 231, 0.1);
    color: var(--color-primary-light);
}

.header__nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
    opacity: 1;
}

.header__cta {
    font-size: var(--fs-sm);
    flex-shrink: 0;
}

/* ── Hamburger (hidden on desktop) ── */
.header__hamburger {
    display: none;
    position: relative;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
}

.header__hamburger-line {
    display: block;
    position: absolute;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    left: 50%;
    margin-left: -11px;
    transition: transform 0.35s var(--ease-out-expo),
                opacity 0.2s ease,
                top 0.35s var(--ease-out-expo);
}

.header__hamburger-line:nth-child(1) { top: 8px; }
.header__hamburger-line:nth-child(2) { top: 15px; }
.header__hamburger-line:nth-child(3) { top: 22px; }

.header__hamburger.active .header__hamburger-line:nth-child(1) {
    top: 15px;
    transform: rotate(45deg);
}

.header__hamburger.active .header__hamburger-line:nth-child(2) {
    opacity: 0;
}

.header__hamburger.active .header__hamburger-line:nth-child(3) {
    top: 15px;
    transform: rotate(-45deg);
}

/* ── Mobile Overlay ── */
.mobile-overlay {
    display: none;
}

/* ── Mobile Slide-Out Nav (hidden on desktop) ── */
.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
    width: 320px;
    max-width: 85vw;
    background: var(--color-bg);
    border-left: 1px solid var(--color-border);
    display: none;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease-out-expo),
                visibility 0.4s;
    visibility: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.3);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.mobile-nav__header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
    position: relative;
    min-height: var(--header-height);
}

.mobile-nav__logo {
    font-family: var(--font-mono);
    font-size: var(--fs-lg);
    font-weight: var(--fw-bold);
    display: flex;
    align-items: center;
    gap: 2px;
}

.mobile-nav__close {
    position: absolute;
    right: var(--space-lg);
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav__close:hover,
.mobile-nav__close:active {
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.06);
}

.mobile-nav__list {
    flex: 1;
    padding: var(--space-md) 0;
}

.mobile-nav__list li {
    opacity: 0;
    transform: translateX(20px);
}

.mobile-nav.open .mobile-nav__list li {
    opacity: 1;
    transform: translateX(0);
}

.mobile-nav.open .mobile-nav__list li:nth-child(1)  { transition: all 0.4s 0.05s var(--ease-out-expo); }
.mobile-nav.open .mobile-nav__list li:nth-child(2)  { transition: all 0.4s 0.08s var(--ease-out-expo); }
.mobile-nav.open .mobile-nav__list li:nth-child(3)  { transition: all 0.4s 0.11s var(--ease-out-expo); }
.mobile-nav.open .mobile-nav__list li:nth-child(4)  { transition: all 0.4s 0.14s var(--ease-out-expo); }
.mobile-nav.open .mobile-nav__list li:nth-child(5)  { transition: all 0.4s 0.17s var(--ease-out-expo); }
.mobile-nav.open .mobile-nav__list li:nth-child(6)  { transition: all 0.4s 0.20s var(--ease-out-expo); }
.mobile-nav.open .mobile-nav__list li:nth-child(7)  { transition: all 0.4s 0.23s var(--ease-out-expo); }
.mobile-nav.open .mobile-nav__list li:nth-child(8)  { transition: all 0.4s 0.26s var(--ease-out-expo); }
.mobile-nav.open .mobile-nav__list li:nth-child(9)  { transition: all 0.4s 0.29s var(--ease-out-expo); }
.mobile-nav.open .mobile-nav__list li:nth-child(10) { transition: all 0.4s 0.32s var(--ease-out-expo); }

.mobile-nav__link {
    display: flex;
    align-items: center;
    padding: 0.875rem var(--space-xl);
    font-size: var(--fs-base);
    font-weight: var(--fw-medium);
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.mobile-nav__link:hover,
.mobile-nav__link:active {
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.03);
}

.mobile-nav__link.active {
    color: var(--color-primary-light);
    border-left-color: var(--color-primary-light);
    background: rgba(108, 92, 231, 0.06);
}

.mobile-nav__cta {
    margin: var(--space-md) var(--space-xl);
    justify-content: center;
    flex-shrink: 0;
}

.mobile-nav__footer {
    padding: var(--space-lg) var(--space-xl);
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.mobile-nav__contact {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.mobile-nav__contact:hover {
    color: var(--color-primary-light);
}

.mobile-nav__contact svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.5;
}


/* ── Hero ── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: calc(var(--header-height) + var(--space-3xl)) 0 var(--space-3xl);
    overflow: hidden;
}

.hero__bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero__bg-gradient {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.12) 0%, transparent 60%);
    pointer-events: none;
    animation: float-slow 8s ease-in-out infinite;
}

.hero__bg-gradient-secondary {
    position: absolute;
    bottom: -15%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 206, 201, 0.06) 0%, transparent 60%);
    pointer-events: none;
    animation: float-slow 10s ease-in-out infinite reverse;
}

@keyframes float-slow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, -20px); }
}

.hero__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.5rem 1rem;
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--color-accent);
    background: rgba(0, 206, 201, 0.08);
    border: 1px solid rgba(0, 206, 201, 0.2);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-xl);
    transition: box-shadow 1s ease;
}

.hero__badge-dot {
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: var(--radius-full);
    animation: pulse-dot 2s ease-in-out infinite;
}

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

.hero__title {
    font-size: clamp(var(--fs-3xl), 6vw, var(--fs-6xl));
    font-weight: var(--fw-black);
    line-height: var(--lh-tight);
    margin-bottom: var(--space-xl);
    letter-spacing: -0.02em;
}

.hero__title-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero__subtitle {
    font-size: var(--fs-md);
    color: var(--color-text-secondary);
    line-height: var(--lh-normal);
    max-width: 540px;
    margin-bottom: var(--space-2xl);
}

.hero__actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-bottom: var(--space-3xl);
}

.hero__stats {
    display: flex;
    gap: var(--space-3xl);
}

.hero__stat {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.hero__stat-number {
    font-size: var(--fs-3xl);
    font-weight: var(--fw-bold);
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
}

.hero__stat-label {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Hero Code Window */
.hero__code-window {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl), 0 0 80px rgba(108, 92, 231, 0.08);
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
    transition: transform 0.7s var(--ease-out-expo), box-shadow 0.7s ease;
    will-change: transform;
    backface-visibility: hidden;
}

.hero__code-window:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
    box-shadow: var(--shadow-xl), 0 0 100px rgba(108, 92, 231, 0.12);
}

.hero__code-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 0.875rem 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--color-border);
}

.hero__code-dots {
    display: flex;
    gap: 6px;
}

.hero__code-dots span {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
}

.hero__code-dots span:nth-child(1) { background: #ff5f57; }
.hero__code-dots span:nth-child(2) { background: #febc2e; }
.hero__code-dots span:nth-child(3) { background: #28c840; }

.hero__code-filename {
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
}

.hero__code-body {
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: var(--fs-sm);
    line-height: 1.8;
    overflow-x: auto;
}

.hero__code-body code {
    font-family: inherit;
}

.code-keyword  { color: #c678dd; }
.code-variable { color: #e06c75; }
.code-function { color: #61afef; }
.code-method   { color: #61afef; }
.code-property { color: #e5c07b; }
.code-string   { color: #98c379; }
.code-boolean  { color: #d19a66; }
.code-comment  { color: #5c6370; font-style: italic; }
.code-output   { color: #56b6c2; }

/* Hero scroll indicator */
.hero__scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.hero__scroll-arrow {
    width: 20px;
    animation: scroll-bounce 2s ease-in-out infinite;
}

.hero__scroll-arrow svg {
    width: 100%;
    height: auto;
    color: var(--color-text-muted);
}

@keyframes scroll-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}


/* ── Section Transition Dividers ──
   Order: Hero(bg) → TechStack(borders) → Services(bg-alt) → Process(bg) → Demo(bg-alt) → Portfolio(bg) → FAQ(bg) → Contact(bg-alt)
*/
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to bottom, transparent, var(--color-bg));
    pointer-events: none;
    z-index: 0;
}

/* Services (bg-alt) — top glow line after tech-stack */
.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 800px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(108, 92, 231, 0.4), rgba(0, 206, 201, 0.4), transparent);
}

/* Process (bg) — smooth gradient from services bg-alt */
.process::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to bottom, var(--color-bg-alt), var(--color-bg));
    pointer-events: none;
}

/* Process (bg) → Demo (bg-alt) — smooth blend at bottom */
.process::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, var(--color-bg-alt), var(--color-bg));
    pointer-events: none;
}

/* Demo (bg-alt) — top glow line */
.demo-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(108, 92, 231, 0.3), transparent);
}

/* Portfolio (bg) — smooth gradient from demo bg-alt */
.portfolio::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to bottom, var(--color-bg-alt), var(--color-bg));
    pointer-events: none;
}

/* FAQ (bg) — subtle glow line separator */
.faq::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 400px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(108, 92, 231, 0.25), transparent);
}

/* Contact (bg-alt) — smooth gradient from faq bg */
.contact::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to bottom, var(--color-bg), var(--color-bg-alt));
    pointer-events: none;
}

/* Ensure sections have relative positioning for pseudo-elements */
.services,
.process,
.demo-cta,
.portfolio,
.faq,
.contact {
    position: relative;
}


/* ── Services ── */
.services {
    padding: var(--space-5xl) 0;
    background: var(--color-bg-alt);
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.services__card {
    position: relative;
    padding: var(--space-2xl);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    transition: transform 0.5s var(--ease-out-expo),
                border-color 0.4s ease,
                box-shadow 0.5s var(--ease-out-expo);
    overflow: hidden;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.services__card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-glow);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.services__card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s var(--ease-out-expo);
}

.services__card:hover {
    border-color: var(--color-border-hover);
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(108, 92, 231, 0.15), var(--shadow-lg);
}

.services__card:hover::before {
    opacity: 1;
}

.services__card:hover::after {
    transform: scaleX(1);
}

.services__card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-card);
    border: 1px solid rgba(108, 92, 231, 0.2);
    border-radius: var(--radius-lg);
    color: var(--color-primary-light);
    margin-bottom: var(--space-lg);
    transition: transform 0.5s var(--ease-out-expo),
                box-shadow 0.5s var(--ease-out-expo),
                background 0.4s ease;
}

.services__card:hover .services__card-icon {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 8px 24px rgba(108, 92, 231, 0.2);
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.15) 0%, rgba(0, 206, 201, 0.08) 100%);
}

.services__card-icon svg {
    width: 24px;
    height: 24px;
}

.services__card-number {
    position: absolute;
    top: var(--space-xl);
    right: var(--space-xl);
    font-size: var(--fs-4xl);
    font-weight: var(--fw-black);
    color: rgba(255, 255, 255, 0.03);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.services__card-title {
    font-size: var(--fs-lg);
    font-weight: var(--fw-bold);
    margin-bottom: var(--space-md);
    position: relative;
}

.services__card-desc {
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
    line-height: var(--lh-normal);
    margin-bottom: var(--space-lg);
    position: relative;
}

.services__card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    position: relative;
}

.services__card-tags li {
    padding: 0.25rem 0.75rem;
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-full);
    border: 1px solid var(--color-border);
}

.services__card--cta {
    background: var(--gradient-card);
    border-color: rgba(108, 92, 231, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.services__card--cta:hover {
    border-color: rgba(108, 92, 231, 0.4);
}

.services__card--cta::after {
    display: none;
}

.services__card-cta-content {
    text-align: center;
}

.services__card--cta .services__card-title {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.services__card--cta .services__card-desc {
    margin-bottom: var(--space-xl);
}


/* ── Tech Stack Marquee ── */
.tech-stack {
    padding: var(--space-3xl) 0;
    overflow: hidden;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    position: relative;
    background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-alt) 50%, var(--color-bg-alt) 100%);
}

.tech-stack__label {
    text-align: center;
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
}

.tech-stack__marquee {
    position: relative;
    overflow: hidden;
}

.tech-stack__marquee::before,
.tech-stack__marquee::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 120px;
    z-index: 2;
    pointer-events: none;
}

.tech-stack__marquee::before {
    left: 0;
    background: linear-gradient(90deg, var(--color-bg-alt) 5%, transparent);
}

.tech-stack__marquee::after {
    right: 0;
    background: linear-gradient(-90deg, var(--color-bg-alt) 5%, transparent);
}

.tech-stack__track {
    display: flex;
    gap: var(--space-xl);
    animation: marquee 30s linear infinite;
    width: max-content;
}

.tech-stack__item {
    flex-shrink: 0;
    padding: 0.625rem 1.25rem;
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--color-text-muted);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    white-space: nowrap;
    transition: all 0.4s var(--ease-out-expo);
}

.tech-stack__item:hover {
    color: var(--color-primary-light);
    border-color: rgba(108, 92, 231, 0.3);
    background: rgba(108, 92, 231, 0.06);
    transform: translateY(-2px);
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}


/* ── Process ── */
.process {
    padding: var(--space-5xl) 0;
    position: relative;
    overflow: hidden;
}

.process__timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.process__line {
    position: absolute;
    left: 28px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--color-primary), var(--color-accent));
    opacity: 0.2;
}

.process__line-progress {
    position: absolute;
    left: 28px;
    top: 0;
    width: 2px;
    height: 0;
    background: linear-gradient(to bottom, var(--color-primary), var(--color-accent));
    opacity: 0.8;
    transition: height 0.1s linear;
    z-index: 0;
    border-radius: 0 0 2px 2px;
    pointer-events: none;
}

.process__step {
    display: flex;
    gap: var(--space-xl);
    margin-bottom: var(--space-3xl);
    position: relative;
    transition: transform 0.5s var(--ease-out-expo);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.process__step:hover {
    transform: translateX(6px);
}

.process__step:last-child {
    margin-bottom: 0;
}

.process__step-marker {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-card);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-full);
    position: relative;
    z-index: 1;
    transition: all 0.5s var(--ease-out-expo);
}

.process__step:hover .process__step-marker {
    border-color: var(--color-primary-light);
    box-shadow: 0 0 24px rgba(108, 92, 231, 0.3),
                0 0 0 4px rgba(108, 92, 231, 0.1);
    transform: scale(1.08);
}

.process__step-marker span {
    font-size: var(--fs-lg);
    font-weight: var(--fw-bold);
    color: var(--color-primary-light);
}

.process__step-content {
    padding-top: var(--space-sm);
}

.process__step-content h3 {
    font-size: var(--fs-lg);
    font-weight: var(--fw-bold);
    margin-bottom: var(--space-sm);
}

.process__step-content p {
    font-size: var(--fs-base);
    color: var(--color-text-secondary);
    line-height: var(--lh-normal);
    margin-bottom: var(--space-md);
}

.process__step-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    color: var(--color-accent);
    background: rgba(0, 206, 201, 0.08);
    border: 1px solid rgba(0, 206, 201, 0.2);
    border-radius: var(--radius-full);
}


/* ── Demo CTA ── */
.demo-cta {
    padding: var(--space-5xl) 0;
    background: var(--color-bg-alt);
}

.demo-cta__wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: center;
    padding: var(--space-3xl);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-2xl);
    position: relative;
    overflow: hidden;
    transition: border-color 0.6s ease, box-shadow 0.6s ease;
}

.demo-cta__wrapper:hover {
    border-color: rgba(108, 92, 231, 0.2);
    box-shadow: 0 20px 80px rgba(108, 92, 231, 0.08);
}

.demo-cta__wrapper::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.08) 0%, transparent 60%);
    pointer-events: none;
    animation: float-slow 12s ease-in-out infinite;
}

.demo-cta__wrapper::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 206, 201, 0.05) 0%, transparent 60%);
    pointer-events: none;
    animation: float-slow 10s ease-in-out infinite reverse;
}

.demo-cta__badge {
    display: inline-block;
    padding: 0.375rem 1rem;
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    background: rgba(0, 206, 201, 0.08);
    border: 1px solid rgba(0, 206, 201, 0.2);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-lg);
}

.demo-cta__title {
    font-size: clamp(var(--fs-2xl), 4vw, var(--fs-3xl));
    font-weight: var(--fw-bold);
    line-height: var(--lh-tight);
    margin-bottom: var(--space-lg);
}

.demo-cta__desc {
    font-size: var(--fs-base);
    color: var(--color-text-secondary);
    line-height: var(--lh-normal);
    margin-bottom: var(--space-xl);
}

.demo-cta__features {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
}

.demo-cta__features li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--fs-sm);
    color: var(--color-text);
}

.demo-cta__features svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--color-accent);
}


/* ── Portfolio ── */
.portfolio {
    padding: var(--space-5xl) 0;
}

.portfolio__filter {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-3xl);
    flex-wrap: wrap;
}

.portfolio__filter-btn {
    padding: 0.5rem 1.25rem;
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--color-text-secondary);
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    transition: all 0.4s var(--ease-out-expo);
}

.portfolio__filter-btn:hover {
    color: var(--color-text);
    border-color: var(--color-border-hover);
    transform: translateY(-1px);
}

.portfolio__filter-btn.active {
    color: #fff;
    background: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.portfolio__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.portfolio__card {
    position: relative;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: transform 0.6s var(--ease-out-expo),
                border-color 0.4s ease,
                box-shadow 0.6s var(--ease-out-expo);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.portfolio__card:hover {
    transform: translateY(-8px);
    border-color: var(--color-border-hover);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4), 0 0 40px rgba(108, 92, 231, 0.08);
}

.portfolio__card-image {
    overflow: hidden;
}

.portfolio__card-image .image-placeholder {
    border: none;
    border-radius: 0;
    aspect-ratio: 3/2;
    transition: transform 0.7s var(--ease-out-expo);
}

.portfolio__card:hover .portfolio__card-image .image-placeholder {
    transform: scale(1.05);
}

.portfolio__card-content {
    padding: var(--space-lg);
}

.portfolio__card-tag {
    display: inline-block;
    padding: 0.2rem 0.625rem;
    font-size: var(--fs-xs);
    color: var(--color-primary-light);
    background: rgba(108, 92, 231, 0.1);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-sm);
}

.portfolio__card-title {
    font-size: var(--fs-base);
    font-weight: var(--fw-bold);
    margin-bottom: var(--space-sm);
}

.portfolio__card-desc {
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
    line-height: var(--lh-normal);
}

.portfolio__card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.5s var(--ease-out-quart);
}

.portfolio__card-overlay .btn {
    transform: translateY(10px);
    transition: all 0.5s var(--ease-out-expo);
}

.portfolio__card:hover .portfolio__card-overlay {
    opacity: 1;
}

.portfolio__card:hover .portfolio__card-overlay .btn {
    transform: translateY(0);
}

.portfolio__card.hidden {
    display: none;
}


/* ── FAQ ── */
.faq {
    padding: var(--space-5xl) 0;
}

.faq__list {
    max-width: 800px;
    margin: 0 auto;
}

.faq__item {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-md);
    overflow: hidden;
    transition: border-color 0.4s var(--ease-out-expo),
                box-shadow 0.5s var(--ease-out-expo),
                background 0.4s var(--ease-out-expo);
}

.faq__item:hover {
    border-color: var(--color-border-hover);
}

.faq__item.open {
    border-color: rgba(108, 92, 231, 0.3);
    background: rgba(108, 92, 231, 0.02);
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.08);
}

.faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--space-lg) var(--space-xl);
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    text-align: left;
    color: var(--color-text);
    transition: color var(--transition-fast);
}

.faq__question svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--color-text-muted);
    transition: transform 0.5s var(--ease-out-expo), color 0.3s ease;
}

.faq__item.open .faq__question svg {
    transform: rotate(180deg);
    color: var(--color-primary-light);
}

.faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s var(--ease-out-expo);
}

.faq__answer p {
    padding: 0 var(--space-xl) var(--space-lg);
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
    line-height: var(--lh-normal);
}


/* ── Contact ── */
.contact {
    padding: var(--space-5xl) 0;
    background: var(--color-bg-alt);
}

.contact__grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: var(--space-3xl);
    align-items: start;
}

.contact__form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.contact__form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.contact__form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.contact__label {
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--color-text);
}

.contact__input {
    padding: 0.875rem 1rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-size: var(--fs-base);
    transition: all 0.3s var(--ease-out-expo);
}

.contact__input::placeholder {
    color: var(--color-text-muted);
    transition: color 0.3s ease;
}

.contact__input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1),
                0 4px 16px rgba(108, 92, 231, 0.08);
    background: rgba(22, 22, 31, 0.8);
}

.contact__input:focus::placeholder {
    color: var(--color-text-secondary);
}

.contact__select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%238888a0' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.contact__select option {
    background: var(--color-bg-card);
    color: var(--color-text);
}

.contact__textarea {
    resize: vertical;
    min-height: 120px;
}

.contact__form-group--checkbox {
    flex-direction: row;
}

.contact__checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
    cursor: pointer;
}

.contact__checkbox input[type="checkbox"] {
    display: none;
}

.contact__checkbox-mark {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border: 2px solid var(--color-border-hover);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    position: relative;
}

.contact__checkbox input:checked + .contact__checkbox-mark {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.contact__checkbox input:checked + .contact__checkbox-mark::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -2px;
}

.contact__submit {
    align-self: flex-start;
}

/* Contact Info */
.contact__info {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.contact__info-card {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: all 0.4s var(--ease-out-expo);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.contact__info-card:hover {
    border-color: var(--color-border-hover);
    transform: translateX(4px);
    background: var(--color-bg-card-hover);
}

.contact__info-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(108, 92, 231, 0.1);
    border-radius: var(--radius-md);
    color: var(--color-primary-light);
}

.contact__info-icon svg {
    width: 20px;
    height: 20px;
}

.contact__info-card strong {
    display: block;
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    margin-bottom: var(--space-xs);
}

.contact__info-card a,
.contact__info-card span {
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
}

.contact__info-card a:hover {
    color: var(--color-primary-light);
}

.contact__response-time {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    font-size: var(--fs-sm);
    color: var(--color-accent);
    background: rgba(0, 206, 201, 0.06);
    border: 1px solid rgba(0, 206, 201, 0.15);
    border-radius: var(--radius-lg);
}

.contact__response-dot {
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: var(--radius-full);
    animation: pulse-dot 2s ease-in-out infinite;
}


/* ── Footer ── */
.footer {
    padding: var(--space-4xl) 0 var(--space-xl);
    border-top: 1px solid var(--color-border);
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-3xl);
    margin-bottom: var(--space-3xl);
}

.footer__logo {
    font-family: var(--font-mono);
    font-size: var(--fs-lg);
    font-weight: var(--fw-bold);
    display: inline-flex;
    margin-bottom: var(--space-md);
}

.footer__desc {
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
    line-height: var(--lh-normal);
    max-width: 300px;
}

.footer__links h4 {
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    margin-bottom: var(--space-lg);
    color: var(--color-text);
}

.footer__links li {
    margin-bottom: var(--space-sm);
}

.footer__links a,
.footer__links span {
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}

.footer__links a:hover {
    color: var(--color-primary-light);
}

.footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
}

.footer__bottom p {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
}

.footer__social {
    display: flex;
    gap: var(--space-md);
}

.footer__social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    transition: all 0.4s var(--ease-out-expo);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.footer__social-link:hover {
    color: var(--color-primary-light);
    border-color: rgba(108, 92, 231, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.15);
}

.footer__social-link svg {
    width: 18px;
    height: 18px;
}


/* ── Back to Top ── */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 3.55rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(22, 22, 31, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    color: var(--color-text-secondary);
    z-index: 900;
    transition: all 0.5s var(--ease-out-expo);
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    pointer-events: none;
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.back-to-top:hover {
    border-color: var(--color-primary-light);
    color: var(--color-primary-light);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 24px rgba(108, 92, 231, 0.2);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}


/* ── Animations ── */
[data-animate] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-out-expo),
                transform 0.8s var(--ease-out-expo);
    will-change: opacity, transform;
}

/* Directional fades */
[data-animate="fade-left"] {
    transform: translateX(50px);
}

[data-animate="fade-right"] {
    transform: translateX(-50px);
}

[data-animate="fade-down"] {
    transform: translateY(-40px);
}

/* Zoom / Scale */
[data-animate="zoom-in"] {
    transform: scale(0.8);
    transition: opacity 0.7s var(--ease-out-expo),
                transform 0.7s var(--ease-out-expo);
}

[data-animate="scale-up"] {
    transform: scale(0.88) translateY(30px);
    transition: opacity 0.9s var(--ease-out-expo),
                transform 0.9s var(--ease-out-expo);
}

/* Slides */
[data-animate="slide-right"] {
    transform: translateX(-70px);
    transition: opacity 0.8s var(--ease-out-expo),
                transform 0.8s var(--ease-out-expo);
}

[data-animate="slide-left"] {
    transform: translateX(70px);
    transition: opacity 0.8s var(--ease-out-expo),
                transform 0.8s var(--ease-out-expo);
}

/* 3D Flip */
[data-animate="flip-up"] {
    transform: perspective(800px) rotateX(10deg) translateY(40px);
    transition: opacity 0.8s var(--ease-out-expo),
                transform 0.8s var(--ease-out-expo);
}

/* Rotate + Fade */
[data-animate="fade-up-rotate"] {
    transform: translateY(40px) rotate(3deg);
    transition: opacity 0.7s var(--ease-out-expo),
                transform 0.7s var(--ease-out-expo);
}

/* Blur + Fade (new) */
[data-animate="blur-in"] {
    filter: blur(8px);
    transform: translateY(20px);
    transition: opacity 0.8s var(--ease-out-expo),
                transform 0.8s var(--ease-out-expo),
                filter 0.8s var(--ease-out-expo);
}

/* All animated states */
[data-animate].animated {
    opacity: 1;
    transform: none;
    filter: none;
}

.hero__scroll-indicator.animated {
    transform: translateX(-50%);
}

/* Staggered children animation */
[data-animate-children] > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--ease-out-expo),
                transform 0.6s var(--ease-out-expo);
}

[data-animate-children].animated > *:nth-child(1) { transition-delay: 0ms; }
[data-animate-children].animated > *:nth-child(2) { transition-delay: 80ms; }
[data-animate-children].animated > *:nth-child(3) { transition-delay: 160ms; }
[data-animate-children].animated > *:nth-child(4) { transition-delay: 240ms; }
[data-animate-children].animated > *:nth-child(5) { transition-delay: 320ms; }

[data-animate-children].animated > * {
    opacity: 1;
    transform: none;
}


/* ── Focus-Visible Accessibility ── */
:focus-visible {
    outline: 2px solid var(--color-primary-light);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

.btn:focus-visible {
    outline-offset: 4px;
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.2);
}

.header__nav-link:focus-visible,
.mobile-nav__link:focus-visible {
    outline-offset: 2px;
}

.faq__question:focus-visible {
    outline-offset: -2px;
}

.contact__input:focus-visible {
    outline: none; /* Already has custom focus styles */
}


/* ── Magnetic Tilt on Cards (JS sets --tilt-x / --tilt-y) ── */
.services__card[style*="--tilt-x"] {
    transform: perspective(800px) rotateY(var(--tilt-x, 0deg)) rotateX(var(--tilt-y, 0deg));
}

.services__card[style*="--tilt-x"]:hover {
    transform: perspective(800px) rotateY(var(--tilt-x, 0deg)) rotateX(var(--tilt-y, 0deg)) translateY(-6px);
}


/* ── Hero Title Word Reveal ── */
.hero__title .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px) rotateX(15deg);
    transition: opacity 0.6s var(--ease-out-expo),
                transform 0.6s var(--ease-out-expo);
}

.hero__title.animated .word {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
}


/* ── Form Success State ── */
.contact__form.submitted {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.contact__success {
    text-align: center;
}

.contact__success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 206, 201, 0.1);
    border: 2px solid var(--color-accent);
    border-radius: var(--radius-full);
    color: var(--color-accent);
}

.contact__success-icon svg {
    width: 32px;
    height: 32px;
}

.contact__success h3 {
    font-size: var(--fs-xl);
    margin-bottom: var(--space-sm);
}

.contact__success p {
    color: var(--color-text-secondary);
}


/* ============================================================
   RESPONSIVE DESIGN
   6 breakpoints for pixel-perfect coverage:
   - 1440px  Large desktop / ultrawide tweaks
   - 1200px  Standard laptop / small desktop
   - 1024px  Tablet landscape / iPad Pro
   - 768px   Tablet portrait / iPad
   - 576px   Large phone (iPhone Plus/Max, Galaxy S)
   - 390px   Small phone (iPhone SE/Mini, Galaxy A)
   ============================================================ */

/* ── Large Desktop (≤1440px) ── */
@media (max-width: 1440px) {
    .hero__title {
        font-size: clamp(var(--fs-3xl), 5vw, var(--fs-5xl));
    }

    .hero__bg-gradient {
        width: 550px;
        height: 550px;
    }
}

/* ── Standard Laptop (≤1200px) ── */
@media (max-width: 1200px) {
    :root {
        --container-pad: 1.25rem;
    }

    /* Header: keep desktop nav but shrink gaps */
    .header__nav-list {
        gap: 2px;
    }

    .header__nav-link {
        padding: 0.5rem 0.5rem;
        font-size: var(--fs-xs);
    }

    .header__cta {
        padding: 0.625rem 1.25rem;
        font-size: var(--fs-xs);
    }

    /* Hero: 2-column but narrower gap */
    .hero__container {
        gap: var(--space-2xl);
    }

    .hero__stats {
        gap: var(--space-2xl);
    }

    /* Services: 2 columns */
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Portfolio: 2 columns */
    .portfolio__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Footer: 4 cols → tighter */
    .footer__grid {
        gap: var(--space-xl);
    }
}

/* ── Tablet Landscape (≤1024px) ── */
@media (max-width: 1024px) {
    /* ── Mobile Navigation System ── */
    .header__desktop-nav,
    .header__cta {
        display: none;
    }

    .header__logo {
        margin-left: 5px;
    }

    .header__hamburger {
        display: flex;
        margin-right: 5px;
    }

    /* Activate mobile slide-out & overlay */
    .mobile-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1090;
        background: rgba(0, 0, 0, 0.6);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.35s ease, visibility 0.35s ease;
        -webkit-tap-highlight-color: transparent;
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
    }

    .mobile-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .mobile-nav {
        display: flex;
    }

    .mobile-nav.open {
        transform: translateX(0);
        visibility: visible;
    }

    /* Hero: stack to single column */
    .hero__container {
        grid-template-columns: 1fr;
        gap: var(--space-3xl);
        text-align: center;
    }

    .hero__subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero__actions {
        justify-content: center;
    }

    .hero__stats {
        justify-content: center;
    }

    .hero__visual {
        max-width: 560px;
        margin: 0 auto;
    }

    .hero__code-window {
        transform: none;
    }

    .hero__code-window:hover {
        transform: none;
    }

    /* Demo CTA: single column */
    .demo-cta__wrapper {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    /* Contact: single column */
    .contact__grid {
        grid-template-columns: 1fr;
    }

    /* Footer: 2×2 */
    .footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-2xl);
    }

    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
    }
}

/* ── Tablet Portrait (≤768px) ── */
@media (max-width: 768px) {
    :root {
        --space-5xl: 6rem;
        --space-4xl: 4.5rem;
    }

    /* Hero: reduce visual weight */
    .hero {
        min-height: auto;
        padding: calc(var(--header-height) + var(--space-2xl)) 0 var(--space-2xl);
    }

    .hero__title {
        font-size: clamp(var(--fs-2xl), 8vw, var(--fs-4xl));
    }

    .hero__subtitle {
        font-size: var(--fs-base);
    }

    .hero__stats {
        flex-direction: row;
        flex-wrap: wrap;
        gap: var(--space-xl);
    }

    .hero__stat-number {
        font-size: var(--fs-2xl);
    }

    .hero__scroll-indicator {
        display: none;
    }

    .hero__bg-gradient {
        width: 400px;
        height: 400px;
    }

    /* Services: single column for cleaner reading */
    .services__grid {
        grid-template-columns: 1fr;
    }

    .services__card {
        padding: var(--space-xl);
    }

    /* Portfolio: single column */
    .portfolio__grid {
        grid-template-columns: 1fr;
    }

    .portfolio__card-overlay {
        /* Make overlay always visible on touch devices */
        opacity: 1;
        background: linear-gradient(to top, rgba(10, 10, 15, 0.9) 0%, transparent 100%);
        display: flex;
        align-items: flex-end;
        justify-content: flex-start;
        padding: var(--space-lg);
    }

    /* Process: keep side-by-side but reduce marker */
    .process__step-marker {
        width: 48px;
        height: 48px;
    }

    .process__step-marker span {
        font-size: var(--fs-base);
    }

    .process__line,
    .process__line-progress {
        left: 24px;
    }

    /* Demo CTA */
    .demo-cta__wrapper {
        padding: var(--space-xl);
    }

    .demo-cta__title {
        font-size: var(--fs-2xl);
    }

    /* Contact */
    .contact__form-row {
        grid-template-columns: 1fr;
    }

    .contact__submit {
        align-self: stretch;
    }

    /* FAQ */
    .faq__question {
        padding: var(--space-md) var(--space-lg);
        font-size: var(--fs-sm);
    }

    .faq__answer p {
        padding: 0 var(--space-lg) var(--space-md);
    }

    /* Footer: single column */
    .footer__grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .footer__brand {
        text-align: center;
    }

    .footer__desc {
        max-width: 100%;
        margin: 0 auto;
    }

    .footer__links {
        text-align: center;
    }

    .footer__bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    /* Section headers */
    .section-header {
        margin-bottom: var(--space-3xl);
    }

    .section-header__title {
        font-size: clamp(var(--fs-xl), 6vw, var(--fs-3xl));
    }

    .section-header__desc {
        font-size: var(--fs-base);
    }

    .back-to-top {
        bottom: 1.25rem;
        right: 1.25rem;
        width: 40px;
        height: 40px;
    }

    .back-to-top svg {
        width: 18px;
        height: 18px;
    }

    /* Tech stack marquee */
    .tech-stack__item {
        padding: 0.5rem 1rem;
        font-size: var(--fs-xs);
    }

    .tech-stack__marquee::before,
    .tech-stack__marquee::after {
        width: 60px;
    }
}

/* ── Large Phone (≤576px) ── */
@media (max-width: 576px) {
    :root {
        --container-pad: 1rem;
        --space-5xl: 5rem;
        --space-4xl: 3.5rem;
        --space-3xl: 2.5rem;
    }

    /* Hero: full mobile optimization */
    .hero {
        padding: calc(var(--header-height) + var(--space-xl)) 0 var(--space-xl);
    }

    .hero__title {
        font-size: clamp(1.75rem, 9vw, var(--fs-3xl));
        letter-spacing: -0.01em;
    }

    .hero__subtitle {
        font-size: var(--fs-sm);
        margin-bottom: var(--space-xl);
    }

    .hero__badge {
        font-size: 0.6875rem;
        padding: 0.375rem 0.75rem;
    }

    .hero__actions {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-sm);
    }

    .hero__actions .btn {
        justify-content: center;
        width: 100%;
    }

    .hero__stats {
        flex-direction: row;
        justify-content: space-around;
        gap: var(--space-md);
        padding-top: var(--space-lg);
        border-top: 1px solid var(--color-border);
    }

    .hero__stat-number {
        font-size: var(--fs-xl);
    }

    .hero__stat-label {
        font-size: 0.625rem;
    }

    .hero__visual {
        max-width: 100%;
    }

    .hero__code-body {
        padding: 1rem;
        font-size: var(--fs-xs);
        line-height: 1.7;
    }

    /* Section headers */
    .section-header {
        margin-bottom: var(--space-2xl);
    }

    .section-header__title {
        font-size: clamp(var(--fs-xl), 7vw, var(--fs-2xl));
    }

    .section-header__desc {
        font-size: var(--fs-sm);
    }

    .section-header__tag {
        font-size: 0.625rem;
        padding: 0.25rem 0.75rem;
    }

    /* ── Edge-to-edge cards on mobile ── */
    .services__grid,
    .portfolio__grid {
        gap: var(--space-md);
        margin-left: calc(-1 * var(--container-pad));
        margin-right: calc(-1 * var(--container-pad));
    }

    .services__card,
    .portfolio__card {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    /* Services card */
    .services__card {
        padding: var(--space-lg) var(--container-pad);
    }

    .services__card-icon {
        width: 44px;
        height: 44px;
    }

    .services__card-icon svg {
        width: 20px;
        height: 20px;
    }

    .services__card-number {
        font-size: var(--fs-3xl);
    }

    /* Process */
    .process__step {
        flex-direction: column;
        text-align: center;
        gap: var(--space-md);
    }

    .process__line,
    .process__line-progress {
        display: none;
    }

    .process__step-marker {
        margin: 0 auto;
        width: 44px;
        height: 44px;
    }

    .process__step-content h3 {
        font-size: var(--fs-base);
    }

    .process__step-content p {
        font-size: var(--fs-sm);
    }

    /* Portfolio filter */
    .portfolio__filter {
        gap: var(--space-xs);
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: var(--space-sm);
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .portfolio__filter::-webkit-scrollbar {
        display: none;
    }

    .portfolio__filter-btn {
        padding: 0.375rem 0.875rem;
        font-size: var(--fs-xs);
        flex-shrink: 0;
    }

    /* Demo CTA */
    .demo-cta__wrapper {
        padding: var(--space-lg) var(--container-pad);
        margin-left: calc(-1 * var(--container-pad));
        margin-right: calc(-1 * var(--container-pad));
        border-radius: 0;
    }

    .demo-cta__title {
        font-size: var(--fs-xl);
    }

    .demo-cta__desc {
        font-size: var(--fs-sm);
    }

    .demo-cta__features li {
        font-size: var(--fs-xs);
    }

    .demo-cta__features svg {
        width: 16px;
        height: 16px;
    }

    /* FAQ */
    .faq__question {
        padding: var(--space-md);
        font-size: var(--fs-sm);
        gap: var(--space-sm);
    }

    .faq__question svg {
        width: 18px;
        height: 18px;
    }

    .faq__answer p {
        padding: 0 var(--space-md) var(--space-md);
        font-size: var(--fs-xs);
    }

    /* Contact */
    .contact__input {
        padding: 0.75rem;
        font-size: var(--fs-sm);
    }

    .contact__label {
        font-size: var(--fs-xs);
    }

    .contact__info-card {
        padding: var(--space-md) var(--container-pad);
        border-radius: 0;
        border-left: none;
        border-right: none;
        margin-left: calc(-1 * var(--container-pad));
        margin-right: calc(-1 * var(--container-pad));
    }

    .contact__info-icon {
        width: 40px;
        height: 40px;
    }

    .contact__info-icon svg {
        width: 18px;
        height: 18px;
    }

    /* FAQ edge-to-edge */
    .faq__item {
        border-radius: 0;
        border-left: none;
        border-right: none;
        margin-left: calc(-1 * var(--container-pad));
        margin-right: calc(-1 * var(--container-pad));
    }

    .faq__question {
        padding-left: var(--container-pad);
        padding-right: var(--container-pad);
    }

    .faq__answer p {
        padding-left: var(--container-pad);
        padding-right: var(--container-pad);
    }

    /* Buttons global */
    .btn--lg {
        padding: 0.875rem 1.5rem;
        font-size: var(--fs-sm);
    }

    /* Footer */
    .footer {
        padding: var(--space-2xl) 0 var(--space-lg);
    }

    .footer__grid {
        gap: var(--space-lg);
    }

    .footer__links h4 {
        margin-bottom: var(--space-sm);
    }

    /* Preloader */
    .preloader__logo {
        font-size: var(--fs-xl);
    }

    .preloader__bar {
        width: 160px;
    }
}

/* ── Small Phone (≤390px) ── */
@media (max-width: 390px) {
    :root {
        --container-pad: 0.875rem;
        --space-5xl: 4rem;
        --space-4xl: 3rem;
        --space-3xl: 2rem;
        --space-2xl: 1.5rem;
    }

    .header__logo {
        font-size: var(--fs-base);
    }

    /* Hero extreme mobile */
    .hero__title {
        font-size: 1.625rem;
        line-height: 1.15;
    }

    .hero__subtitle {
        font-size: var(--fs-xs);
    }

    .hero__badge {
        font-size: 0.625rem;
        padding: 0.25rem 0.625rem;
    }

    .hero__badge-dot {
        width: 6px;
        height: 6px;
    }

    .hero__stats {
        gap: var(--space-sm);
    }

    .hero__stat-number {
        font-size: var(--fs-lg);
    }

    .hero__stat-label {
        font-size: 0.5625rem;
    }

    .hero__code-body {
        padding: 0.75rem;
        font-size: 0.6875rem;
        line-height: 1.6;
    }

    .hero__code-header {
        padding: 0.625rem 0.875rem;
    }

    .hero__code-dots span {
        width: 10px;
        height: 10px;
    }

    /* Section headers */
    .section-header__title {
        font-size: var(--fs-xl);
    }

    .section-header__desc {
        font-size: var(--fs-xs);
    }

    /* Buttons */
    .btn {
        padding: 0.625rem 1rem;
        font-size: var(--fs-xs);
    }

    .btn--lg {
        padding: 0.75rem 1.25rem;
        font-size: var(--fs-xs);
    }

    .btn__icon {
        width: 16px;
        height: 16px;
    }

    /* Services */
    .services__card {
        padding: var(--space-md);
    }

    .services__card-title {
        font-size: var(--fs-base);
    }

    .services__card-desc {
        font-size: var(--fs-xs);
    }

    .services__card-tags li {
        font-size: 0.625rem;
        padding: 0.2rem 0.5rem;
    }

    /* Process */
    .process__step-marker {
        width: 40px;
        height: 40px;
    }

    .process__step-marker span {
        font-size: var(--fs-sm);
    }

    .process__step-content h3 {
        font-size: var(--fs-sm);
    }

    .process__step-content p {
        font-size: var(--fs-xs);
    }

    .process__step-tag {
        font-size: 0.625rem;
    }

    /* Demo CTA */
    .demo-cta__wrapper {
        padding: var(--space-md);
    }

    .demo-cta__badge {
        font-size: 0.625rem;
    }

    .demo-cta__title {
        font-size: var(--fs-lg);
    }

    .demo-cta__desc {
        font-size: var(--fs-xs);
    }

    /* Portfolio */
    .portfolio__card-content {
        padding: var(--space-md);
    }

    .portfolio__card-title {
        font-size: var(--fs-sm);
    }

    .portfolio__card-desc {
        font-size: var(--fs-xs);
    }

    .portfolio__card-tag {
        font-size: 0.625rem;
    }

    /* FAQ */
    .faq__question {
        padding: var(--space-sm) var(--space-md);
        font-size: var(--fs-xs);
    }

    .faq__question svg {
        width: 16px;
        height: 16px;
    }

    .faq__answer p {
        padding: 0 var(--space-md) var(--space-sm);
        font-size: 0.6875rem;
    }

    /* Contact */
    .contact__input {
        padding: 0.625rem;
        font-size: var(--fs-xs);
    }

    .contact__label {
        font-size: 0.625rem;
    }

    .contact__info-card {
        padding: var(--space-sm) var(--space-md);
    }

    .contact__info-icon {
        width: 36px;
        height: 36px;
    }

    .contact__info-card strong {
        font-size: var(--fs-xs);
    }

    .contact__info-card a,
    .contact__info-card span {
        font-size: var(--fs-xs);
    }

    .contact__response-time {
        font-size: var(--fs-xs);
        padding: var(--space-sm) var(--space-md);
    }

    .contact__checkbox span {
        font-size: var(--fs-xs);
    }

    /* Footer */
    .footer {
        padding: var(--space-xl) 0 var(--space-md);
    }

    .footer__logo {
        font-size: var(--fs-base);
    }

    .footer__desc {
        font-size: var(--fs-xs);
    }

    .footer__links h4 {
        font-size: var(--fs-xs);
        margin-bottom: var(--space-xs);
    }

    .footer__links a,
    .footer__links span {
        font-size: var(--fs-xs);
    }

    .footer__bottom p {
        font-size: var(--fs-xs);
    }

    .footer__social-link {
        width: 36px;
        height: 36px;
    }

    .footer__social-link svg {
        width: 16px;
        height: 16px;
    }

    .back-to-top {
        width: 36px;
        height: 36px;
        bottom: 1rem;
        right: 1rem;
    }

    .back-to-top svg {
        width: 16px;
        height: 16px;
    }

    /* Image placeholders */
    .image-placeholder {
        padding: var(--space-md);
        font-size: var(--fs-xs);
    }

    .image-placeholder svg {
        width: 36px;
        height: 36px;
    }


    /* Tech stack */
    .tech-stack {
        padding: var(--space-xl) 0;
    }

    .tech-stack__label {
        font-size: 0.625rem;
        margin-bottom: var(--space-md);
    }

    .tech-stack__item {
        padding: 0.375rem 0.75rem;
        font-size: 0.625rem;
    }

    .tech-stack__marquee::before,
    .tech-stack__marquee::after {
        width: 40px;
    }

    /* Preloader */
    .preloader__logo {
        font-size: var(--fs-lg);
    }

    .preloader__bar {
        width: 130px;
    }
}


/* ── Landscape Phones – height fix ── */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: calc(var(--header-height) + var(--space-md)) 0 var(--space-md);
    }

    .hero__container {
        grid-template-columns: 1fr 1fr;
        text-align: left;
        gap: var(--space-xl);
    }

    .hero__actions {
        justify-content: flex-start;
    }

    .hero__stats {
        justify-content: flex-start;
        gap: var(--space-xl);
    }

    .hero__stat-number {
        font-size: var(--fs-lg);
    }

    .hero__title {
        font-size: var(--fs-xl);
    }

    .hero__subtitle {
        font-size: var(--fs-xs);
        margin-bottom: var(--space-md);
    }

    .hero__badge {
        margin-bottom: var(--space-sm);
    }

    .hero__scroll-indicator {
        display: none;
    }

}


/* ── Touch Device Enhancements ── */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover transforms on touch – prevent janky tap */
    .services__card:hover,
    .portfolio__card:hover {
        transform: none;
    }

    /* Keep hover color/shadow effects for visual feedback */
    .services__card:active,
    .portfolio__card:active {
        transform: scale(0.98);
        transition-duration: 100ms;
    }

    /* Portfolio overlay: always visible on touch */
    .portfolio__card-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(10, 10, 15, 0.85) 0%, transparent 60%);
        align-items: flex-end;
        padding: var(--space-md);
    }

    /* Larger tap targets for touch */
    .btn {
        min-height: 44px;
    }

    .faq__question {
        min-height: 48px;
    }

    .header__hamburger {
        padding: 8px;
    }

    /* Disable glow on cards for performance */
    .services__card::before {
        display: none;
    }
}


/* ── High DPI Screens ── */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero__code-dots span {
        border: 0.5px solid rgba(0, 0, 0, 0.1);
    }
}


/* ── Dark Mode Preference (already dark, ensure no conflicts) ── */
@media (prefers-color-scheme: light) {
    /* Site is dark-theme by design – no changes needed */
}


/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    [data-animate] {
        opacity: 1;
        transform: none;
        filter: none;
    }

    [data-animate-children] > * {
        opacity: 1;
        transform: none;
    }

    .tech-stack__track {
        animation: none;
    }

    .hero__scroll-arrow {
        animation: none;
    }

    .hero__badge-dot,
    .contact__response-dot {
        animation: none;
    }

    .hero__bg-gradient,
    .hero__bg-gradient-secondary {
        animation: none;
    }

    .section-header__tag::after {
        animation: none;
    }

    .hero__title .word {
        opacity: 1;
        transform: none;
    }

    .header.header--hidden {
        transform: none;
    }

    .process__line-progress {
        height: 100% !important;
    }
}


/* ── Print Styles ── */
@media print {
    .header,
    .preloader,
    .back-to-top,
    .hero__bg-grid,
    .hero__bg-gradient,
    .tech-stack,
    .hero__scroll-indicator,
    .mobile-nav,
    .mobile-overlay {
        display: none !important;
    }

    body {
        background: #fff;
        color: #111;
    }

    .text-gradient {
        -webkit-text-fill-color: #111;
        background: none;
    }

    a {
        color: #111;
        text-decoration: underline;
    }

    .section-header__tag {
        color: #555;
        background: #eee;
        border-color: #ccc;
    }
}
