/* ----- Selbst gehostete Display-Schrift (Cormorant Garamond, SIL OFL) ----- */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal; font-weight: 500; font-display: swap;
  src: url('/static/fonts/cormorant-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal; font-weight: 600; font-display: swap;
  src: url('/static/fonts/cormorant-600.woff2') format('woff2');
}

:root {
  --bg: #fbf8f4;
  --paper: #ffffff;
  --ink: #463f39;
  --muted: #8d8178;
  --accent: #b07d56;
  --accent-deep: #8c6242;
  --sage: #8b9a7d;
  --blush: #e7cfc6;
  --line: #ece4da;
  --ok: #5a7d5a;
  --no: #b06a6a;
  --display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --shadow: 0 10px 40px rgba(70,63,57,.10);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); line-height: 1.7; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; color: var(--accent-deep); line-height: 1.15; letter-spacing: .01em; }
h1 { font-size: clamp(2.6rem, 7vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin: 0 0 .6rem; }
h3 { font-size: 1.4rem; margin: 0 0 .3rem; }
a { color: var(--accent-deep); }
p { margin: .5rem 0; }
.container { max-width: 800px; margin: 0 auto; padding: 0 1.3rem; }
.center { text-align: center; }
.muted { color: var(--muted); }

/* ---------- Header ---------- */
header.site { position: sticky; top: 0; z-index: 20; background: rgba(251,248,244,.92);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
header.site .container { display: flex; align-items: center; justify-content: space-between; padding: .7rem 1.3rem; }
.brand { font-family: var(--display); font-size: 1.5rem; color: var(--accent-deep); text-decoration: none; }
nav.top a { margin-left: 1.1rem; text-decoration: none; font-size: .95rem; color: var(--ink); }
nav.top a:hover { color: var(--accent-deep); }

/* ---------- Hero (mit Foto) ---------- */
.hero { position: relative; min-height: 78vh; display: flex; align-items: center; justify-content: center;
  text-align: center; color: #fff; padding: 4rem 1.2rem; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(40,30,24,.32), rgba(40,30,24,.55)), var(--hero-img, url('/static/img/hero.jpg'));
  background-size: cover; background-position: center; z-index: -1; }
.hero h1 { color: #fff; text-shadow: 0 2px 24px rgba(0,0,0,.35); margin: .3rem 0; }
.hero .date { letter-spacing: .25em; text-transform: uppercase; font-size: .85rem; opacity: .95; }
.hero .sub { font-size: 1.2rem; max-width: 34rem; margin: 1.1rem auto 0; text-shadow: 0 1px 12px rgba(0,0,0,.4); }
.hero .amp { font-family: var(--display); }

.countdown { display: inline-flex; gap: .7rem; margin-top: 1.8rem; }
.countdown div { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3);
  border-radius: 12px; padding: .6rem 1rem; min-width: 70px; backdrop-filter: blur(4px); }
.countdown b { display: block; font-family: var(--display); font-size: 2rem; line-height: 1; }
.countdown span { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; opacity: .9; }

/* ---------- Gate / Sperrbildschirm ---------- */
.gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem;
  position: relative; color: var(--ink); }
.gate::before { content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(40,30,24,.30), rgba(40,30,24,.45)), url('/static/img/hero.jpg');
  background-size: cover; background-position: center; z-index: -1; }
.gate-card { background: rgba(255,255,255,.94); border-radius: 20px; padding: 2.6rem 2rem; max-width: 420px;
  width: 100%; text-align: center; box-shadow: var(--shadow); }
.gate-card .heart { font-size: 1.8rem; color: var(--blush); }
.gate-card h1 { font-size: 2.4rem; margin: .2rem 0 .4rem; }
.gate-card p { color: var(--muted); margin: 0 auto 1.2rem; max-width: 22rem; }
.gate-card .qrhint { font-size: .85rem; margin-top: 1rem; }

/* ---------- Sections ---------- */
section.block { padding: 3rem 0; }
section.block + section.block { border-top: 1px solid var(--line); }
.eyebrow { text-align: center; color: var(--accent); letter-spacing: .22em; text-transform: uppercase;
  font-size: .75rem; margin-bottom: .3rem; }
