/* Marsa School — Refined Design System */

:root {
    --marsa-teal: #0A3D4D;
    --marsa-teal-mid: #0E5266;
    --marsa-teal-light: #1A6B7C;
    --marsa-teal-glow: rgba(10, 61, 77, 0.18);
    --marsa-navy: #2A3A47;
    --marsa-navy-muted: #5A6B78;
    --marsa-cream: #F7F2EC;
    --marsa-cream-deep: #EDE6DC;
    --marsa-sand: #E5DDD3;
    --marsa-white: #FDFBF8;
    --marsa-border: rgba(10, 61, 77, 0.07);
    --marsa-border-strong: rgba(10, 61, 77, 0.12);
    --text-body: rgba(42, 58, 71, 0.82);
    --text-muted: rgba(42, 58, 71, 0.58);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--marsa-cream);
    color: var(--marsa-navy);
    font-family: 'Readex Pro', system-ui, sans-serif;
    font-weight: 400;
    line-height: 1.7;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Ambient background — softer */
.mesh-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(170deg, var(--marsa-cream) 0%, var(--marsa-white) 45%, var(--marsa-cream-deep) 100%);
}

.mesh-bg::before {
    content: '';
    position: absolute;
    inset: -30%;
    background:
        radial-gradient(ellipse 50% 40% at 85% 15%, rgba(10, 61, 77, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse 40% 35% at 10% 80%, rgba(26, 107, 124, 0.03) 0%, transparent 55%);
    animation: gradientShift 28s ease infinite;
}

.mesh-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    animation: float 16s ease-in-out infinite;
    pointer-events: none;
    opacity: 0.35;
}

.mesh-orb-1 { width: 400px; height: 400px; background: rgba(10, 61, 77, 0.07); top: -8%; right: 5%; }
.mesh-orb-2 { width: 300px; height: 300px; background: rgba(232, 220, 207, 0.6); bottom: 15%; left: -8%; animation-delay: -5s; }
.mesh-orb-3 { width: 240px; height: 240px; background: rgba(14, 82, 102, 0.06); top: 45%; left: 35%; animation-delay: -9s; }

@keyframes gradientShift {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(6deg) scale(1.03); }
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(16px, -24px) scale(1.02); }
    66% { transform: translate(-12px, 12px) scale(0.98); }
}

@keyframes pulseSoft {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

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

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

/* Typography */
.font-display {
    font-family: 'Readex Pro', system-ui, sans-serif;
    letter-spacing: -0.02em;
}

h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.35;
    color: var(--marsa-navy);
}

p, li {
    color: var(--text-body);
}

