/* ============================================================
   Charwa GmbH v2 — Design System
   ============================================================ */

/* ===== Light Theme (Default) ===== */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --bg-card: #ffffff;
    --bg-nav: rgba(255, 255, 255, 0.92);
    --bg-code: #f3f4f6;

    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --text-inverse: #ffffff;

    --border-color: #e5e7eb;
    --border-light: #f3f4f6;

    --accent: #22c55e;
    --accent-dark: #16a34a;
    --accent-light: rgba(34, 197, 94, 0.1);
    --accent-border: rgba(34, 197, 94, 0.2);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-nav: 0 1px 3px rgba(0, 0, 0, 0.08);

    --max-width: 1200px;
    --nav-height: 72px;
    --section-padding: 96px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --transition: 0.2s ease;
}

/* ===== Dark Theme — OS Preference ===== */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-primary: #0a0a0a;
        --bg-secondary: #111111;
        --bg-tertiary: #1a1a1a;
        --bg-card: #151515;
        --bg-nav: rgba(10, 10, 10, 0.92);
        --bg-code: #1a1a1a;

        --text-primary: #f3f4f6;
        --text-secondary: #a0a0a0;
        --text-muted: #5a5a5a;
        --text-inverse: #0a0a0a;

        --border-color: #1e1e1e;
        --border-light: #151515;

        --accent-light: rgba(34, 197, 94, 0.12);
        --accent-border: rgba(34, 197, 94, 0.25);

        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
        --shadow-nav: 0 1px 3px rgba(0, 0, 0, 0.4);
    }
}

/* ===== Manual Dark Override ===== */
[data-theme="dark"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --bg-card: #151515;
    --bg-nav: rgba(10, 10, 10, 0.92);
    --bg-code: #1a1a1a;

    --text-primary: #f3f4f6;
    --text-secondary: #a0a0a0;
    --text-muted: #5a5a5a;
    --text-inverse: #0a0a0a;

    --border-color: #1e1e1e;
    --border-light: #151515;

    --accent-light: rgba(34, 197, 94, 0.12);
    --accent-border: rgba(34, 197, 94, 0.25);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-nav: 0 1px 3px rgba(0, 0, 0, 0.4);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background var(--transition), color var(--transition);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ===== Typography ===== */
h1, h2, h3, h4 {
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 { font-size: 48px; line-height: 1.1; }
h2 { font-size: 32px; font-weight: 600; }
h3 { font-size: 22px; font-weight: 600; }
h4 { font-size: 18px; font-weight: 600; }

p { margin-bottom: 16px; }
p:last-child { margin-bottom: 0; }

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

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

.section--alt {
    background: var(--bg-secondary);
}

.section--accent {
    background: var(--bg-tertiary);
}

/* ===== Navigation ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-height);
    transition: background 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}

.nav--scrolled {
    background: var(--bg-nav);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-nav);
    border-bottom: 1px solid var(--border-color);
}

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

.nav__logo {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: 2px;
    transition: color var(--transition);
}

.nav__logo:hover {
    color: var(--accent);
}

.nav__menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav__menu a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition);
    position: relative;
}

.nav__menu a:hover,
.nav__menu a.active {
    color: var(--text-primary);
}

.nav__menu a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}

.nav__controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Language Selector */
.lang-selector {
    display: flex;
    gap: 2px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 3px;
}

.lang-selector button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    border-radius: 6px;
    transition: all var(--transition);
    letter-spacing: 0.02em;
}

.lang-selector button:hover {
    color: var(--text-secondary);
}

.lang-selector button.active {
    background: var(--accent);
    color: var(--text-inverse);
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
    cursor: pointer;
    transition: all var(--transition);
    color: var(--text-secondary);
}

.theme-toggle:hover {
    border-color: var(--accent-border);
    color: var(--text-primary);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

/* Hamburger */
.nav__hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
    cursor: pointer;
    padding: 8px;
    transition: all var(--transition);
}

.nav__hamburger span {
    display: block;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 1px;
    transition: all 0.3s;
}

.nav__hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav__hamburger.open span:nth-child(2) {
    opacity: 0;
}

.nav__hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    letter-spacing: 0.01em;
}

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

.btn--primary:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

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

.btn--secondary:hover {
    background: var(--accent-light);
    border-color: var(--accent);
}

.btn--large {
    padding: 16px 36px;
    font-size: 16px;
    border-radius: 12px;
}

/* ===== Cards ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    transition: all var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent-border);
}

.card__icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--accent);
}

.card__icon svg {
    width: 24px;
    height: 24px;
}

.card__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.card__text {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== Grid Layouts ===== */
.grid {
    display: grid;
    gap: 24px;
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ===== Badge ===== */
.badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--accent-light);
    border: 1px solid var(--accent-border);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
}

/* ===== Tags ===== */
.tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ===== Stats ===== */
.stat {
    text-align: center;
    padding: 24px;
}

.stat__number {
    font-size: 40px;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.stat__label {
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 8px;
    font-weight: 500;
}

/* ===== Steps (Process Timeline) ===== */
.steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

.step {
    display: flex;
    gap: 24px;
    position: relative;
    padding-bottom: 40px;
}

.step:last-child {
    padding-bottom: 0;
}

.step__indicator {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step__num {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--text-inverse);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.step__line {
    width: 2px;
    flex: 1;
    background: var(--border-color);
    margin-top: 8px;
}

.step:last-child .step__line {
    display: none;
}

.step__content {
    flex: 1;
    padding-top: 8px;
}

.step__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.step__desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== Team Member ===== */
.team-card {
    text-align: center;
    padding: 32px 24px;
}

.team-card__badge {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--text-inverse);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    margin: 0 auto 16px;
}

.team-card__name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.team-card__role {
    font-size: 14px;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 12px;
}

.team-card__desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.team-card__links {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

.team-card__links a {
    color: var(--text-muted);
    transition: color var(--transition);
}

.team-card__links a:hover {
    color: var(--accent);
}

/* ===== Details Table ===== */
.details-table {
    width: 100%;
    border-collapse: collapse;
}

.details-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 15px;
}

.details-table td:first-child {
    font-weight: 600;
    color: var(--text-primary);
    width: 35%;
}

/* ===== Contact Info Card ===== */
.contact-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: all var(--transition);
    text-decoration: none;
    color: inherit;
}

