/* ========================================
   TIAKI MAI RĀ — Design System & Styles
   Refined with NEXUS brand guidelines
   ======================================== */

/* === DESIGN TOKENS === */
:root {
    /* Primary Colors */
    --color-bg: #FFFFFF;
    --color-bg-soft: #f8f9fa;
    --color-bg-deep: #0a0a0f;
    --color-text-primary: #0A0F1A;
    --color-text-headline: #1B3A5C;
    --color-text-secondary: #6B7280;
    --color-text-muted: #9CA3AF;
    --color-text-dark: #1F2937;
    --color-white: #ffffff;

    /* Accent / Glow */
    --color-accent: #00A8E8;
    --color-accent-azure: #0077B6;
    --color-glow-cyan: #00D4FF;
    --color-glow-ice: #7DD3FC;
    --color-void-black: #020617;
    --color-accent-glow: rgba(0, 168, 232, 0.35);

    /* Borders */
    --color-border: #E5E7EB;

    /* Typography */
    --font-serif: 'Playfair Display', 'DM Serif Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-condensed: 'Barlow Condensed', 'Oswald', 'Industry', sans-serif;

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

    /* Layout */
    --max-width: 1280px;
    --nav-height: 76px;

    /* Animation */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-fast: 200ms var(--ease-out-quad);
    --transition-medium: 400ms var(--ease-out-expo);
    --transition-slow: 800ms var(--ease-out-expo);
}

/* === RESET === */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

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

/* === NAVIGATION === */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-height);
    padding: 0 var(--space-lg);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: background var(--transition-medium), box-shadow var(--transition-medium);
}

.nav--scrolled {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 1px 40px rgba(0, 0, 0, 0.05);
}

.nav__logo {
    font-family: var(--font-condensed);
    font-weight: 700;
    font-size: 1.125rem;
    /* ~18px */
    letter-spacing: 0.15em;
    color: var(--color-text-primary);
    transition: opacity var(--transition-fast);
    
    /* Clean, natural sizing for the tightly cropped logo */
    display: flex;
    align-items: center;
    height: 44px;
}

.nav__logo:hover {
    opacity: 0.7;
}

.nav__logo-img {
    height: 100%; 
    width: auto;
    display: block;
    mix-blend-mode: multiply; /* Keeps the white background invisible */
    object-fit: contain;
}

.nav__links {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.nav__link {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
    position: relative;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-text-headline);
    transition: width var(--transition-medium);
}

.nav__link:hover {
    color: var(--color-text-primary);
}

.nav__link:hover::after {
    width: 100%;
}

.nav__cta {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    /* Wider spacing */
    color: var(--color-text-primary);
    padding: 10px 0;
    /* Text link style, no side padding */
    border: none;
    /* No button border */
    border-bottom: 1.5px solid transparent;
    border-radius: 0;
    transition: all var(--transition-fast);
}

.nav__cta:hover {
    color: var(--color-text-primary);
    border-bottom-color: var(--color-text-primary);
}

.nav__hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    z-index: 110;
}

.nav__hamburger span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--color-text-primary);
    transition: all var(--transition-medium);
    transform-origin: center;
}

.nav__hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 5px);
}

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

.nav__hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -5px);
}

/* === MOBILE MENU === */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-medium);
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu__link {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--color-text-primary);
    transition: opacity var(--transition-fast);
}

.mobile-menu__link:hover {
    opacity: 0.6;
}

.mobile-menu__cta {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    padding: 14px 28px;
    border: 1.5px solid rgba(0, 0, 0, 0.12);
    margin-top: var(--space-md);
}

/* === HERO SECTION === */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: var(--nav-height) var(--space-lg) 0;
    overflow: hidden;
    background: var(--color-bg);
}

/* Soft vignette focus toward centre */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 35%, rgba(255, 255, 255, 0.95) 72%);
    z-index: 2;
    pointer-events: none;
}



/* === HERO ORB / PORTAL EFFECTS === */
.hero__orb {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 550px;
    height: 550px;
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
    will-change: opacity, transform;
}

.hero__orb--left {
    left: -100px;
}

.hero__orb--right {
    right: -100px;
}

.hero__orb-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    animation: orbPulse 7s ease-in-out infinite;
}

.hero__orb--right .hero__orb-inner {
    animation-delay: -3.5s;
}

/* Dark void centre */
.hero__orb-void {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30%;
    height: 30%;
    border-radius: 50%;
    background: radial-gradient(circle,
            var(--color-void-black) 0%,
            rgba(2, 6, 23, 0.8) 40%,
            rgba(2, 6, 23, 0.3) 65%,
            transparent 100%);
}

