/* Global Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Colors */
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --secondary: #0EA5E9;
    --tertiary: #EC4899;
    --dark: #0F172A;
    --dark-surface: #1E293B;
    --light: #F8FAFC;
    --white: #FFFFFF;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --border: #CBD5E1;
    /* Darkened from #E2E8F0 for better visibility in light mode */

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.3);

    /* Transitions */
    --transition: all 0.3s ease;

    /* Fixed Colors */
    --white-fixed: #ffffff;
}

[data-theme="dark"] {
    --light: #020617;
    /* Deep Slate 950 */
    --white: #0f172a;
    /* Slate 900 - Card/Surface */
    --text-main: #f8fafc;
    /* Slate 50 - Near white */
    --text-muted: #cbd5e1;
    /* Slate 300 - Clearly visible */
    --border: #334155;
    /* Slate 700 - Visible but subtle */
    --primary: #818cf8;
    /* Indigo 400 - Lighter for dark mode */
    --primary-hover: #a5b4fc;
    /* Indigo 300 */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
    --dark: #f1f5f9;
    /* Flip --dark to light in dark mode for contrast */
}

/* Global Form Elements for Contrast */
input,
textarea,
select {
    background-color: var(--white);
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    outline: none;
    transition: var(--transition);
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.3);
}

::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}



/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    max-width: 100vw;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.5rem;
    letter-spacing: -0.01em;
    text-align: center;
}

h3 {
    font-size: 1.75rem;
    text-align: center;
}

p {
    margin: 0 auto var(--spacing-sm);
    color: var(--text-muted);
}

/* Components */
.container {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

@media (max-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.5rem;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 1.1rem;
    /* Reduced proportionally */
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    /* Reduced to 14px */
    cursor: pointer;
    transition: var(--transition);
    border: none;
    gap: 0.4rem;
    height: auto;
    min-width: min-content;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-main);
}

[data-theme="dark"] .btn-secondary {
    border-color: var(--text-muted);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(129, 140, 248, 0.1);
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 0;
}

[data-theme="dark"] header {
    background: rgba(15, 23, 42, 0.95);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--primary);
}

[data-theme="dark"] .logo span {
    color: #ffffff;
}

/* Navigation - Updated for No-Duplicates */
.nav-menu {
    display: flex;
    align-items: center;
    flex-grow: 1;
    justify-content: space-between;
    margin: 0 2rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin: 0 auto;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--text-muted);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: var(--radius-full);
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--border);
}

/* Mobile Menu */
/* Mobile Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
    width: 44px;
    height: 44px;
    padding: 0;
    z-index: 1001;
    position: relative;
    /* Ensure z-index works */
}

.hamburger span {
    display: block;
    width: 25px;
    /* Reduced slightly to fit comfortably */
    height: 3px;
    background-color: var(--text-main);
    /* Force color */
    transition: var(--transition);
    border-radius: var(--radius-full);
}

/* Hero Section */
.hero {
    padding: calc(var(--spacing-xl) + 2rem) 0 var(--spacing-lg);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
    min-height: 90vh;
    background: radial-gradient(circle at top right, rgba(79, 70, 229, 0.1), transparent 40%);
}

.hero-content {
    text-align: center;
    margin: 0 auto;
}

.hero-content p {
    font-size: 1.25rem;
    margin: 0 auto var(--spacing-md);
    max-width: 600px;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.hero-image {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    max-width: 550px;
    width: 100%;
    margin: 0 auto;
}

.hero-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transform: scale(1.01);
}

/* Features */
.section {
    padding: var(--spacing-lg) 0;
    width: 100%;
    /* Ensure side padding from .container isn't wiped out if used together */
}

/* Specific override for sections that are ALSO containers */
section.container {
    padding-left: var(--spacing-sm);
    padding-right: var(--spacing-sm);
}

@media (max-width: 1024px) {
    section.container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

@media (max-width: 480px) {
    section.container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: var(--transition);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1.5rem;
}

/* Footer */
/* Footer */
/* Footer */
footer {
    background: var(--white);
    color: var(--text-main);
    padding: 2rem 0 0;
    position: relative;
    margin-top: auto;
    border-top: 1px solid var(--border);
    transition: var(--transition);
}

[data-theme="dark"] footer {
    background: #0f172a;
    border-top: none;
}

[data-theme="dark"] footer .logo span {
    color: #ffffff;
}

[data-theme="dark"] footer .footer-brand p,
[data-theme="dark"] footer .footer-links a,
[data-theme="dark"] footer .footer-bottom p {
    color: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] footer .footer-links a:hover {
    color: #ffffff;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 4rem;
    padding-bottom: 1rem;
}

.footer-brand {
    flex: 1;
    max-width: 350px;
}

/* Logo Span inherits color or specific override */
.footer-brand .logo span {
    color: var(--primary);
}

.footer-nav-group {
    display: flex;
    flex: 2;
    justify-content: center;
    gap: 5rem;
}

.footer-col h4 {
    color: var(--text-main);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

[data-theme="dark"] .footer-col h4 {
    color: #ffffff;
}

.footer-links li {
    margin-bottom: 0.85rem;
    font-size: 0.9375rem;
}

.footer-links a {
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 1rem 0;
    text-align: center;
    position: relative;
    /* For absolute positioning of back-to-top */
}

[data-theme="dark"] .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--text-muted);
}

