/* ===================================
   css/global.css  —  Reset, tokens, base, utilities, buttons, animations
   SOURCE OF TRUTH for shared global styles.
   styles.css remains authoritative during migration (loaded after this).
   =================================== */

/* ── Reset ── */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* ── Design Tokens ── */
:root {
    --primary-blue:   #0066FF;
    --accent-blue:    #4F46E5;
    --accent-green:   #10B981;
    --primary-purple: #4F46E5; /* mapped to premium indigo */
    --primary-pink:   #0066FF; /* mapped to corporate blue */
    --primary-orange: #10B981; /* mapped to emerald green */
    --primary-teal:   #10B981; /* mapped to emerald green */
    --primary-green:  #10B981; /* mapped to emerald green */

    --gradient-primary: linear-gradient(135deg, #0066FF 0%, #4F46E5 100%);
    --gradient-blue:    linear-gradient(135deg, #0066FF 0%, #3B82F6 100%);
    --gradient-purple:  linear-gradient(135deg, #0066FF 0%, #4F46E5 100%);
    --gradient-green:   linear-gradient(135deg, #10B981 0%, #059669 100%);
    --gradient-orange:  linear-gradient(135deg, #0066FF 0%, #10B981 100%);
    --gradient-rainbow: linear-gradient(135deg, #0066FF 0%, #4F46E5 50%, #10B981 100%);

    --dark-bg:    #0f172a;
    --dark-card:  #1e293b;
    --dark-border:#334155;
    --light-text: #ffffff;
    --gray-text:  #e2e8f0;

    --spacing-xs:  0.55rem;
    --spacing-sm:  1.1rem;
    --spacing-md:  1.6rem;
    --spacing-lg:  2.25rem;
    --spacing-xl:  3.25rem;
    --spacing-2xl: 4.5rem;

    --container-max-width: 1200px;
    --hero-padding-desktop: calc(80px + 3.6rem) 0 3.6rem;
    --hero-padding-mobile: calc(72px + 2.25rem) 0 2.25rem;
    --section-padding-desktop: 6.5rem 0;
    --section-padding-mobile: 4.5rem 0;

    --font-primary:  'Inter', sans-serif;
    --font-display:  'Outfit', sans-serif;

    /* Tactile depth shadows — layered, not flat */
    --shadow-sm:   0 2px 4px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md:   0 6px 12px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-lg:   0 12px 24px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
    --shadow-xl:   0 24px 40px rgba(0,0,0,0.10), 0 8px 16px rgba(0,0,0,0.05);
    --shadow-glow: 0 0 0 1px rgba(0,102,255,0.08), 0 8px 24px rgba(0,102,255,0.1);

    --transition-fast: 0.18s ease;
    --transition-base: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Base Elements ── */
html { overflow-x: hidden; scroll-behavior: smooth; max-width: 100%; }

body {
    font-family: var(--font-primary);
    background: var(--dark-bg);
    color: var(--light-text);
    line-height: 1.75;
    overflow-x: hidden;
    min-width: 320px;
}

/* Slightly larger body text on desktop */
@media (min-width: 1024px) {
    body {
        font-size: 1.025rem;
    }
}

.container {
    max-width: var(--container-max-width);
    width: min(100% - 32px, var(--container-max-width));
    margin-inline: auto;
    box-sizing: border-box;
}

/* Prevent ANY child from breaking out of its parent */
* { max-width: 100%; }
img, video, svg, canvas { max-width: 100%; height: auto; }

section {
    padding-block: clamp(64px, 8vw, 112px);
}

/* ── Accessibility utility ── */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Gradient Text Utility ── */
.gradient-text {
    background: var(--gradient-rainbow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
    background-size: 200% 200%;
}

/* ── Section Header Utilities ── */
.section-header    { text-align: center; margin-bottom: var(--spacing-2xl); }

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.8vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: #ffffff;
}

.section-description {
    font-size: 1.05rem;
    color: #94a3b8;
    max-width: 660px;
    margin: 0 auto;
    line-height: 1.75;
}

/* ── Page Header (inner pages dark banner) ── */
.page-header {
    padding: calc(80px + 2rem) 0 1rem;
    background: linear-gradient(135deg, var(--dark-bg) 0%, #1a1f35 100%);
    text-align: center;
}

.header-content { max-width: 900px; margin: 0 auto; }

.main-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.tagline { font-size: 1.1rem; color: var(--gray-text); font-weight: 500; }

.offer-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-left: 0.5rem;
    animation: pulse 2s ease-in-out infinite;
}

/* ── Hero Section ── */
.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 0.5rem 1.5rem;
    background: rgba(0, 102, 255, 0.1);
    border: 1px solid rgba(0, 102, 255, 0.25);
    border-radius: 50px;
    color: #93c5fd;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: var(--spacing-md);
    animation: fadeInDown 0.8s ease, pulse 2s ease-in-out infinite;
}

.badge-icon { font-size: 1.2rem; }

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--gray-text);
    max-width: 700px;
    margin: 0 auto var(--spacing-xl);
    line-height: 1.8;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--spacing-2xl);
    animation: fadeInUp 0.8s ease 0.6s both;
}

/* ── Stats ── */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-lg);
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease 0.8s both;
}

.stat {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    transition: var(--transition-base);
}

.stat:hover { transform: translateY(-5px); background: rgba(255, 255, 255, 0.1); }

.stat-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-rainbow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}