/* Glow backdrop for left orb */
.hero__orb--left .hero__orb-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 65% 50%,
            rgba(0, 168, 232, 0.35) 0%,
            rgba(0, 119, 182, 0.2) 25%,
            rgba(0, 77, 150, 0.1) 45%,
            rgba(0, 60, 200, 0.04) 60%,
            transparent 75%);
    box-shadow:
        0 0 100px rgba(0, 168, 232, 0.12),
        0 0 200px rgba(0, 119, 182, 0.06);
}

/* Glow backdrop for right orb */
.hero__orb--right .hero__orb-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 50%,
            rgba(0, 168, 232, 0.35) 0%,
            rgba(0, 119, 182, 0.2) 25%,
            rgba(0, 77, 150, 0.1) 45%,
            rgba(0, 60, 200, 0.04) 60%,
            transparent 75%);
    box-shadow:
        0 0 100px rgba(0, 168, 232, 0.12),
        0 0 200px rgba(0, 119, 182, 0.06);
}

/* Concentric rings */
.hero__orb-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(0, 168, 232, 0.12);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: border-color 0.6s ease;
}

.hero__orb-ring--1 {
    width: 92%;
    height: 92%;
    border-color: rgba(0, 168, 232, 0.06);
    animation: ringRotate 20s linear infinite;
}

.hero__orb-ring--2 {
    width: 76%;
    height: 76%;
    border-color: rgba(0, 168, 232, 0.1);
    animation: ringRotate 16s linear infinite reverse;
}

.hero__orb-ring--3 {
    width: 60%;
    height: 60%;
    border-color: rgba(0, 212, 255, 0.15);
    border-width: 1.5px;
    animation: ringRotate 12s linear infinite;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.05);
}

.hero__orb-ring--4 {
    width: 44%;
    height: 44%;
    border-color: rgba(0, 212, 255, 0.2);
    border-width: 1.5px;
    animation: ringRotate 9s linear infinite reverse;
    box-shadow:
        0 0 20px rgba(0, 212, 255, 0.08),
        inset 0 0 20px rgba(0, 212, 255, 0.04);
}

.hero__orb-ring--5 {
    width: 34%;
    height: 34%;
    border-color: rgba(0, 212, 255, 0.25);
    border-width: 2px;
    animation: ringRotate 7s linear infinite;
    box-shadow:
        0 0 30px rgba(0, 212, 255, 0.1),
        inset 0 0 30px rgba(0, 212, 255, 0.06);
}

/* Slight elliptical distortion on rings for depth */
.hero__orb-ring--1,
.hero__orb-ring--3,
.hero__orb-ring--5 {
    border-radius: 50%;
    transform: translate(-50%, -50%) rotate(0deg);
}

.hero__orb-ring--2,
.hero__orb-ring--4 {
    border-radius: 48% 52% 50% 50%;
}

@keyframes orbPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.03);
        opacity: 0.9;
    }
}

@keyframes ringRotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* === SPLINE 3D CONTAINERS (ready for integration) === */
.hero__spline {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 600px;
    height: 600px;
    z-index: 1;
    pointer-events: auto;
}

.hero__spline--left {
    left: -150px;
}

.hero__spline--right {
    right: -150px;
}

.hero__spline-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: auto;
}

/* Hide watermark on Spline viewer */
.hero__spline::part(watermark),
.hero__spline-bg::part(watermark) {
    display: none;
}

/* === SPLINE ROBOT — Cinematic 3D Background === */
.hero__spline-robot {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: auto;
    mix-blend-mode: multiply;
    -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 42%, rgba(0, 0, 0, 1) 18%, rgba(0, 0, 0, 0.5) 42%, transparent 70%);
    mask-image: radial-gradient(ellipse 70% 65% at 50% 42%, rgba(0, 0, 0, 1) 18%, rgba(0, 0, 0, 0.5) 42%, transparent 70%);
    opacity: 0;
    transition: opacity 1.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
    overflow: hidden;
}

.hero__spline-robot.loaded {
    opacity: 0.88;
}

.hero__spline-robot spline-viewer {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: auto;
    transform: scale(1.35) translateY(6%);
    transform-origin: center center;
}

#spline-robot-viewer::part(watermark) {
    display: none !important;
}

/* Loading pulse while Spline scene loads */
.hero__spline-loader {
    position: absolute;
    top: 38%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    transition: opacity 0.8s ease 0.3s;
}

.hero__spline-robot.loaded .hero__spline-loader {
    opacity: 0;
    pointer-events: none;
}

.hero__spline-loader-pulse {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--color-accent-glow) 0%, transparent 70%);
    animation: splineLoaderPulse 2.5s ease-in-out infinite;
}

@keyframes splineLoaderPulse {

    0%,
    100% {
        transform: scale(0.7);
        opacity: 0.2;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.5;
    }
}

