/* ============================================
   DOAP Agency - Global Styles
   ============================================ */

/* ============================================
   CSS Custom Properties (Single Source of Truth)
   ============================================ */

:root {
    /* ========================================
       Brand Colors - Vibrant Logo Blue
       ======================================== */
    --color-brand: #4B5CF6;
    --color-brand-light: #6B7AFF;
    --color-brand-dark: #3B4AE8;
    --color-brand-glow: rgba(75, 92, 246, 0.4);
    --color-brand-subtle: rgba(75, 92, 246, 0.06);
    --color-brand-muted: rgba(75, 92, 246, 0.10);

    /* ========================================
       Background System - Deep Navy Base
       Blue undertone for cohesion with brand
       ======================================== */
    --color-bg: #0A0A14;
    --color-surface: #0E0E18;
    --color-surface-raised: #16161F;
    --color-surface-overlay: #1E1E28;

    /* ========================================
       Text Hierarchy - Light & Readable
       ======================================== */
    --color-text-primary: #FFFFFF;
    --color-text-secondary: #E4E4E7;
    --color-text-muted: #D4D4D8;

    /* ========================================
       Borders - Subtle White Overlays
       ======================================== */
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-hover: rgba(255, 255, 255, 0.15);
    --color-border-active: rgba(75, 92, 246, 0.5);

    /* ========================================
       Gradients - Visible Brand Presence
       ======================================== */
    --gradient-primary: rgba(75, 92, 246, 0.30);
    --gradient-secondary: rgba(75, 92, 246, 0.18);
    --gradient-accent: rgba(99, 102, 241, 0.14);
}

/* ============================================
   Base Styles
   ============================================ */

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    min-height: 100vh;
}

/* ============================================
   Animated Gradient Background
   ============================================ */

.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -2;
    background: var(--color-bg);
    overflow: hidden;
}

/* Animated gradient orbs - Digital Nebula effect */
.gradient-bg::before {
    content: '';
    position: absolute;
    top: -30%;
    left: -20%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, var(--gradient-primary) 0%, transparent 60%);
    filter: blur(60px);
    animation: gradientOrb1 25s ease-in-out infinite;
}

.gradient-bg::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -15%;
    width: 70%;
    height: 70%;
    background: radial-gradient(circle, var(--gradient-secondary) 0%, transparent 60%);
    filter: blur(80px);
    animation: gradientOrb2 32s ease-in-out infinite;
}

/* Third orb - accent glow */
.gradient-bg-accent {
    position: fixed;
    top: 30%;
    right: 10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, var(--gradient-accent) 0%, transparent 55%);
    filter: blur(70px);
    z-index: -1;
    animation: gradientOrb3 28s ease-in-out infinite;
    pointer-events: none;
}

/* Simpler gradient for inner pages */
.gradient-bg-simple::before {
    width: 70%;
    height: 70%;
    top: -20%;
    left: -10%;
    opacity: 1;
    animation: gradientOrbSimple 30s ease-in-out infinite;
}

.gradient-bg-simple::after {
    width: 60%;
    height: 60%;
    bottom: -10%;
    right: -10%;
    opacity: 0.8;
    animation: gradientOrbSimple 35s ease-in-out infinite reverse;
}

@keyframes gradientOrb1 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(5%, 10%) scale(1.1);
    }
    66% {
        transform: translate(-5%, 5%) scale(0.95);
    }
}

@keyframes gradientOrb2 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(-8%, -5%) scale(1.05);
    }
    66% {
        transform: translate(5%, -10%) scale(1.1);
    }
}

@keyframes gradientOrb3 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-15%, 10%) scale(1.15);
        opacity: 0.7;
    }
}

@keyframes gradientOrbSimple {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(3%, 3%);
    }
}

/* Grain overlay */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    opacity: 0.035;
    pointer-events: none;
    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");
}

/* ============================================
   Hero Stagger Animation (Page Load)
   ============================================ */

.hero-stagger {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeIn 0.8s ease-out forwards;
}

.hero-stagger:nth-child(1) { animation-delay: 0.1s; }
.hero-stagger:nth-child(2) { animation-delay: 0.25s; }
.hero-stagger:nth-child(3) { animation-delay: 0.4s; }
.hero-stagger:nth-child(4) { animation-delay: 0.55s; }

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

/* ============================================
   Scroll Down Indicator
   ============================================ */

.scroll-indicator {
    animation: scrollBounce 2s ease-in-out infinite;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.scroll-indicator.hidden {
    opacity: 0;
    pointer-events: none;
}

@keyframes scrollBounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

/* ============================================
   Reveal Animations (Scroll)
   ============================================ */

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.reveal-delay-1 { transition-delay: 0.05s; }
.reveal-delay-2 { transition-delay: 0.1s; }
.reveal-delay-3 { transition-delay: 0.15s; }
.reveal-delay-4 { transition-delay: 0.2s; }
.reveal-delay-5 { transition-delay: 0.25s; }
.reveal-delay-6 { transition-delay: 0.3s; }

/* ============================================
   Model Cards
   ============================================ */

.model-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.model-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.6);
    border-color: var(--color-border-hover);
}

.model-card img {
    transition: transform 0.4s ease;
}

.model-card:hover img {
    transform: scale(1.03);
}

/* Card Reveal Animation - Staggered entrance */
.card-reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.card-reveal:nth-child(1) { transition-delay: 0s; }
.card-reveal:nth-child(2) { transition-delay: 0.1s; }
.card-reveal:nth-child(3) { transition-delay: 0.2s; }
.card-reveal:nth-child(4) { transition-delay: 0.3s; }
.card-reveal:nth-child(5) { transition-delay: 0.4s; }
.card-reveal:nth-child(6) { transition-delay: 0.5s; }

/* ============================================
   Buttons
   ============================================ */

/* Primary button with glow */
.btn-primary {
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--color-brand-glow);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    box-shadow: 0 6px 30px var(--color-brand-glow), 0 0 40px var(--color-brand-subtle);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::after {
    left: 100%;
}

/* Secondary button - light glass morphism */
.btn-secondary {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(16px);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Social buttons */
.social-btn {
    transition: all 0.2s ease;
}

.social-btn:hover {
    background-color: var(--color-surface-overlay);
    border-color: var(--color-border-hover);
}

/* ============================================
   Navbar Scroll Effect
   ============================================ */

nav {
    transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

nav.scrolled {
    background-color: rgba(14, 14, 24, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--color-border-hover);
}

/* ============================================
   Nav Link Hover Underlines
   ============================================ */

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-brand);
    transition: width 0.3s ease;
}

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

/* ============================================
   Card Image Hover Overlay
   ============================================ */

.model-card .aspect-\[4\/5\] {
    position: relative;
}

.model-card .aspect-\[4\/5\]::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.model-card:hover .aspect-\[4\/5\]::after {
    opacity: 1;
}

/* ============================================
   Mobile Menu
   ============================================ */

.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-menu.open {
    max-height: 200px;
}

/* ============================================
   Utility Classes
   ============================================ */

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

/* Glow effect for special elements */
.glow-blue {
    box-shadow: 0 0 30px var(--color-brand-glow);
}

/* Glass panel effect */
.glass {
    background: rgba(14, 14, 24, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid var(--color-border);
}

/* ============================================
   Focus States - Accessibility
   ============================================ */

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--color-brand);
    outline-offset: 2px;
}

/* ============================================
   Selection
   ============================================ */

::selection {
    background: rgba(75, 92, 246, 0.3);
    color: var(--color-text-primary);
}