.stat-label { color: var(--gray-text); font-size: 0.9rem; }

/* ── Portfolio Main Content Area ── */
.portfolio-main {
    padding: var(--section-padding-desktop);
    background:
        radial-gradient(circle at 100% 100%, rgba(0, 102, 255, 0.02), transparent 50%),
        var(--dark-bg);
    background-image:
        radial-gradient(circle at 100% 100%, rgba(0, 102, 255, 0.02), transparent 50%),
        radial-gradient(rgba(255,255,255,0.018) 1px, transparent 1px);
    background-size: 100% 100%, 32px 32px;
}

/* Soft top gradient bleed from hero into grid */
.portfolio-main::before {
    content: '';
    display: block;
    height: 1px;
    margin-bottom: 3rem;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06) 40%, rgba(255,255,255,0.06) 60%, transparent);
}

/* ── Portfolio Grid ── */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

/* ── Portfolio Card ── */
.portfolio-card {
    background: rgba(30, 41, 59, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 28px;
    transition:
        transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.3s ease,
        box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 290px;
}

.portfolio-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.01));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.portfolio-card:hover {
    transform: translateY(-4px);
    border-color: rgba(96, 165, 250, 0.35);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.portfolio-card .description {
    font-size: 0.95rem;
    color: var(--gray-text);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
    font-weight: 500;
}

/* ── Tech Used line ── */
.tech-used {
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 500;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.85rem;
    width: 100%;
}

.tech-used strong {
    color: #94a3b8;
    font-weight: 700;
}

/* ── Filter Pills ── */
.filter-btn {
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 50px;
    color: var(--gray-text);
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.01em;
}

/* ── Buttons — tactile depth ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 0.95rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: linear-gradient(135deg, #1a6fff 0%, #0047d9 100%);
    color: white;
    /* Layered tactile shadow */
    box-shadow:
        0 1px 0 rgba(255,255,255,0.12) inset,
        0 -1px 0 rgba(0,0,0,0.15) inset,
        0 6px 16px rgba(0, 90, 255, 0.28),
        0 2px 4px rgba(0, 0, 0, 0.12);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.15) inset,
        0 -1px 0 rgba(0,0,0,0.15) inset,
        0 12px 28px rgba(0, 90, 255, 0.36),
        0 4px 8px rgba(0, 0, 0, 0.14);
}

.btn-primary:active {
    transform: translateY(1px) scale(0.985);
    box-shadow:
        0 1px 0 rgba(0,0,0,0.15) inset,
        0 2px 6px rgba(0, 90, 255, 0.2);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.07);
    color: white;
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.42);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.16);
}

