/* ===========================
   VARIABLEN & GRUNDEINSTELLUNGEN
   Farben, Typografie, Abstände
   =========================== */
:root {
    /* Farben abgeleitet aus typischen Reise/iOS-Apps */
    --color-primary: #007AFF; /* iOS Blue */
    --color-primary-dark: #0056b3;
    --color-bg-light: #F5F5F7; /* Apple Light Gray */
    --color-bg-white: #FFFFFF;
    --color-text-main: #1D1D1F; /* Apple Dark Gray */
    --color-text-muted: #86868B;
    --color-accent: #FF9500; /* Orange Accent */
    
    /* Typografie */
    --font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    
    /* Layout */
    --container-max-width: 1200px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Schatten & Radien */
    --border-radius-sm: 12px;
    --border-radius-md: 24px;
    --border-radius-lg: 36px;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* ===========================
   DARK MODE – CSS-Variablen
   =========================== */
@media (prefers-color-scheme: dark) {
    :root {
        --color-bg-light: #1C1C1E;
        --color-bg-white: #000000;
        --color-text-main: #F5F5F7;
        --color-text-muted: #98989D;
        --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.5);
    }
}

/* ===========================
   RESET & BASIS-STYLES
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    color: var(--color-text-main);
    background-color: var(--color-bg-white);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

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

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

.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* ===========================
   STICKY NAVIGATION
   =========================== */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    transition: background-color 0.3s ease;
}

@media (prefers-color-scheme: dark) {
    .site-nav {
        background-color: rgba(0, 0, 0, 0.82);
        border-bottom-color: rgba(255, 255, 255, 0.08);
    }
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

/* Rechte Nav-Gruppe: Desktop = Links + Sprache + (Mobil) Menü; Mobil bleibt Sprachumschalter neben dem Hamburger sichtbar, nicht im Vollbild-Overlay. */
.nav-end {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--spacing-md);
    flex: 1;
    min-width: 0;
}

.nav-logo {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    line-height: 1;
    font-weight: 700;
    font-size: 1.0625rem;
    color: var(--color-text-main);
    letter-spacing: -0.02em;
    transition: color 0.2s ease;
}

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

/* Kleines App-Icon in der Nav: auf Unterseiten immer sichtbar; auf der Startseite erst, wenn der Hero (großes Icon) aus dem Sichtfeld ist. */
.nav-logo__icon-wrap {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    width: 26px;
    height: 26px;
    opacity: 1;
    transition: width 0.28s ease, opacity 0.22s ease, margin 0.28s ease;
}

.nav-logo__icon {
    display: block;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

body.has-hero-app-icon .site-nav:not(.nav-app-icon-visible) .nav-logo__icon-wrap {
    width: 0;
    height: 0;
    opacity: 0;
    margin-inline-end: -0.5rem;
}

@media (prefers-reduced-motion: reduce) {
    .nav-logo__icon-wrap {
        transition: none;
    }
}

.nav-logo__text {
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.nav-link {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: color 0.2s ease;
}

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

.nav-cta-btn {
    background-color: var(--color-primary);
    color: #fff;
    padding: 0.45rem 1.1rem;
    border-radius: 980px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.nav-cta-btn:hover {
    background-color: var(--color-primary-dark);
    color: #fff;
    transform: none;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--color-text-main);
    z-index: 101;
}

.mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--color-bg-white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.3s ease;
        z-index: 100;
        gap: var(--spacing-lg);
    }

    .nav-links.is-open {
        right: 0;
    }

    .nav-link {
        font-size: 1.25rem;
    }
    
    .nav-cta-btn {
        font-size: 1.125rem;
        padding: 0.75rem 1.5rem;
    }

    .lang-switcher {
        padding: 0.25rem 0.5rem;
        font-size: 0.8125rem;
    }
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Desktop: gleiche Reihenfolge wie zuvor (… Support → Sprache → CTA), obwohl Sprache im DOM außerhalb von .nav-links steht. */
@media (min-width: 769px) {
    .nav-end .nav-links {
        display: contents;
    }

    .nav-end .nav-links > .nav-link {
        order: 0;
    }

    .nav-end .lang-switcher {
        order: 1;
    }

    .nav-end .nav-cta-btn {
        order: 2;
    }

    .nav-end .mobile-menu-toggle {
        order: 3;
    }
}

.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.65rem;
    border: 1.5px solid color-mix(in srgb, var(--color-text-muted) 30%, transparent);
    border-radius: 980px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
    white-space: nowrap;
}

.lang-switcher svg {
    flex-shrink: 0;
    border-radius: 2px;
}

