/* --- CSS VARIABLES & THEME --- */
:root {
    /* Color Palette - Light Mode */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    
    --accent-primary: #3b82f6; /* Blue */
    --accent-secondary: #8b5cf6; /* Purple */
    --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
    
    --border-color: #e2e8f0;
    --error-color: #ef4444;
    --success-color: #10b981;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Layout */
    --container-width: 1200px;
    --nav-height: 80px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Overrides */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    
    --border-color: #334155;
}

/* --- RESET & BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

.bg-alt {
    background-color: var(--bg-secondary);
}

/* --- TYPOGRAPHY & UTILITIES --- */
.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

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

.section-header.center {
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* --- COMPONENTS --- */
/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    border-radius: 9999px;
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all var(--transition-normal);
    gap: 0.5rem;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.39);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(59, 130, 246, 0.39);
}

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

.btn-outline:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

.btn-full {
    width: 100%;
}

.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    box-shadow: var(--glass-shadow);
}

/* --- NAVBAR --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
}

.navbar.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
}

.nav-menu {
    display: flex;
}

.nav-list {
    display: flex;
    gap: 2rem;
}

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

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

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

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.theme-toggle:hover {
    transform: scale(1.1);
    color: var(--accent-primary);
}

.mobile-toggle {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-primary);
}

/* --- HERO SECTION --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: calc(var(--nav-height) + 2rem);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.5;
    border-radius: 50%;
    animation: float 10s infinite ease-in-out;
}

.blob-1 {
    top: -10%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(59, 130, 246, 0.3);
}

.blob-2 {
    bottom: -10%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(139, 92, 246, 0.3);
    animation-delay: -5s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(30px, -50px); }
    66% { transform: translate(-20px, 20px); }
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-primary);
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

/* Hero Mockup Anim */
.mockup-card {
    padding: 1.5rem;
    transform: perspective(1000px) rotateY(-15deg) rotateX(10deg);
    transition: transform var(--transition-slow);
}

.mockup-card:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.mockup-header {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.mockup-body i {
    font-size: 3rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.mockup-body h3 {
    margin-bottom: 1.5rem;
}

.mockup-lines .line {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* --- SERVICES --- */
.pricing-cards {
    display: flex;
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
}

.pricing-card {
    padding: 3rem;
    position: relative;
    width: 100%;
    transition: transform var(--transition-normal);
}

.pricing-card.highlight {
    border: 2px solid var(--accent-primary);
    transform: translateY(-10px);
}

.pricing-card.highlight:hover {
    transform: translateY(-15px);
}

.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-gradient);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.card-header {
    text-align: center;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2rem;
}

.card-header h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.price {
    display: flex;
    justify-content: center;
    align-items:baseline;
    gap: 0.25rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.currency { font-size: 1.5rem; font-weight: 700; }
.amount { font-size: 4rem; font-weight: 800; font-family: var(--font-heading); line-height: 1; }
.period { color: var(--text-secondary); }

.card-desc {
    color: var(--text-secondary);
}

.features-list {
    margin-bottom: 2.5rem;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.features-list i {
    color: var(--accent-primary);
    font-size: 1.25rem;
}

.terms-note {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 1rem;
}

/* --- PORTFOLIO --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.portfolio-item {
    overflow: hidden;
    transition: transform var(--transition-normal);
}

.portfolio-item:hover {
    transform: translateY(-10px);
}

.portfolio-image {
    height: 200px;
    overflow: hidden;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
    opacity: 0.8;
}

.bg-gradient-1 { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.bg-gradient-2 { background: linear-gradient(135deg, #10b981, #3b82f6); }
.bg-gradient-3 { background: linear-gradient(135deg, #8b5cf6, #ec4899); }

.portfolio-content {
    padding: 1.5rem;
}

.category {
    font-size: 0.875rem;
    color: var(--accent-primary);
    font-weight: 600;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.5rem;
}

.portfolio-content h3 {
    margin-bottom: 0.5rem;
}

.portfolio-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* --- FEATURES --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    text-align: center;
    transition: transform var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
}

/* --- PROCESS TIMELINE --- */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: var(--border-color);
}

.timeline-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3rem;
    position: relative;
    width: 100%;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: var(--font-heading);
    z-index: 10;
    box-shadow: 0 0 0 4px var(--bg-secondary);
}

.timeline-content {
    width: 45%;
    padding: 1.5rem;
}

/* --- TESTIMONIALS --- */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.testimonial-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.quote-icon {
    color: var(--border-color);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.review {
    font-style: italic;
    margin-bottom: 2rem;
    flex-grow: 1;
}

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

.client-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
}

.client-info h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.client-info span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* --- CONTACT --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    padding: 4rem;
}

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.detail-item i {
    font-size: 2rem;
    color: var(--accent-primary);
}

.detail-item span {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.detail-item a, .detail-item p {
    color: var(--text-secondary);
}

.detail-item a:hover {
    color: var(--accent-primary);
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-body);
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.error-msg {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.form-group.error input,
.form-group.error textarea {
    border-color: var(--error-color);
}

.form-group.error .error-msg {
    display: block;
}

.form-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- FOOTER --- */
.footer {
    background: var(--bg-secondary);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-top: 1rem;
    max-width: 300px;
}

.footer h4 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.footer-links ul li {
    margin-bottom: 0.75rem;
}

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

.footer-links ul li a:hover {
    color: var(--accent-primary);
}

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

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

.social-icons a:hover {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
}

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

/* --- SCROLL TO TOP --- */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-normal);
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-5px);
}

/* --- ANIMATIONS --- */
[data-animate] {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate].animated {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

[data-animate="fade-up"] { transform: translateY(50px); }
[data-animate="fade-down"] { transform: translateY(-50px); }
[data-animate="fade-left"] { transform: translateX(50px); }
[data-animate="fade-right"] { transform: translateX(-50px); }
[data-animate="zoom-in"] { transform: scale(0.9); }

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 1024px) {
    .hero-title { font-size: 3rem; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
    .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-wrapper { grid-template-columns: 1fr; gap: 2rem; padding: 2rem; }
}

@media (max-width: 768px) {
    .nav-actions .btn { display: none; }
    .mobile-toggle { display: block; }
    
    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--nav-height));
        background: var(--bg-primary);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: left var(--transition-normal);
    }

    .nav-menu.active { left: 0; }
    .nav-list { flex-direction: column; text-align: center; gap: 2rem; }
    .nav-link { font-size: 1.25rem; }

    .hero-container { grid-template-columns: 1fr; text-align: center; }
    .hero-buttons { justify-content: center; }
    .hero-visual { display: none; } /* Hide mockup on mobile to save space */
    
    .timeline::before { left: 20px; }
    .timeline-dot { left: 20px; transform: translateX(-50%); }
    .timeline-item, .timeline-item:nth-child(even) { flex-direction: column; align-items: flex-end; }
    .timeline-content { width: calc(100% - 60px); }
    
    .portfolio-grid, .testimonials-grid { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2.5rem; }
    .hero-buttons { flex-direction: column; }
    .features-grid { grid-template-columns: 1fr; }
    .pricing-card { padding: 2rem; }
}