/* === HERO CONTENT === */
.hero__content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 820px;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none; /* Let cursor pass through text to the 3D scene below */
}

.hero__title {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: clamp(2.6rem, 5.5vw, 4.2rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--color-text-headline);
    margin-bottom: var(--space-md);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s var(--ease-out-expo) 0.2s forwards;
}

.hero__title--italic {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.01em;
    display: inline;
    background: linear-gradient(135deg,
            var(--color-accent-azure) 0%,
            var(--color-accent) 35%,
            var(--color-glow-cyan) 65%,
            var(--color-glow-ice) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 6s ease-in-out infinite, fadeUp 1s var(--ease-out-expo) 0.2s forwards;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}



.hero__subtitle {
    font-family: var(--font-body);
    font-size: clamp(0.85rem, 1.3vw, 1rem);
    font-weight: 400;
    line-height: 1.7;
    color: var(--color-text-secondary);
    max-width: 520px;
    margin-bottom: var(--space-xl);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s var(--ease-out-expo) 0.5s forwards;
}

.hero__cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 0.875rem;
    /* ~14px text */
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--color-text-dark);
    padding: 14px 32px;
    border: 2px solid var(--color-text-dark);
    background: transparent;
    transition: all var(--transition-medium);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s var(--ease-out-expo) 0.8s forwards;
    position: relative;
    overflow: hidden;
    pointer-events: auto; /* Re-enable pointer events so the button is clickable */
}

.hero__cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--color-text-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-medium);
    z-index: -1;
}

.hero__cta:hover {
    color: var(--color-white);
    border-color: var(--color-text-primary);
}

.hero__cta:hover::before {
    transform: scaleX(1);
}

.hero__cta-arrow {
    transition: transform var(--transition-fast);
}

.hero__cta:hover .hero__cta-arrow {
    transform: translateX(4px);
}

/* === HERO SCROLL INDICATOR === */
.hero__scroll-indicator {
    position: absolute;
    bottom: 40px;
    /* Pins it neatly above the threshold edge */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: fadeUp 1s var(--ease-out-expo) 1.5s forwards;
    z-index: 10;
}

.hero__scroll-mouse {
    width: 20px;
    height: 32px;
    border: 1.5px solid var(--color-accent-azure);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    /* Natural scroll (Upwards) */
    padding-bottom: 5px;
}

.hero__scroll-wheel {
    width: 2.5px;
    height: 6px;
    background-color: var(--color-accent-azure);
    border-radius: 2px;
    animation: scrollFlickHero 2s infinite ease-out;
}

.hero__scroll-arrows {
    animation: heroArrowBounce 2s infinite ease-in-out;
}

@keyframes scrollFlickHero {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateY(-10px);
        opacity: 0;
    }
}

@keyframes heroArrowBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(6px);
    }
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === TRUSTED BY SECTION === */
.trusted {
    position: relative;
    z-index: 5;
    padding: var(--space-lg) var(--space-lg) 12rem;
    text-align: center;
    background: linear-gradient(
        to bottom,
        var(--color-bg) 0%,
        var(--color-bg) 45%,
        rgba(200, 210, 220, 0.4) 65%,
        rgba(10, 10, 15, 0.75) 85%,
        var(--color-bg-deep) 100%
    );
}

.trusted__label {
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
    opacity: 0;
    animation: fadeUp 1s var(--ease-out-expo) 1.1s forwards;
}

.trusted__logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3xl);
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeUp 1s var(--ease-out-expo) 1.3s forwards;
}

.trusted__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.25;
    transition: opacity var(--transition-medium), transform var(--transition-medium);
    color: var(--color-text-secondary);
}

.trusted__logo:hover {
    opacity: 0.5;
    transform: translateY(-2px);
}

.trusted__logo-svg {
    width: auto;
    height: 32px;
}

/* === SCROLL INDICATOR === */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: fadeUp 1s var(--ease-out-expo) 1.5s forwards;
}

.scroll-indicator__line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--color-text-muted), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {

    0%,
    100% {
        opacity: 0.4;
        transform: scaleY(1);
    }

    50% {
        opacity: 1;
        transform: scaleY(0.6);
    }
}

/* === PROJECTS SECTION === */
.projects {
    position: relative;
    min-height: 250vh;
    background: var(--color-bg-deep);
    overflow: hidden;
}

/* Top fade — catches any remaining hero white bleeding into the dark section */
.projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 160px;
    background: linear-gradient(
        to bottom,
        var(--color-bg-deep) 0%,
        transparent 100%
    );
    z-index: 3;
    pointer-events: none;
}

.projects__spline-bg {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    pointer-events: auto;
}

.projects__spline-bg spline-viewer {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: auto;
}

#projects-spline-viewer::part(watermark) {
    display: none !important;
}

