:root {
    /* Color Palette - Mindful, Organic & Premium */
    --primary: #2D4F1E; /* Deep Forest Green */
    --primary-rgb: 45, 79, 30;
    --accent: #A3B18A;  /* Sage Green */
    --accent-light: #DAD7CD; /* Pale Moss */
    
    /* Theme - Soft Cream Minimalism */
    --bg: #F9F9F7;
    --secondary-bg: #F2F2EC;
    --text: #3A3A3A; /* Soft Grey-Black for readability */
    --text-muted: #6B705C; /* Earthy muted text */
    --card-bg: #FFFFFF;
    --border: rgba(45, 79, 30, 0.08); /* Almost invisible border */
    --glass-bg: rgba(249, 249, 247, 0.85);
    --shadow: 0 12px 40px rgba(45, 79, 30, 0.04); /* Very soft shadow */
}

:root[data-theme="dark"] {
    --bg: #231F1C; /* Dark Espresso Brown */
    --secondary-bg: #2C2723; /* Warm Muted Brown */
    --text: #F4EFEA; /* Creamy White */
    --text-muted: #BFA896; /* Elegant Sand/Gold */
    --card-bg: #332D28; /* Soft Taupe Brown */
    --border: rgba(255, 245, 235, 0.08); /* Warm subtle border */
    --glass-bg: rgba(35, 31, 28, 0.85);
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.8; /* Increased line-height for readability & breathe */
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Crimson Text', serif; /* Elegant Serif for Headlines */
    font-weight: 500;
    letter-spacing: -0.04em; /* Backed off slightly from -0.05em */
    line-height: 1.2;
}

/* Global Layout Utilities */
.container {
    max-width: 1075px; /* Widened to allow longer hero text */
    margin: 0 auto;
    padding: 0 32px;
}

.section {
    padding: 140px 0; /* Significant vertical space */
}

/* Navigation - Breathing Glass */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 84px; /* Taller for elegance */
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 0.5px solid var(--border);
    z-index: 1000;
    display: flex;
    align-items: center;
}

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

.logo {
    font-size: 16px;
    font-family: 'Roboto Flex', sans-serif;
    font-weight: 400;
    text-decoration: none;
    color: rgba(var(--primary-rgb), 0.75);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 4px; /* Minimalist sharp/soft corners */
    font-weight: 500;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: pointer;
    letter-spacing: 0.05em;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #1D3613;
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(var(--primary-rgb), 0.15);
}

.card {
    background: var(--card-bg);
    border: 0.5px solid var(--border);
    border-radius: 8px; /* Softer minimalist corner */
    padding: 48px;
    box-shadow: var(--shadow);
    transition: all 0.5s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(var(--primary-rgb), 0.08);
}

/* Animations - Gentle "Breathe" */
@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fadeInSlide {
    animation: fadeInSlide 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Language Selector Dropdown */
.lang-selector {
    position: relative;
    display: inline-block;
    margin-left: 24px;
}

.lang-btn {
    background: transparent;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-family: 'Roboto Flex', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    text-decoration: none;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.lang-btn:hover {
    color: var(--primary);
}

.lang-btn::after {
    content: "▾";
    font-size: 10px;
    opacity: 0.5;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 0.5px solid var(--border);
    border-radius: 4px;
    box-shadow: var(--shadow);
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    overflow: hidden;
    padding: 8px 0;
}

.lang-selector:hover .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-link {
    display: block;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--text-muted);
    font-family: 'Roboto Flex', sans-serif;
    font-size: 13px;
    font-weight: 400;
    transition: all 0.2s ease;
    text-align: right;
    letter-spacing: 0.05em;
}

.lang-link:hover {
    background: var(--secondary-bg);
    color: var(--primary);
}

.lang-link.active {
    color: var(--primary);
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .section {
        padding: 80px 0;
    }
    
    h1 { font-size: 42px; }
    h2 { font-size: 32px; }
    
    .container {
        padding: 0 24px;
    }
}

footer {
    padding: 80px 0;
    text-align: center;
    border-top: 0.5px solid var(--border);
    color: var(--text-muted);
    font-size: 13px;
    font-family: 'Roboto Mono', monospace;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Nav Links Layout to prevent wrapping */
.nav-links {
    display: flex;
    align-items: center;
}

/* Theme Toggle Pill Switch */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    margin-left: 32px;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #DAD7CD; /* Pale moss for light side */
    transition: .3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #FFFFFF;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

input:checked + .slider {
    background-color: var(--primary); /* Deep Forest Green for dark side */
}

input:checked + .slider:before {
    transform: translateX(20px);
}
