/* =====================================================================
   GastroScan.at - Globale Styles (Marketing + Auth + Errors)
   Mobile-first, modern, premium
===================================================================== */

:root {
    --color-primary: #FF6B35;
    --color-primary-dark: #E85A24;
    --color-primary-light: #FFB627;
    --color-accent: #FFB627;
    --color-bg: #FFFFFF;
    --color-bg-soft: #FAF7F2;
    --color-bg-muted: #F1F5F9;
    --color-text: #0F172A;
    --color-text-soft: #475569;
    --color-text-muted: #94A3B8;
    --color-border: #E2E8F0;
    --color-success: #16A34A;
    --color-warning: #F59E0B;
    --color-danger: #DC2626;
    --color-info: #0EA5E9;
    --shadow-sm: 0 1px 2px rgba(15,23,42,.06);
    --shadow: 0 4px 12px rgba(15,23,42,.08);
    --shadow-lg: 0 12px 32px rgba(15,23,42,.12);
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --container: 1200px;
    --font-sans: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";
    --transition: 200ms cubic-bezier(.2,.8,.2,1);
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-dark); }

h1,h2,h3,h4,h5,h6 { margin: 0 0 .5em; line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(1.8rem, 4vw + .5rem, 3rem); }
h2 { font-size: clamp(1.4rem, 2.5vw + .5rem, 2rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1em; }

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

/* ----- Header / Nav ------------------------------------------------ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,.92);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--color-border);
}

.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--color-text); }
.brand-mark {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    display: grid; place-items: center; color: #fff; font-weight: 800;
}
.nav-links { display: none; gap: 24px; align-items: center; }
.nav-links a { color: var(--color-text-soft); font-weight: 500; }
.nav-links a:hover, .nav-links a.active { color: var(--color-text); }
.nav-cta { display: flex; gap: 10px; }

.nav-toggle {
    display: inline-flex;
    width: 42px; height: 42px;
    border: 1px solid var(--color-border);
    background: #fff;
    border-radius: 10px;
    align-items: center; justify-content: center;
    cursor: pointer;
}
.nav-toggle span {
    display: block; width: 18px; height: 2px;
    background: var(--color-text); position: relative;
}
.nav-toggle span::before, .nav-toggle span::after {
    content: ""; position: absolute; left: 0; right: 0; height: 2px; background: var(--color-text);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after  { top: 6px; }

@media (min-width: 880px) {
    .nav-links { display: flex; }
    .nav-toggle { display: none; }
}

.mobile-nav { display: none; padding: 12px 20px 20px; border-bottom: 1px solid var(--color-border); background: #fff; }
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; padding: 12px 4px; color: var(--color-text); border-bottom: 1px solid var(--color-border); }
.mobile-nav .btn { margin-top: 12px; width: 100%; justify-content: center; }

/* ----- Buttons ----------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform var(--transition), background var(--transition), box-shadow var(--transition), color var(--transition);
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--color-primary); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--color-primary-dark); color: #fff; box-shadow: var(--shadow-lg); }
.btn-secondary { background: var(--color-bg-soft); color: var(--color-text); border-color: var(--color-border); }
.btn-secondary:hover { background: #fff; box-shadow: var(--shadow); color: var(--color-text); }
.btn-ghost { background: transparent; color: var(--color-text); }
.btn-ghost:hover { background: var(--color-bg-soft); color: var(--color-text); }
.btn-danger { background: var(--color-danger); color: #fff; }
.btn-danger:hover { background: #B91C1C; color: #fff; }
.btn-success { background: var(--color-success); color: #fff; }
.btn-success:hover { background: #15803D; color: #fff; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 16px 28px; font-size: 17px; }
.btn-block { display: flex; width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ----- Forms ------------------------------------------------------- */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--color-text); }
.form-help { font-size: 13px; color: var(--color-text-muted); margin-top: 4px; }
.form-error { font-size: 13px; color: var(--color-danger); margin-top: 4px; }

.form-control,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius);
    background: #fff;
    color: var(--color-text);
    transition: border-color var(--transition), box-shadow var(--transition);
    -webkit-appearance: none;
    appearance: none;
}
.form-textarea { min-height: 120px; resize: vertical; }
.form-control:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(255,107,53,.12);
}
.form-control[type="color"] { padding: 4px; height: 44px; cursor: pointer; }

.form-row { display: grid; gap: 16px; }
@media (min-width: 720px) { .form-row.cols-2 { grid-template-columns: 1fr 1fr; } .form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; } }

.form-checkbox, .form-radio {
    display: flex; align-items: center; gap: 10px;
    cursor: pointer; padding: 8px 0;
}
.form-checkbox input, .form-radio input { width: 18px; height: 18px; }

/* ----- Cards / Layout --------------------------------------------- */
.card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-title { font-size: 1.15rem; font-weight: 700; margin: 0; }

