/* Soft Modern Aesthetic + Framed Canvas Card */
:root {
    /* Color Palette */
    --bg-color: #f8fafc;
    --surface-color: #ffffff;
    --soft-surface: #eff4f8;
    
    --primary: #89a8b2; /* Soft muted blue */
    --primary-hover: #728f98;
    --primary-text: #ffffff;
    
    --text-main: #334155;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    
    --error: #ef4444;
    
    /* Typography */
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    
    /* Spacing Scale */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 24px;
    --sp-6: 40px;
    --sp-7: 64px;
    
    /* Radii & Shadows (Soft Modern) */
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 4px 12px rgba(137, 168, 178, 0.08);
    --shadow-md: 0 12px 32px rgba(137, 168, 178, 0.12);
    --shadow-lg: 0 20px 48px rgba(137, 168, 178, 0.15);
    
    /* Layout */
    --max-w: 1080px;
    --header-h-dt: 64px;
    --header-h-mob: 52px;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
}
* {
    margin: 0;
    padding: 0;
}
html, body {
    height: 100%;
}
body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden; /* Global body can hide horizontal scrollbar, but we don't use it to mask layout overflow within containers */
}

/* Base Elements */
h1, h2, h3, h4, .brand-name {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
    overflow-wrap: anywhere;
}
h1 { font-size: 2.5rem; margin-bottom: var(--sp-5); }
h2 { font-size: 2rem; margin-bottom: var(--sp-4); }
h3 { font-size: 1.5rem; margin-bottom: var(--sp-3); }
h4 { font-size: 1.2rem; margin-bottom: var(--sp-4); }

p {
    margin-bottom: var(--sp-4);
}
a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}
a:hover {
    color: var(--primary-hover);
}
img {
    max-width: 100%;
    display: block;
    height: auto;
}
ul, ol {
    margin-bottom: var(--sp-4);
    padding-left: var(--sp-5);
}
li {
    margin-bottom: var(--sp-2);
}

/* Accessibility */
:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: -1px;
}
[hidden] {
    display: none !important;
}

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

/* Layout Utilities */
.container {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--sp-5);
    min-width: 0;
}
.soft-surface {
    background-color: var(--soft-surface);
    border-radius: var(--radius-lg);
}
.radius-md {
    border-radius: var(--radius-md);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-3) var(--sp-5);
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn-primary {
    background-color: var(--primary);
    color: var(--primary-text);
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    color: var(--primary-text);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.btn-outline {
    background-color: transparent;
    border-color: var(--primary);
    color: var(--primary);
}
.btn-outline:hover {
    background-color: var(--primary);
    color: var(--primary-text);
}
.btn-text {
    background-color: transparent;
    color: var(--text-muted);
}
.btn-text:hover {
    color: var(--primary);
}

/* Header */
.site-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 100;
}
.header-inner {
    height: var(--header-h-dt);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    color: var(--text-main);
}
.brand-mark {
    color: var(--primary);
}
.brand-name {
    font-size: 1.125rem;
}
.nav-toggle {
    display: none;
    background: none;
    border: none;
    padding: var(--sp-2);
    cursor: pointer;
    color: var(--text-main);
}
.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
    position: relative;
    transition: background 0.2s;
}
.hamburger::before, .hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: currentColor;
    left: 0;
    transition: transform 0.2s, top 0.2s;
}
.hamburger::before { top: -6px; }
.hamburger::after { top: 6px; }

[aria-expanded="true"] .hamburger { background: transparent; }
[aria-expanded="true"] .hamburger::before { transform: rotate(45deg); top: 0; }
[aria-expanded="true"] .hamburger::after { transform: rotate(-45deg); top: 0; }

.main-nav {
    display: flex;
    align-items: center;
    gap: var(--sp-6);
}
.nav-list {
    display: flex;
    list-style: none;
    gap: var(--sp-5);
    margin: 0;
    padding: 0;
}
.nav-link {
    color: var(--text-main);
    font-weight: 500;
}
.nav-link:hover {
    color: var(--primary);
}

/* Hero */
.hero {
    padding: var(--sp-7) 0;
    text-align: center;
    position: relative;
}
.hero-inner {
    max-width: 800px;
}
.hero p {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: var(--sp-6);
}

/* Guides Section / Card Grid */
.guides-section {
    padding: var(--sp-7) 0;
}
.section-header {
    text-align: center;
    margin-bottom: var(--sp-7);
}
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--sp-7) var(--sp-6);
}

/* Framed Canvas Card */
.framed-canvas {
    position: relative;
    /* Spacing context for hover lift */
    padding-bottom: 8px; 
}
.framed-canvas-bg {
    position: absolute;
    top: 16px;
    left: 16px;
    right: -16px;
    bottom: -8px;
    background-color: #e8eff3;
    border-radius: var(--radius-md);
    z-index: 0;
    transition: transform 0.3s ease;
}
.framed-canvas-fg {
    position: relative;
    z-index: 1;
    background: var(--surface-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}
.framed-canvas:hover .framed-canvas-fg {
    transform: translate(-4px, -4px);
    box-shadow: var(--shadow-lg);
}
.framed-canvas:hover .framed-canvas-bg {
    transform: translate(4px, 4px);
}
.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.card-content {
    padding: var(--sp-5);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.card-content p {
    color: var(--text-muted);
    flex-grow: 1;
    margin-bottom: var(--sp-5);
}
.card-link {
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
}

/* Supporting Section */
.supporting-section {
    margin: var(--sp-7) var(--sp-5);
    padding: var(--sp-7) 0;
}
.supporting-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-7);
    align-items: center;
}
.supporting-stats {
    display: flex;
    gap: var(--sp-6);
}
.stat-block {
    display: flex;
    flex-direction: column;
}
.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: var(--sp-3);
}
.stat-label {
    font-weight: 600;
    color: var(--text-muted);
}

