/* ═══════════════════════════════════════════════════════════
   nodi Digital Agency — Ultra Responsive & Cross-Browser CSS
   Supports 320px Mobile, Tablets, Laptops, 4K Ultra-Wide
   ═══════════════════════════════════════════════════════════ */

/* ─── CSS Variables ─── */
:root {
    --bg-primary: #050506;
    --bg-secondary: #0a0a0f;
    --bg-card: rgba(14, 14, 22, 0.75);
    --bg-card-hover: rgba(20, 20, 32, 0.9);
    --bg-glass: rgba(255, 255, 255, 0.035);
    --bg-glass-border: rgba(255, 255, 255, 0.08);

    --text-primary: #f0f0f5;
    --text-secondary: #8a8a9a;
    --text-tertiary: #55556a;

    --accent-purple: #8b5cf6;
    --accent-purple-dim: rgba(139, 92, 246, 0.15);
    --accent-purple-glow: rgba(139, 92, 246, 0.4);
    --accent-cyan: #06b6d4;
    --accent-cyan-dim: rgba(6, 182, 212, 0.15);
    --accent-cyan-glow: rgba(6, 182, 212, 0.4);
    --accent-green: #10b981;

    --gradient-main: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
    --gradient-text: linear-gradient(135deg, #a78bfa 0%, #22d3ee 50%, #8b5cf6 100%);
    --gradient-card: linear-gradient(135deg, rgba(139,92,246,0.12) 0%, rgba(6,182,212,0.06) 100%);

    --border-color: rgba(255, 255, 255, 0.07);
    --border-hover: rgba(255, 255, 255, 0.18);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;

    --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);

    --nav-height: 76px;
}

/* ─── Reset & Cross-Browser Base ─── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-padding-top: var(--nav-height);
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
}

::selection {
    background: var(--accent-purple);
    color: white;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.15s ease;
    touch-action: manipulation;
}

button {
    touch-action: manipulation;
    font-family: inherit;
}

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

/* ─── Utility ─── */
.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: shimmer 5s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 200% center; }
}

/* ─── View Switching ─── */
.view-active {
    display: block;
    opacity: 1;
    transition: opacity 0.3s var(--ease-smooth);
}

.view-hidden {
    display: none;
    opacity: 0;
}

/* ═══════════════════════════════════════════════
   GLOBAL ANIMATED BACKGROUND (Cross-Browser GPU)
   ═══════════════════════════════════════════════ */
.hero-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 0;
    pointer-events: none;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
}

.hero-glow {
    position: fixed;
    width: clamp(300px, 45vw, 600px);
    height: clamp(300px, 45vw, 600px);
    border-radius: 50%;
    -webkit-filter: blur(140px);
    filter: blur(140px);
    opacity: 0.12;
    z-index: 0;
    pointer-events: none;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    animation: float 12s ease-in-out infinite;
    will-change: transform;
}

.hero-glow--purple {
    background: var(--accent-purple);
    top: -150px;
    right: -80px;
    animation-delay: 0s;
}

.hero-glow--cyan {
    background: var(--accent-cyan);
    bottom: -150px;
    left: -80px;
    animation-delay: 6s;
}

.hero-glow--center {
    background: #6366f1;
    top: 40%;
    left: 30%;
    opacity: 0.07;
    animation-delay: 3s;
}

@keyframes float {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(30px, -30px, 0) scale(1.05); }
}

/* ─── Entrance Animations ─── */
.animate-on-scroll {
    opacity: 0;
    -webkit-transform: translate3d(0, 16px, 0) scale(0.985);
    transform: translate3d(0, 16px, 0) scale(0.985);
    transition: opacity 0.45s var(--ease-smooth), transform 0.45s var(--ease-smooth);
    will-change: opacity, transform;
}

.animate-on-scroll.visible {
    opacity: 1;
    -webkit-transform: translate3d(0, 0, 0) scale(1);
    transform: translate3d(0, 0, 0) scale(1);
}

