/* STV Auw Kartei – Gestaltung angelehnt an stvauw.ch/theater */

/* --- Schriften (lokal, keine externen Anfragen) --------------------------- */
@font-face {
  font-family: "Big Shoulders Display";
  src: url("/static/fonts/BigShouldersDisplay-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Big Shoulders Display";
  src: url("/static/fonts/BigShouldersDisplay-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Libre Franklin";
  src: url("/static/fonts/LibreFranklin-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Libre Franklin";
  src: url("/static/fonts/LibreFranklin-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Farb- und Formwerte ------------------------------------------------- */
:root {
  --ink: #151112;
  --ink-soft: #1e1a1b;
  --cream: #faf8f4;
  --cream-card: #f8f6f2;
  --cream-border: #f2efe8;
  --white: #ffffff;
  --red: #e02424;
  --red-bright: #ef3b3b;
  --gold: #e3b04b;
  --muted-on-dark: #b5aeaa;
  --muted: #7d7672;
  --muted-strong: #5f5955;

  --font-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --font-body: "Libre Franklin", system-ui, -apple-system, sans-serif;

  --radius-button: 6px;
  --radius-small: 10px;
  --radius-card: 16px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 2px rgba(21, 17, 18, 0.06), 0 4px 16px rgba(21, 17, 18, 0.07);
  --shadow-lift: 0 2px 6px rgba(21, 17, 18, 0.1), 0 12px 32px rgba(21, 17, 18, 0.14);

  --container: 1080px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
}

a {
  color: var(--red);
  text-decoration: none;
}

a:hover {
  color: var(--red-bright);
  text-decoration: underline;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.98;
  margin: 0;
  font-weight: 700;
}

h2 {
  font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.5rem);
  font-weight: 600;
}

h3 {
  font-size: 1.35rem;
  font-weight: 600;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Kopfzeile ----------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--ink);
  color: var(--cream-card);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  min-height: 62px;
  flex-wrap: wrap;
}

.site-header__logo img {
  display: block;
  height: 26px;
  width: auto;
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  flex: 1;
}

.site-nav a {
  color: var(--muted-on-dark);
  font-size: 0.95rem;
  padding: 0.4rem 0.1rem;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  color: var(--cream-card);
  text-decoration: none;
}

.site-nav a.is-active {
  color: var(--cream-card);
  font-weight: 600;
  border-bottom-color: var(--red);
}

.site-header__user {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.85rem;
  color: var(--muted-on-dark);
}

.linkbutton {
  background: none;
  border: 0;
  padding: 0;
  color: var(--red);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.linkbutton:hover {
  color: var(--red-bright);
  text-decoration: underline;
}

/* --- Hero ---------------------------------------------------------------- */
.hero {
  background: var(--ink);
  color: var(--cream-card);
  padding: 3.5rem 0 4rem;
}

.hero__badge {
  display: inline-block;
  background: rgba(248, 246, 242, 0.12);
  color: var(--cream-card);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.85rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero__title {
  font-size: clamp(3.2rem, 1.6rem + 7vw, 6.5rem);
  margin: 1.1rem 0 0;
}

.hero__title span {
  display: block;
}

.hero__title .accent {
  color: var(--red);
}

.hero__lead {
  max-width: 46ch;
  color: var(--muted-on-dark);
  margin: 1.1rem 0 0;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}

/* --- Knöpfe -------------------------------------------------------------- */
.button {
  display: inline-block;
  background: var(--cream-card);
  color: var(--ink);
  border: 1px solid transparent;
  border-radius: var(--radius-button);
  padding: 0.7rem 1.35rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.button:hover {
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
}

.button--dark {
  background: var(--ink);
  color: var(--cream-card);
}

.button--dark:hover {
  background: var(--ink-soft);
  color: var(--white);
}

.button--ghost {
  background: transparent;
  border-color: var(--cream-border);
  color: var(--ink-soft);
}

.button--ghost:hover {
  background: var(--cream-card);
  color: var(--ink);
}

.button--red {
  background: var(--red);
  color: var(--white);
}

.button--red:hover {
  background: var(--red-bright);
  color: var(--white);
}

/* --- Abschnitte ---------------------------------------------------------- */
.section {
  padding: 3rem 0;
}

.section--tight {
  padding: 2rem 0;
}

.eyebrow {
  display: block;
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.section__head {
  margin-bottom: 1.5rem;
}

.section__head p {
  color: var(--muted);
  margin: 0.5rem 0 0;
  max-width: 60ch;
}

/* --- Karten -------------------------------------------------------------- */
.card {
  background: var(--white);
  border: 1px solid var(--cream-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
}

.card + .card {
  margin-top: 1.25rem;
}

.card__title {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1rem;
}

.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: start;
}

.grid--halves {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

/* --- Kennzahlen ---------------------------------------------------------- */
.stat {
  background: var(--white);
  border: 1px solid var(--cream-border);
  border-radius: var(--radius-small);
  padding: 1.1rem 1.25rem;
}

.stat__value {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}

.stat__label {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.35rem;
}

/* --- Zeitachse (Personendetail) ------------------------------------------ */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline__row {
  display: grid;
  grid-template-columns: 7.5rem 1fr auto;
  gap: 1rem;
  align-items: baseline;
  padding: 0.85rem 0;
  border-top: 1px solid var(--cream-border);
}

.timeline__row:first-child {
  border-top: 0;
}

.timeline__years {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.timeline__years .unknown {
  color: var(--muted);
  font-size: 0.95rem;
  font-family: var(--font-body);
  font-weight: 400;
}

.timeline__what {
  min-width: 0;
}

.timeline__ereignis {
  font-weight: 600;
}

.timeline__detail {
  display: block;
  color: var(--muted-strong);
  font-size: 0.9rem;
}

.timeline__jahre {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  margin-top: 0.15rem;
}

.timeline__meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.2rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.timeline__duration {
  color: var(--muted-strong);
  font-size: 0.85rem;
  white-space: nowrap;
}

/* --- Chips --------------------------------------------------------------- */
.chip {
  display: inline-block;
  background: var(--cream-border);
  color: var(--muted-strong);
  border-radius: var(--radius-pill);
  padding: 0.18rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.chip--red {
  background: rgba(224, 36, 36, 0.1);
  color: var(--red);
}

.chip--gold {
  background: rgba(227, 176, 75, 0.18);
  color: #8a6414;
}

.chip--dark {
  background: var(--ink);
  color: var(--cream-card);
}

.chip--ghost {
  background: transparent;
  border: 1px solid var(--cream-border);
  color: var(--muted);
}

/* --- Tabellen ------------------------------------------------------------ */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

thead th {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted-strong);
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--cream-border);
  white-space: nowrap;
}

tbody td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--cream-border);
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td.numeric,
th.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* --- Jubiläumsliste ------------------------------------------------------ */
.jubilee-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.jubilee-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--cream-border);
}

.jubilee-row:first-child {
  border-top: 0;
}

.jubilee-row__milestone {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--red);
  min-width: 2.6rem;
  white-space: nowrap;
}

.jubilee-row__name {
  font-weight: 600;
  flex: 1 1 12ch;
  min-width: 0;
}

.jubilee-row__meta {
  color: var(--muted);
  font-size: 0.85rem;
  text-align: right;
}

/* --- Formulare ----------------------------------------------------------- */
label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-strong);
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="search"],
input[type="password"],
input[type="number"],
input[type="file"],
select {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink-soft);
  background: var(--white);
  border: 1px solid var(--cream-border);
  border-radius: var(--radius-button);
  padding: 0.6rem 0.75rem;
}

input:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.form-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

.form-row > * {
  flex: 1 1 180px;
}

.form-row > .form-actions {
  flex: 0 0 auto;
}

.field + .field {
  margin-top: 1rem;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.checkbox input {
  margin-top: 0.25rem;
}

.checkbox label {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--ink-soft);
  margin: 0;
}

.hint {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0.4rem 0 0;
}

/* --- Meldungen ----------------------------------------------------------- */
.callout {
  border-radius: var(--radius-small);
  border: 1px solid var(--cream-border);
  border-left: 3px solid var(--muted);
  background: var(--white);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.25rem;
}

.callout--red {
  border-left-color: var(--red);
  background: rgba(224, 36, 36, 0.05);
}

.callout--gold {
  border-left-color: var(--gold);
  background: rgba(227, 176, 75, 0.09);
}

.callout--ok {
  border-left-color: #2f855a;
  background: rgba(47, 133, 90, 0.07);
}

.callout p {
  margin: 0;
}

.callout p + p {
  margin-top: 0.4rem;
}

.empty {
  color: var(--muted);
  font-style: italic;
  margin: 0;
}

/* --- Anmeldeseite -------------------------------------------------------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  padding: 2rem 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 380px;
}

.login-card__logo {
  height: 34px;
  width: auto;
  display: block;
  margin-bottom: 2rem;
}

.login-card h1 {
  color: var(--cream-card);
  font-size: 2.75rem;
  margin-bottom: 1.5rem;
}

.login-card label {
  color: var(--muted-on-dark);
}

.login-card input {
  background: rgba(248, 246, 242, 0.08);
  border-color: rgba(248, 246, 242, 0.2);
  color: var(--cream-card);
}

.login-card .button {
  width: 100%;
  margin-top: 1.5rem;
}

.login-error {
  color: var(--red-bright);
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

/* --- Fusszeile ----------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--cream-border);
  margin-top: 2rem;
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

/* --- Kleine Bildschirme -------------------------------------------------- */
@media (max-width: 720px) {
  .site-header .container {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .site-nav {
    order: 3;
    width: 100%;
    gap: 0.9rem;
  }

  .timeline__row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .timeline__duration {
    color: var(--muted);
  }

  .jubilee-row {
    flex-wrap: wrap;
  }

  /* Zusatzangabe auf eigene Zeile, damit sie den Namen nicht überlappt. */
  .jubilee-row__meta {
    flex: 1 0 100%;
    text-align: left;
    padding-left: 3.6rem;
  }
}
