/* Altavo-inspired: primary #009a8b, secondary #004a83 */
:root {
    --primary: #009a8b;
    --secondary: #004a83;
    --accent: #006e93;
    --text: #1a2b3c;
    --text-muted: #4e4e4e;
    --bg: #f7fafb;
    --white: #ffffff;
    --border: #d8e4ea;
    --gradient: linear-gradient(135deg, #004a83 0%, #006e93 50%, #009a8b 100%);
    --shadow: 0 4px 24px rgba(0, 74, 131, 0.12);
    --radius: 12px;
    --font: 'Ubuntu', Helvetica, Arial, sans-serif;
}

/* 2026 multisensor revamp */
:root {
    --moss: #65704f;
    --moss-deep: #27372e;
    --paper: #f5f3eb;
    --ink: #17211c;
    --line-soft: rgba(39, 55, 46, .13);
}

body { background: var(--paper); color: var(--ink); }
.hero { background: radial-gradient(circle at 82% 22%, rgba(150, 171, 97, .35), transparent 32%), linear-gradient(125deg, #172b27 0%, #31564e 58%, #65704f 100%); }
.hero-compact { padding: clamp(3.8rem, 8vw, 7rem) 0; }
.hero h1 { max-width: 850px; font-size: clamp(2.7rem, 6vw, 5.7rem); line-height: .94; letter-spacing: -.055em; margin: .5rem 0 1.25rem; }
.hero p { max-width: 720px; font-size: clamp(1rem, 2vw, 1.25rem); opacity: .86; }
.eyebrow { display: inline-block; color: #cbdc9e; font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.section .eyebrow, .sensor-panel .eyebrow { color: var(--moss); }
.card, .chart-wrap, .metric, .recovery-ampel { border: 1px solid var(--line-soft); border-radius: 18px; box-shadow: 0 16px 44px rgba(26, 43, 34, .07); }
.metrics-grid { gap: 1rem; }
.metric { background: rgba(255,255,255,.76); }
.sensor-panel { display: grid; grid-template-columns: 1fr minmax(220px, .55fr); gap: 2rem; align-items: stretch; margin: 2rem 0; padding: clamp(1.25rem, 3vw, 2rem); background: #fff; border: 1px solid var(--line-soft); border-radius: 22px; overflow: hidden; }
.sensor-panel h3, .measurement-gallery h3 { font-size: clamp(1.55rem, 3vw, 2.35rem); margin: .35rem 0 .5rem; color: var(--moss-deep); }
.lab-values { display: flex; gap: .7rem; margin-top: 1.4rem; flex-wrap: wrap; }
.lab-values span { min-width: 92px; padding: .8rem 1rem; background: var(--paper); border-radius: 12px; font-size: 1.15rem; }
.lab-values b { display: block; font-size: .7rem; color: #6e786f; margin-bottom: .25rem; }
.color-swatch { min-height: 190px; padding: 1.4rem; border-radius: 16px; background: var(--swatch); color: #fff; display: flex; flex-direction: column; justify-content: flex-end; text-shadow: 0 1px 5px rgba(0,0,0,.45); }
.color-swatch span { font-size: 1.65rem; font-weight: 700; }
.color-swatch small { margin-top: .35rem; }
.chart-wrap-wide { grid-column: 1 / -1; }
.measurement-gallery { margin-top: 3rem; }
.section-heading { display: flex; flex-direction: column; margin-bottom: 1.25rem; }
.section-heading p { color: #65716a; margin: 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: .9rem; }
.gallery-item { position: relative; grid-column: span 4; min-height: 240px; border-radius: 16px; overflow: hidden; background: #dfe4d9; color: #fff; }
.gallery-item:nth-child(5n + 1), .gallery-item:nth-child(5n + 2) { grid-column: span 6; }
.gallery-item img { width: 100%; height: 100%; min-height: 240px; max-height: 430px; object-fit: cover; display: block; transition: transform .35s ease; }
.gallery-item:hover img { transform: scale(1.025); }
.gallery-item span { position: absolute; left: .85rem; bottom: .75rem; padding: .35rem .6rem; border-radius: 99px; background: rgba(16,27,21,.7); font-size: .72rem; }

@media (max-width: 760px) {
    .sensor-panel { grid-template-columns: 1fr; }
    .gallery-item, .gallery-item:nth-child(5n + 1), .gallery-item:nth-child(5n + 2) { grid-column: span 12; min-height: 210px; }
    .gallery-item img { min-height: 210px; max-height: 390px; }
}

*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    font-family: var(--font);
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

.container {
    width: min(1200px, 92vw);
    margin: 0 auto;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--secondary);
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: var(--gradient);
    color: var(--white);
    font-weight: 700;
    font-size: 0.75rem;
    border-radius: 8px;
}

.logo-text {
    font-weight: 400;
    font-size: 1.05rem;
}

.main-nav {
    display: flex;
    gap: 0.25rem;
}

.main-nav a {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 400;
    border-radius: 35px;
    transition: color 0.2s, background 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
    background: rgba(0, 154, 139, 0.08);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--secondary);
}

/* Hero */
.hero {
    background: var(--gradient);
    color: var(--white);
    padding: 3rem 0 2.5rem;
}

.hero h1 {
    font-weight: 400;
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    margin: 0 0 0.75rem;
    letter-spacing: 0;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.92;
    max-width: 720px;
    margin: 0;
}

.hero-compact {
    padding: 2rem 0 1.5rem;
}

.form-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.form-inline .form-group {
    flex: 1;
    min-width: 200px;
}

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

/* Sections */
.section {
    padding: 2.5rem 0;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--secondary);
    margin: 0 0 0.5rem;
}

.section-sub {
    color: var(--text-muted);
    margin: 0 0 1.5rem;
}

/* Map */
.map-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 1.5rem;
    align-items: start;
}

#tourMap {
    height: 520px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    z-index: 1;
}

.tour-sidebar {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1.25rem;
    max-height: 520px;
    overflow-y: auto;
}

.tour-card {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.tour-card:hover,
.tour-card.active {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.tour-card h3 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--secondary);
}

.tour-badge {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: rgba(0, 154, 139, 0.15);
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.tour-badge.poi {
    background: rgba(0, 74, 131, 0.12);
    color: var(--secondary);
}

/* Cards & metrics */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.metric {
    text-align: center;
    padding: 1.25rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.metric-value {
    font-size: 2rem;
    font-weight: 500;
    color: var(--primary);
    line-height: 1.2;
}

.metric-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.grade-a { color: #009a8b; }
.grade-b { color: #006e93; }
.grade-c { color: #e6a800; }
.grade-d { color: #c44; }

/* Erholungs-Ampel */
.recovery-ampel--pending {
    border-style: dashed;
}

.recovery-ampel {
    background: linear-gradient(135deg, #f7fafb 0%, #eef6f8 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
}

.recovery-ampel h3 {
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--secondary);
}

.recovery-ampel-index {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 0 1rem;
}

.ampel-overall {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.ampel-lights {
    display: flex;
    gap: 0.65rem;
    align-items: center;
}

.ampel-light {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    opacity: 0.22;
    border: 2px solid transparent;
    transition: opacity 0.2s, box-shadow 0.2s;
}

.ampel-light--green { background: #22a06b; }
.ampel-light--yellow { background: #e6a800; }
.ampel-light--red { background: #d64545; }

.ampel-light.active {
    opacity: 1;
    box-shadow: 0 0 0 3px rgba(0, 74, 131, 0.12);
    border-color: rgba(255, 255, 255, 0.85);
}

.ampel-result strong {
    display: block;
    font-size: 1.15rem;
    color: var(--primary);
    font-weight: 500;
}

.ampel-result span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.ampel-downgrade {
    font-size: 0.85rem;
    color: #8a6d00;
    margin: 0 0 0.75rem;
}

.ampel-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.ampel-factor {
    background: var(--white);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    font-size: 0.88rem;
}

.ampel-factor-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    font-weight: 500;
    color: var(--secondary);
}

.ampel-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.ampel-dot--green { background: #22a06b; }
.ampel-dot--yellow { background: #e6a800; }
.ampel-dot--red { background: #d64545; }

.ampel-disclaimer-link {
    font-size: 0.85rem;
    margin-top: 0.75rem;
}

/* Charts */
.chart-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.chart-wrap {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    min-height: 280px;
}

.chart-wrap h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--secondary);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    font-family: var(--font);
    font-weight: 400;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    border-radius: 35px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

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

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 154, 139, 0.35);
}

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

.btn-outline:hover {
    background: rgba(0, 74, 131, 0.06);
}

.btn-block { width: 100%; text-align: center; }

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 40, 70, 0.55);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.open { display: flex; }

.modal {
    background: var(--white);
    border-radius: var(--radius);
    max-width: 720px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--gradient);
    color: var(--white);
}

.modal-header h2 { margin: 0; font-weight: 400; font-size: 1.35rem; }

.modal-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: var(--white);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
}

.modal-body { padding: 1.5rem; }

.preview-map {
    height: 200px;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.paywall {
    margin-top: 1.25rem;
    padding: 1.25rem;
    background: rgba(0, 154, 139, 0.06);
    border: 1px dashed var(--primary);
    border-radius: var(--radius);
    text-align: center;
}

.paywall-price {
    font-size: 1.75rem;
    font-weight: 500;
    color: var(--secondary);
}

/* Forms */
.form-group { margin-bottom: 1.25rem; }

.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 400;
    color: var(--secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font);
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: 35px;
    background: var(--white);
    color: var(--text);
}

.form-group textarea { border-radius: var(--radius); min-height: 100px; }

.file-drop {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    background: var(--white);
    transition: border-color 0.2s;
}

.file-drop.dragover { border-color: var(--primary); background: rgba(0,154,139,0.04); }

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.alert-success { background: rgba(0,154,139,0.12); color: #006b60; border: 1px solid var(--primary); }
.alert-error { background: rgba(200,60,60,0.1); color: #a33; border: 1px solid #e88; }
.alert-info { background: rgba(0,74,131,0.08); color: var(--secondary); border: 1px solid var(--accent); }

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.about-grid ul { padding-left: 1.25rem; }

/* Footer */
.site-footer {
    background: var(--secondary);
    color: rgba(255,255,255,0.9);
    padding: 2rem 0;
    margin-top: 3rem;
}

.site-footer a { color: var(--primary); }
.site-footer a:hover { color: #00c4b0; }

.footer-grid {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-small { font-size: 0.85rem; opacity: 0.75; }

.footer-legal {
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer-legal a:hover {
    color: #00c4b0;
}

/* Legal pages */
.section-legal {
    padding-top: 1rem;
}

.legal-content {
    max-width: 52rem;
    margin: 0 auto;
    font-size: 1rem;
    line-height: 1.65;
}

.legal-content h2 {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--secondary);
    margin: 2rem 0 0.75rem;
}

.legal-content h2:first-child {
    margin-top: 0;
}

.legal-content h3 {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--secondary);
    margin: 1.5rem 0 0.5rem;
}

.legal-content h4 {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text);
    margin: 1.25rem 0 0.5rem;
}

.legal-content p {
    margin: 0 0 0.85rem;
    color: var(--text);
}

.legal-content ul {
    margin: 0 0 1rem;
    padding-left: 1.35rem;
}

.legal-content li {
    margin-bottom: 0.35rem;
}

.legal-content a {
    color: var(--primary);
    word-break: break-word;
}

.legal-content a:hover {
    color: var(--accent);
}

.correlation-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.correlation-table th,
.correlation-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.correlation-table th { color: var(--secondary); font-weight: 500; }

/* Wetterstationen (DWD / Bright Sky) */
.section-weather {
    background: linear-gradient(180deg, rgba(0, 154, 139, 0.06) 0%, transparent 100%);
    padding-top: 2rem;
}

.weather-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.weather-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    box-shadow: var(--shadow);
    transition: border-color 0.2s, transform 0.15s;
}

.weather-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.weather-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.weather-card-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--secondary);
    line-height: 1.3;
}

.weather-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.weather-region {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.weather-values {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.weather-value {
    text-align: center;
    padding: 0.5rem 0.25rem;
    background: rgba(0, 74, 131, 0.04);
    border-radius: 8px;
}

.weather-value-num {
    display: block;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--primary);
    line-height: 1.2;
}

.weather-value-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 0.2rem;
}

.weather-card-footer {
    border-top: 1px solid var(--border);
    padding-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    line-height: 1.4;
}

.weather-meta {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: right;
}

.scientific-note {
    font-size: 0.9rem;
    color: var(--text-muted);
    border-left: 3px solid var(--primary);
    padding-left: 1rem;
    margin: 1rem 0;
}

/* Responsive */
@media (max-width: 900px) {
    .map-layout { grid-template-columns: 1fr; }
    #tourMap { height: 400px; }
    .tour-sidebar { max-height: none; }
    .about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--white);
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
    }
    .main-nav.open { display: flex; }
    .header-inner { position: relative; flex-wrap: wrap; }
}

/* Revamp overrides kept last so the new visual language wins the cascade. */
body { background: var(--paper); color: var(--ink); }
.hero { background: radial-gradient(circle at 82% 22%, rgba(150, 171, 97, .35), transparent 32%), linear-gradient(125deg, #172b27 0%, #31564e 58%, #65704f 100%); }
.hero-compact { padding: clamp(3.8rem, 8vw, 7rem) 0; }
.hero h1 { max-width: 850px; font-size: clamp(2.7rem, 6vw, 5.7rem); line-height: .94; letter-spacing: -.055em; margin: .5rem 0 1.25rem; }
.hero p { max-width: 720px; font-size: clamp(1rem, 2vw, 1.25rem); opacity: .86; }