.text-gradient {
    background: linear-gradient(135deg, var(--marsa-teal) 0%, var(--marsa-teal-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass & cards — lighter */
.glass {
    background: rgba(253, 251, 248, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--marsa-border);
    box-shadow: 0 2px 12px rgba(26, 42, 58, 0.04);
}

.glass-strong {
    background: rgba(253, 251, 248, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--marsa-border-strong);
    box-shadow: 0 6px 24px rgba(10, 61, 77, 0.05);
}

/* 3D cards */
.model-card-3d { perspective: 1000px; }

.model-card-inner {
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.4s ease;
}

.model-card-3d:hover .model-card-inner {
    transform: translateY(-6px) scale(1.005);
    box-shadow: 0 16px 40px rgba(10, 61, 77, 0.1);
}

.model-card-glow {
    position: absolute;
    inset: -1px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(10,61,77,0.1), rgba(26,107,124,0.05), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.model-card-3d:hover .model-card-glow { opacity: 1; }

/* Buttons — softer */
.btn-glow {
    background: linear-gradient(135deg, var(--marsa-teal) 0%, var(--marsa-teal-mid) 100%);
    color: #fff;
    font-weight: 500;
    letter-spacing: 0.02em;
    box-shadow: 0 3px 16px var(--marsa-teal-glow);
    transition: all 0.25s ease;
}

.btn-glow:hover {
    box-shadow: 0 6px 22px rgba(10, 61, 77, 0.22);
    transform: translateY(-1px);
    background: linear-gradient(135deg, var(--marsa-teal-mid) 0%, var(--marsa-teal-light) 100%);
}

.btn-ghost {
    background: rgba(253, 251, 248, 0.8);
    border: 1px solid var(--marsa-border-strong);
    color: var(--marsa-navy);
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-ghost:hover {
    background: var(--marsa-white);
    border-color: rgba(10, 61, 77, 0.2);
    color: var(--marsa-teal);
    box-shadow: 0 3px 12px rgba(10, 61, 77, 0.06);
}

/* Skeleton */
.skeleton {
    background: linear-gradient(90deg, var(--marsa-sand) 25%, var(--marsa-cream-deep) 50%, var(--marsa-sand) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 12px;
}

/* Navigation */
.nav-glass {
    background: rgba(253, 251, 248, 0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--marsa-border);
    box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
}

.nav-glass a {
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* Forms */
.input-premium {
    background: var(--marsa-white);
    border: 1px solid var(--marsa-border-strong);
    border-radius: 14px;
    color: var(--marsa-navy);
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-premium:focus {
    outline: none;
    border-color: rgba(10, 61, 77, 0.35);
    box-shadow: 0 0 0 3px rgba(10, 61, 77, 0.08);
}

.input-premium::placeholder { color: var(--marsa-navy-muted); opacity: 0.6; }

/* Alerts */
.alert-success-premium {
    background: rgba(16, 120, 100, 0.08);
    border: 1px solid rgba(16, 120, 100, 0.18);
    color: #0A5C4A;
}

.alert-error-premium {
    background: rgba(180, 60, 50, 0.06);
    border: 1px solid rgba(180, 60, 50, 0.15);
    color: #8B2E2E;
}

/* Animations */
.animate-fade-up {
    animation: fadeUp 0.6s ease forwards;
    opacity: 0;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }

/* Decorative shapes */
.shape {
    position: absolute;
    border: 1px solid rgba(10, 61, 77, 0.08);
    border-radius: 24px;
    pointer-events: none;
    background: rgba(253, 251, 248, 0.25);
}

/* Logo — transparent, blends with page */
.marsa-logo-img {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.marsa-logo-img--light {
    mix-blend-mode: normal;
    filter: brightness(0) invert(1) opacity(0.92);
}

.marsa-logo:focus-visible {
    outline: 2px solid var(--marsa-teal);
    outline-offset: 4px;
    border-radius: 8px;
}

/* Navbar wordmark — icon + separated text lines */
.marsa-logo--wordmark {
    gap: 0.625rem;
    text-decoration: none;
}

.marsa-logo-icon {
    height: 2.75rem;
    width: 3.5rem;
    object-fit: cover;
    object-position: left center;
    flex-shrink: 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.marsa-logo-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    line-height: 1;
}

.marsa-logo-name {
    font-size: 1.3125rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--marsa-teal);
    line-height: 1.15;
}

.marsa-logo-tag {
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--marsa-teal);
    line-height: 1.25;
    padding-inline-start: 2px;
}

.marsa-logo--wordmark-light .marsa-logo-name,
.marsa-logo--wordmark-light .marsa-logo-tag {
    color: rgba(255, 255, 255, 0.95);
}

.marsa-logo--wordmark-light .marsa-logo-icon {
    filter: brightness(0) invert(1) opacity(0.92);
}

@media (min-width: 640px) {
    .marsa-logo--wordmark {
        gap: 0.75rem;
    }

    .marsa-logo-icon {
        height: 3.25rem;
        width: 4rem;
    }

    .marsa-logo-text {
        gap: 0.3rem;
    }

    .marsa-logo-name {
        font-size: 1.5rem;
    }

    .marsa-logo-tag {
        font-size: 0.875rem;
    }
}

/* WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 1.5rem;
    inset-inline-end: 1.5rem;
    z-index: 50;
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem 0.75rem 0.875rem;
    background: #25D366;
    color: #fff;
    border-radius: 9999px;
    box-shadow: 0 8px 28px rgba(37, 211, 102, 0.35);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(37, 211, 102, 0.42);
    color: #fff;
}

.whatsapp-float-icon {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
}

.whatsapp-float-label {
    display: none;
}

@media (min-width: 640px) {
    .whatsapp-float-label {
        display: inline;
    }
}

.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.875rem 1.5rem;
    background: #25D366;
    color: #fff;
    border-radius: 1rem;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.28);
}

.whatsapp-btn:hover {
    background: #20bd5a;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
}

.whatsapp-btn-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.whatsapp-btn-lg {
    padding: 1rem 1.75rem;
    font-size: 1rem;
    border-radius: 1.25rem;
}

.whatsapp-card {
    border: 1px solid rgba(37, 211, 102, 0.2);
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.08), rgba(37, 211, 102, 0.02));
}

/* Hero */
.hero-panel {
    padding: 0.5rem;
}

.hero-logo-wrap {
    padding: 0;
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(10, 61, 77, 0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(10, 61, 77, 0.28); }

/* Mobile menu */
#mobileMenu {
    background: rgba(253, 251, 248, 0.96);
    backdrop-filter: blur(16px);
    border-inline-start: 1px solid var(--marsa-border);
    box-shadow: -6px 0 24px rgba(10, 61, 77, 0.06);
}
#mobileMenu.open { transform: translateX(0); }
[dir="rtl"] #mobileMenu { transform: translateX(100%); }
[dir="rtl"] #mobileMenu.open { transform: translateX(0); }
[dir="ltr"] #mobileMenu { transform: translateX(-100%); }

/* Pricing */
.pricing-row:hover { background: rgba(10, 61, 77, 0.03); }

/* Skill cards */
.skill-card-accent {
    border-color: rgba(10, 61, 77, 0.1) !important;
}

.skill-btn {
    background: linear-gradient(135deg, var(--marsa-teal), var(--marsa-teal-mid));
    font-weight: 500;
}

.skill-btn:hover {
    background: linear-gradient(135deg, var(--marsa-teal-mid), var(--marsa-teal-light));
}

/* Section headings */
section h2 {
    font-weight: 600;
    letter-spacing: -0.015em;
}

section p {
    line-height: 1.75;
}

/* Dashboard & inner pages */
main h1.text-white,
main h2.text-white,
main h3.text-white {
    color: var(--marsa-navy) !important;
}

main .text-slate-300 { color: rgba(42, 58, 71, 0.78) !important; }
main .text-slate-400 { color: var(--text-muted) !important; }
main .text-slate-500 { color: rgba(42, 58, 71, 0.48) !important; }
main .text-violet-400,
main .text-violet-300 { color: var(--marsa-teal) !important; }
main .border-violet-500\/20 { border-color: rgba(10, 61, 77, 0.12) !important; }
main .from-violet-600\/10 { --tw-gradient-from: rgba(10, 61, 77, 0.06) !important; }
main .file\:bg-violet-600::file-selector-button { background: var(--marsa-teal) !important; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}