/* ═══════════════════════════════════════════════════════════
   DIEXAR — Dark Futuristic Theme
   Tech-forward design with purple/blue gradients
   ═══════════════════════════════════════════════════════════ */

/* ─── Design Tokens ───────────────────────────────────── */
:root {
    /* Backgrounds */
    --bg-deep: #04040e;
    --bg-surface: #0a0a1a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --bg-elevated: rgba(255, 255, 255, 0.05);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1, #8b5cf6, #a855f7);
    --gradient-secondary: linear-gradient(135deg, #3b82f6, #6366f1, #8b5cf6);
    --gradient-glow: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #3b82f6 100%);
    --gradient-subtle: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.05));
    --gradient-border: linear-gradient(135deg, rgba(99, 102, 241, 0.5), rgba(168, 85, 247, 0.5), rgba(59, 130, 246, 0.5));

    /* Text */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-accent: #a78bfa;

    /* Accent */
    --accent: #8b5cf6;
    --accent-light: #a78bfa;
    --accent-blue: #6366f1;
    --accent-cyan: #22d3ee;

    /* Borders */
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(139, 92, 246, 0.4);
    --border-glow: rgba(99, 102, 241, 0.3);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.15);
    --shadow-glow-hover: 0 0 60px rgba(139, 92, 246, 0.25);

    /* Typography */
    --font-primary: 'Inter', -apple-system, system-ui, sans-serif;
    --font-heading: 'Space Grotesk', -apple-system, system-ui, sans-serif;

    /* Spacing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
}

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

html {
    scroll-behavior: smooth;
    font-family: var(--font-primary);
    background-color: var(--bg-deep);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-deep);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Noise texture overlay for depth */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.025;
    z-index: 0;
    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='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 128px 128px;
}

/* ─── Typography ───────────────────────────────────────── */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
}

p {
    line-height: 1.7;
    color: var(--text-secondary);
}

/* ─── Utility Classes ──────────────────────────────────── */
.text-white { color: var(--text-primary); }
.text-navy { color: var(--text-primary); }
.text-silver { color: var(--text-secondary); }
.text-accent { 
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.tracking-widest { letter-spacing: 0.1em; }
.uppercase { text-transform: uppercase; }
.relative { position: relative; }
.z-10 { z-index: 10; }
.italic { font-style: italic; }

.bg-navy { background-color: var(--bg-deep); }
.bg-navy-light { background-color: var(--bg-surface); }
.bg-white { background-color: var(--bg-card); }
.bg-offwhite { background-color: var(--bg-deep); }
.min-h-screen { min-height: 100vh; }

/* ─── Structural Layout ───────────────────────────────── */
.container {
    width: 100%;
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
}
.max-w-7xl { max-width: 80rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-xl { max-width: 36rem; }
.max-w-sm { max-width: 24rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.w-full { width: 100%; }

.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.p-8 { padding: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.pr-8 { padding-right: 2rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-12 { gap: 3rem; }
.gap-8 { gap: 2rem; }
.gap-6 { gap: 1.5rem; }
.gap-4 { gap: 1rem; }
.gap-2 { gap: 0.5rem; }
.self-start { align-self: flex-start; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.block { display: block; }
.inline-flex { display: inline-flex; }
.hidden { display: none; }

@media (min-width: 768px) {
    .md\:flex-row { flex-direction: row; }
    .md\:w-1\/2 { width: 50%; }
    .md\:items-center { align-items: center; }
    .md\:items-start { align-items: flex-start; }
    .md\:text-left { text-align: left; }
    .md\:text-4xl { font-size: 2.25rem; }
    .md\:block { display: block; }
    .md\:flex-row { flex-direction: row; }
    .md\:p-12 { padding: 3rem; }
    .md\:justify-end { justify-content: flex-end; }
}

/* Font sizes */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-md { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }

/* Spacing */
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }

/* List styles */
.list-disc { list-style-type: disc; }
.pl-6 { padding-left: 1.5rem; }

/* Misc */
.leading-relaxed { line-height: 1.625; }
.rounded-2xl { border-radius: var(--radius-2xl); }
.overflow-hidden { overflow: hidden; }
.transition-colors { transition: color 0.25s ease; }
.transition-opacity { transition: opacity 0.25s ease; }
.opacity-100 { opacity: 1; }
.opacity-40 { opacity: 0.4; }
.hover\:opacity-100:hover { opacity: 1; }
.hover\:text-accent:hover { color: var(--accent-light); }
.hover\:text-white:hover { color: var(--text-primary); }
.hover\:underline:hover { text-decoration: underline; }
.shadow-strong { box-shadow: var(--shadow-md); }
.border-silver-light { border-color: var(--border); }

/* ─── Ambient Background System ───────────────────────── */
@keyframes morphingBlob {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }
    25% {
        transform: translate(3%, 5%) scale(1.08) rotate(5deg);
        border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%;
    }
    50% {
        transform: translate(-3%, 8%) scale(0.95) rotate(-3deg);
        border-radius: 100% 60% 60% 100% / 100% 100% 60% 60%;
    }
    75% {
        transform: translate(5%, -3%) scale(1.03) rotate(3deg);
        border-radius: 50% 80% 40% 60% / 60% 40% 80% 50%;
    }
    100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.7; }
}

.ambient-blob-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
    background-color: var(--bg-deep);
}

.blob-1, .blob-2 {
    position: absolute;
    filter: blur(120px);
    animation: morphingBlob 20s ease-in-out infinite;
    will-change: transform, border-radius;
}

.blob-1 {
    width: 700px;
    height: 700px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #3b82f6);
    opacity: 0.2;
    top: -200px;
    left: -150px;
    animation-delay: 0s;
}

.blob-2 {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, #a855f7, #6366f1, #22d3ee);
    opacity: 0.15;
    bottom: -200px;
    right: -150px;
    animation-delay: -7s;
    animation-direction: reverse;
}

/* ─── Header ──────────────────────────────────────────── */
.header {
    background-color: rgba(4, 4, 14, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 2rem;
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.logo-img {
    height: 35px;
    width: auto;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: brightness(1.1);
}

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

@media (min-width: 768px) {
    .nav-links {
        gap: 2rem;
    }
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.25s ease;
}

.nav-link:hover {
    color: var(--accent-light);
}

/* ─── Buttons ─────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

.card-btn {
    margin-top: auto;
    align-self: flex-start;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.5);
    filter: brightness(1.15);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--border-hover);
    color: var(--accent-light);
}

.btn-secondary:hover {
    background-color: rgba(139, 92, 246, 0.08);
    border-color: var(--accent);
}

/* ─── Hero Section ────────────────────────────────────── */
.hero-img-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.hero-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Image Glow Frame */
.img-glow-frame {
    position: relative;
    border-radius: var(--radius-xl);
    padding: 3px;
    background: var(--gradient-glow);
    background-size: 300% 300%;
    animation: glowGradientShift 6s ease infinite;
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.25), 0 0 80px rgba(139, 92, 246, 0.1);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.img-glow-frame:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 50px rgba(99, 102, 241, 0.4), 0 0 100px rgba(139, 92, 246, 0.15);
}

.img-glow-frame img {
    border-radius: calc(var(--radius-xl) - 3px);
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@keyframes glowGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ─── Bento Grid ──────────────────────────────────────── */
.bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .bento-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ─── Card Styling (Glassmorphic Dark) ────────────────── */
.bento-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-xl);
    padding: 32px;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Gradient shine on top of card */
.bento-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-border);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.bento-card:hover {
    transform: translateY(-8px);
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

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

.bento-card h3 {
    color: var(--text-primary);
}

.bento-card h4 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

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

/* ─── Section Dividers ────────────────────────────────── */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-glow), transparent);
    border: none;
    margin: 0;
}

