:root {
    --primary-color: #c75c2a;
    --primary-light: #e8834e;
    --ink: #1a1614;
    --warm: #f8f5f0;
    --cream: #faf8f4;
    --sand: #ede8e0;
    --terracotta: #c75c2a;
    --forest: #2d5a3d;
    --slate: #5a554e;
    --mist: #9b958c;
    --text: #1a1614;
    --text-muted: #5a554e;
    --border: #ede8e0;
    --bg: #f8f5f0;
    --white: #ffffff;
    --radius: 16px;
    --shadow: 0 1px 3px rgba(26,22,20,0.04), 0 4px 16px rgba(26,22,20,0.06);
    --shadow-lg: 0 4px 12px rgba(26,22,20,0.08), 0 8px 32px rgba(26,22,20,0.06);
}

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

/* ========================================
   Auth pages (login, register etc)
   ======================================== */
.auth-container {
    max-width: 440px;
    margin: 0 auto;
    padding: 60px 20px;
}

.auth-logo {
    display: block;
    text-align: center;
    font-family: 'DM Serif Display', serif;
    font-size: 1.8rem;
    color: var(--ink);
    text-decoration: none;
    margin-bottom: 40px;
    letter-spacing: -0.02em;
}

.auth-logo span { color: var(--terracotta); }

.auth-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px;
    border: 1px solid var(--sand);
}

.auth-container h1 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.75rem;
    font-weight: 400;
    margin-bottom: 24px;
    color: var(--ink);
    letter-spacing: -0.01em;
    text-align: center;
}

/* ========================================
   Event Page Container
   ======================================== */
.page-container {
    max-width: 960px;
    margin: 0 auto;
    padding-bottom: 40px;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    position: relative;
    background: var(--primary-color);
    color: #fff;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
}

.hero-overlay {
    padding: 32px 40px 28px;
}

.hero-logo {
    max-height: 56px;
    max-width: 200px;
    margin-bottom: 16px;
    border-radius: 6px;
    background: rgba(255,255,255,0.15);
    padding: 4px;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0;
    color: #fff;
    letter-spacing: -0.02em;
}

/* ========================================
   Event Info Bar
   ======================================== */
.event-info-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.event-info-item {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 24px;
    border-right: 1px solid var(--border);
}

.event-info-item:last-child {
    border-right: none;
}

.event-info-share {
    flex: 0 0 auto;
    min-width: 0;
    margin-left: auto;
    padding: 20px 24px;
    align-items: center;
}

.event-info-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--primary-color);
}

.event-info-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.event-info-value {
    font-size: 0.925rem;
    font-weight: 500;
    color: var(--text);
}

.event-info-address {
    display: block;
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 1px;
}

/* ========================================
   Two-Column Event Layout
   ======================================== */
.event-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    padding: 24px;
}

.event-main {
    order: 1;
}

.event-sidebar {
    order: 2;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ========================================
   Registration Card (Primary CTA)
   ======================================== */
.registration-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 28px;
    border: 2px solid var(--primary-color);
    position: sticky;
    top: 24px;
}

.registration-card h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text);
}

/* ========================================
   Detail Cards (Sidebar)
   ======================================== */
.detail-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

.detail-card h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}

/* ========================================
   Section Content / Rich Text
   ======================================== */