/* Instant Hover on Touch/Pointer */
.animate-on-scroll:hover,
.service-card:hover,
.portfolio-card:hover,
.stack-row:hover,
.why-item:hover,
.pricing-card:hover,
.agent-feat-card:hover,
.btn:hover {
    transition-delay: 0s !important;
}

/* ═══════════════════════════════════════════════
   SPOTLIGHT MOUSE TRACKING & BORDER BEAM CARDS
   ═══════════════════════════════════════════════ */
.spotlight-card {
    position: relative;
    overflow: hidden;
}

.spotlight-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(350px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(139, 92, 246, 0.15), transparent 75%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1;
}

.spotlight-card:hover::after {
    opacity: 1;
}

/* Border Beam Traveling Light */
.border-beam-card {
    position: relative;
    z-index: 1;
}

.border-beam {
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1.5px;
    background: conic-gradient(from var(--beam-angle, 0deg) at 50% 50%, transparent 0%, transparent 70%, #8b5cf6 85%, #06b6d4 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    animation: rotate-beam 6s linear infinite;
    opacity: 0.85;
}

@keyframes rotate-beam {
    0% { --beam-angle: 0deg; }
    100% { --beam-angle: 360deg; }
}

@property --beam-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

/* ═══════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    transition: background-color 0.25s ease, border-color 0.25s ease;
    background: transparent;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.navbar.scrolled {
    background: rgba(5, 5, 6, 0.92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.45rem;
    font-weight: 700;
    display: flex;
    gap: 3px;
    align-items: center;
    transition: transform 0.15s ease;
}

.nav-logo:hover {
    transform: scale(1.03);
}

.logo-bracket {
    color: var(--accent-purple);
    font-weight: 400;
    opacity: 0.8;
}

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

.logo-sub {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-tertiary);
    margin-left: 2px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
}

.nav-links a {
    padding: 8px 14px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-link-agent {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(139, 92, 246, 0.12) !important;
    border: 1px solid rgba(139, 92, 246, 0.3) !important;
    color: #c4b5fd !important;
    border-radius: 100px !important;
    padding: 6px 14px !important;
    font-weight: 600 !important;
    transition: all 0.15s ease !important;
}

.nav-link-agent:hover {
    background: rgba(139, 92, 246, 0.25) !important;
    border-color: rgba(139, 92, 246, 0.6) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.pulse-sparkle {
    display: inline-block;
    animation: sparkle-pulse 2.5s ease-in-out infinite;
}

@keyframes sparkle-pulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.2); opacity: 1; }
}

.agent-nav-badge {
    font-size: 0.65rem;
    font-family: var(--font-mono);
    padding: 2px 6px;
    background: var(--gradient-main);
    color: white;
    border-radius: 100px;
    font-weight: 700;
}

.nav-cta {
    background: var(--gradient-main) !important;
    color: white !important;
    border-radius: var(--radius-md) !important;
    font-weight: 600 !important;
    padding: 9px 18px !important;
    transition: all 0.15s ease !important;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
}

.nav-cta:hover {
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.4) !important;
    transform: translateY(-1px);
}

.nav-actions-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 100px;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.lang-btn.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.12);
}

.lang-btn:hover:not(.active) {
    color: var(--text-secondary);
}

.lang-sep {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    opacity: 0.5;
}

/* Mobile Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.2s ease;
}

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

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

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

/* ═══════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════ */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: clamp(100px, 14vh, 140px) 24px clamp(60px, 10vh, 100px);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 860px;
    width: 100%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: var(--bg-glass);
    border: 1px solid var(--bg-glass-border);
    border-radius: 100px;
    font-size: clamp(0.75rem, 2vw, 0.85rem);
    color: var(--text-secondary);
    margin-bottom: clamp(20px, 4vh, 32px);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}

.hero-title {
    font-size: clamp(2.2rem, 5.5vw, 4.6rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: clamp(16px, 3vh, 24px);
}

.hero-subtitle {
    font-size: clamp(0.95rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: clamp(28px, 5vh, 40px);
    font-weight: 400;
    letter-spacing: 0.03em;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: clamp(40px, 6vh, 64px);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    border: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-main);
    color: white;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 6px 30px rgba(139, 92, 246, 0.45);
    transform: translateY(-2px);
}

.btn-agent-glow {
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.4);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.18);
}