/* ─── Testimonial Cards ───────────────────────────────── */
.testimonial-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-border);
    opacity: 0.5;
}

.testimonial-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    transform: translateY(-4px);
}

/* ─── Contact Form ────────────────────────────────────── */
.contact-form-glass {
    background: rgba(10, 10, 26, 0.8);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid var(--border-glow);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(99, 102, 241, 0.08);
    border-radius: var(--radius-2xl);
    padding: 3rem 8%;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-input {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border) !important;
    backdrop-filter: blur(12px);
    color: var(--text-primary) !important;
    padding: 1rem 1.25rem !important;
    font-size: 1rem;
    font-family: var(--font-primary);
    border-radius: var(--radius-md) !important;
    width: 100%;
    transition: all 0.35s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.07);
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15), 0 0 20px rgba(139, 92, 246, 0.08);
}

.form-input::placeholder {
    color: var(--text-muted) !important;
}

/* ─── Footer ──────────────────────────────────────────── */
.footer {
    background-color: rgba(4, 4, 14, 0.95);
    color: var(--text-secondary);
    padding: 4rem 2rem;
    margin-top: 0;
    border-top: 1px solid var(--border);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-glow);
    opacity: 0.6;
}

/* ─── Prose Styling (Privacy/Terms) ────────────────────── */
.prose {
    color: var(--text-secondary);
}

.prose h2 {
    color: var(--text-primary) !important;
}

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

.prose a {
    color: var(--accent-light) !important;
}

.prose a:hover {
    color: var(--accent) !important;
}

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

.prose .font-semibold,
.prose .font-bold {
    color: var(--text-primary);
}

/* Content pages (privacy, terms) glass container */
.content-glass {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
}

/* ─── Scroll Reveal Animation ─────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.reveal-delay-1 { animation-delay: 0.1s; }
.reveal-delay-2 { animation-delay: 0.2s; }
.reveal-delay-3 { animation-delay: 0.3s; }

/* ─── Gradient Text Utility ───────────────────────────── */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── Kicker / Label styling ──────────────────────────── */
.kicker {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-bottom: 0.5rem;
}

/* ─── Responsive & Performance ────────────────────────── */
@media (max-width: 768px) {
    .ambient-blob-container {
        display: none !important;
    }

    body {
        background: var(--bg-deep);
    }

    .bento-card,
    .testimonial-card,
    .contact-form-glass {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .bento-card,
    .testimonial-card {
        background-color: rgba(15, 15, 30, 0.95) !important;
        border-color: var(--border) !important;
    }

    .contact-form-glass {
        background-color: rgba(10, 10, 26, 0.95) !important;
        padding: 2rem 6%;
    }

    .hidden { display: none; }

    .img-glow-frame {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
    }

    /* Reduce motion for performance */
    .bento-card:hover,
    .testimonial-card:hover {
        transform: none;
    }
}

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

    .ambient-blob-container {
        display: none !important;
    }
}

/* ─── Selection ───────────────────────────────────────── */
::selection {
    background: rgba(139, 92, 246, 0.3);
    color: var(--text-primary);
}

/* ─── Scrollbar (Webkit) ──────────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.5);
}