/* Back to Top Button - Subtle and Footer-bound */
.back-to-top {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2.25rem;
    height: 2.25rem;
    background: var(--light);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

[data-theme="dark"] .back-to-top {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.back-to-top:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    transform: translateY(-50%) scale(1.05);
}

.back-to-top i {
    font-size: 0.875rem;
}

@media (max-width: 1024px) {
    .footer-grid {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 3rem;
    }

    .footer-nav-group {
        flex-direction: column;
        gap: 2.5rem;
        width: 100%;
    }

    .footer-brand {
        max-width: 100%;
    }

    .footer-brand .logo {
        justify-content: center;
    }
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: center;
}

@media (min-width: 1025px) {
    .social-links {
        justify-content: flex-start;
    }
}

.social-links a {
    color: var(--text-muted);
    font-size: 1.25rem;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.social-links a:hover {
    color: var(--primary);
    background: rgba(79, 70, 229, 0.1);
    transform: translateY(-3px);
}

[data-theme="dark"] .social-links a {
    color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .social-links a:hover {
    color: #ffffff;
    background: var(--primary);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
}


/* Responsive */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: var(--spacing-xl);
    }

    .hero-content p {
        margin: 0 auto var(--spacing-md);
    }

    .hero-btns {
        justify-content: center;
    }

    .logo,
    .nav-actions {
        z-index: 1001;
        position: relative;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100dvh;
        background: var(--white);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 4.5rem 1.5rem 1.5rem;
        /* Balanced top padding */
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, visibility 0.3s;
        z-index: 999;
        margin: 0;
        overflow: hidden;
        /* Strictly no scrolling as requested */
        opacity: 0;
        visibility: hidden;
    }

    /* Remove spacer approach to enforce compact fit */
    .nav-menu::before,
    .nav-menu::after {
        content: none;
    }

    .nav-links,
    .nav-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
        gap: 0.65rem;
        /* Tighter gaps to fit without scrolling */
        text-align: center;
        flex-shrink: 0;
    }

    .nav-links {
        margin: 1rem 0 1.5rem;
    }

    .nav-link {
        font-size: 1.15rem;
        /* Balanced size to prevent overflow */
        display: block;
        padding: 0.4rem 0;
        line-height: 1.2;
    }

    .nav-buttons .btn {
        width: 100%;
        max-width: 240px;
        /* Balanced width to remove excessive side space */
        justify-content: center;
        padding: 0.45rem 1rem;
        font-size: 0.85rem;
        margin: 0 auto;
        /* Center within nav-buttons */
        min-height: auto;
    }

    [data-theme="dark"] .nav-menu {
        background: var(--white);
    }

    .nav-menu.active {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }

    body.menu-open {
        overflow: hidden;
    }

    .hamburger {
        display: flex;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Content Sections */
.content-section {
    padding: var(--spacing-xl) 0;
    overflow: hidden;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.content-grid.reverse {
    direction: rtl;
}

.content-grid.reverse>* {
    direction: ltr;
}

.content-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.content-text h2 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    color: var(--text-main);
}

.content-text p {
    font-size: 1.16rem;
    margin: 0 auto var(--spacing-md);
    line-height: 1.8;
}

/* Ensure buttons within content-text are centered if they are wrapped in a div */
.content-text .btn,
.content-text div:has(> .btn) {
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

/* If buttons are just direct children or in a flex container */
.content-text .hero-btns,
.content-text .grid {
    justify-content: center;
}

.content-image {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    max-width: 550px;
    width: 100%;
    margin: 0 auto;
}

.content-image:hover {
    transform: scale(1.02);
}

.content-image img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .content-section {
        padding: var(--spacing-lg) 0;
    }

    .content-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-md);
    }

    .content-grid.reverse {
        direction: ltr;
    }

    .content-text {
        max-width: 100% !important;
        order: 1;
        margin: 0 auto;
    }

    .content-image {
        order: 2;
        width: 100%;
    }

    .content-image img {
        height: auto;
        max-height: 300px;
    }

    .content-text h2 {
        font-size: 2rem;
    }
}

/* Animations */
.reveal {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.reveal.active {
    opacity: 1;
    pointer-events: auto;
}

/* Slide-in from Left / Right / Up */
.reveal-left {
    transform: translateX(-50px);
}

.reveal-right {
    transform: translateX(50px);
}

.reveal-up {
    transform: translateY(30px);
}

.reveal-left.active,
.reveal-right.active,
.reveal-up.active {
    transform: translate(0, 0);
}

/* Pop-up (Scale + Fade) */
.reveal-pop {
    transform: scale(0.9);
}

.reveal-pop.active {
    transform: scale(1);
}

/* Staggered Delays */
.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.2s;
}

.reveal-delay-3 {
    transition-delay: 0.3s;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}