.projects__content {
    position: relative;
    z-index: 2;
    /* Pulls text and cards up so they graphically overlap the 3D liquid scene */
    margin-top: -45vh;
    padding: 0 var(--space-lg) 12.5vw;
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
    /* Lets the mouse click/hover through the container to the Spline liquid directly */
    pointer-events: none;
}

/* Gradient transition to smoothly bridge the dark project section into the bright testimonials */
.projects::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20vh;
    background: linear-gradient(to bottom, rgba(10, 10, 15, 0) 0%, rgba(10, 10, 15, 0.4) 30%, #ffffff 100%);
    pointer-events: none;
    z-index: 0;
}

/* Reactivate pointer events stringently only on visible assets */
.projects__label,
.projects__heading,
.testi-card {
    pointer-events: auto;
}

/* === MATRIX MOUSE TRAIL === */
.binary-char {
    position: absolute;
    color: var(--color-glow-cyan);
    font-family: monospace;
    font-size: 15px;
    font-weight: bold;
    pointer-events: none;
    /* Must not block clicks on project cards */
    z-index: -1;
    /* Goes physically underneath cards if hovering nearby */
    transform: translate(-50%, -50%);
    text-shadow: 0 0 10px rgba(0, 168, 232, 0.8), 0 0 20px rgba(0, 212, 255, 0.4);
    opacity: 1;
    animation: binaryFade 2.7s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

/* 0s/1s gracefully fall backwards into the darkness while shrinking */
@keyframes binaryFade {
    0% {
        opacity: 0.9;
        transform: translate(-50%, -50%) scale(1.4);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -20px) scale(0.6);
    }
}

.binary-click-me {
    font-size: 22px !important;
    font-weight: 900 !important;
    color: #39ff14 !important;
    /* Authentic high-vis Matrix green */
    text-shadow: 0 0 12px rgba(57, 255, 20, 0.9), 0 0 25px rgba(57, 255, 20, 0.6) !important;
    white-space: nowrap;
    z-index: 5 !important;
    /* Ensure it floats conspicuously above the trail */
    letter-spacing: 2px;
}

.binary-theme-word {
    font-size: 18px !important;
    font-weight: 800 !important;
    white-space: nowrap;
    z-index: 10 !important;
    letter-spacing: 2px;
}

.binary-love-word {
    font-size: 38px !important;
    font-weight: 900 !important;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.projects__label {
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: var(--space-md);
}

.projects__heading {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--color-white);
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.projects__heading--italic {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    background: linear-gradient(135deg, var(--color-accent-azure), var(--color-glow-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

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

/* === PROJECT CARDS === */
.project-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo), border-color 0.4s ease;
    cursor: pointer;
    will-change: transform;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 24px 60px rgba(0, 168, 232, 0.12), 0 8px 24px rgba(0, 0, 0, 0.3);
    border-color: rgba(0, 212, 255, 0.2);
}

.project-card__image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, rgba(0, 119, 182, 0.3) 0%, rgba(0, 212, 255, 0.15) 50%, rgba(2, 6, 23, 0.6) 100%);
    position: relative;
    overflow: hidden;
}

.project-card__image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, var(--color-bg-deep));
    opacity: 0.5;
}

.project-card__body {
    padding: var(--space-md) var(--space-lg) var(--space-lg);
}

.project-card__tag {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-glow-cyan);
    margin-bottom: 10px;
    display: block;
}

.project-card__title {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--color-white);
    margin-bottom: 8px;
}

.project-card__desc {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--color-text-muted);
}

/* === SCROLL REVEAL ANIMATION === */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays for cards */
.project-card.scroll-reveal:nth-child(3n+1) {
    transition-delay: 0s;
}

.project-card.scroll-reveal:nth-child(3n+2) {
    transition-delay: 0.12s;
}

.project-card.scroll-reveal:nth-child(3n+3) {
    transition-delay: 0.24s;
}

/* === SECTION SEPARATOR === */
.section-separator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transform: translateY(-95%);
    z-index: 1;
    pointer-events: none;
    display: flex;
    justify-content: center;
    mix-blend-mode: screen;
}

.section-separator__video {
    width: 100%;
    /* Remove min-width: 800px constraint that breaks mobile layout */
    height: auto;
    min-height: 400px; /* guarantees video doesn't get too short on mobile */
    object-fit: cover;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
    opacity: 0.95;
}

/* === TESTIMONIALS SECTION === */
.testimonials {
    position: relative;
    height: 400vh;
    /* Extremely tall to provide scroll track */
    /* Hand-crafted studio gradient: crisp white center fading to soft studio grey at edges */
    background: radial-gradient(circle at 60% 50%, #ffffff 0%, #f3f4f6 40%, #e5e7eb 100%);
}

/* Fades the top boundary of testimonials seamlessly into the bridging white */
.testimonials::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 15vh;
    background: linear-gradient(to bottom, #ffffff 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.testimonials__sticky-wrapper {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    /* Vertically center the content inside the locked 100vh viewport */
}

.testimonials__spline-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: auto;
}

