@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    /* Color Palette - Medical Blue & Digital Violet */
    --primary: #1E88E5;
    --primary-light: #42A5F5;
    --primary-dark: #1565C0;
    --secondary: #4200FF;
    
    --bg-white: #ffffff;
    --bg-soft: #e6f6ff; /* Match Stitch design surface-container-low */
    
    --text-main: #111827; /* Deep slate */
    --text-muted: #6B7280;
    --text-white: #ffffff;
    
    --border-soft: rgba(255, 255, 255, 0.3);
    --border-glass: 1px solid rgba(255, 255, 255, 0.4);
    
    /* Spacing & Sizing */
    --section-padding: 80px 20px;
    --container-width: 1200px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    
    /* Shadows - Ambient & Diffused */
    --shadow-sm: 0 4px 6px rgba(30, 136, 229, 0.05);
    --shadow-md: 0 10px 20px rgba(30, 136, 229, 0.08);
    --shadow-lg: 0 20px 40px rgba(30, 136, 229, 0.12);
    --header-height: 60px;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-blur: blur(12px);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

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

body {
    font-family: 'Manrope', sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-soft);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

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

.text-gradient {
    background: linear-gradient(to right, #1E88E5, #38D3C8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

ul {
    list-style: none;
}

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

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 9999px; /* Pill-shaped */
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background: linear-gradient(to right, #1E88E5, #38D3C8);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
}

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

.btn-outline:hover {
    background: rgba(30, 136, 229, 0.05);
}

.btn-conversion {
    background: linear-gradient(to right, #1E88E5, #38D3C8);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-conversion:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: #3600cc;
}

/* Header */
header {
    padding: 10px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border-bottom: var(--border-glass);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.03em;
}

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

.nav-links a {
    font-weight: 600;
    color: var(--text-main);
}

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

/* Header right-hand group (nav + language switcher) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Language switcher — compact custom dropdown, in-flow with the header */
.lang-switch {
    position: relative;
}

/* Trigger reads as a plain nav link — no pill, no border — so it sits
   in-flow with the other header links instead of competing with the CTA. */
.lang-switch__trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
    background: transparent;
    border: none;
    padding: 6px 4px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.lang-switch__trigger:hover,
.lang-switch.is-open .lang-switch__trigger {
    color: var(--primary);
}

.lang-switch__trigger:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    border-radius: 4px;
}

.lang-switch__icon {
    color: var(--primary);
    flex: none;
    display: block;
}

.lang-switch__code {
    letter-spacing: 0.05em;
    font-weight: 700;
}

.lang-switch__chevron {
    color: var(--text-muted);
    flex: none;
    display: block;
    transition: transform 0.2s ease, color 0.2s ease;
}

.lang-switch.is-open .lang-switch__chevron {
    transform: rotate(180deg);
    color: var(--primary);
}

.lang-switch__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 168px;
    background: #ffffff;
    border: 1px solid rgba(30, 136, 229, 0.12);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    padding: 6px;
    margin: 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    z-index: 1001;
}

.lang-switch.is-open .lang-switch__menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-switch__menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 9px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-main);
    transition: background 0.15s ease, color 0.15s ease;
}

.lang-switch__menu a:hover {
    background: rgba(30, 136, 229, 0.07);
    color: var(--primary);
}

.lang-switch__menu a.is-active {
    color: var(--primary);
    font-weight: 700;
}

.lang-switch__check {
    font-size: 0.8125rem;
    color: var(--primary);
    font-weight: 700;
}

.lang-switch__noscript select {
    font-family: inherit;
    font-size: 0.875rem;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid rgba(30, 136, 229, 0.25);
}

/* Mobile menu toggle (hamburger) */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 8px;
}

.menu-toggle .bar {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: var(--transition);
}

.menu-toggle:hover .bar {
    background: var(--primary);
}

.menu-toggle.is-open .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open .bar:nth-child(2) { opacity: 0; }
.menu-toggle.is-open .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu panel */
.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid rgba(30, 136, 229, 0.12);
    box-shadow: var(--shadow-lg);
    padding: 20px;
    z-index: 999;
    max-height: calc(100vh - 75px);
    overflow-y: auto;
}

.mobile-menu.is-open { display: block; }

.mobile-menu__nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 20px;
}

.mobile-menu__nav a {
    display: block;
    padding: 14px 16px;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-main);
    border-radius: 10px;
    transition: var(--transition);
}

.mobile-menu__nav a:hover {
    background: rgba(30, 136, 229, 0.07);
    color: var(--primary);
}

.mobile-menu__nav .btn {
    margin-top: 8px;
    text-align: center;
}

.mobile-menu__lang {
    border-top: 1px solid rgba(30, 136, 229, 0.12);
    padding-top: 16px;
}

.mobile-menu__lang-title {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.mobile-menu__lang-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mobile-menu__lang-list a {
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-main);
    border: 1px solid rgba(30, 136, 229, 0.25);
    transition: var(--transition);
}

.mobile-menu__lang-list a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.mobile-menu__lang-list a.is-active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* Visually hidden, still announced by screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Hero Section */
.hero {
    padding-top: var(--header-height);
    background-color: #EEF9F9;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-bottom: 60px;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    max-width: 500px;
    font-weight: 400;
}

.hero-image {
    position: relative;
}

.hero-image img,
.hero-image video {
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Features Section */
.features {
    padding: var(--section-padding);
}

.features-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: center;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 80px; /* Generous gap */
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    padding: 40px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: var(--border-glass);
}

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

.feature-icon {
    width: 56px;
    height: 56px;
    background: rgba(30, 136, 229, 0.1);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--primary);
    font-size: 1.5rem;
}

.feature-card h3 {
    font-size: 1.25rem;
}

/* How It Works */
.how-it-works {
    padding: var(--section-padding);
    background-color: white; /* Contrast layer */
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 80px;
}

.step {
    text-align: center;
    position: relative;
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-weight: 800;
    font-size: 1.25rem;
    box-shadow: var(--shadow-sm);
}

/* Footer */
footer {
    background: var(--text-main);
    color: white;
    padding: 80px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

/* i18n: allow grid columns to shrink and let long compound words
   (e.g. German "Datenschutzerklärung") wrap instead of widening the grid.
   hyphens:auto uses the page's <html lang> for correct hyphenation. */
.footer-col {
    min-width: 0;
    overflow-wrap: break-word;
    hyphens: auto;
}

.footer-links li {
    margin-bottom: 16px; /* Airy spacing */
}

.footer-links a {
    color: #9CA3AF;
    font-weight: 500;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 40px;
    text-align: center;
    color: #6B7280;
    font-size: 0.875rem;
}

/* Inputs & Forms - Not strictly in index but part of system */
input, textarea {
    background: #F3F4F6;
    border: 1px solid transparent;
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    font-family: 'Manrope', sans-serif;
    width: 100%;
    transition: var(--transition);
}

input:focus, textarea:focus {
    outline: none;
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

/* Responsive */
@media (max-width: 992px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 40px;
    }
    .hero-image {
        order: 1;
        display: flex;
        justify-content: center !important;
        margin-bottom: 40px;
    }
    .hero-content {
        order: 2;
    }
    .hero-btns {
        justify-content: center;
    }
    .features-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    .hero-content p {
        margin: 0 auto 2.5rem;
    }
    .features-grid {
        grid-template-columns: 1fr 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }
    .steps {
        grid-template-columns: 1fr;
    }
    .nav-links {
        display: none;
    }
    /* Hide desktop nav + language switcher; show hamburger menu instead */
    .header-actions {
        display: none;
    }
    .menu-toggle {
        display: flex;
    }
}
