/* ============================================
   SANDBOX DIGITAL - Main Stylesheet
   ============================================ */

/* CSS Variables */
:root {
    /* Base Colors */
    --bg-primary: #1a1d23;
    --bg-secondary: #22262e;
    --bg-tertiary: #2a2f3a;
    
    /* Brand Colors */
    --accent-blue: #64b5f6;
    --accent-blue-light: #90caf9;
    --accent-purple: #7c4dff;
    --accent-purple-dark: #5e35b1;
    --accent-gradient: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
    
    /* Text Colors */
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    
    /* Utility */
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glow-blue: rgba(100, 181, 246, 0.4);
    --glow-purple: rgba(124, 77, 255, 0.4);
    
    /* Typography */
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Spacing */
    --section-padding: clamp(60px, 10vw, 120px);
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Theme Variations */
[data-theme="minimal"] {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #252525;
    --accent-blue: #ffffff;
    --accent-purple: #888888;
    --accent-gradient: linear-gradient(135deg, #ffffff 0%, #888888 100%);
    --text-primary: #ffffff;
    --text-secondary: #999999;
}

[data-theme="bold"] {
    --bg-primary: #0d001a;
    --bg-secondary: #1a0033;
    --bg-tertiary: #2a0050;
    --accent-blue: #ff6b6b;
    --accent-purple: #ffd93d;
    --accent-gradient: linear-gradient(135deg, #ff6b6b 0%, #ffd93d 100%);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
}

[data-theme="light"] {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e9ecef;
    --accent-blue: #4a90d9;
    --accent-purple: #7c5ce7;
    --accent-gradient: linear-gradient(135deg, #4a90d9 0%, #7c5ce7 100%);
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a68;
    --text-muted: #6c6c8a;
    --border-color: rgba(0, 0, 0, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glow-blue: rgba(74, 144, 217, 0.3);
    --glow-purple: rgba(124, 92, 231, 0.3);
}

/* Global Light Mode Toggle */
[data-mode="light"] {
    --bg-primary: #f5f5f7;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e8e8ed;
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a68;
    --text-muted: #6c6c8a;
    --border-color: rgba(0, 0, 0, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.7);
}

[data-mode="light"] .main-nav {
    background: rgba(255, 255, 255, 0.9);
}

[data-mode="light"] .noise-overlay {
    opacity: 0.015;
}

[data-mode="light"] .cursor-glow {
    opacity: 0.08;
}

/* Font Themes */
[data-font="minimal"] {
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

[data-font="bold"] {
    --font-display: 'Syne', sans-serif;
    --font-body: 'Syne', sans-serif;
}

[data-font="light"] {
    --font-display: 'DM Serif Display', serif;
    --font-body: 'Outfit', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

/* Prevent horizontal scroll on all containers */
section,
div,
header,
footer {
    max-width: 100%;
}

/* Ensure images and media are responsive */
img,
video,
iframe {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Noise Overlay */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Cursor Glow */
.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(circle, var(--glow-purple) 0%, transparent 70%);
    opacity: 0.15;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
}

/* Selection */
::selection {
    background: var(--accent-purple);
    color: var(--text-primary);
}

/* Links */
a {
    color: inherit;
    text-decoration: none;
}

/* ============================================
   NAVIGATION
   ============================================ */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 3rem;
    background: rgba(26, 29, 35, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    animation: navSlideDown 0.8s ease-out;
}

@keyframes navSlideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 0rem;
    font-family: 'Exo 2', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
    transition: transform var(--transition-fast);
}

.logo:hover {
    transform: scale(1.02);
}

.logo-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.logo-text {
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.logo-digital {
    font-size: 0.85em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    position: relative;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width var(--transition-smooth);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-cta {
    padding: 0.75rem 1.5rem;
    background: var(--accent-gradient);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0a0a0a;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--glow-purple);
}

/* Mobile Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all var(--transition-fast);
    z-index: 1001;
}

.hamburger:hover {
    background: var(--bg-tertiary);
    transform: scale(1.05);
}

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

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

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

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

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.mobile-nav-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 2rem;
    padding: 2rem;
}

.mobile-nav-menu .nav-link {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.mobile-nav-menu .nav-link:hover,
.mobile-nav-menu .nav-link.active {
    color: var(--text-primary);
    transform: translateX(10px);
}

.mobile-nav-menu .nav-link::after {
    display: none;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Theme Toggle Button */
.theme-toggle {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.theme-toggle:hover {
    background: var(--bg-tertiary);
    transform: scale(1.05);
}

.theme-toggle svg {
    position: absolute;
    transition: all 0.3s ease;
}

.theme-toggle .sun-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

.theme-toggle .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-mode="light"] .theme-toggle .sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-mode="light"] .theme-toggle .moon-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: calc(80px + 2rem) 4rem 2rem 8rem;
    position: relative;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(ellipse at center right, var(--glow-purple) 0%, transparent 60%);
    opacity: 0.15;
    pointer-events: none;
}

.hero-content {
    max-width: 550px;
    text-align: left;
    flex-shrink: 0;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

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

@keyframes dotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.title-line {
    display: block;
    animation: fadeInUp 0.8s ease-out both;
}

.title-line:nth-child(1) { animation-delay: 0.3s; }
.title-line:nth-child(2) { animation-delay: 0.4s; }
.title-line:nth-child(3) { animation-delay: 0.5s; }

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

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.hero-ctas {
    display: flex;
    gap: 1rem;
    animation: fadeInUp 0.8s ease-out 0.7s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: var(--accent-gradient);
    color: #0a0a0a;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px var(--glow-purple);
}

.btn-primary svg {
    transition: transform var(--transition-fast);
}

.btn-primary:hover svg {
    transform: translateX(4px);
}

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

.btn-secondary:hover {
    background: var(--glass-bg);
    border-color: var(--accent-blue);
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
}

/* ============================================
   CARD STACK - EMERGING FROM RIGHT
   ============================================ */
.card-stack-container {
    position: fixed;
    right: -15%;
    top: 80px;
    height: calc(100vh - 80px);
    width: 40%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    z-index: 1;
    pointer-events: none;
    transition: right 0.6s cubic-bezier(0.4, 0, 0.2, 1), width 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease-out;
}

.card-stack-title,
.card-stack-subtitle {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.card-stack {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 1rem;
}

.style-card {
    position: absolute;
    width: 100%;
    max-width: 480px;
    height: 580px;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    pointer-events: all;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -20px 30px 60px rgba(0, 0, 0, 0.5);
    right: 0;
}

/* Cards positioned vertically stacked from right */
.card-minimal {
    top: -8%;
    transform: translateY(0) rotate(-4deg);
    z-index: 1;
    background: linear-gradient(145deg, #0f0f0f, #1a1a1a);
}

.card-bold {
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    z-index: 2;
    background: linear-gradient(145deg, #1a0033, #330066);
}

.card-light {
    bottom: -8%;
    transform: translateY(0) rotate(4deg);
    z-index: 1;
    background: linear-gradient(145deg, #ffffff, #f0f0f5);
}

/* When a card is hovered, slide in and expand container */
.card-stack-container:has(.style-card:hover) {
    right: 0;
    width: 66.666%;
}

.hero:has(.card-stack-container .style-card:hover) .hero-content {
    transform: translateX(-15%);
}

/* Hover States - Card expands and centers */
.style-card:hover {
    z-index: 10;
    top: 50%;
    bottom: auto;
    right: 0;
    transform: translateY(-50%) rotate(0deg);
    height: 650px;
    width: 95%;
    max-width: 95%;
    box-shadow: -40px 50px 100px rgba(0, 0, 0, 0.7);
}

.card-minimal:hover {
    top: 50%;
}

.card-light:hover {
    bottom: auto;
    top: 50%;
}

/* Non-hovered cards fade and shrink */
.card-minimal:hover ~ .card-bold,
.card-minimal:hover ~ .card-light {
    opacity: 0.3;
    transform: translateY(0) scale(0.75) rotate(0deg);
    pointer-events: none;
}

.card-bold:hover ~ .card-light {
    opacity: 0.3;
    transform: translateY(0) scale(0.75) rotate(0deg);
    pointer-events: none;
}

.card-stack:has(.card-bold:hover) .card-minimal {
    opacity: 0.3;
    transform: translateY(0) scale(0.75) rotate(0deg);
    pointer-events: none;
}

.card-stack:has(.card-light:hover) .card-minimal {
    opacity: 0.3;
    transform: translateY(0) scale(0.75) rotate(0deg);
    pointer-events: none;
}

.card-stack:has(.card-light:hover) .card-bold {
    opacity: 0.3;
    transform: translateY(-50%) scale(0.75) rotate(0deg);
    pointer-events: none;
}

/* Browser Bar */
.card-browser {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-light .card-browser {
    background: rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

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

.browser-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.card-minimal .browser-dots span:nth-child(1) { background: #888; }
.card-minimal .browser-dots span:nth-child(2) { background: #666; }
.card-minimal .browser-dots span:nth-child(3) { background: #444; }

.card-bold .browser-dots span:nth-child(1) { background: #ff6b6b; }
.card-bold .browser-dots span:nth-child(2) { background: #ffd93d; }
.card-bold .browser-dots span:nth-child(3) { background: #6bcb77; }

.card-light .browser-dots span:nth-child(1) { background: #ff5f56; }
.card-light .browser-dots span:nth-child(2) { background: #ffbd2e; }
.card-light .browser-dots span:nth-child(3) { background: #27ca40; }

.browser-url {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.3);
    padding: 0.35rem 1rem;
    border-radius: 6px;
}

.card-light .browser-url {
    background: rgba(0, 0, 0, 0.05);
    color: #666;
}

/* Card Content */
.card-content {
    padding: 2rem;
    height: calc(100% - 50px);
    display: flex;
    flex-direction: column;
}

.card-nav {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
    font-size: 0.85rem;
}

/* Minimal Card Styles */
.card-minimal .card-nav {
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #888;
}

.card-minimal h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 1px;
    color: #fff;
    margin-bottom: 1rem;
}

.card-minimal p {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    color: #666;
    flex-grow: 1;
    line-height: 1.6;
}

.card-minimal .card-cta {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: #fff;
    border-bottom: 1px solid #fff;
    align-self: flex-start;
    padding-bottom: 4px;
}

/* Bold Card Styles */
.card-bold .card-nav {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    color: #ffd93d;
}

.card-bold h3 {
    font-family: 'Syne', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: #ff6b6b;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.card-bold p {
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    flex-grow: 1;
    line-height: 1.6;
}

.card-bold .card-cta {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #ffd93d;
    background: rgba(255, 217, 61, 0.15);
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    align-self: flex-start;
}

/* Light Card Styles */
.card-light .card-nav {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    color: #4a90d9;
}

.card-light h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 2rem;
    font-weight: 400;
    color: #1a1a2e;
    margin-bottom: 1rem;
}

.card-light p {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    color: #4a4a68;
    flex-grow: 1;
    line-height: 1.6;
}

.card-light .card-cta {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: #4a90d9;
    border-bottom: 2px solid #4a90d9;
    align-self: flex-start;
    padding-bottom: 4px;
}

/* Card Label */
.card-label {
    position: absolute;
    bottom: 1.25rem;
    right: 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.5;
}

.card-light .card-label {
    color: #1a1a2e;
}

/* Center hover hint with arrow pointing right */
.hero::after {
    content: 'Hover to preview styles →';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1rem;
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--text-primary);
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    padding: 1rem 2rem;
    border-radius: 50px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
    animation: pulseHintCenter 2.5s ease-in-out infinite;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

@keyframes pulseHintCenter {
    0%, 100% {
        opacity: 0.9;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

/* Hide hint when any card is hovered */
.hero:has(.style-card:hover)::after {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-out, visibility 0s 0.2s;
}

/* Small hint on cards themselves */
.card-stack::after {
    content: '';
    display: none;
}

/* ============================================
   SERVICES PREVIEW
   ============================================ */
.services-preview {
    padding: var(--section-padding) 3rem;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent-blue);
    margin-bottom: 1rem;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-smooth);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: rgba(100, 181, 246, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    border-radius: 16px;
    margin-bottom: 1.5rem;
    transition: transform var(--transition-bounce);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(-5deg);
}

.service-icon svg {
    stroke: #0a0a0a;
}

.service-card h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--accent-blue);
    transition: gap var(--transition-fast);
}

.service-link::after {
    content: '→';
    transition: transform var(--transition-fast);
}

.service-link:hover {
    gap: 0.75rem;
}

.service-link:hover::after {
    transform: translateX(4px);
}

/* ============================================
   STATS SECTION
   ============================================ */
.stats-section {
    padding: var(--section-padding) 3rem;
    background: var(--bg-secondary);
    position: relative;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.stat-item {
    padding: 2rem;
}

.stat-number {
    font-family: var(--font-display);
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-suffix {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    display: block;
    margin-top: 0.75rem;
    font-size: 1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
    padding: var(--section-padding) 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-section h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.cta-decoration {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.deco-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    animation: pulse 4s ease-in-out infinite;
}

.deco-circle:nth-child(1) {
    width: 300px;
    height: 300px;
    top: -150px;
    left: -150px;
    animation-delay: 0s;
}

.deco-circle:nth-child(2) {
    width: 500px;
    height: 500px;
    top: -250px;
    left: -250px;
    animation-delay: 1s;
}

.deco-circle:nth-child(3) {
    width: 700px;
    height: 700px;
    top: -350px;
    left: -350px;
    animation-delay: 2s;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.1;
    }
}

/* ============================================
   FOOTER
   ============================================ */
.main-footer {
    padding: 3rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto 2rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Exo 2', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.footer-brand .logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.footer-brand .logo-digital {
    font-size: 0.85em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

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

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    background: var(--accent-gradient);
    border-color: transparent;
    color: #0a0a0a;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    .card-stack-container {
        right: -12%;
        width: 38%;
        padding: 2rem 1.5rem;
    }

    .card-stack-container:has(.style-card:hover) {
        right: 0;
        width: 65%;
    }

    .style-card {
        max-width: 420px;
        height: 520px;
    }

    .style-card:hover {
        height: 580px;
    }
}

@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        padding: calc(80px + 2rem) 2rem 2rem;
        text-align: center;
        overflow: visible;
    }

    .hero::after {
        display: none;
    }

    .hero-content {
        max-width: 100%;
        transform: translateX(0) !important;
    }

    .hero-ctas {
        justify-content: center;
    }

    .card-stack-container {
        position: relative;
        right: 0 !important;
        width: 100% !important;
        height: auto;
        margin-top: 4rem;
        padding: 0;
    }

    .card-stack {
        height: 500px;
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }

    .card-stack::after {
        display: none;
    }

    .style-card {
        width: 320px;
        max-width: 320px;
        height: 420px;
    }

    /* Reset to centered stacked layout on tablet */
    .card-minimal {
        right: auto;
        left: 50%;
        top: 0;
        transform: translateX(-50%) translateX(-30px) rotate(-5deg);
    }

    .card-bold {
        right: auto;
        left: 50%;
        top: 40px;
        transform: translateX(-50%) translateY(-50%) rotate(0deg);
    }

    .card-light {
        right: auto;
        left: 50%;
        bottom: auto;
        top: 80px;
        transform: translateX(-50%) translateX(30px) rotate(5deg);
    }

    .style-card:hover {
        width: 340px;
        max-width: 340px;
        height: 440px;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%) rotate(0deg) scale(1.05);
    }

    .card-minimal:hover ~ .card-bold,
    .card-minimal:hover ~ .card-light,
    .card-bold:hover ~ .card-light {
        opacity: 0.4;
        transform: translateX(-50%) translateX(50px) rotate(8deg) scale(0.85);
    }

    .card-stack:has(.card-bold:hover) .card-minimal,
    .card-stack:has(.card-light:hover) .card-minimal,
    .card-stack:has(.card-light:hover) .card-bold {
        opacity: 0.4;
        transform: translateX(-50%) translateX(-50px) rotate(-8deg) scale(0.85);
    }

    .services-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
}

@media (max-width: 768px) {
    .main-nav {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .mobile-nav-overlay {
        display: block;
    }

    .nav-right {
        gap: 0.75rem;
    }

    .theme-toggle {
        width: 40px;
        height: 40px;
    }

    .hero {
        padding: calc(70px + 1.5rem) 1.5rem 1.5rem;
        min-height: auto;
    }

    .hero-content {
        margin-bottom: 2rem;
    }

    .card-stack {
        height: 450px;
    }

    .style-card {
        width: 280px;
        max-width: 280px;
        height: 380px;
    }

    .style-card:hover {
        width: 300px;
        max-width: 300px;
        height: 400px;
    }

    .card-content {
        padding: 1.5rem;
    }

    .card-minimal h3,
    .card-bold h3,
    .card-light h3 {
        font-size: 1.5rem;
    }

    .card-nav {
        gap: 1rem;
        font-size: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-item {
        padding: 1.5rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .main-nav {
        padding: 0.875rem 1rem;
    }

    .logo-img {
        width: 32px;
        height: 32px;
    }

    .logo-text {
        font-size: 1rem;
    }

    .nav-cta {
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
    }

    .hero {
        padding: calc(70px + 1rem) 1rem 1rem;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.85rem;
        margin-bottom: 1.5rem;
    }

    .hero h1 {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
        line-height: 1.1;
    }

    .hero-description {
        font-size: 1rem;
        line-height: 1.6;
    }

    .hero-ctas {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .hero-ctas .btn-primary,
    .hero-ctas .btn-secondary {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }

    .card-stack {
        height: 400px;
    }

    .style-card {
        width: 260px;
        max-width: 260px;
        height: 340px;
    }

    .style-card:hover {
        width: 280px;
        max-width: 280px;
        height: 360px;
    }

    .card-content {
        padding: 1.25rem;
    }

    .card-minimal h3,
    .card-bold h3,
    .card-light h3 {
        font-size: 1.25rem;
    }

    .card-content p {
        font-size: 0.9rem;
    }

    .section-header h2 {
        font-size: clamp(1.75rem, 6vw, 2.25rem);
    }

    .section-header p {
        font-size: 1rem;
    }
}

@media (max-width: 375px) {
    .hero h1 {
        font-size: clamp(1.5rem, 7vw, 2rem);
    }

    .card-stack {
        height: 380px;
    }

    .style-card {
        width: 240px;
        max-width: 240px;
        height: 320px;
    }

    .style-card:hover {
        width: 255px;
        max-width: 255px;
        height: 335px;
    }

    .nav-cta {
        padding: 0.5rem 0.875rem;
        font-size: 0.8rem;
    }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    /* Disable cursor glow on touch devices */
    .cursor-glow {
        display: none;
    }

    /* Make all interactive elements more touch-friendly */
    .nav-link,
    .nav-cta,
    .theme-toggle,
    .hamburger,
    .btn-primary,
    .btn-secondary {
        min-height: 44px;
        min-width: 44px;
    }

    /* Simplify card stack interactions for touch */
    .style-card {
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .style-card:active {
        transform: scale(0.98);
    }

    /* Remove complex hover states on cards for touch devices */
    @media (max-width: 1024px) {
        .card-minimal:hover ~ .card-bold,
        .card-minimal:hover ~ .card-light,
        .card-bold:hover ~ .card-light {
            opacity: 1;
            transform: translateX(-50%) translateX(0) rotate(0deg) scale(1);
        }

        .card-stack:has(.card-bold:hover) .card-minimal,
        .card-stack:has(.card-light:hover) .card-minimal,
        .card-stack:has(.card-light:hover) .card-bold {
            opacity: 1;
            transform: translateX(-50%) translateX(0) rotate(0deg) scale(1);
        }
    }

    /* Better tap targets for service cards */
    .service-card,
    .pricing-card,
    .testimonial-card,
    .value-card,
    .skill-category {
        transition: transform 0.2s ease;
    }

    .service-card:active,
    .pricing-card:active,
    .testimonial-card:active,
    .value-card:active,
    .skill-category:active {
        transform: scale(0.98);
    }

    /* Disable hover effects on touch, use tap instead */
    .nav-cta:hover {
        transform: none;
        box-shadow: 0 5px 20px var(--glow-purple);
    }

    .nav-cta:active {
        transform: translateY(2px);
    }
}

/* ============================================
   PAGE TRANSITIONS
   ============================================ */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.7, 0, 0.3, 1);
}

.page-transition.active {
    transform: translateY(0);
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.4s; }

.stagger-children.visible > * {
    opacity: 1;
    transform: translateY(0);
}