.testimonials__spline-bg spline-viewer {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: auto;
}

#testimonials-spline-viewer::part(watermark) {
    display: none !important;
}

.testimonials__content {
    position: relative;
    z-index: 2;
    width: 100%;
    margin-top: 0vh;
    padding: 0 var(--space-lg);
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    pointer-events: none;
    /* Visually lift the content higher to give bottom arrows breathing room without clipping the top */
    transform: translateY(-3vh);
}

/* Reactivate pointer events strictly for the cards and text so they are selectable/hoverable */
.testimonials__content>* {
    pointer-events: auto;
}

.testimonials__label {
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    color: var(--color-bg-deep);
    /* Flipped to dark to contrast against new white gradient */
    opacity: 0.6;
    text-align: left;
    margin-bottom: var(--space-md);
}

.testimonials__heading {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--color-bg-deep);
    /* Flipped to dark to contrast against new white gradient */
    text-align: left;
    margin-bottom: var(--space-xl);
    /* Increased gap between text and cards */
}

.testimonials__heading--italic {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    background: linear-gradient(135deg, var(--color-accent-azure), var(--color-glow-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

/* === STACKED CARD DECK === */
.card-deck {
    position: relative;
    width: 380px;
    height: 480px;
    margin: 0;
    perspective: 1000px;
}

.deck-card {
    position: absolute;
    inset: 0;
    background: rgba(30, 34, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 50px 36px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.6s ease, border-color 0.4s ease;
    will-change: transform, opacity, box-shadow;
    overflow: visible;
    /* Enables absolute floating hint below the card */
}

/* === CARD BEACON PULSE (Powered by .is-pinned and .deck-glow) === */
.is-pinned .deck-glow {
    animation: azureHeartbeat 2.5s infinite ease-in-out;
}

@keyframes azureHeartbeat {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 168, 232, 0);
        border-color: rgba(255, 255, 255, 0.08);
    }

    50% {
        box-shadow: 0 0 25px 4px rgba(0, 168, 232, 0.45);
        border-color: var(--color-accent-azure);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 168, 232, 0);
        border-color: rgba(255, 255, 255, 0.08);
    }
}

.deck-card[data-index="1"] {
    transform: rotate(2deg) translateY(8px);
}

.deck-card[data-index="2"] {
    transform: rotate(-3deg) translateY(16px) translateX(5px);
}

.deck-card[data-index="3"] {
    transform: rotate(4deg) translateY(24px) translateX(-5px);
}

.deck-card[data-index="4"] {
    transform: rotate(-2deg) translateY(32px) translateX(8px);
}

.deck-card.deck-active {
    transform: rotate(0deg) translateY(0px) !important;
    z-index: 10 !important;
    opacity: 1;
}

.deck-card.deck-dismissed {
    /* Transform and Opacity are now smoothly calculated by scroll-script */
    pointer-events: none;
}

/* === CARD SCROLL HINT (Top Card Only) === */
.deck-scroll-hint {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.6;
}

.deck-scroll-hint__mouse {
    width: 14px;
    height: 24px;
    border: 1px solid var(--color-white);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    /* Start wheel from the bottom */
    padding-bottom: 4px;
}

.deck-scroll-hint__wheel {
    width: 2px;
    height: 5px;
    background-color: var(--color-white);
    border-radius: 1px;
    animation: scrollFlick 1.5s infinite ease-out;
}

/* === DECK FINAL EXIT HINT (5th Card specific marker) === */
.deck-final-hint {
    position: absolute;
    bottom: -60px;
    /* Force it perfectly under the card */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    /* Fully invisible normally */
    transition: opacity 0.8s ease;
    pointer-events: none;
    z-index: 20;
}

/* Activated strictly by the finish flag from Javascript */
.deck-card.deck-finished .deck-final-hint {
    opacity: 1;
    /* Seamlessly fade in */
}

.deck-scroll-hint span {
    font-size: 0.65rem;
    color: var(--color-white);
    font-family: var(--font-body);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

@keyframes scrollFlick {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateY(-8px);
        opacity: 0;
    }

    /* Animate UPwards */
}


.deck-card[data-index="0"] {
    z-index: 5;
}

.deck-card[data-index="1"] {
    z-index: 4;
}

.deck-card[data-index="2"] {
    z-index: 3;
}

.deck-card[data-index="3"] {
    z-index: 2;
}

.deck-card[data-index="4"] {
    z-index: 1;
}

.deck-card__stars {
    color: #2DD4A8;
    font-size: 1.2rem;
    letter-spacing: 4px;
    margin-bottom: 24px;
}

.deck-card__quote {
    font-size: 1.1rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
    font-family: var(--font-body);
}

.deck-card__author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.deck-card__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.deck-card__name {
    font-size: 1rem;
    color: var(--color-white);
    display: block;
}

.deck-card__role {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* === TESTIMONIAL MASONRY GRID === */
.testi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-auto-flow: dense;
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
    perspective: 1200px;
    /* Prevents the grid's bounding box block from obscuring the 3D Spline background interactions */
    pointer-events: none;
}

.testi-card {
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    background: rgba(10, 15, 26, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    min-height: 220px;
    cursor: pointer;
    transition: box-shadow 0.4s var(--ease-out-expo), border-color 0.4s ease;
    will-change: transform;
    transform-style: preserve-3d;
    transform: perspective(800px) rotateX(0deg) rotateY(0deg) scale(1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Tinted glass color layer */
.testi-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--card-bg);
    opacity: 0.3;
    z-index: 0;
    pointer-events: none;
}

/* Cursor-following glow overlay */
.testi-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
        circle 180px at var(--glow-x, 50%) var(--glow-y, 50%),
        rgba(0, 212, 255, 0.25) 0%,
        rgba(0, 168, 232, 0.08) 40%,
        transparent 70%
    );
    z-index: 5;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.testi-card:hover::before {
    opacity: 1;
}

.testi-card:hover {
    box-shadow:
        0 0 20px rgba(0, 212, 255, 0.5),
        0 0 50px rgba(0, 168, 232, 0.25),
        0 0 80px rgba(0, 212, 255, 0.1),
        0 20px 50px rgba(0, 0, 0, 0.4);
    border-color: rgba(0, 212, 255, 0.55);
}

.testi-card--tall {
    grid-row: span 2;
    min-height: 460px;
}

.testi-card--wide {
    grid-column: span 2;
    min-height: 220px;
}

.testi-card__link {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s var(--ease-out-expo);
    z-index: 5;
}

.testi-card__link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1) rotate(15deg);
}

