/* =====================================================================
   Domain-Sale – Basis-Stylesheet (Struktur + Komponenten)
   Wird auf jeder Seite ZUSAMMEN mit einem Theme (style-*.css) geladen.
   Farben/Schriften kommen aus CSS-Variablen, die das Theme überschreibt.
   Schriften werden lokal ausgeliefert (DSGVO-konform, keine Fremd-CDNs).
   ===================================================================== */

@font-face {
    font-family: 'Fraunces';
    src: url('../fonts/fraunces-var.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Hanken Grotesk';
    src: url('../fonts/hanken-var.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* ---- Variablen (Default = seriöses Haupt-Theme „classic") ---------- */
:root {
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;

    --bg: #f6f4ee;
    --surface: #ffffff;
    --surface-2: #faf8f3;
    --ink: #1b2433;
    --ink-soft: #5c6678;
    --line: #e6e1d6;

    --primary: #1c3a57;
    --primary-deep: #142a41;
    --on-primary: #ffffff;
    --accent: #b6862c;
    --accent-soft: #f3ead4;

    --success: #2e7d5b;
    --success-bg: #e7f3ec;
    --danger: #b23b30;
    --danger-bg: #fbeae7;
    --info-bg: #eef2f7;

    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(20, 30, 50, .04), 0 12px 28px -12px rgba(20, 30, 50, .18);
    --shadow-sm: 0 1px 3px rgba(20, 30, 50, .08);
    --maxw: 720px;
    --maxw-wide: 1040px;
}

/* ---- Reset / Base -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    border-top: 4px solid var(--accent);
}
img { max-width: 100%; height: auto; display: block; }

/* ---- Typografie ---------------------------------------------------- */
h1, h2, h3 {
    font-family: var(--font-display);
    color: var(--ink);
    line-height: 1.15;
    font-weight: 580;
    margin: 0 0 .5em;
    letter-spacing: -.01em;
}
h1 { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 2.9rem); }
h2 { font-size: clamp(1.3rem, 1.05rem + 1vw, 1.6rem); margin-top: 1.4em; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1rem; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
small { font-size: .85rem; }
.muted { color: var(--ink-soft); }
.lede { font-size: 1.15rem; color: var(--ink-soft); margin-bottom: 1.5rem; }
.eyebrow {
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .72rem;
    font-weight: 700;
    color: var(--accent);
    margin: 0 0 .8rem;
}

/* ---- Layout -------------------------------------------------------- */
.site { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.page {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: clamp(1.5rem, 1rem + 3vw, 3.5rem) 1.25rem 2.5rem;
    flex: 1 0 auto;
}
.page--wide { max-width: var(--maxw-wide); }

/* ---- Marke --------------------------------------------------------- */
.brand {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--ink);
    text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand__mark {
    width: 12px; height: 12px; border-radius: 3px;
    background: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
    flex: none;
}

/* ---- Hero ---------------------------------------------------------- */
.hero { margin-bottom: 2rem; }
.hero h1 { margin-bottom: .4rem; }
.hero .lede { max-width: 34ch; }

/* ---- Karten -------------------------------------------------------- */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
}
.card + .card { margin-top: 1.25rem; }
.card__title { margin-top: 0; }

/* ---- Formulare ----------------------------------------------------- */
.field { margin-bottom: 1.1rem; }
.field:last-child { margin-bottom: 0; }
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .4rem; color: var(--ink); }
.hint { font-size: .82rem; color: var(--ink-soft); margin-top: .35rem; }
input[type=text], input[type=email], input[type=password], input[type=number], textarea, select {
    width: 100%;
    padding: .7rem .85rem;
    font: inherit;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none;
    appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%); background-position: calc(100% - 18px) center, calc(100% - 13px) center; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 2.2rem; }
textarea { min-height: 120px; resize: vertical; }
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}
input::placeholder, textarea::placeholder { color: #9aa3b2; }

/* ---- Buttons ------------------------------------------------------- */
.btn, button[type=submit], .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .72rem 1.4rem;
    font: inherit;
    font-weight: 600;
    line-height: 1;
    color: var(--on-primary);
    background: var(--primary);
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, transform .12s, box-shadow .15s;
}
.btn:hover, button[type=submit]:hover, .btn-primary:hover {
    background: var(--primary-deep);
    border-color: var(--primary-deep);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px -6px rgba(20, 30, 50, .4);
    text-decoration: none;
}
.btn:active, button[type=submit]:active { transform: translateY(0); }
.btn:focus-visible, button:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 30%, transparent); outline-offset: 2px; }
.btn--block { width: 100%; }
.btn--ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
}
.btn--ghost:hover { background: var(--surface-2); color: var(--ink); box-shadow: none; transform: none; }
.btn--sm { padding: .42rem .8rem; font-size: .85rem; }
.btn--danger { background: var(--danger); border-color: var(--danger); }
.btn--danger:hover { background: #93302700; background: #8f2d24; border-color: #8f2d24; }

/* ---- Hinweise / Alerts -------------------------------------------- */
.alert {
    padding: .85rem 1rem;
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--ink-soft);
    background: var(--info-bg);
    font-size: .95rem;
    margin-bottom: 1.25rem;
}
.alert--error { background: var(--danger-bg); border-color: var(--danger); color: #7c2a22; }
.alert--success { background: var(--success-bg); border-color: var(--success); color: #1f5a40; }
.alert--info { background: var(--info-bg); border-color: var(--primary); }

/* ---- Info-Box / Statuszeilen -------------------------------------- */
.infobox {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: .9rem 1rem;
    font-size: .95rem;
}
.offer-tag {
    display: inline-block;
    background: var(--accent-soft);
    color: #7a5912;
    font-weight: 700;
    padding: .15rem .6rem;
    border-radius: 999px;
    font-size: .92rem;
}

/* ---- Chat / Nachrichten ------------------------------------------- */
.chat { display: flex; flex-direction: column; gap: 1rem; margin: 1.25rem 0; }
.msg { display: flex; flex-direction: column; max-width: 82%; }
.msg--me { align-self: flex-end; align-items: flex-end; }
.msg--them { align-self: flex-start; align-items: flex-start; }
.msg__meta { font-size: .78rem; color: var(--ink-soft); margin-bottom: .3rem; padding: 0 .2rem; }
.msg__bubble {
    padding: .75rem 1rem;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    line-height: 1.5;
}
.msg--me .msg__bubble {
    background: var(--primary);
    color: var(--on-primary);
    border-color: var(--primary);
}
.msg__offer {
    margin-top: .55rem;
    padding-top: .55rem;
    border-top: 1px dashed color-mix(in srgb, currentColor 25%, transparent);
    font-weight: 700;
}
.msg__actions { margin-top: .5rem; }

/* ---- Tabellen ------------------------------------------------------ */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.table { width: 100%; border-collapse: collapse; min-width: 560px; }
table.table th {
    text-align: left;
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ink-soft);
    font-weight: 700;
    padding: .8rem 1rem;
    border-bottom: 2px solid var(--line);
    white-space: nowrap;
}
table.table td { padding: .8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.table tbody tr:last-child td { border-bottom: 0; }
table.table tbody tr:hover { background: var(--surface-2); }
.table-empty { text-align: center; color: var(--ink-soft); padding: 2.25rem 1rem; }
.row-deal { background: var(--success-bg) !important; }

/* ---- Topbar (Admin) ------------------------------------------------ */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 1.25rem;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}
.topbar__nav a { color: var(--ink-soft); font-weight: 600; font-size: .92rem; margin-left: 1.1rem; }
.topbar__nav a:hover { color: var(--primary); }
.topbar__nav a.is-active { color: var(--primary); }

/* ---- Footer -------------------------------------------------------- */
.site-footer {
    flex-shrink: 0;
    border-top: 1px solid var(--line);
    padding: 1.5rem 1.25rem;
    color: var(--ink-soft);
    font-size: .88rem;
}
.site-footer__inner {
    max-width: var(--maxw);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--primary); }
.site-footer__links a { margin-left: 1.1rem; }
.site-footer__links a:first-child { margin-left: 0; }

/* ---- Utilities ----------------------------------------------------- */
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.inline-form { display: inline; }
.status-deal { color: var(--success); font-weight: 600; }

/* ---- Animation ----------------------------------------------------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.reveal { animation: fadeUp .5s both; }
.reveal.d1 { animation-delay: .06s; }
.reveal.d2 { animation-delay: .14s; }
.reveal.d3 { animation-delay: .22s; }

@media (prefers-reduced-motion: reduce) {
    .reveal { animation: none; }
    * { transition: none !important; }
}

/* ---- Responsive ---------------------------------------------------- */
@media (max-width: 640px) {
    body { font-size: 16px; }
    .grid-2 { grid-template-columns: 1fr; }
    .msg { max-width: 92%; }
    .site-footer__inner { flex-direction: column; align-items: flex-start; }
    .site-footer__links a:first-child { margin-left: 0; }
    .row > .btn, .row > button { width: 100%; }
}