.btn-agent-glow:hover {
    background: rgba(139, 92, 246, 0.28);
    border-color: rgba(139, 92, 246, 0.65);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.35);
    transform: translateY(-2px);
}

.btn-sub-tag {
    font-size: 0.7rem;
    font-family: var(--font-mono);
    padding: 2px 6px;
    background: var(--accent-purple);
    border-radius: 4px;
    color: white;
    text-transform: uppercase;
}

.btn-ghost {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-ghost:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 18px 36px;
    font-size: 1.05rem;
    border-radius: var(--radius-lg);
}

.btn-sm {
    padding: 10px 18px;
    font-size: 0.88rem;
    border-radius: var(--radius-md);
}

.btn-xs {
    padding: 6px 12px;
    font-size: 0.78rem;
    border-radius: var(--radius-sm);
}

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

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(16px, 4vw, 40px);
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: var(--font-mono);
}

.stat-plus {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    display: block;
    font-size: clamp(0.75rem, 1.5vw, 0.85rem);
    color: var(--text-tertiary);
    margin-top: 4px;
}

.stat-divider {
    width: 1px;
    height: 36px;
    background: var(--border-color);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.scroll-line {
    width: 1px;
    height: 50px;
    background: var(--border-color);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    width: 100%;
    height: 50px;
    background: var(--gradient-main);
    animation: scroll-down 2s ease-in-out infinite;
}

@keyframes scroll-down {
    0% { top: -50px; }
    100% { top: 50px; }
}

/* ═══════════════════════════════════════════════
   SECTIONS COMMON
   ═══════════════════════════════════════════════ */
.section {
    padding: clamp(60px, 10vh, 110px) 0;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: clamp(40px, 7vh, 64px);
}

.section-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: clamp(0.72rem, 1.5vw, 0.8rem);
    color: var(--accent-purple);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 14px;
    padding: 5px 14px;
    border: 1px solid var(--accent-purple-dim);
    border-radius: 100px;
    background: var(--accent-purple-dim);
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 14px;
}

.section-desc {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    color: var(--text-secondary);
    max-width: 620px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════════
   SERVICES
   ═══════════════════════════════════════════════ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: clamp(24px, 4vw, 36px) clamp(20px, 3.5vw, 32px);
    transition: border-color 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-main);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.service-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translate3d(0, -3px, 0);
}

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

.service-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-purple-dim);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    color: var(--accent-purple);
    transition: transform 0.15s ease;
}

.service-card[data-glow="cyan"] .service-icon {
    background: var(--accent-cyan-dim);
    color: var(--accent-cyan);
}

.service-card:hover .service-icon {
    transform: scale(1.08);
}

.service-card h3 {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.service-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.service-tags span {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    color: var(--text-tertiary);
}

/* ═══════════════════════════════════════════════
   TECH STACK (Banner-style rows)
   ═══════════════════════════════════════════════ */
.stack-rows {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stack-row {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: clamp(20px, 3vw, 26px) clamp(20px, 3.5vw, 30px);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: border-color 0.15s ease, transform 0.15s ease;
    transform: translateZ(0);
}

.stack-row:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.stack-category {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-purple);
    white-space: nowrap;
    min-width: 200px;
    padding-top: 4px;
    letter-spacing: 0.02em;
}

.stack-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
    cursor: default;
}

.tag:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.tag-highlight {
    background: var(--accent-purple-dim);
    border-color: rgba(139, 92, 246, 0.25);
    color: #c4b5fd;
}

.tag-highlight:hover {
    background: rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.5);
    color: #ffffff;
}

/* ═══════════════════════════════════════════════
   PORTFOLIO
   ═══════════════════════════════════════════════ */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.portfolio-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: clamp(24px, 4vw, 36px);
    transition: border-color 0.15s ease, transform 0.15s ease;
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
}

.portfolio-card:hover {
    border-color: var(--border-hover);
    transform: translate3d(0, -3px, 0);
}