.section-content {
    color: #555;
    font-size: 0.925rem;
    line-height: 1.75;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.rich-text p { margin-bottom: 10px; }
.rich-text p:last-child { margin-bottom: 0; }
.rich-text ul, .rich-text ol { margin-bottom: 10px; padding-left: 20px; }
.rich-text a { color: var(--primary-color); text-decoration: underline; }
.rich-text strong { font-weight: 600; }
.rich-text p, .rich-text li { overflow-wrap: anywhere; word-break: break-word; }

/* ========================================
   Venue & Map
   ======================================== */
.venue-info { margin-bottom: 12px; }
.venue-name { font-weight: 600; font-size: 0.925rem; }
.venue-address { color: var(--text-muted); font-size: 0.85rem; margin-top: 2px; }

.map-container {
    height: 220px;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 8px;
}

.maps-link {
    display: block;
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}
.maps-link:hover { text-decoration: underline; }

/* ========================================
   Directions / PDF
   ======================================== */
.pdf-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 12px;
    transition: background 0.15s;
}
.pdf-download:hover { background: #eef2ff; }

/* ========================================
   Calendar Links
   ======================================== */
.calendar-links { display: flex; flex-direction: column; gap: 8px; }
.calendar-link {
    display: flex; align-items: center; gap: 10px; padding: 10px 14px;
    background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
    color: var(--text); text-decoration: none; font-size: 0.9rem; font-weight: 500;
    transition: border-color 0.15s, background 0.15s;
}
.calendar-link:hover { border-color: var(--primary-color); background: #f0f0ff; }
.calendar-link-icon { width: 24px; text-align: center; font-size: 1.1rem; }

/* ========================================
   Pricing Tiers
   ======================================== */
.pricing-tiers {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pricing-tier-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.pricing-tier-option:hover:not(.pricing-tier-disabled) {
    border-color: var(--primary-color, #4f46e5);
    background: rgba(79, 70, 229, 0.04);
}
.pricing-tier-option input[type="radio"] {
    margin-top: 3px;
    flex-shrink: 0;
}
.pricing-tier-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f9fafb;
}
.pricing-tier-content {
    flex: 1;
    min-width: 0;
}
.pricing-tier-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.pricing-tier-name {
    font-weight: 600;
}
.pricing-tier-price {
    font-weight: 700;
    white-space: nowrap;
}
.pricing-tier-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.pricing-tier-sold-out {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #dc2626;
    margin-top: 4px;
}

/* ========================================
   Companions
   ======================================== */
.companions-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.companions-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.companions-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.companion-entry {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    position: relative;
    background: var(--bg);
}

/* ========================================
   Form Elements
   ======================================== */
.form-row { display: flex; gap: 12px; }
.form-row > .form-group { flex: 1; }

.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--sand);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text);
    background: var(--white);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--mist);
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 15%, transparent);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 0.925rem;
}
.checkbox-group input[type="checkbox"] { width: auto; accent-color: var(--primary-color); }

button[type="submit"], .btn-primary {
    background: var(--terracotta);
    color: #fff;
    padding: 14px 24px;
    border: none;
    border-radius: 100px;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    margin-top: 8px;
    box-shadow: 0 2px 12px rgba(199,92,42,0.2);
}

button[type="submit"]:hover, .btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(199,92,42,0.25);
}
button[type="submit"]:active { transform: translateY(0); }
button[type="submit"]:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-secondary {
    background: none;
    border: 1.5px dashed var(--sand);
    color: var(--terracotta);
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-size: 0.9rem;
    font-weight: 500;
    transition: border-color 0.15s;
}
.btn-secondary:hover { border-color: var(--primary-color); }