.btn-secondary:active {
    transform: translateY(1px) scale(0.985);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.btn-pulse { animation: pulse-btn 2s ease-in-out infinite; }

.btn-whatsapp-hero {
    background: #25D366;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 0.85rem 1.85rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-whatsapp-hero:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.25);
}

.btn-whatsapp-hero:active {
    transform: translateY(0) scale(0.98);
}

/* ── Start Project Button (portfolio only) — SaaS Blue ── */
.start-project-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.95rem 2.25rem;
    background: linear-gradient(135deg, #006BFF, #0052D9);
    color: #ffffff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 20px rgba(0, 107, 255, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.12);
    letter-spacing: 0.01em;
}

.start-project-btn:hover {
    background: linear-gradient(135deg, #1a7bff, #0063f0);
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(0, 107, 255, 0.42);
}

/* ── Discount Badge ── */
.discount-badge {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    border-radius: 60px;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 40px rgba(245, 158, 11, 0.4);
    animation: bounceIn 1s ease, glow 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.discount-badge::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 3s infinite;
}

.discount-icon  { font-size: 2rem; animation: rotate 2s linear infinite; }
.discount-text  { display: flex; flex-direction: column; gap: 0.25rem; }

.discount-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.9);
}

.discount-amount {
    font-size: 1.25rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* ── Trust Indicators ── */
.trust-indicators {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem auto;
    max-width: 700px;
    animation: fadeInUp 0.8s ease 0.5s both;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 30px;
    transition: all 0.3s ease;
}

.trust-item:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

.trust-icon { font-size: 1.25rem; font-weight: 900; color: #10b981; }

.trust-item span:last-child {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--light-text);
}

/* ── Floating Contact Buttons ── */
.floating-contacts {
    position: fixed;
    bottom: 2rem; right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    align-items: flex-end;
}

.float-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: var(--transition-base);
    white-space: nowrap;
    border: none;
    cursor: pointer;
}

.float-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.float-btn.whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #1cbd56 100%);
}

.float-btn.email {
    background: linear-gradient(135deg, #006BFF 0%, #0052D9 100%);
}

.float-btn svg { flex-shrink: 0; width: 18px; height: 18px; }

/* ===================================
   GLOBAL KEYFRAME ANIMATIONS
   =================================== */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 102, 255, 0.4); }
    50%       { transform: scale(1.05); box-shadow: 0 0 20px 5px rgba(0, 102, 255, 0.2); }
}

@keyframes pulse-btn {
    0%, 100% { box-shadow: 0 4px 15px rgba(102,126,234,0.4), 0 0 0 0 rgba(102,126,234,0.4); }
    50%       { box-shadow: 0 8px 30px rgba(102,126,234,0.6), 0 0 0 10px rgba(102,126,234,0); }
}

@keyframes bounceIn {
    0%   { opacity: 0; transform: scale(0.3); }
    50%  { opacity: 1; transform: scale(1.05); }
    70%  { transform: scale(0.9); }
    100% { transform: scale(1); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 10px 40px rgba(245,158,11,0.4), 0 0 20px rgba(245,158,11,0.3); }
    50%       { box-shadow: 0 10px 40px rgba(245,158,11,0.6), 0 0 30px rgba(245,158,11,0.5); }
}

@keyframes shine {
    0%   { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes cardGlow {
    0%, 100% { box-shadow: 0 10px 30px rgba(139,92,246,0.2), 0 0 20px rgba(139,92,246,0.1); }
    50%       { box-shadow: 0 15px 40px rgba(139,92,246,0.3), 0 0 30px rgba(139,92,246,0.2); }
}

@keyframes cardGlowHover {
    0%, 100% { transform: translateY(-15px) scale(1.02); }
    50%       { transform: translateY(-18px) scale(1.03); }
}

@keyframes floatPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.4), 0 0 0 0 rgba(37,211,102,0.3); }
    50%       { box-shadow: 0 4px 20px rgba(37,211,102,0.5), 0 0 0 8px rgba(37,211,102,0); }
}
