:root {
    /* Soft Modern Palette: Pastels & Calm tones */
    --color-bg: #FAFAFB;
    --color-surface: #FFFFFF;
    --color-surface-blur: rgba(255, 255, 255, 0.85);
    
    --color-primary: #84A59D; /* Soft Sage */
    --color-primary-hover: #72938B;
    --color-secondary: #F28482; /* Muted Blush */
    --color-accent: #F5CAC3; /* Warm Sand */
    --color-accent-soft: #FDF3F1;
    
    --color-text: #2B2D42; /* Deep Charcoal */
    --color-text-light: #6C757D;
    
    /* Spacing Scale */
    --space-4: 4px;
    --space-8: 8px;
    --space-12: 12px;
    --space-16: 16px;
    --space-24: 24px;
    --space-40: 40px;
    --space-64: 64px;
    
    /* Border Radius */
    --radius-md: 12px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 4px 16px rgba(43, 45, 66, 0.04);
    --shadow-md: 0 12px 32px rgba(43, 45, 66, 0.08);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-primary-hover);
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 4px;
}

h1, h2, h3, h4, .brand-name {
    color: var(--color-text);
    line-height: 1.2;
    overflow-wrap: anywhere;
    margin-bottom: var(--space-16);
    font-weight: 600;
}

p {
    margin-bottom: var(--space-16);
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-24);
}

.section {
    padding: var(--space-64) 0;
}

.grid {
    display: grid;
    gap: var(--space-40);
}

.grid-cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* Responsive text wrap and min-widths */
.grid > *, .flex > * {
    min-width: 0;
}

/* Typography */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 2rem; }
.text-4xl { font-size: 2.5rem; }

/* Buttons & CTA */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-12) var(--space-24);
    border-radius: var(--radius-full);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-size: 1rem;
    color: var(--color-surface);
    background-color: var(--color-primary);
}

.btn:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
    color: var(--color-surface);
}

.btn-secondary {
    background-color: var(--color-accent);
    color: var(--color-text);
}

.btn-secondary:hover {
    background-color: #EBC0B9;
    color: var(--color-text);
}

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

.btn-outline:hover {
    background-color: var(--color-bg);
    color: var(--color-text);
    transform: none;
}

/* Header */
.site-header {
    height: 64px;
    background: var(--color-surface-blur);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
}

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

.header-brand {
    display: flex;
    align-items: center;
    gap: var(--space-12);
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--color-text);
}

.brand-icon {
    width: 24px;
    height: 24px;
}

.header-nav {
    display: flex;
    gap: var(--space-24);
    align-items: center;
}

.nav-link {
    color: var(--color-text-light);
    font-weight: 500;
}

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

.header-cta {
    display: flex;
    gap: var(--space-16);
    align-items: center;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-8);
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-text);
    margin: 5px 0;
    transition: 0.3s ease;
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 52px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-surface-blur);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 40;
    padding: var(--space-24);
    display: flex;
    flex-direction: column;
    gap: var(--space-24);
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-nav-overlay.is-open {
    transform: translateX(0);
}

@media (max-width: 767px) {
    .site-header {
        height: 52px;
    }
    .header-nav {
        display: none;
    }
    .header-cta .btn {
        display: none;
    }
    .hamburger {
        display: block;
    }
    .hamburger.is-active .hamburger-line:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .hamburger.is-active .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    .hamburger.is-active .hamburger-line:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}

/* Framed Canvas Card */
.card-framed {
    position: relative;
    z-index: 1;
    margin-bottom: var(--space-24);
}

.card-framed::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 16px;
    right: -16px;
    bottom: -16px;
    background-color: var(--color-accent);
    border-radius: var(--radius-lg);
    z-index: -1;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.card-foreground {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-media {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: var(--color-accent-soft);
}

.card-body {
    padding: var(--space-24);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-body > *:not(:last-child) {
    margin-bottom: var(--space-16);
}

.card-framed:hover .card-foreground {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.card-framed:hover::before {
    background-color: var(--color-secondary);
}

@media (max-width: 767px) {
    .card-framed::before {
        top: 0; left: 0; right: 0; bottom: 0;
        transform: scale(1.03);
    }
    .card-framed:hover::before {
        transform: scale(1.05);
    }
}

/* Page Layouts & Specifics */
.hero {
    background: linear-gradient(135deg, var(--color-accent-soft) 0%, var(--color-bg) 100%);
    padding: var(--space-64) 0;
    text-align: center;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    margin-bottom: var(--space-64);
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    max-width: 800px;
    margin: 0 auto var(--space-24);
}

.hero p {
    font-size: 1.125rem;
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto var(--space-40);
}

/* Article & Legal Content */
.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: var(--color-surface);
    padding: var(--space-40);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-64);
}

.content-wrapper h2 {
    margin-top: var(--space-40);
    padding-bottom: var(--space-8);
    border-bottom: 1px solid var(--color-bg);
}

.content-wrapper ul, .content-wrapper ol {
    margin-left: var(--space-24);
    margin-bottom: var(--space-16);
}

.content-wrapper li {
    margin-bottom: var(--space-8);
}

.table-wrapper {
    overflow-x: auto;
    margin-bottom: var(--space-24);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

th, td {
    padding: var(--space-16);
    border-bottom: 1px solid var(--color-bg);
    text-align: left;
}

th {
    background-color: var(--color-accent-soft);
    font-weight: 600;
}

.stat-block {
    background: var(--color-accent-soft);
    padding: var(--space-24);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-24);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--space-12);
}

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

/* Forms */
.form-group {
    margin-bottom: var(--space-24);
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: var(--space-8);
}

.form-control {
    width: 100%;
    padding: var(--space-16);
    border: 1px solid #E2E8F0;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    background: var(--color-bg);
    transition: border-color 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--color-surface);
}

.form-control.is-invalid {
    border-color: var(--color-secondary);
}

.error-message {
    display: none;
    color: var(--color-secondary);
    font-size: 0.875rem;
    margin-top: var(--space-4);
}

.form-control.is-invalid + .error-message {
    display: block;
}

/* Contact Map */
.static-map {
    width: 100%;
    height: 300px;
    background-color: #E8F0EE;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    margin-bottom: var(--space-24);
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-lines {
    position: absolute;
    inset: 0;
    opacity: 0.2;
    background-image: 
        linear-gradient(#A9C2BB 2px, transparent 2px),
        linear-gradient(90deg, #A9C2BB 2px, transparent 2px);
    background-size: 40px 40px;
}

.map-pin {
    position: relative;
    z-index: 2;
    color: var(--color-secondary);
    text-align: center;
}

.map-pin svg {
    width: 48px;
    height: 48px;
    margin: 0 auto;
}

/* Footer */
.site-footer {
    background-color: var(--color-surface);
    border-top: 1px solid rgba(0,0,0,0.05);
    padding: var(--space-64) 0 var(--space-24);
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-40);
    margin-bottom: var(--space-40);
}

.footer-col h4 {
    margin-bottom: var(--space-24);
    font-size: 1.125rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-12);
}

.footer-links a {
    color: var(--color-text-light);
}

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

.footer-bottom {
    padding-top: var(--space-24);
    border-top: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--space-16);
    color: var(--color-text-light);
    font-size: 0.875rem;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: var(--space-24);
    left: var(--space-24);
    right: var(--space-24);
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-24);
    box-shadow: var(--shadow-md);
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: var(--space-16);
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid rgba(0,0,0,0.05);
}

.cookie-banner[hidden] {
    display: none;
}

.cookie-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-12);
}

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