.testi-card__link svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.testi-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.85) 0%, rgba(2, 6, 23, 0.3) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    z-index: 2;
}

.testi-card__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 10px;
}

.testi-card__tag {
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-glow-cyan);
    display: block;
    margin-bottom: 6px;
}

.testi-card__name {
    font-size: 1.1rem;
    color: var(--color-white);
    display: block;
    margin-bottom: 6px;
}

.testi-card__country {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    display: block;
    margin-bottom: 10px;
}

.testi-card__quote {
    font-size: 0.82rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.75);
}

/* Smooth staggered swoop-in for project cards */
.testi-card.scroll-reveal {
    opacity: 0;
    transform: perspective(800px) rotateX(10deg) rotateY(0deg) scale(0.9) translateY(120px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.testi-card.scroll-reveal.revealed {
    opacity: 1;
    transform: perspective(800px) rotateX(0deg) rotateY(0deg) scale(1) translateY(0);
}

.testi-card.scroll-reveal:nth-child(1) {
    transition-delay: 0s;
}

.testi-card.scroll-reveal:nth-child(2) {
    transition-delay: 0.1s;
}

.testi-card.scroll-reveal:nth-child(3) {
    transition-delay: 0.2s;
}

.testi-card.scroll-reveal:nth-child(4) {
    transition-delay: 0.3s;
}

.testi-card.scroll-reveal:nth-child(5) {
    transition-delay: 0.4s;
}

.testi-card.scroll-reveal:nth-child(6) {
    transition-delay: 0.5s;
}

.testi-card.scroll-reveal:nth-child(7) {
    transition-delay: 0.6s;
}

.testi-card.scroll-reveal:nth-child(8) {
    transition-delay: 0.7s;
}

.testi-card.scroll-reveal:nth-child(9) {
    transition-delay: 0.8s;
}

.testi-card.scroll-reveal:nth-child(10) {
    transition-delay: 0.9s;
}

.testi-card.scroll-reveal:nth-child(11) {
    transition-delay: 1.0s;
}

.testi-card.scroll-reveal:nth-child(12) {
    transition-delay: 1.1s;
}

/* === 3D MARQUEE CONTAINER === */
.marquee-container {
    position: relative;
    height: 28rem;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    perspective: 300px;
}

.marquee-perspective {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    height: 100%;
    transform: translateX(-100px) translateZ(-100px) rotateX(20deg) rotateY(-10deg) rotateZ(20deg);
}

/* === MARQUEE COLUMNS === */
.marquee-col {
    flex: 1;
    overflow: hidden;
    height: 100%;
    position: relative;
}

.marquee-track {
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.marquee-col--down .marquee-track {
    animation: marqueeDown 40s linear infinite;
}

.marquee-col--up .marquee-track {
    animation: marqueeUp 40s linear infinite;
}

@keyframes marqueeDown {
    0% {
        transform: translateY(-50%);
    }

    100% {
        transform: translateY(0%);
    }
}

@keyframes marqueeUp {
    0% {
        transform: translateY(0%);
    }

    100% {
        transform: translateY(-50%);
    }
}

/* Pause on hover */
.marquee-container:hover .marquee-track {
    animation-play-state: paused;
}

/* === TESTIMONIAL CARD === */
.testimonial-card {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 16px;
    min-width: 0;
    flex-shrink: 0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.testimonial-card__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    float: left;
    margin-right: 10px;
}

.testimonial-card__info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.testimonial-card__info strong {
    font-size: 0.82rem;
    color: var(--color-white);
    white-space: nowrap;
}

.testimonial-card__country {
    font-size: 0.72rem;
}

.testimonial-card__handle {
    font-size: 0.7rem;
    color: var(--color-text-muted);
}

.testimonial-card__body {
    font-size: 0.8rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
    clear: both;
}

/* === GRADIENT FADES === */
.marquee-fade {
    position: absolute;
    pointer-events: none;
    z-index: 3;
}

.marquee-fade--top {
    inset: 0 0 auto 0;
    height: 25%;
    background: linear-gradient(to bottom, var(--color-bg-deep), transparent);
}

.marquee-fade--bottom {
    inset: auto 0 0 0;
    height: 25%;
    background: linear-gradient(to top, var(--color-bg-deep), transparent);
}

.marquee-fade--left {
    inset: 0 auto 0 0;
    width: 25%;
    background: linear-gradient(to right, var(--color-bg-deep), transparent);
}

.marquee-fade--right {
    inset: 0 0 0 auto;
    width: 25%;
    background: linear-gradient(to left, var(--color-bg-deep), transparent);
}

/* === CONTACT SECTION === */
.contact {
    position: relative;
    min-height: 100vh;
    background: var(--color-bg-deep);
    overflow: hidden;
    /* Clips the scaled spline bg so it doesn't leak upward into testimonials */
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact__spline-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: auto;
}

.contact__spline-bg spline-viewer {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: auto;
    transform: scale(1.6) translateY(-8%);
    transform-origin: center center;
}

#contact-spline-viewer::part(watermark) {
    display: none !important;
}

.contact__content {
    position: relative;
    z-index: 2;
    padding: var(--space-4xl) var(--space-lg);
    width: 100%;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.contact__label {
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: var(--space-md);
}

.contact__heading {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--color-white);
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.contact__heading--italic {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    background: linear-gradient(135deg, var(--color-accent-azure), var(--color-glow-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.contact__form {
    background: rgba(30, 34, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.contact__field label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--color-text-muted);
    letter-spacing: 0.04em;
}

.contact__field input,
.contact__field textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 0.92rem;
    color: var(--color-white);
    font-family: var(--font-body);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
    resize: vertical;
}

.contact__field input:focus,
.contact__field textarea:focus {
    border-color: var(--color-accent-azure);
    box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.15);
}

.contact__field input::placeholder,
.contact__field textarea::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.contact__field-error {
    font-size: 0.72rem;
    color: #ff6b6b;
    min-height: 0;
}

.contact__submit {
    margin-top: 8px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--color-accent-azure), var(--color-glow-cyan));
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-bg-deep);
    cursor: pointer;
    transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s ease;
    font-family: var(--font-body);
}

.contact__submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 168, 232, 0.3);
}

