/* Farver og typografi hentet fra plakaten: creme, teglrød, salviegrøn. */
:root {
  --bg: #fbf4ea;
  --surface: #fffaf3;
  --ink: #2a1f1a;
  --muted: #7a6458;
  --line: #ead9c6;
  --red: #b8483a;
  --red-dark: #933629;
  --green: #7b8f6e;
  --pink: #e39a8f;
  --amber: #c9861f;
  --display: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --body: "Nunito", "Segoe UI", system-ui, sans-serif;
  --radius: 18px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--body);
}
h1, h2, h3 { font-family: var(--display); line-height: 1.15; text-wrap: balance; margin: 0 0 .4em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; }
h2 { font-size: 1.45rem; font-weight: 600; margin-top: 1.6em; }
h3 { font-size: 1.1rem; font-weight: 600; margin-top: 1.4em; }
p { margin: 0 0 1em; }
a { color: var(--red-dark); }
img { max-width: 100%; display: block; }
.muted { color: var(--muted); }
.eyebrow {
  font-family: var(--display); font-weight: 600; text-transform: uppercase;
  letter-spacing: .08em; color: var(--red); font-size: .85rem; margin-bottom: .4em;
}
.error { color: var(--red-dark); font-weight: 600; }
[hidden] { display: none !important; }

/* Knapper og felter */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 1rem var(--display); padding: .7em 1.3em; border-radius: 999px;
  border: 2px solid var(--red); background: var(--red); color: #fff;
  cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-ghost { background: transparent; color: var(--red-dark); }
.btn-ghost:hover { background: var(--red); color: #fff; }
.btn-small { padding: .35em .9em; font-size: .9rem; }
.btn-green { background: var(--green); border-color: var(--green); }
.btn-green:hover { background: #63765a; border-color: #63765a; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

input, select, textarea {
  font: inherit; color: var(--ink); background: #fff;
  border: 2px solid var(--line); border-radius: 12px; padding: .6em .8em; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--green); outline: none; }
label { font-weight: 700; font-size: .95rem; }
.form { display: grid; gap: .5rem; }
.form .btn { margin-top: .8rem; justify-self: start; }
.row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

/* Login-port */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.gate-card {
  width: 100%; max-width: 380px; background: var(--surface);
  border: 2px solid var(--line); border-radius: var(--radius); padding: 2rem;
  display: grid; gap: .5rem;
}
.gate-card .btn { margin-top: .8rem; }

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 10; background: var(--bg);
  border-bottom: 2px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .5rem 1.5rem; padding: .8rem 16px;
}
.brand { font: 700 1.4rem var(--display); color: var(--ink); text-decoration: none; }
.brand span { color: var(--red); font-weight: 600; font-size: 1rem; margin-left: .3em; }
.nav { display: flex; flex-wrap: wrap; gap: .25rem; }
.nav a {
  font: 600 .98rem var(--display); color: var(--ink); text-decoration: none;
  padding: .35em .8em; border-radius: 999px;
}
.nav a:hover { background: var(--line); }
.nav a.active { background: var(--red); color: #fff; }
.nav a.nav-admin { color: var(--green); }
.nav a.nav-admin.active { background: var(--green); color: #fff; }

.demo-banner {
  margin: 0; padding: .5rem 16px; background: #f3e1b8; color: #6b4a0e;
  font-size: .9rem; text-align: center;
}

main { max-width: 1080px; margin: 0 auto; padding: 2rem 16px 4rem; }
.narrow { max-width: 560px; }

/* Forside */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.hero-text { padding-top: 1rem; }
.hero-text p { font-size: 1.1rem; max-width: 34ch; }
.poster { margin: 0; }
.poster img { border-radius: var(--radius); box-shadow: 0 10px 30px rgba(90, 50, 30, .15); width: 100%; }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; gap: 1.5rem; } }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.card {
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; display: grid; gap: .35rem; align-content: start;
}
.card .when { font: 600 .85rem var(--display); text-transform: uppercase; letter-spacing: .06em; color: var(--red); }
.card h3 { margin: 0; font-size: 1.3rem; }
.card .details { font-size: .95rem; color: var(--muted); margin: 0; }
.card .foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .5rem; flex-wrap: wrap; }

/* Pladser */
.seats { display: inline-flex; gap: 4px; vertical-align: middle; }
.seat { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--green); }
.seat.filled { background: var(--green); }
.chip {
  display: inline-block; font: 600 .82rem var(--display); padding: .2em .7em;
  border-radius: 999px; white-space: nowrap;
}
.chip-need { background: #f8dcd5; color: var(--red-dark); }
.chip-ok { background: #e1e8da; color: #4b5c41; }
.chip-full { background: #e7ddd2; color: var(--muted); }
.chip-pending { background: #f3e1b8; color: #6b4a0e; }

/* Tabel */
.table-wrap { overflow-x: auto; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; min-width: 560px; }
.table th, .table td { text-align: left; padding: .8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font: 600 .85rem var(--display); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.table tr:last-child td { border-bottom: 0; }
.table .ev-title { font-family: var(--display); font-weight: 600; font-size: 1.1rem; }
.names { margin: 0; padding: 0; list-style: none; }
.names .child { color: var(--muted); font-size: .9rem; }
.empty { color: var(--muted); font-style: italic; }

/* Aftaler */
.note { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin-bottom: 1rem; }
.note h2 { margin-top: 0; font-size: 1.25rem; }
.note .body { white-space: pre-wrap; margin: 0; }
.note .date { font-size: .85rem; color: var(--muted); margin: .6rem 0 0; }

/* Admin */
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.panel { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem 1.5rem; margin-top: 1.5rem; }
.panel h2 { margin-top: 0; }
.ad-item { border-top: 1px solid var(--line); padding: 1rem 0; display: grid; gap: .5rem; }
.ad-item:first-child { border-top: 0; padding-top: 0; }
.grid-form { display: grid; grid-template-columns: 1.2fr 1fr 1.5fr auto; gap: .5rem; align-items: center; }
@media (max-width: 760px) { .grid-form { grid-template-columns: 1fr; } }
.signup-pill {
  display: inline-flex; align-items: center; gap: .4em; background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: .15em .3em .15em .8em; font-size: .9rem; margin: 0 .3rem .3rem 0;
}
.x { border: 0; background: var(--line); color: var(--ink); border-radius: 50%; width: 22px; height: 22px; cursor: pointer; font-weight: 700; line-height: 1; }
.x:hover { background: var(--red); color: #fff; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: .8rem 1.3rem; border-radius: 999px;
  font-weight: 600; z-index: 50; max-width: calc(100% - 32px); text-align: center;
}
.toast.bad { background: var(--red-dark); }

@media (prefers-reduced-motion: no-preference) {
  .card, .btn { transition: background .15s, border-color .15s, transform .15s; }
  .card:hover { transform: translateY(-2px); }
}

/* Smal skærm: tabellen bliver til kort */
@media (max-width: 640px) {
  .table { min-width: 0; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: .9rem 1rem; border-bottom: 1px solid var(--line); }
  .table tr:last-child { border-bottom: 0; }
  .table td { border: 0; padding: .15rem 0; }
  .table td[data-label]::before {
    content: attr(data-label); display: block;
    font: 600 .75rem var(--display); text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  }
  .table td.ev-title { font-size: 1.25rem; }
  .table td.status br { display: none; }
  .table td.status .chip { margin-left: .4rem; }
}
