/* ═══════════════════════════════════════════════════════════════════════════
   CURIA Watch — Globales Stylesheet
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── D-DIN Webfont ─────────────────────────────────────────────────────── */

@font-face {
    font-family: 'D-DIN';
    src: url('webfonts/d-din-webfont.woff2') format('woff2'),
         url('webfonts/d-din-webfont.woff') format('woff'),
         url('webfonts/d-din-webfont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'D-DIN';
    src: url('webfonts/d-din-bold-webfont.woff2') format('woff2'),
         url('webfonts/d-din-bold-webfont.woff') format('woff'),
         url('webfonts/d-din-bold-webfont.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'D-DIN';
    src: url('webfonts/d-din-italic-webfont.woff2') format('woff2'),
         url('webfonts/d-din-italic-webfont.woff') format('woff'),
         url('webfonts/d-din-italic-webfont.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

/* ─── Reset & Base ──────────────────────────────────────────────────────── */

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

:root {
    --primary:       #003189;
    --primary-light: #0050a0;
    --primary-dark:  #001f5c;
    --gold:          #f0c040;
    --bg:            #eef2f7;
    --surface:       #ffffff;
    --border:        #dde3ef;
    --text:          #111827;
    --text-muted:    #6b7280;
    --success:       #059669;
    --success-bg:    #ecfdf5;
    --error:         #dc2626;
    --error-bg:      #fef2f2;
    --warning:       #d97706;
    --warning-bg:    #fffbeb;
    --radius:        12px;
    --shadow:        0 4px 24px rgba(0, 0, 0, 0.09);
}

html { font-size: 16px; }

body {
    font-family: 'D-DIN', -apple-system, BlinkMacSystemFont, 'Arial', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

/* Zentriertes Layout für confirm.php / unsubscribe.php */
body.page-centered {
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* ─── Header ─────────────────────────────────────────────────────────────── */

.site-header {
    background: var(--primary);
    padding: 0;
}
.site-header-inner {
    max-width: 680px;
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.site-header .logo-stars {
    font-size: 22px;
    opacity: 0.9;
}
.site-header .logo-text {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: -0.3px;
}
.site-header .logo-sub {
    margin-left: auto;
    color: #93b8e0;
    font-size: 12px;
    font-weight: 500;
}

/* ─── Main ───────────────────────────────────────────────────────────────── */

main {
    flex: 1;
    max-width: 680px;
    margin: 40px auto 32px;
    padding: 0 24px;
    width: 100%;
}

/* ─── Hero ───────────────────────────────────────────────────────────────── */

.hero {
    text-align: center;
    margin-bottom: 36px;
}
.hero h1 {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary);
    letter-spacing: -0.5px;
    line-height: 1.3;
    margin-bottom: 12px;
}
.hero p {
    font-size: 15px;
    color: var(--text-muted);
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ─── Card ───────────────────────────────────────────────────────────────── */

.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* Variante für zentrierte Seiten (confirm/unsubscribe) */
.card-centered {
    background: var(--surface);
    border-radius: 16px;
    box-shadow: 0 4px 28px rgba(0, 0, 0, 0.1);
    padding: 48px 40px;
    max-width: 500px;
    width: 100%;
    text-align: center;
}

.card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 20px 28px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.card-header h2 {
    color: #fff;
    font-size: 16px;
    font-weight: bold;
}
.card-header .icon {
    font-size: 18px;
}
.card-body {
    padding: 28px;
}

/* ─── Form ───────────────────────────────────────────────────────────────── */

.form-group {
    margin-bottom: 20px;
}
label {
    display: block;
    font-size: 13px;
    font-weight: bold;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: 0.1px;
}
label .hint {
    font-weight: normal;
    color: var(--text-muted);
    margin-left: 4px;
}
input[type="email"],
input[type="text"] {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}
input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 49, 137, 0.12);
}
input.valid   { border-color: var(--success); }
input.invalid { border-color: var(--error); }

/* ─── Case Validation Feedback ───────────────────────────────────────────── */

.case-feedback {
    margin-top: 8px;
    min-height: 22px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.case-feedback.loading   { color: var(--text-muted); }
.case-feedback.found     { color: var(--success); }
.case-feedback.not-found { color: var(--error); }
.case-feedback .spinner {
    width: 14px;
    height: 14px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    display: inline-block;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 28px;
    font-size: 15px;
    font-weight: bold;
    font-family: inherit;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s, opacity 0.15s;
    text-decoration: none;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
    width: 100%;
}
.btn-primary:hover:not(:disabled) { background: var(--primary-light); }
.btn-primary:active:not(:disabled) { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

/* Varianten für confirm/unsubscribe */
.btn-inline {
    display: inline-block;
    padding: 14px 32px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    margin-top: 8px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    width: 100%;
}
.btn-inline:hover { background: var(--primary-light); }
.btn-danger  { background: var(--error) !important; }
.btn-outline {
    background: transparent !important;
    color: var(--primary) !important;
    border: 2px solid var(--primary) !important;
    margin-top: 10px;
}
.btn-sm {
    display: inline-block;
    padding: 12px 28px;
    font-size: 14px;
    width: auto;
}
.btn-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* ─── Flash / Alert ──────────────────────────────────────────────────────── */

.alert {
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.alert-success { background: var(--success-bg); color: #065f46; border: 1px solid #a7f3d0; }
.alert-error   { background: var(--error-bg);   color: #991b1b; border: 1px solid #fca5a5; }
.alert-info    { background: #eff6ff;            color: #1e40af; border: 1px solid #bfdbfe; }
.alert-icon    { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

/* ─── How it works ───────────────────────────────────────────────────────── */

.how-it-works {
    margin-top: 32px;
}
.how-it-works h3 {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 16px;
}
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.step {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px 16px;
    text-align: center;
}
.step .step-num {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
}
.step h4 {
    font-size: 13px;
    font-weight: bold;
    color: var(--text);
    margin-bottom: 4px;
}
.step p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ─── Doc type pills ─────────────────────────────────────────────────────── */

.doc-types {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}
.pill {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    background: #f0f4ff;
    color: var(--primary);
    border: 1px solid #d4e0ff;
}

/* ─── Icon Circles (confirm / unsubscribe) ───────────────────────────────── */

.icon-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 24px;
}
.icon-success  { background: #d1fae5; }
.icon-error    { background: #fee2e2; }
.icon-info     { background: #dbeafe; }
.icon-question { background: #ede9fe; }
.icon-warn     { background: #fef3c7; }

/* Typografie für zentrierte Seiten */
.card-centered h1 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 12px;
}
.card-centered p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 12px;
}
.case-box {
    background: #f0f5ff;
    border-left: 4px solid var(--primary);
    border-radius: 0 8px 8px 0;
    padding: 14px 18px;
    text-align: left;
    margin: 20px 0;
}
.case-ref  { font-size: 20px; font-weight: bold; color: var(--primary); }
.case-name { font-size: 14px; color: var(--text-muted); margin-top: 4px; font-style: italic; }
.notice {
    font-size: 12px;
    color: #9ca3af;
    background: #f9fafb;
    border-radius: 6px;
    padding: 10px 14px;
    margin-top: 20px;
    text-align: left;
    line-height: 1.5;
}
.link { color: var(--primary); text-decoration: none; font-size: 14px; }

/* ─── Pre-Footer ─────────────────────────────────────────────────────────── */

.pre-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 28px 24px;
}
.pre-footer-inner {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.pre-footer-logos {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}
.pre-footer-logos img {
    height: 40px;
    width: auto;
    display: block;
}
.pre-footer-text {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    flex: 1;
    min-width: 220px;
}
.pre-footer-text .check-icon {
    color: var(--success);
    margin-right: 6px;
    font-size: 14px;
}
.footer-linkedin {
    color: #0a66c2;
    text-decoration: none;
    font-weight: bold;
}
.footer-linkedin:hover { text-decoration: underline; }
.footer-linkedin i { font-style: normal; }

/* ─── Footer ─────────────────────────────────────────────────────────────── */

.site-footer {
    text-align: center;
    padding: 20px 24px;
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg);
}
.site-footer a {
    color: var(--primary);
    text-decoration: none;
}
.site-footer a:hover { text-decoration: underline; }
.site-footer .separator { margin: 0 6px; opacity: 0.5; }

/* ─── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 540px) {
    main { margin: 24px auto; }
    .hero h1 { font-size: 22px; }
    .steps { grid-template-columns: 1fr; gap: 10px; }
    .card-body { padding: 20px; }
    .card-centered { padding: 32px 24px; }
    .site-header .logo-sub { display: none; }
    .pre-footer-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
    .pre-footer-logos img { height: 32px; }
}