.lang-switcher:hover {
    color: var(--color-text-main);
    border-color: color-mix(in srgb, var(--color-text-muted) 60%, transparent);
    background-color: color-mix(in srgb, var(--color-text-muted) 6%, transparent);
}

/* ===========================
   TYPOGRAFIE
   =========================== */
h1, h2, h3, h4 {
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.2;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
}

p {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-md);
}

/* ===========================
   HERO-SEKTION
   =========================== */
.hero-section {
    padding: var(--spacing-xl) 0 var(--spacing-lg);
    background: linear-gradient(180deg, var(--color-bg-light) 0%, var(--color-bg-white) 100%);
    /* Nur horizontal begrenzen: vertikales clip würde die untere Display-Abrundung der Mockups abschneiden */
    overflow-x: hidden;
    overflow-y: visible;
}

.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin-bottom: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (min-width: 1024px) {
    .hero-container {
        flex-direction: row;
        text-align: left;
        gap: var(--spacing-lg);
        align-items: center;
    }

    .hero-content {
        align-items: flex-start;
        margin-bottom: 0;
        flex: 1 1 auto;
        max-width: 560px;
    }

    .hero-subtext {
        margin-left: 0;
        margin-right: 0;
    }

    .hero-visual {
        flex: 0 0 auto;
    }
}

.app-icon {
    width: 120px;
    height: 120px;
    border-radius: 28px;
    margin-bottom: var(--spacing-md);
}

.app-icon.small {
    width: 80px;
    height: 80px;
    border-radius: 18px;
}

.hero-headline {
    color: var(--color-text-main);
}

.hero-subtext {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto var(--spacing-md);
}

.app-store-btn {
    display: inline-block;
    transition: transform 0.2s ease;
}

.app-store-btn:hover {
    transform: scale(1.05);
}

.mt-4 {
    margin-top: var(--spacing-md);
}

/* iPhone Mockup CSS */
.iphone-mockup {
    position: relative;
    width: 300px;
    height: 621px;
    background-color: #000;
    border-radius: 40px;
    padding: 12px;
    box-shadow: var(--shadow-lg);
    margin: 0 auto;
    border: 4px solid #e5e5ea;
    /* Screenshot + Innenfläche sauber an den Geräteradius klammern */
    overflow: hidden;
}

.iphone-mockup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 25px;
    background-color: #000;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    z-index: 2;
}

.mockup-screen {
    width: 100%;
    height: 100%;
    /* Innenradius = Außenradius minus Polsterung (konzentrisch zum Rahmen) */
    border-radius: 28px;
    /* Zuverlässige Abrundung der Bitmap (u. a. bei object-fit / WebKit) */
    clip-path: inset(0 round 28px);
    object-fit: cover;
    background-color: var(--color-bg-white);
    overflow: hidden;
}

.iphone-mockup.mini {
    width: 250px;
    height: 518px;
    border-radius: 36px;
    padding: 10px;
}

.iphone-mockup.mini .mockup-screen {
    border-radius: 26px;
    clip-path: inset(0 round 26px);
}

/* Notch proportional zum kleinen Mockup */
.iphone-mockup.mini::before {
    width: 84px;
    height: 20px;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* ===========================
   FEATURES-SEKTION
   =========================== */
.features-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-bg-white);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--spacing-lg);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: var(--spacing-md);
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-card {
    background-color: var(--color-bg-light);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 52px;
    height: 52px;
    background-color: rgba(0, 122, 255, 0.1);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary);
    flex-shrink: 0;
}

.feature-icon svg {
    width: 26px;
    height: 26px;
}

.feature-card p {
    font-size: 1rem;
    margin-bottom: 0;
}

.feature-card p strong {
    color: var(--color-text-main);
    font-weight: 600;
}

.features-pro-note {
    max-width: 640px;
    margin: var(--spacing-lg) auto 0;
    padding: var(--spacing-md) var(--spacing-md);
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--color-text-muted);
    text-align: center;
    background-color: var(--color-bg-light);
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 0;
}

.features-pro-note strong {
    color: var(--color-text-main);
}

/* ===========================
   SCREENSHOT-GALERIE
   =========================== */
.gallery-section {
    padding: var(--spacing-xl) 0 calc(var(--spacing-xl) + var(--spacing-sm));
    background-color: var(--color-bg-light);
    overflow-x: hidden;
    overflow-y: visible;
}

.gallery-scroll-wrapper {
    position: relative;
    width: 100%;
}

/* Weicher Verlauf links/rechts: mehr Inhalt andeuten */
.gallery-scroll-wrapper::before,
.gallery-scroll-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: clamp(24px, 5vw, 48px);
    z-index: 1;
    pointer-events: none;
}