.contact__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.contact__success {
    text-align: center;
    padding: 16px;
    background: rgba(45, 212, 168, 0.1);
    border: 1px solid rgba(45, 212, 168, 0.3);
    border-radius: 12px;
    color: #2DD4A8;
    font-size: 0.9rem;
    margin-bottom: var(--space-md);
    display: none;
}

.contact__error {
    text-align: center;
    color: #ff6b6b;
    font-size: 0.85rem;
    margin-bottom: var(--space-sm);
}

/* === RESPONSIVE === */


@media (max-width: 968px) {

    .nav__links,
    .nav__cta {
        display: none;
    }

    .nav__hamburger {
        display: flex;
    }

    .hero {
        padding: var(--nav-height) var(--space-md) 0;
    }

    .hero__orb {
        width: 400px;
        height: 400px;
    }

    .hero__orb--left {
        left: -140px;
    }

    .hero__orb--right {
        right: -140px;
    }

    .hero__spline {
        width: 400px;
        height: 400px;
    }

    .hero__spline--left {
        left: -180px;
    }

    .hero__spline--right {
        right: -180px;
    }

    .hero__spline-robot spline-viewer {
        transform: scale(1.5) translateY(8%);
    }

    .hero__content {
        max-width: 600px;
    }

    .trusted {
        padding: var(--space-2xl) var(--space-md) var(--space-xl);
    }

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

    .projects__grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .projects__content {
        margin-top: -50vh;
    }

    /* === MOBILE TESTIMONIALS === */
    .testimonials__spline-bg {
        display: none;
    }

    .testimonials__content {
        flex-direction: column;
        justify-content: flex-start;
        padding: calc(var(--nav-height) + var(--space-md)) var(--space-xs) var(--space-sm);
        gap: var(--space-lg);
        height: 100vh; /* Force container bounds to fix layout clips */
        transform: translateY(0);
    }

    .testimonials__label {
        font-size: 0.6rem;
        margin-bottom: var(--space-xs);
        line-height: 1.2;
    }

    .testimonials__text {
        max-width: 100%;
        text-align: center;
    }

    .testimonials__title {
        font-size: 2.2rem;
        line-height: 1.1;
    }

    .testimonials__desc {
        font-size: 1.1rem;
        margin: 0 auto;
    }

    .testimonials__spline-bg spline-viewer {
        /* Mathematically shrink the sphere to fit phones! */
        transform: scale(0.65) translateY(10%);
    }

    .card-deck {
        width: 100%;
        max-width: 400px;
        height: 380px;
        align-self: center;
        margin-top: 0;
    }

    .testi-grid {
        column-count: 2;
    }

    /* === MOBILE CONTACT === */
    .contact {
        padding: var(--nav-height) 0 var(--space-2xl);
    }

    .contact__spline-bg {
        display: none;
    }

    .contact__content {
        padding: var(--space-2xl) var(--space-sm);
    }
}

