:root {
    --primary-color: #0F8FA8;
    --primary-contrast: #ffffff;
    --accent-color: #E0A93F;
    --text-color: #1c2733;
    --text-muted: #5a6b7b;
    --background-color: #ffffff;
    --surface-color: #f1f5f8;
    --card-color: #ffffff;
    --border-color: rgba(15, 31, 56, 0.08);
    --footer-bg: #0C1F38;
    --footer-text: #cdd9e5;
    --shadow: rgba(12, 31, 56, 0.10);
    --hero-bg: linear-gradient(165deg, #f5f9fc 0%, #e8eff5 55%, #dfe9f1 100%);
    --hero-heading: #0c1f38;
    --hero-text: #44566a;
    --hero-muted: #6a7b8b;
    --hero-secondary-bg: rgba(15, 31, 56, 0.04);
    --hero-secondary-border: rgba(15, 31, 56, 0.18);
    --hero-secondary-text: #1c2733;
    --hero-secondary-hover: rgba(15, 31, 56, 0.08);
}

[data-theme="dark"] {
    --primary-color: #3FE0C8;
    --primary-contrast: #06121f;
    --accent-color: #F2C266;
    --text-color: #e3edf5;
    --text-muted: #9fb1c2;
    --background-color: #06121f;
    --surface-color: #0e2236;
    --card-color: #112a40;
    --border-color: rgba(110, 232, 255, 0.12);
    --footer-bg: #04101b;
    --footer-text: #9fb1c2;
    --shadow: rgba(0, 0, 0, 0.45);
    --hero-bg: linear-gradient(160deg, #050b17 0%, #0c1f38 60%, #112a40 100%);
    --hero-heading: #ffffff;
    --hero-text: #c7d6e4;
    --hero-muted: #9fb1c2;
    --hero-secondary-bg: rgba(255, 255, 255, 0.08);
    --hero-secondary-border: rgba(255, 255, 255, 0.25);
    --hero-secondary-text: #e3edf5;
    --hero-secondary-hover: rgba(255, 255, 255, 0.16);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --primary-color: #3FE0C8;
        --primary-contrast: #06121f;
        --accent-color: #F2C266;
        --text-color: #e3edf5;
        --text-muted: #9fb1c2;
        --background-color: #06121f;
        --surface-color: #0e2236;
        --card-color: #112a40;
        --border-color: rgba(110, 232, 255, 0.12);
        --footer-bg: #04101b;
        --footer-text: #9fb1c2;
        --shadow: rgba(0, 0, 0, 0.45);
        --hero-bg: linear-gradient(160deg, #050b17 0%, #0c1f38 60%, #112a40 100%);
        --hero-heading: #ffffff;
        --hero-text: #c7d6e4;
        --hero-muted: #9fb1c2;
        --hero-secondary-bg: rgba(255, 255, 255, 0.08);
        --hero-secondary-border: rgba(255, 255, 255, 0.25);
        --hero-secondary-text: #e3edf5;
        --hero-secondary-hover: rgba(255, 255, 255, 0.16);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
        Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

header {
    padding: 0.5rem;
    background: var(--background-color);
    box-shadow: 0 2px 4px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 10;
}

nav {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    gap: 0.75rem;
}

.logo-img {
    height: 2.5rem;
    width: 2.5rem;
    border-radius: 8px;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 600;
}

@media (max-width: 768px) {
    header {
        padding: 0.25rem;
    }

    nav {
        padding: 0.5rem;
    }

    .logo-img {
        height: 2rem;
        width: 2rem;
    }

    .logo-text {
        font-size: 1.1rem;
    }
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Theme toggle button */
.theme-toggle {
    background: none;
    border: none;
    padding: 0.4rem;
    cursor: pointer;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background-color: var(--surface-color);
}

/* Show moon (→ dark) in light mode, sun (→ light) in dark mode */
.theme-toggle .sun-icon { display: none; }
.theme-toggle .moon-icon { display: block; }

[data-theme="dark"] .theme-toggle .sun-icon { display: block; }
[data-theme="dark"] .theme-toggle .moon-icon { display: none; }

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .sun-icon { display: block; }
    :root:not([data-theme="light"]) .theme-toggle .moon-icon { display: none; }
}

/* Theme-aware screenshots: show the light variant by default, the dark
   variant when the dark theme is active (manual toggle or system). Mirrors
   the sun/moon icon logic above. */
.theme-img-dark { display: none; }
.theme-img-light { display: block; }

[data-theme="dark"] .theme-img-light { display: none; }
[data-theme="dark"] .theme-img-dark { display: block; }

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-img-light { display: none; }
    :root:not([data-theme="light"]) .theme-img-dark { display: block; }
}

/* Hero */
.hero {
    background: var(--hero-bg);
    color: var(--hero-text);
    padding: 5rem max(1.5rem, calc((100% - 1200px) / 2));
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    color: var(--hero-heading);
    letter-spacing: -0.02em;
}

.hero-content p {
    font-size: 1.15rem;
    color: var(--hero-text);
}

.cta-buttons {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.6rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    border: 1px solid transparent;
}

.button:hover {
    transform: translateY(-1px);
}

.button.primary {
    background: var(--primary-color);
    color: var(--primary-contrast);
    box-shadow: 0 6px 18px rgba(15, 143, 168, 0.35);
}

.button.secondary {
    background: var(--hero-secondary-bg);
    color: var(--hero-secondary-text);
    border-color: var(--hero-secondary-border);
}

.button.secondary:hover {
    background: var(--hero-secondary-hover);
}

.requirements {
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: var(--hero-muted);
}

.hero-image {
    display: flex;
    justify-content: flex-start;
}

.hero-image img {
    width: 100%;
    height: auto;
    max-width: 380px;
    border-radius: 24px;
    box-shadow: 0 24px 60px var(--shadow);
}

/* App screenshot band directly under the hero */
.hero-screenshot {
    max-width: 1100px;
    margin: -3.5rem auto 0;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

.hero-screenshot img {
    width: 100%;
    height: auto;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    box-shadow: 0 30px 70px var(--shadow);
}

/* Marketing screenshots */
.showcase {
    padding: 4rem 1.5rem 5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.showcase h2 {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 2rem;
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.showcase-card {
    margin: 0;
    background: var(--card-color);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 24px var(--shadow);
}

.showcase-card img {
    width: 100%;
    height: auto;
    border-bottom: 1px solid var(--border-color);
    cursor: zoom-in;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    cursor: zoom-out;
}

.lightbox.open {
    display: flex;
}

.lightbox img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
    object-fit: contain;
    cursor: default;
    pointer-events: none;
}

.lightbox-close {
    position: fixed;
    top: 1rem;
    right: 1.25rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.75;
    padding: 0;
}

.lightbox-close:hover {
    opacity: 1;
}

.showcase-card figcaption {
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Features */
.features {
    padding: 4.5rem 1.5rem;
    background: var(--surface-color);
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
}

.feature-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--card-color);
    padding: 2rem;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px var(--shadow);
}

.feature-icon {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.feature-card p {
    color: var(--text-muted);
}

/* FAQ */
.faq {
    padding: 4.5rem 1.5rem;
    background: var(--background-color);
}

.faq-inner {
    max-width: 820px;
    margin: 0 auto;
}

.faq-inner h2 {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 2rem;
}

.faq-item {
    margin-bottom: 1.25rem;
    padding: 1.5rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.faq-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.6rem;
    font-size: 1.1rem;
}

.faq-item p {
    color: var(--text-muted);
}

/* Footer */
footer {
    padding: 2.5rem 1.5rem;
    text-align: center;
    background: var(--footer-bg);
    color: var(--footer-text);
}

.footer-links {
    margin-top: 1rem;
}

.footer-links a {
    display: none;
    color: var(--footer-text);
    margin: 0 1rem;
    text-decoration: none;
}

.footer-links a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-links a.active {
    display: inline;
}

.footer-links a.de {
    display: none;
}

.footer-links a.en {
    display: inline;
}

/* Legal pages */
.legal-content {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.legal-content h1 {
    margin-bottom: 2rem;
}

.legal-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.legal-content p,
.legal-content address {
    margin-bottom: 1rem;
    line-height: 1.6;
    font-style: normal;
}

.contact-email {
    color: var(--primary-color);
    font-weight: 600;
}

.contact-email a {
    color: inherit;
    text-decoration: none;
}

.contact-email a:hover {
    text-decoration: underline;
}

.lang-link {
    padding: 4px 8px;
    text-decoration: none;
    color: inherit;
    opacity: 0.7;
}

.lang-link.active {
    opacity: 1;
    font-weight: bold;
}

/* Mobile menu button */
.menu-button {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: inherit;
}

.menu-button span {
    display: block;
    width: 25px;
    height: 3px;
    background: currentColor;
    margin: 5px 0;
    transition: 0.3s;
}

/* Mobile styles */
@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 3rem 1.5rem;
        gap: 2.5rem;
    }

    .hero-content {
        margin: 0 auto;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .cta-buttons {
        justify-content: center;
    }

    .hero-image {
        order: -1;
        justify-content: center;
    }

    .hero-image img {
        max-width: 240px;
    }

    .hero-screenshot {
        margin-top: -1.5rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--background-color);
        padding: 1rem;
        flex-direction: column;
        box-shadow: 0 2px 5px var(--shadow);
        z-index: 1;
    }

    .nav-links.active {
        display: flex !important;
    }

    .nav-links a {
        padding: 0.5rem 0;
        width: 100%;
        text-align: center;
    }

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

    .menu-button.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-button.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .menu-button {
        display: block;
        z-index: 2;
    }
}

/* Markdown content (privacy policy) */
.content-container {
    max-width: 820px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

.content-container h1 {
    margin-bottom: 0.5rem;
}

.content-container h2 {
    margin: 2rem 0 1rem;
}

.content-container h3 {
    margin: 1.5rem 0 0.75rem;
}

.content-container ul,
.content-container ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.content-container p {
    margin: 1rem 0;
    line-height: 1.6;
}

.content-container li {
    margin: 0.5rem 0;
}

.content-container code {
    background: var(--surface-color);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.content-container a {
    color: var(--primary-color);
    text-decoration: none;
}

.content-container a:hover {
    text-decoration: underline;
}

/* Releases / downloads */
.releases-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
}

.releases-intro {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.release-card {
    background: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 4px 14px var(--shadow);
}

.release-version {
    font-size: 1.35rem;
    margin: 0.5rem 0;
}

.release-build {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.95rem;
}

.release-meta {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.release-checksum {
    margin-top: 1.25rem;
    font-size: 0.9rem;
}

.release-checksum code {
    display: block;
    word-break: break-all;
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

.releases-history-heading {
    margin: 2rem 0 1rem;
}

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

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

.releases-table th {
    color: var(--text-muted);
    font-weight: 600;
}

.releases-table .sha-cell {
    font-size: 0.72rem;
    word-break: break-all;
}

.releases-empty {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.releases-footer-note {
    margin-top: 2.5rem;
}