.contact-card:hover {
    border-color: var(--accent-border);
    box-shadow: var(--shadow-sm);
}

.contact-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--accent);
}

.contact-card__icon svg {
    width: 20px;
    height: 20px;
}

.contact-card__label {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.contact-card__value {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

/* ===== Form ===== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all var(--transition);
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* ===== Page Header ===== */
.page-header {
    padding: calc(var(--nav-height) + 48px) 0 48px;
    text-align: center;
}

.page-header h1 {
    margin-bottom: 16px;
}

.page-header p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto;
}

/* ===== Hero ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-height);
    position: relative;
    overflow: hidden;
}

.hero__content {
    max-width: 680px;
}

.hero__badge {
    margin-bottom: 24px;
}

.hero__title {
    font-size: 56px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.08;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.hero__title span {
    color: var(--accent);
}

.hero__subtitle {
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 520px;
    margin-bottom: 36px;
}

/* ===== CTA Section ===== */
.cta-section {
    text-align: center;
    padding: var(--section-padding) 0;
    background: var(--bg-tertiary);
}

.cta-section h2 {
    margin-bottom: 16px;
}

.cta-section p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 auto 32px;
}

/* ===== Section Header ===== */
.section__header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 48px;
}

.section__header h2 {
    margin-bottom: 12px;
}

.section__header p {
    font-size: 17px;
    color: var(--text-secondary);
}

/* ===== Footer ===== */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 48px 0 0;
    background: var(--bg-secondary);
}

.footer__top {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
}

.footer__logo {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.footer__tagline {
    font-size: 14px;
    color: var(--text-muted);
}

.footer__links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer__links a {
    font-size: 14px;
    color: var(--text-secondary);
    transition: color var(--transition);
}

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

.footer__contact p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-muted);
}

.footer__legal {
    display: flex;
    gap: 24px;
}

.footer__legal a {
    color: var(--text-muted);
    transition: color var(--transition);
}

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

/* ===== Utility ===== */
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }

/* ===== Responsive — Tablet ===== */
@media (max-width: 1024px) {
    :root {
        --section-padding: 64px;
    }

    h1 { font-size: 40px; }
    h2 { font-size: 28px; }

    .hero__title { font-size: 44px; }

    .grid--3 { grid-template-columns: repeat(2, 1fr); }
    .grid--4 { grid-template-columns: repeat(2, 1fr); }

    .footer__top {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

/* ===== Responsive — Mobile ===== */
@media (max-width: 640px) {
    :root {
        --section-padding: 48px;
        --nav-height: 64px;
    }

    h1 { font-size: 32px; }
    h2 { font-size: 24px; }
    h3 { font-size: 18px; }

    .container { padding: 0 16px; }

    .hero { min-height: auto; padding-top: calc(var(--nav-height) + 48px); padding-bottom: 48px; }
    .hero__title { font-size: 36px; }
    .hero__subtitle { font-size: 16px; }

    /* Nav mobile */
    .nav__menu {
        display: none;
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-primary);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 24px;
        z-index: 999;
    }

    .nav__menu.open {
        display: flex;
    }

    .nav__menu a {
        font-size: 20px;
    }

    .nav__hamburger {
        display: flex;
    }

    .grid--2,
    .grid--3,
    .grid--4 {
        grid-template-columns: 1fr;
    }

    .stat__number { font-size: 32px; }

    .step { gap: 16px; }

    .page-header {
        padding: calc(var(--nav-height) + 32px) 0 32px;
        text-align: left;
    }

    .page-header p {
        margin: 0;
    }

    .section__header {
        text-align: left;
    }

    .footer__top {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer__bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .btn--large {
        padding: 14px 28px;
        font-size: 15px;
        width: 100%;
        justify-content: center;
    }
}

/* ===== Mobile Bottom Nav ===== */
.bottom-nav {
    display: none;
}

@media (max-width: 640px) {
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: var(--bg-nav);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid var(--border-color);
        height: 60px;
        padding: 0 8px;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .bottom-nav__link {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        text-decoration: none;
        color: var(--text-muted);
        font-size: 10px;
        font-weight: 500;
        letter-spacing: 0.02em;
        transition: color var(--transition);
    }

    .bottom-nav__link.active {
        color: var(--accent);
    }

    .bottom-nav__link svg {
        width: 22px;
        height: 22px;
    }

    /* Add padding to body so content isn't hidden behind bottom nav */
    body {
        padding-bottom: 60px;
    }

    /* Hide hamburger menu — bottom nav replaces it */
    .nav__hamburger {
        display: none !important;
    }

    /* Hide fullscreen mobile menu */
    .nav__menu {
        display: none !important;
    }
}

/* ===== Print ===== */
@media print {
    .nav, .footer, .theme-toggle, .lang-selector, .nav__hamburger {
        display: none !important;
    }

    body {
        background: white;
        color: #111;
    }

    .section { padding: 24px 0; }
}