@media (max-width: 640px) {
    .testi-grid {
        column-count: 1;
    }

    .nav {
        padding: 0 var(--space-sm);
    }

    .hero {
        padding: var(--nav-height) var(--space-sm) 0;
    }

    .hero__orb {
        width: 260px;
        height: 260px;
        top: 35%;
    }

    .hero__orb--left {
        left: -100px;
    }

    .hero__orb--right {
        right: -100px;
    }

    .hero__spline {
        width: 280px;
        height: 280px;
    }

    .hero__spline-robot spline-viewer {
        transform: scale(1.8) translateY(12%);
    }

    .hero__spline-robot {
        -webkit-mask-image: radial-gradient(ellipse 80% 55% at 50% 38%, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 0.4) 35%, transparent 60%);
        mask-image: radial-gradient(ellipse 80% 55% at 50% 38%, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 0.4) 35%, transparent 60%);
    }

    .hero__content {
        max-width: 100%;
        padding: 0 var(--space-xs);
    }

    .hero__title {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero__subtitle {
        font-size: 0.88rem;
        max-width: 340px;
    }

    .hero__subtitle br {
        display: none;
    }

    .hero__cta {
        padding: 14px 28px;
        font-size: 0.72rem;
    }

    .trusted {
        padding: var(--space-xl) var(--space-sm) var(--space-lg);
    }

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

    .trusted__logo-svg {
        height: 24px;
    }

    /* === TINY MOBILE TWEAKS === */
    .testimonials__title {
        font-size: 1.8rem;
    }

    .testimonials__spline-bg spline-viewer {
        transform: scale(0.55) translateY(15%);
    }

    .testi-card--wide {
        grid-column: span 1;
        min-height: 200px;
    }
    .testi-card--tall {
        grid-row: span 1;
        min-height: 260px;
    }

    .section-separator__video {
        min-height: 250px;
    }

    .card-deck {
        height: 350px;
    }

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

    .deck-card__quote {
        font-size: 0.88rem;
        line-height: 1.4;
    }

    .deck-card__name {
        font-size: 0.9rem;
    }

    .contact__content {
        padding: var(--space-xl) 0 var(--space-2xl);
    }

    .contact__form {
        margin: 0 var(--space-md);
        padding: var(--space-lg) var(--space-md);
    }

    .contact__heading {
        font-size: 1.8rem;
    }
}

/* Extra small screens */
@media (max-width: 380px) {
    .hero__title {
        font-size: 1.7rem;
    }

    .hero__orb {
        width: 220px;
        height: 220px;
    }

    .hero__orb--left {
        left: -90px;
    }

    .hero__orb--right {
        right: -90px;
    }

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

    .trusted__logo-svg {
        height: 20px;
    }
}

/* === UTILITY: When Spline models are active, hide CSS orbs === */
body.spline-active .hero__orb {
    display: none;
}

/* === SMOOTH PAGE LOAD === */
body {
    opacity: 0;
    animation: pageLoad 0.6s ease forwards;
}

@keyframes pageLoad {
    to {
        opacity: 1;
    }
}