section.block > .container > h2 { text-align: center; }
.lead { text-align: center; max-width: 38rem; margin: .4rem auto 1.5rem; }
.divider { width: 60px; height: 2px; background: var(--blush); margin: .8rem auto 1.6rem; border: 0; }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 1.6rem; box-shadow: var(--shadow); }
.imgcard { border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.imgcard img { width: 100%; display: block; }

/* ---------- Forms ---------- */
label { display: block; font-weight: 600; margin: 1rem 0 .35rem; font-size: .92rem; }
input[type=text], input[type=number], input[type=password], input[type=email], select, textarea {
  width: 100%; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; font: inherit;
  background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(176,125,86,.15); }
textarea { min-height: 4.5rem; resize: vertical; }
.code-input { text-align: center; font-family: monospace; font-size: 1.5rem; letter-spacing: .2em; text-transform: uppercase; }

.btn, button { display: inline-block; background: var(--accent-deep); color: #fff; border: none;
  padding: .75rem 1.5rem; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer;
  text-decoration: none; transition: background .15s, transform .05s; }
.btn:hover, button:hover { background: var(--accent); }
.btn:active, button:active { transform: translateY(1px); }
.btn.secondary, button.secondary { background: #fff; color: var(--accent-deep); border: 1.5px solid var(--accent); }
.btn.secondary:hover, button.secondary:hover { background: #faf3ec; }
.btn.danger, button.danger { background: var(--no); }
.btn.sm { padding: .35rem .8rem; font-size: .85rem; }
.btn.block { width: 100%; }

.row { display: flex; gap: 1rem; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 150px; }
.toggle-yesno { display: flex; gap: .7rem; margin-top: .4rem; }
.toggle-yesno label { flex: 1; border: 2px solid var(--line); border-radius: 12px; padding: .9rem; text-align: center; cursor: pointer; margin: 0; transition: all .15s; }
.toggle-yesno input { display: none; }
.toggle-yesno input:checked + span { color: var(--accent-deep); }
.toggle-yesno label:has(input:checked) { border-color: var(--accent); background: #faf3ec; }

.notice { background: #eef4ec; border: 1px solid #d3e3cf; color: var(--ok); padding: .8rem 1.1rem; border-radius: 12px; margin: 1rem 0; }
.warn { background: #fbeeea; border: 1px solid #f0d2c8; color: var(--no); padding: .8rem 1.1rem; border-radius: 12px; margin: 1rem 0; }

/* ---------- Map ---------- */
#map { height: 340px; border-radius: 16px; border: 1px solid var(--line); margin-top: 1.2rem; }

/* ---------- Timeline (Ablauf) ---------- */
.timeline { list-style: none; padding: 0; max-width: 36rem; margin: 0 auto; }
.timeline li { display: flex; gap: 1.2rem; padding: .9rem 0; border-bottom: 1px dashed var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline time { font-family: var(--display); font-size: 1.3rem; color: var(--accent-deep); min-width: 4.5rem; }

/* "Mein Tisch" */
.tablecard { text-align: center; background: linear-gradient(135deg, #faf3ec, #fff); }
.tablecard h3 { font-size: 2rem; }

/* ---------- Admin ---------- */
table.data { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
table.data th, table.data td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--line); font-size: .92rem; }
table.data th { color: var(--muted); font-weight: 600; background: #faf6f1; }
.badge { font-size: .72rem; padding: .15rem .6rem; border-radius: 999px; white-space: nowrap; }
.badge.yes { background: #e6f0e4; color: var(--ok); }
.badge.no { background: #f6e4e4; color: var(--no); }
.badge.open { background: #efe9e2; color: var(--muted); }
.adminnav { background: var(--accent-deep); }
.adminnav .container { display: flex; flex-wrap: wrap; gap: .3rem 1.3rem; padding: .7rem 1.3rem; }
.adminnav a { color: #fff; opacity: .9; text-decoration: none; font-size: .92rem; }
.adminnav a:hover { opacity: 1; }
.stat-grid { display: flex; gap: 1rem; flex-wrap: wrap; }
.stat-grid .card { flex: 1; min-width: 120px; text-align: center; padding: 1.2rem; }
.stat-grid .card b { font-size: 2.2rem; font-family: var(--display); color: var(--accent-deep); display: block; }
.qr { text-align: center; }
.qr img { max-width: 240px; border-radius: 12px; }
.code-display { font-family: monospace; font-size: 1.7rem; letter-spacing: .18em; background: #fff;
  border: 1.5px dashed var(--accent); padding: .6rem 1.1rem; border-radius: 12px; display: inline-block; }

footer.site { padding: 2.5rem 1rem; text-align: center; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); margin-top: 1rem; }
footer.site a { margin: 0 .5rem; color: var(--muted); }
.inline-form { display: inline; }