.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    border: 1px solid;
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-success { background: #F0FDF4; border-color: #BBF7D0; color: #166534; }
.alert-error,
.alert-danger { background: #FEF2F2; border-color: #FECACA; color: #991B1B; }
.alert-info    { background: #EFF6FF; border-color: #BFDBFE; color: #1E40AF; }
.alert-warning { background: #FFFBEB; border-color: #FDE68A; color: #92400E; }

/* ----- Hero & Sections -------------------------------------------- */
.hero {
    padding: 60px 0 40px;
    background: linear-gradient(135deg, #FFF7ED 0%, #FEF3C7 100%);
    position: relative;
    overflow: hidden;
}
.hero h1 { font-size: clamp(2rem, 5vw + .5rem, 3.5rem); }
.hero .lead { font-size: clamp(1.05rem, 1vw + .5rem, 1.3rem); color: var(--color-text-soft); max-width: 720px; }
.hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

.section { padding: 64px 0; }
.section-muted { background: var(--color-bg-soft); }
.section-dark  { background: var(--color-text); color: #fff; }
.section-dark h1, .section-dark h2, .section-dark h3 { color: #fff; }
.section-title { text-align: center; margin-bottom: 32px; }
.section-title p { color: var(--color-text-soft); max-width: 640px; margin: 0 auto; }

.grid {
    display: grid;
    gap: 20px;
}
.grid.cols-2 { grid-template-columns: 1fr; }
.grid.cols-3 { grid-template-columns: 1fr; }
.grid.cols-4 { grid-template-columns: 1fr 1fr; }
@media (min-width: 720px) {
    .grid.cols-2 { grid-template-columns: 1fr 1fr; }
    .grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
    .grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
}

.feature-card {
    padding: 28px;
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    transition: transform var(--transition), box-shadow var(--transition);
}
.feature-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.feature-icon {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: 12px;
    display: grid; place-items: center;
    color: #fff;
    margin-bottom: 12px;
    font-size: 24px;
}

/* ----- Pricing ------------------------------------------------------ */
.price-card {
    padding: 32px 24px;
    background: #fff;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: transform var(--transition), border-color var(--transition);
}
.price-card.featured { border-color: var(--color-primary); position: relative; }
.price-card.featured::before {
    content: "Empfohlen";
    position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
    background: var(--color-primary); color: #fff;
    padding: 4px 16px; border-radius: 999px;
    font-size: 12px; font-weight: 700;
}
.price-amount { font-size: 2.5rem; font-weight: 800; margin: 12px 0 4px; }
.price-period { color: var(--color-text-muted); font-size: 14px; }
.price-features { list-style: none; padding: 0; margin: 24px 0; text-align: left; }
.price-features li { padding: 8px 0; border-bottom: 1px solid var(--color-border); display: flex; align-items: center; gap: 8px; }
.price-features li:last-child { border-bottom: none; }
.price-features li::before {
    content: "✓"; color: var(--color-success); font-weight: 700; flex: 0 0 auto;
}

/* ----- Auth / Forms-Page ------------------------------------------ */
.auth-wrap {
    min-height: calc(100vh - 64px);
    display: grid; place-items: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #FFF7ED 0%, #F1F5F9 100%);
}
.auth-card { width: 100%; max-width: 460px; padding: 32px; border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-lg); }
.auth-card h1 { font-size: 1.6rem; text-align: center; margin-bottom: 20px; }
.auth-card .form-meta { text-align: center; margin-top: 18px; color: var(--color-text-soft); font-size: 14px; }

/* ----- Footer ------------------------------------------------------ */
.site-footer {
    background: #0F172A;
    color: #E2E8F0;
    padding: 48px 0 20px;
    margin-top: 60px;
}
.site-footer a { color: #94A3B8; }
.site-footer a:hover { color: #fff; }
.footer-grid {
    display: grid; gap: 28px;
    grid-template-columns: 1fr;
}
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand { font-size: 1.2rem; font-weight: 800; color: #fff; margin-bottom: 8px; }
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 12px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { padding: 4px 0; }
.footer-bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid #1E293B; text-align: center; font-size: 13px; color: #64748B; }

/* ----- Cookie-Banner ---------------------------------------------- */
.cookie-banner {
    position: fixed;
    bottom: 16px; left: 16px; right: 16px;
    z-index: 100;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-lg);
    display: none;
}
.cookie-banner.visible { display: block; }
.cookie-banner h3 { font-size: 1rem; margin-bottom: 6px; }
.cookie-banner p { font-size: 13.5px; color: var(--color-text-soft); margin-bottom: 14px; }
.cookie-banner .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cookie-banner .actions .btn { flex: 1 1 auto; }
@media (min-width: 720px) {
    .cookie-banner { left: auto; right: 16px; bottom: 16px; max-width: 460px; }
    .cookie-banner .actions .btn { flex: 0 0 auto; }
}

/* ----- Utility ----------------------------------------------------- */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.text-soft  { color: var(--color-text-soft); }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.hidden { display: none !important; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--color-bg-soft); color: var(--color-text); }
.tag-primary { background: var(--color-primary); color: #fff; }

/* ----- Errors ------------------------------------------------------ */
.error-page { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 40px 20px; }
.error-page .code { font-size: 6rem; font-weight: 800; background: linear-gradient(135deg, var(--color-primary), var(--color-accent)); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }

/* ----- Globale Mobile-Anpassungen ---------------------------------- */
@media (max-width: 720px) {
    /* iOS-Auto-Zoom verhindern */
    .form-control, .form-select, .form-textarea { font-size: 16px; }
    .btn { font-size: 14px; padding: 11px 18px; min-height: 42px; }
    .btn-sm { font-size: 13px; padding: 8px 14px; min-height: 36px; }

    .hero { padding: 36px 0 28px; }
    .hero h1 { font-size: 1.8rem; }
    .hero .lead { font-size: 1rem; }
    .hero-actions { flex-direction: column; width: 100%; }
    .hero-actions .btn { width: 100%; justify-content: center; }

    .container { padding: 0 14px; }
    .auth-card { padding: 22px; }

    .site-footer { padding: 32px 0 16px; }
    .footer-grid { gap: 22px; }
}

/* iPad / Tablet */
@media (max-width: 1023px) and (min-width: 721px) {
    .grid.cols-3 { grid-template-columns: 1fr 1fr; }
    .grid.cols-4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 380px) {
    .btn { font-size: 13px; padding: 10px 14px; }
    .hero h1 { font-size: 1.5rem; }
    .auth-card h1 { font-size: 1.3rem; }
}