.gallery-scroll-wrapper::before {
    left: 0;
    background: linear-gradient(90deg, var(--color-bg-light) 0%, transparent 100%);
}

.gallery-scroll-wrapper::after {
    right: 0;
    background: linear-gradient(270deg, var(--color-bg-light) 0%, transparent 100%);
}

.gallery-scroll-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    padding: var(--spacing-md) 0 var(--spacing-lg);
    scroll-snap-type: x mandatory;
    scroll-padding-inline: max(var(--spacing-md), calc((100vw - min(100vw, var(--container-max-width))) / 2 + var(--spacing-md)));
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.gallery-scroll-container::-webkit-scrollbar {
    display: none;
}

.gallery-track {
    display: flex;
    align-items: stretch;
    gap: clamp(var(--spacing-md), 4vw, var(--spacing-lg));
    padding-inline: max(var(--spacing-md), calc((100vw - min(100vw, var(--container-max-width))) / 2 + var(--spacing-md)));
    width: max-content;
    min-height: 100%;
}

.gallery-item {
    flex: 0 0 auto;
    scroll-snap-align: center;
    scroll-snap-stop: normal;
}

.gallery-device {
    margin: 0;
    padding: 0;
    border: 0;
}

/* Galerie-Gerät: sauberer Rahmen, feste iPhone-ähnliche Proportionen (9 : 19,5) */
.iphone-mockup.mini.gallery-mockup {
    --max-frame-h: min(82vh, 520px);
    --frame-w: min(232px, 70vw, calc((var(--max-frame-h) - 18px) * 390 / 844 + 18px));
    width: var(--frame-w);
    height: calc((var(--frame-w) - 18px) * 844 / 390 + 18px);
    padding: 9px;
    border-radius: 36px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.04),
        0 12px 28px rgba(0, 0, 0, 0.1),
        0 24px 48px rgba(0, 0, 0, 0.08);
    margin: 0;
    overflow: hidden;
    background: linear-gradient(145deg, #2c2c2e 0%, #0d0d0d 45%, #1c1c1e 100%);
}

.iphone-mockup.mini.gallery-mockup::before {
    width: 34%;
    max-width: 88px;
    height: 18px;
    border-bottom-left-radius: 11px;
    border-bottom-right-radius: 11px;
}

.iphone-mockup.mini.gallery-mockup .mockup-screen.gallery-screen {
    border-radius: 27px;
    clip-path: inset(0 round 27px);
    object-fit: cover;
    object-position: center top;
    background-color: #000;
    overflow: hidden;
}

/* ===========================
   SOCIAL PROOF
   =========================== */
.social-proof-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-bg-white);
    text-align: center;
}

.proof-content {
    max-width: 800px;
    margin: 0 auto;
}

.stats-row {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

@media (min-width: 768px) {
    .stats-row {
        flex-direction: row;
        justify-content: space-around;
    }
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.stat-number--word {
    font-size: clamp(2.25rem, 5vw, 3.25rem);
    letter-spacing: -0.03em;
}

.stat-label {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    font-weight: 500;
    margin-top: var(--spacing-xs);
}

/* ===========================
   FINALER CTA
   =========================== */
.cta-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-bg-light);
    text-align: center;
}

.cta-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 600px;
}

/* ===========================
   DARK MODE – komponentenspezifische Overrides
   =========================== */
@media (prefers-color-scheme: dark) {
    .iphone-mockup {
        border-color: #3A3A3C;
    }

    .feature-icon {
        background-color: rgba(10, 132, 255, 0.15);
    }

    .feature-card {
        background-color: #1C1C1E;
    }

    .features-pro-note {
        background-color: #1C1C1E;
        border-color: rgba(255, 255, 255, 0.07);
    }

    .site-footer {
        border-top-color: #2C2C2E;
    }

    .gallery-scroll-wrapper::before {
        background: linear-gradient(90deg, var(--color-bg-light) 0%, transparent 100%);
    }

    .gallery-scroll-wrapper::after {
        background: linear-gradient(270deg, var(--color-bg-light) 0%, transparent 100%);
    }
}

/* ===========================
   FOOTER
   =========================== */
.site-footer {
    padding: var(--spacing-md) 0;
    background-color: var(--color-bg-white);
    border-top: 1px solid #E5E5EA;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

@media (min-width: 768px) {
    .footer-container {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (min-width: 768px) {
    .footer-brand {
        align-items: flex-start;
    }
}

.app-name {
    font-weight: 600;
    color: var(--color-text-main);
}

.copyright {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.footer-links {
    display: flex;
    gap: var(--spacing-md);
}

.footer-links a {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

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