.portfolio-card--featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    align-items: center;
    background: var(--gradient-card);
    border-color: rgba(139, 92, 246, 0.25);
}

.portfolio-card--featured:hover {
    border-color: rgba(139, 92, 246, 0.45);
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.12);
}

.portfolio-card-glow {
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: var(--accent-purple);
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.12;
}

.portfolio-badge {
    position: absolute;
    top: 24px;
    right: 24px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 6px 14px;
    background: var(--accent-purple-dim);
    color: var(--accent-purple);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 100px;
}

.portfolio-content h3 {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.portfolio-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 24px;
}

.portfolio-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.portfolio-stack span {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 5px 12px;
    background: var(--accent-purple-dim);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius-sm);
    color: var(--accent-purple);
}

.portfolio-actions {
    margin-top: 16px;
}

/* Code Window */
.code-window {
    background: #090910;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-color);
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-dot--red { background: #ff5f57; }
.code-dot--yellow { background: #febc2e; }
.code-dot--green { background: #28c840; }

.code-title {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.code-body {
    padding: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.code-body code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.code-keyword { color: #c792ea; }
.code-class { color: #ffcb6b; }
.code-func { color: #82aaff; }
.code-str { color: #c3e88d; }
.code-num { color: #f78c6c; }

/* ═══════════════════════════════════════════════
   WHY US
   ═══════════════════════════════════════════════ */
.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.why-item {
    padding: clamp(28px, 4vw, 40px) clamp(24px, 3.5vw, 32px);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: border-color 0.15s ease, transform 0.15s ease;
    transform: translateZ(0);
}

.why-item:hover {
    border-color: var(--border-hover);
    transform: translate3d(0, -3px, 0);
}

.why-number {
    font-family: var(--font-mono);
    font-size: clamp(2.2rem, 4vw, 3rem);
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.3;
    margin-bottom: 16px;
    line-height: 1;
}

.why-item:hover .why-number {
    opacity: 0.6;
}

.why-item h3 {
    font-size: clamp(1.1rem, 2vw, 1.2rem);
    font-weight: 700;
    margin-bottom: 12px;
}

.why-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════
   CONTACT
   ═══════════════════════════════════════════════ */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(32px, 5vw, 64px);
    align-items: center;
    padding: clamp(28px, 5vw, 64px);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
}

.contact-glow {
    position: absolute;
    top: -150px;
    left: -150px;
    width: 400px;
    height: 400px;
    background: var(--accent-purple);
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.08;
}

.contact-title {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.03em;
    margin-top: 16px;
    margin-bottom: 20px;
}

.contact-desc {
    color: var(--text-secondary);
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    line-height: 1.6;
    margin-bottom: 32px;
}

.contact-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-actions .btn {
    justify-content: center;
}

/* Terminal */
.terminal-window {
    background: #090910;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
    width: 100%;
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-color);
}

.terminal-body {
    padding: 20px 24px;
    min-height: 110px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.terminal-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: clamp(0.78rem, 1.8vw, 0.9rem);
    white-space: nowrap;
}

.terminal-prompt {
    color: var(--accent-cyan);
    font-weight: 700;
}

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

.terminal-cursor {
    color: var(--accent-purple);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* ═══════════════════════════════════════════════
   DEDICATED VIEW: nodi AI AGENT SHOWCASE PAGE
   ═══════════════════════════════════════════════ */
.agent-hero-section {
    padding: clamp(100px, 14vh, 130px) 0 80px;
    position: relative;
    z-index: 1;
}

.agent-back-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 16px;
}

.agent-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: clamp(0.72rem, 1.5vw, 0.8rem);
    color: #6ee7b7;
}

.pulse-green {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

.agent-hero-header {
    text-align: center;
    max-width: 840px;
    margin: 0 auto clamp(36px, 6vh, 60px);
}

.agent-badge-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-cyan);
    letter-spacing: 0.15em;
    padding: 6px 18px;
    background: var(--accent-cyan-dim);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 100px;
    margin-bottom: 24px;
}

.agent-hero-title {
    font-size: clamp(2.2rem, 5vw, 4.2rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.agent-hero-desc {
    font-size: clamp(1rem, 2.2vw, 1.15rem);
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Custom Video Player */
.agent-video-box {
    background: var(--bg-card);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    margin-bottom: clamp(50px, 8vh, 90px);
    transform: translateZ(0);
}

.video-window-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid var(--border-color);
}

.window-dots {
    display: flex;
    gap: 8px;
}

.window-title {
    font-family: var(--font-mono);
    font-size: clamp(0.72rem, 1.5vw, 0.85rem);
    color: var(--text-secondary);
    font-weight: 600;
}

.window-lang-indicator {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 4px 10px;
    background: var(--accent-purple-dim);
    color: #c4b5fd;
    border-radius: 100px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.custom-video-shell {
    position: relative;
    width: 100%;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.custom-video-shell video {
    width: 100%;
    max-height: 620px;
    object-fit: contain;
    display: block;
    cursor: pointer;
}

/* Custom Big Play Overlay */
.custom-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
    transition: opacity 0.3s ease, transform 0.3s var(--ease-smooth);
}

.custom-play-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.85);
}

.play-icon-glow {
    width: clamp(64px, 12vw, 84px);
    height: clamp(64px, 12vw, 84px);
    border-radius: 50%;
    background: var(--gradient-main);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.6);
    transition: transform 0.2s var(--ease-smooth), box-shadow 0.2s var(--ease-smooth);
}

.custom-play-overlay:hover .play-icon-glow {
    transform: scale(1.1);
    box-shadow: 0 0 60px rgba(139, 92, 246, 0.85);
}

/* Custom Controls Bar */
.custom-player-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 18px;
    background: linear-gradient(to top, rgba(5, 5, 10, 0.95), transparent);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-video-shell:hover .custom-player-controls,
.custom-player-controls.active {
    opacity: 1;
}

.player-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 6px;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.player-btn:hover {
    color: #c4b5fd;
    background: rgba(255, 255, 255, 0.1);
}

.player-time {
    font-family: var(--font-mono);
    font-size: clamp(0.72rem, 1.5vw, 0.8rem);
    color: var(--text-secondary);
    white-space: nowrap;
}

.player-progress-track {
    flex-grow: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: height 0.15s ease;
}

.player-progress-track:hover {
    height: 8px;
}

.player-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--gradient-main);
    border-radius: 100px;
    transition: width 0.1s linear;
}

.video-box-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 12px;
}

.video-switch-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: clamp(0.78rem, 1.8vw, 0.85rem);
    color: var(--text-tertiary);
}

.video-lang-toggle-btns {
    display: flex;
    gap: 8px;
}

.video-lang-btn.active {
    background: var(--accent-purple-dim) !important;
    border-color: rgba(139, 92, 246, 0.4) !important;
    color: #ffffff !important;
}

/* Features Grid */
.agent-features-section {
    margin-bottom: clamp(50px, 8vh, 90px);
}

.agent-sec-title {
    text-align: center;
    font-size: clamp(1.6rem, 3.5vw, 2.6rem);
    font-weight: 800;
    margin-bottom: clamp(32px, 5vh, 50px);
    letter-spacing: -0.02em;
}

.agent-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.agent-feat-card {
    padding: clamp(24px, 3.5vw, 36px) clamp(20px, 3vw, 30px);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: border-color 0.15s ease, transform 0.15s ease;
    transform: translateZ(0);
}

.agent-feat-card:hover {
    border-color: rgba(139, 92, 246, 0.4);
    transform: translate3d(0, -3px, 0);
}

.feat-icon {
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.agent-feat-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.agent-feat-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Arch Section */
.agent-arch-section {
    margin-bottom: clamp(50px, 8vh, 90px);
}

.agent-arch-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.arch-col {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: clamp(24px, 4vw, 36px);
    transform: translateZ(0);
}

.arch-col h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.arch-spec-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.arch-spec-list li {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
    padding-left: 20px;
    position: relative;
}

.arch-spec-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-cyan);
    font-weight: bold;
}

.arch-spec-list strong {
    color: var(--text-primary);
}

/* Pricing Grid */
.agent-pricing-section {
    margin-bottom: 40px;
}

.agent-pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: clamp(28px, 4vw, 40px) clamp(20px, 3.5vw, 32px);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: border-color 0.15s ease, transform 0.15s ease;
    transform: translateZ(0);
}

.pricing-card:hover {
    border-color: var(--border-hover);
    transform: translate3d(0, -3px, 0);
}

.pricing-card--featured {
    background: var(--gradient-card);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.12);
}

