/* Schdodlbuam – Onepager
   Farbkonzept der bisherigen Seite: dunkelgrau (#3e3e3e), helle Schrift (#e1e6dd), Petrol (#455e60),
   dazu das Dunkelrot aus dem Wappen. Bewusst schlicht gehalten: flache Flächen, kantige Ecken,
   Frakturschrift wie auf dem Logo, leichte Körnung statt Verläufen und Schatten. */

@font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 400 800;
    font-stretch: 75% 100%;
    font-display: swap;
    src: url("../assets/fonts/open-sans-latin.woff2") format("woff2");
}
@font-face {
    font-family: "UnifrakturMaguntia";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../assets/fonts/unifraktur-maguntia.woff2") format("woff2");
}

:root {
    --bg: #3e3e3e;
    --bg-deep: #343434;
    --bg-panel: #464646;
    --accent: #455e60;
    --accent-light: #5f7f81;
    --text: #e1e6dd;
    --text-muted: #b1b5ad;
    --line: rgba(225, 230, 221, 0.22);
    --red: #d8352f;
    --red-text: #ff8a80; /* helleres Rot für Schrift und Fokusrahmen: 4,7:1 auf Grau (das Wappen-Rot hat nur 2,3:1) */
    --red-dark: #8e1b1f; /* Dunkelrot aus dem Schdodlbuam-Wappen */
    --paper: #e9e5da;
    --radius: 2px;
    --font-body: "Open Sans", Tahoma, Geneva, sans-serif;
    --font-cond: "Open Sans", "Open Sans Condensed", "Arial Narrow", sans-serif;
    --font-black: "UnifrakturMaguntia", "Old English Text MT", "Times New Roman", serif;
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

:root { color-scheme: dark; }

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

html { scroll-behavior: smooth; scroll-padding-top: 64px; }

body {
    margin: 0;
    background: var(--bg) var(--grain);
    color: var(--text);
    font: 400 1rem/1.65 var(--font-body);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--text); text-decoration-color: var(--red-dark); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--red-text); outline-offset: 3px; }
main:focus { outline: none; } /* Sprungziel des „Zum Inhalt springen“-Links */

h1, h2, h3 { margin: 0 0 .5em; line-height: 1.15; }
h2 { font-family: var(--font-black); font-weight: 400; font-synthesis: none; }
h3 { font-family: var(--font-cond); font-stretch: 75%; font-weight: 700; }

.container { width: min(1100px, 100% - 2.5rem); margin-inline: auto; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; left: 1rem; top: -4rem; z-index: 100;
    background: var(--red-dark); color: #fff; padding: .5rem 1rem;
}
.skip-link:focus { top: 1rem; }

/* ---------- Navigation ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: #222525;
    border-bottom: 2px solid var(--red-dark);
}
.nav {
    width: min(1100px, 100% - 2.5rem); margin-inline: auto;
    display: flex; align-items: center; justify-content: space-between;
    min-height: 56px;
}
.nav__brand {
    display: flex; align-items: center; gap: .6rem;
    color: #fff; text-decoration: none;
    font: 400 1.6rem/1 var(--font-black);
}
.nav__brand img { width: 34px; height: 36px; object-fit: cover; }
.nav__list { display: flex; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.nav__list a {
    display: flex; align-items: center; min-height: 44px; padding: .5rem .9rem;
    color: var(--text); text-decoration: none;
    font: 700 1.05rem var(--font-cond); font-stretch: 75%;
}
.nav__list a:hover, .nav__list a.is-active { color: #fff; }

.nav__toggle { display: none; background: none; border: 0; padding: .6rem; min-width: 44px; min-height: 44px; cursor: pointer; color: #fff; }
.nav__bars, .nav__bars::before, .nav__bars::after {
    display: block; width: 24px; height: 2px; background: currentColor; content: ""; position: relative;
}
.nav__bars::before { position: absolute; top: -7px; }
.nav__bars::after { position: absolute; top: 7px; }
.nav__toggle[aria-expanded="true"] .nav__bars { background: transparent; }
.nav__toggle[aria-expanded="true"] .nav__bars::before { top: 0; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__bars::after { top: 0; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
    position: relative; display: flex; flex-direction: column;
    min-height: calc(100svh - 58px); background: #000;
    border-bottom: 3px solid var(--red-dark);
}
.hero__art {
    flex: 1 1 auto; min-height: 340px;
    background: url("../assets/keyvisual.webp") center 12px / contain no-repeat;
}
.hero__bar { text-align: center; padding: 1.25rem 1.25rem 2.5rem; background: #000; }
.lead { font-size: 1.1rem; max-width: 52ch; margin: 0 auto; }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin: 1.25rem 0 0; }

.btn {
    display: inline-block; padding: .7rem 1.4rem; min-height: 44px;
    background: var(--red-dark); color: #fff; text-decoration: none;
    font: 700 1.05rem var(--font-cond); font-stretch: 75%;
    border: 2px solid var(--red-dark);
}
.btn:hover { background: #a3201f; border-color: #a3201f; color: #fff; }
.btn--ghost { background: transparent; border-color: var(--text-muted); }
.btn--ghost:hover { background: transparent; border-color: #fff; }
.btn--small { padding: .5rem 1.1rem; font-size: 1rem; cursor: pointer; }
button.btn { font-family: var(--font-cond); }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section--memoriam { background: var(--bg-deep) var(--grain); }
.section__head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
    margin-bottom: 1.75rem;
}
.section__head h2 { font-size: clamp(2.3rem, 5vw, 3.3rem); margin: 0; color: #fff; }
.section__meta { margin: 0; color: var(--text-muted); font-size: .9rem; }
.section__intro { color: var(--text-muted); max-width: 60ch; margin-bottom: 2rem; }

/* ---------- Termine ---------- */
.termine { display: grid; grid-template-columns: 1fr minmax(280px, 330px); gap: 2.5rem; align-items: start; }