/* Article Pages */
.article-page {
    padding: var(--sp-7) 0;
}
.article-container {
    max-width: 800px;
}
.article-header {
    margin-bottom: var(--sp-6);
}
.article-lead {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: var(--sp-6);
}
.article-hero-img {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 1;
    object-fit: cover;
    margin-bottom: var(--sp-6);
}
.article-body h2 {
    margin-top: var(--sp-6);
}
.article-body h3 {
    margin-top: var(--sp-5);
}
.article-body p, .article-body ul {
    font-size: 1.1rem;
}
.article-body ul {
    margin-bottom: var(--sp-5);
}

/* Tables */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-bottom: var(--sp-5);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}
.cookie-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    text-align: left;
    background: var(--surface-color);
}
.cookie-table th, .cookie-table td {
    padding: var(--sp-4);
    border-bottom: 1px solid var(--border-color);
}
.cookie-table th {
    background: var(--soft-surface);
    font-weight: 600;
}

/* Contact Page */
.contact-section {
    padding: var(--sp-7) 0;
}
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-7);
}
.static-map {
    margin-top: var(--sp-6);
    height: 250px;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #e2e8f0 25%, #cbd5e1 100%);
}
.map-visual {
    width: 100%;
    height: 100%;
    position: relative;
}
.map-pin {
    width: 20px;
    height: 20px;
    background: var(--primary);
    border: 3px solid white;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: var(--shadow-sm);
}

/* Forms */
.contact-form-wrapper {
    padding: var(--sp-6);
}
.form-group {
    margin-bottom: var(--sp-5);
    display: flex;
    flex-direction: column;
}
.form-group label {
    font-weight: 600;
    margin-bottom: var(--sp-2);
}
.form-group input, .form-group select, .form-group textarea {
    padding: var(--sp-3);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    background: var(--surface-color);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--primary);
}
.form-group input.is-invalid, .form-group select.is-invalid, .form-group textarea.is-invalid {
    border-color: var(--error);
}
.error-message {
    color: var(--error);
    font-size: 0.875rem;
    margin-top: var(--sp-1);
}

/* Footer */
.site-footer {
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: var(--sp-7) 0 var(--sp-5);
    margin-top: var(--sp-7);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--sp-6);
    margin-bottom: var(--sp-6);
}
.footer-brand {
    display: block;
    margin-bottom: var(--sp-3);
}
.footer-col p, .footer-col address {
    color: var(--text-muted);
    font-style: normal;
    font-size: 0.95rem;
}
.footer-nav {
    list-style: none;
    padding: 0;
}
.footer-nav li {
    margin-bottom: var(--sp-3);
}
.footer-nav a, .footer-link {
    color: var(--text-muted);
}
.footer-nav a:hover, .footer-link:hover {
    color: var(--primary);
}
.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    padding-top: var(--sp-5);
    border-top: 1px solid var(--border-color);
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: var(--sp-4);
    left: var(--sp-4);
    right: var(--sp-4);
    z-index: 999;
}
.cookie-inner {
    background: var(--surface-color);
    padding: var(--sp-5);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-5);
    border: 1px solid var(--border-color);
}
.cookie-text p {
    margin: 0;
    font-size: 0.95rem;
}
.cookie-actions {
    display: flex;
    gap: var(--sp-3);
    flex-wrap: wrap;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .header-inner {
        height: var(--header-h-mob);
    }
    .nav-toggle {
        display: block;
    }
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface-color);
        flex-direction: column;
        padding: var(--sp-5);
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-md);
        display: none; /* hidden by default on mobile */
    }
    .main-nav.is-visible {
        display: flex;
    }
    .nav-list {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: var(--sp-4);
        padding-left: 0;
    }
    
    .supporting-inner {
        grid-template-columns: 1fr;
        gap: var(--sp-5);
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .contact-form-wrapper {
        padding: var(--sp-5) var(--sp-4);
    }
    
    /* Remove negative offset frame on mobile */
    .framed-canvas-bg {
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: var(--radius-md);
        background: transparent;
    }
    .framed-canvas-fg {
        box-shadow: var(--shadow-sm);
    }
    .framed-canvas:hover .framed-canvas-fg {
        transform: none;
    }
    .framed-canvas:hover .framed-canvas-bg {
        transform: none;
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .cookie-inner {
        flex-direction: column;
        text-align: center;
    }
    .cookie-actions {
        justify-content: center;
    }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
}

@media (max-width: 400px) {
    .hero {
        padding: var(--sp-5) 0;
    }
    .btn {
        width: 100%;
    }
    .supporting-stats {
        flex-direction: column;
        gap: var(--sp-4);
        align-items: center;
    }
}