/* ========================================
   Alerts
   ======================================== */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.875rem;
}
.alert-success { background: rgba(45,90,61,0.08); color: var(--forest); border: 1px solid rgba(45,90,61,0.2); }
.alert-error { background: rgba(220,38,38,0.06); color: #991b1b; border: 1px solid rgba(220,38,38,0.15); }

/* ========================================
   Footer
   ======================================== */
.page-footer {
    text-align: center;
    padding: 32px 24px;
    font-size: 0.8rem;
    color: #9ca3af;
}
.page-footer a { color: #9ca3af; text-decoration: none; }
.page-footer a:hover { color: var(--text-muted); }

/* ========================================
   Links
   ======================================== */
a { color: var(--terracotta); transition: color 0.2s; }
a:hover { color: var(--primary-light); }

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .event-layout {
        grid-template-columns: 1fr;
        padding: 16px 20px;
        gap: 16px;
    }

    .event-main { order: 1; }
    .event-sidebar { order: 2; }

    .registration-card {
        position: static;
    }

    .event-info-bar {
        flex-direction: column;
    }

    .event-info-item {
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 14px 20px;
    }

    .event-info-item:last-child { border-bottom: none; }

    .hero-image { height: 200px; }
    .hero-overlay { padding: 24px 20px 20px; }
    .hero h1 { font-size: 1.5rem; }

    .registration-card { padding: 20px; }
    .detail-card { padding: 20px; }
    .map-container { height: 180px; }
}

@media (max-width: 480px) {
    .hero-overlay { padding: 20px 16px 16px; }
    .hero h1 { font-size: 1.3rem; line-height: 1.2; overflow-wrap: anywhere; }
    .event-info-item { padding: 14px 16px; }
    .event-info-share { padding: 14px 16px; }
    .event-layout { padding: 12px 16px; gap: 12px; }
    .registration-card { padding: 16px; }
    .form-row { flex-direction: column; gap: 0; }
    .calendar-links { gap: 6px; }
    .calendar-link { font-size: 0.8rem; padding: 8px 10px; }
    .auth-container { padding: 30px 16px; }
    .auth-card { padding: 24px 20px; }
}

/* ========================================
   Spots / Capacity Indicator
   ======================================== */
.spots-available { color: var(--text); font-weight: 500; }
.spots-full { color: #dc2626; font-weight: 600; }

.spots-bar {
    width: 100%;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.spots-bar-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 2px;
    transition: width 0.3s;
}

/* ========================================
   Countdown Bar
   ======================================== */
.countdown-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: color-mix(in srgb, var(--primary-color) 8%, white);
    border-bottom: 1px solid color-mix(in srgb, var(--primary-color) 15%, white);
    font-size: 0.875rem;
}

.countdown-label {
    color: var(--text-muted);
    font-weight: 500;
}

.countdown-timer {
    color: var(--primary-color);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* Private Gate */
.private-gate {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.private-gate__card {
    background: #fff;
    border-radius: 12px;
    padding: 3rem 2.5rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.private-gate__logo {
    max-height: 64px;
    max-width: 200px;
    margin-bottom: 1.5rem;
}

.private-gate__icon {
    color: #94a3b8;
    margin-bottom: 1rem;
}

.private-gate__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.private-gate__subtitle {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 1.5rem;
}

.private-gate__error {
    background: #fef2f2;
    color: #dc2626;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.private-gate__form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.private-gate__input {
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    text-align: center;
    transition: border-color 0.2s;
}

.private-gate__input:focus {
    outline: none;
    border-color: var(--primary-color, #6366f1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.private-gate__button {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color, #6366f1);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.private-gate__button:hover {
    opacity: 0.9;
}

/* ========================================
   Checkout Page
   Uses .hero, .detail-card from event page.
   ======================================== */
.checkout-content {
    max-width: 640px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}

.checkout-content .detail-card {
    position: static;
    margin-bottom: 16px;
}

.checkout-back {
    display: inline-block;
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 12px;
}
.checkout-back:hover {
    color: var(--primary-color);
}

.checkout-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text);
}

/* Summary card */
.checkout-summary-card {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1px solid var(--border);
}

.checkout-lines {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.9rem;
}
.checkout-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.checkout-line--muted {
    color: var(--text-muted);
}
.checkout-line--total {
    border-top: 1px solid var(--border);
    padding-top: 8px;
    margin-top: 4px;
    font-weight: 700;
    font-size: 1rem;
}
.checkout-method {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 12px;
}

/* Guest recap */
.checkout-guest-recap {
    font-size: 0.9rem;
    line-height: 1.5;
}
.checkout-companions {
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Billing fields */
.checkout-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkout-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.checkout-field input,
.checkout-field select {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.925rem;
    color: var(--text);
    background: var(--white);
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.checkout-field input:focus,
.checkout-field select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}

.checkout-row {
    display: flex;
    gap: 12px;
}
.checkout-row > .checkout-field {
    flex: 1;
}

/* Legal checkboxes */
.checkout-legal {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.checkout-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}
.checkout-check input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}
.checkout-link {
    background: none;
    border: none;
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font-size: inherit;
}

/* Submit button */
.checkout-submit {
    display: block;
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 20px;
    transition: opacity 0.2s;
}
.checkout-submit:hover {
    opacity: 0.9;
}
.checkout-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 8px;
}

/* Checkout dialog (AGB / Widerruf) */
.checkout-dialog {
    border: none;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    padding: 24px;
    max-width: 560px;
    width: calc(100% - 32px);
    max-height: 80vh;
    overflow-y: auto;
}
.checkout-dialog::backdrop {
    background: rgba(0,0,0,0.4);
}
.checkout-dialog-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.checkout-dialog-head h3 {
    font-size: 1.125rem;
    font-weight: 700;
}
.checkout-dialog-head button {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}
.checkout-dialog-head button:hover {
    color: var(--text);
}
.checkout-dialog-body {
    font-size: 0.9rem;
    line-height: 1.6;
}

@media (max-width: 480px) {
    .checkout-row {
        flex-direction: column;
        gap: 0;
    }
    .checkout-content {
        padding: 16px 12px 32px;
    }
}