.event-list { list-style: none; margin: 0 0 2.25rem; padding: 0; border-top: 1px solid var(--line); }
.event {
    display: grid; grid-template-columns: 10rem 1fr; gap: 0 1rem; align-items: baseline;
    padding: .85rem .25rem; border-bottom: 1px dashed var(--line);
}
.event__btn {
    background: none; border: 0; padding: .3rem .25rem; margin: -.3rem -.25rem; min-height: 44px;
    font: 700 1.2rem var(--font-cond); font-stretch: 75%; color: #fff; text-align: left; cursor: pointer;
    text-decoration: underline dotted var(--text-muted); text-underline-offset: 4px;
}
.event__btn:hover { text-decoration-style: solid; text-decoration-color: var(--red-text); }
.event__title { font-weight: 700; font-size: 1.1rem; }
.event__host { grid-column: 2; color: var(--text-muted); font-size: .9rem; }
.event--past .event__btn, .event--past .event__title { color: var(--text-muted); }
.event--next .event__btn { color: var(--red-text); }
.event__badge { display: block; color: var(--red-text); font-size: .85rem; font-weight: 700; }
.event-list__empty { color: var(--text-muted); padding: .75rem 0; list-style: none; }
html:not(.js) li.event-list__empty { display: none; } /* ohne JavaScript übernimmt der noscript-Hinweis */
.termine__tools { margin: 0 0 2rem; }

.invite { margin: 0; max-width: 560px; }
.invite img { border: 8px solid var(--paper); width: 100%; }
.invite figcaption { color: var(--text-muted); font-size: .9rem; margin-top: .6rem; }