.pricing-card--featured:hover {
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 20px 50px rgba(139, 92, 246, 0.2);
}

.pricing-badge {
    align-self: flex-start;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 4px 12px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    color: var(--text-tertiary);
    margin-bottom: 20px;
}

.pricing-badge--hot {
    background: var(--gradient-main);
    color: white;
    border: none;
}

.pricing-card h3 {
    font-size: clamp(1.2rem, 2.2vw, 1.35rem);
    font-weight: 800;
    margin-bottom: 12px;
}

.pricing-price {
    font-size: clamp(1.8rem, 3.5vw, 2.2rem);
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--text-primary);
    margin-bottom: 16px;
}

.pricing-price span {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-tertiary);
    font-family: var(--font-sans);
}

.pricing-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 32px;
    flex-grow: 1;
}

/* ═══════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════ */
.footer {
    padding: 48px 0 32px;
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.footer-tagline {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-top: 8px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: color 0.15s ease;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.footer-made .heart {
    color: #ef4444;
    display: inline-block;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.15); }
    50% { transform: scale(1); }
    75% { transform: scale(1.1); }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS (ALL DEVICES & RESOLUTIONS)
   ═══════════════════════════════════════════════ */

/* 1600px+ (Ultra-Wide / 4K Monitors) */
@media (min-width: 1600px) {
    .container {
        max-width: 1400px;
    }
    .hero-content {
        max-width: 960px;
    }
}

/* 1024px to 1200px (Laptops / Small Desktops) */
@media (max-width: 1200px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .portfolio-card--featured {
        grid-column: 1 / -1;
    }
    .agent-features-grid,
    .agent-pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 768px to 1024px (Tablets / iPad) */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .why-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-card--featured {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .agent-arch-grid {
        grid-template-columns: 1fr;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* 576px to 768px (Mobile Landscape / Large Phones) */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        height: 100dvh;
        flex-direction: column;
        background: rgba(5, 5, 6, 0.98);
        padding: 95px 28px 32px;
        gap: 8px;
        transition: right 0.3s var(--ease-smooth);
        border-left: 1px solid var(--border-color);
        z-index: 999;
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links a {
        font-size: 1.05rem;
        padding: 12px 16px;
        width: 100%;
    }

    .nav-cta {
        margin-top: 12px;
        text-align: center;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .stack-row {
        flex-direction: column;
        gap: 12px;
    }

    .stack-category {
        min-width: auto;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .why-grid,
    .agent-features-grid,
    .agent-pricing-grid {
        grid-template-columns: 1fr;
    }

    .contact-wrapper {
        padding: 32px 20px;
    }

    .footer-content {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

/* 380px to 576px (Standard Mobile Phones) */
@media (max-width: 576px) {
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

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

    .hero-stats {
        gap: 16px;
    }

    .stat-divider {
        display: none;
    }

    .stat {
        width: 45%;
    }

    .video-box-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .video-lang-toggle-btns {
        width: 100%;
    }

    .video-lang-toggle-btns .btn {
        flex-grow: 1;
        justify-content: center;
    }

    .agent-back-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Under 380px (Small Mobile Phones — iPhone SE, Galaxy Fold) */
@media (max-width: 380px) {
    .container {
        padding: 0 16px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .stat {
        width: 100%;
    }

    .service-card,
    .portfolio-card,
    .why-item,
    .pricing-card,
    .arch-col {
        padding: 20px 16px;
    }

    .custom-player-controls {
        padding: 8px 12px;
        gap: 8px;
    }

    .player-time {
        font-size: 0.7rem;
    }
}

/* Overlay for Mobile Navigation Drawer */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.65);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