/* ---------- Kalender ---------- */
.calendar { background: var(--bg-panel); border: 1px solid var(--line); padding: 1rem; position: sticky; top: 78px; }
.calendar__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.calendar__head h3 { margin: 0; font-size: 1.35rem; color: #fff; }
.calendar__nav {
    width: 2.75rem; height: 2.75rem; border: 1px solid var(--line); cursor: pointer;
    background: transparent; color: var(--text); font-size: 1.3rem; line-height: 1;
}
.calendar__nav:hover { border-color: #fff; color: #fff; }
.calendar__grid { width: 100%; border-collapse: collapse; text-align: center; table-layout: fixed; }
.calendar__grid th { font: 700 .8rem var(--font-cond); font-stretch: 75%; color: var(--text-muted); padding: .35rem 0; }
.calendar__grid td { padding: 1px; }
.cal-day { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; font-size: .9rem; }
.cal-day--today { outline: 1px solid var(--text-muted); outline-offset: -2px; }
.cal-day--event { background: var(--red-dark); color: #fff; font-weight: 700; cursor: help; box-shadow: inset 0 0 0 2px var(--red-text); }
.calendar__legend { margin: .75rem 0 0; font-size: .85rem; color: var(--text-muted); }
.dot { display: inline-block; width: .65rem; height: .65rem; background: var(--red-dark); margin-right: .3rem; }

/* ---------- in memoriam ---------- */
.memoriam {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 2rem 1.75rem;
}
.memorial__link { display: block; background: var(--paper); padding: 7px; }
.memorial__link img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
/* wie aufgehängte Abzüge: ganz leicht schief, jeder anders */
.memorial:nth-child(3n + 1) .memorial__link { transform: rotate(-1deg); }
.memorial:nth-child(3n + 2) .memorial__link { transform: rotate(.7deg); }
.memorial:nth-child(3n) .memorial__link { transform: rotate(-.4deg); }

/* ---------- Footer ---------- */
.site-footer { background: #232626; border-top: 2px solid var(--red-dark); padding: 2.5rem 0 1.25rem; color: var(--text-muted); }
.footer__grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; }
.footer__title { font: 400 1.8rem/1.1 var(--font-black); color: #fff; margin-bottom: .5rem; }
.footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.footer__links a { color: var(--text-muted); text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
.footer__links a:hover { color: #fff; text-decoration: underline; }
.footer__links .footer__only {
    display: inline-block; margin-top: .5rem; padding: .3rem .9rem;
    border: 1px solid var(--text-muted); color: var(--text); font-weight: 700;
}
.footer__links .footer__only:hover { border-color: #fff; color: #fff; text-decoration: none; }
.footer__copy {
    width: min(1100px, 100% - 2.5rem); margin: 2rem auto 0; padding-top: .5rem; border-top: 1px solid var(--line);
    font-size: .9rem; display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; align-items: center;
}
.footer__copy a { color: var(--text-muted); display: inline-flex; align-items: center; min-height: 44px; }
.footer__copy a:hover { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .termine { grid-template-columns: 1fr; }
    .calendar { position: static; order: -1; }
}
@media (max-width: 640px) {
    .nav__toggle { display: block; }
    .nav__list {
        display: none; position: absolute; left: 0; right: 0; top: 100%;
        flex-direction: column; background: #222525; padding: .5rem 1.25rem 1rem; border-bottom: 2px solid var(--red-dark);
    }
    .nav__list.is-open { display: flex; }
    .event { grid-template-columns: 1fr; padding-block: .75rem; }
    .event__host { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}

/* ---------- Rechtstexte (Impressum, Datenschutz) ---------- */
.legal { max-width: 70ch; }
.legal h1 { font: 400 clamp(2.3rem, 5vw, 3.3rem)/1.1 var(--font-black); color: #fff; margin: 0 0 1rem; }
.legal h2 { font: 700 1.35rem var(--font-cond); font-stretch: 75%; color: #fff; margin: 2rem 0 .4rem; }
.legal p { margin: 0 0 1rem; }
.legal mark { background: rgba(255, 138, 128, .2); color: #ffd6d2; padding: 0 .25em; }
.legal__note { border-left: 4px solid var(--red-dark); background: rgba(0, 0, 0, .25); padding: .75rem 1rem; font-size: .95rem; }
.nav__back { color: var(--text); font: 700 1rem var(--font-cond); font-stretch: 75%; display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- Druck: Terminliste ohne Bilder, Navigation und Effekte ---------- */
@media print {
    :root { color-scheme: light; }
    body { background: #fff !important; color: #000; font-size: 11pt; }
    .site-header, .hero, .calendar, .invite, .section--memoriam, .footer__tools, .footer__links,
    .to-top, .termine__tools, .skip-link, .lightbox { display: none !important; }
    .section { padding: 1rem 0; }
    .section__head h2, .footer__title { color: #000 !important; }
    .section__head h2::after { display: none; }
    .termine { display: block; }
    .event { color: #000; border-bottom: 1px solid #999; break-inside: avoid; }
    .event__btn, .event__title, .event--next .event__btn, .event--past .event__btn { color: #000 !important; text-decoration: none; }
    .event__host, .event__badge, .section__meta, .site-footer, .site-footer a { color: #333 !important; }
    .site-footer { background: none; border: 0; }
    html.js .reveal { opacity: 1 !important; transform: none !important; }
    a[href^="mailto:"]::after { content: ""; }
}
