/*
 * Café du Gymnase – Frontend
 *
 * Gestaltungsidee: Der Gastraum ist dunkelgrün, die Buvette aus Messing,
 * das Haus heißt "Gymnase". Daraus: Wandgrün als Fläche, Messing für
 * Preise und aktive Zustände, Oliv (Original-Akzent) für Linien, und eine
 * schmale Grotesk wie die Beschriftung einer Sporthalle.
 */

/* ---------- Schriften (selbst gehostet, OFL) ---------- */
@font-face {
	font-family: "Big Shoulders Display";
	font-style: normal;
	font-display: swap;
	font-weight: 100 900;
	src: url("../fonts/big-shoulders-display-latin-wght-normal.woff2") format("woff2-variations");
	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";
	font-style: normal;
	font-display: swap;
	font-weight: 100 900;
	src: url("../fonts/big-shoulders-display-latin-ext-wght-normal.woff2") format("woff2-variations");
	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: "Instrument Sans";
	font-style: normal;
	font-display: swap;
	font-weight: 400 700;
	src: url("../fonts/instrument-sans-latin-wght-normal.woff2") format("woff2-variations");
	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: "Instrument Sans";
	font-style: normal;
	font-display: swap;
	font-weight: 400 700;
	src: url("../fonts/instrument-sans-latin-ext-wght-normal.woff2") format("woff2-variations");
	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;
}

/* ---------- Tokens ---------- */
:root {
	--g-wall: #1e2b24;      /* Wandgrün – Grundfläche */
	--g-deep: #142019;      /* Tiefgrün – Leisten, Schatten */
	--g-chalk: #eef0e8;     /* Kreide – Text */
	--g-brass: #c9a55a;     /* Messing – Preise, Aktiv */
	--g-olive: #858454;     /* Oliv – Linien (Original-Akzent) */
	--g-moss: #9aa89c;      /* Moos – Nebentext */

	--g-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
	--g-text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

	--g-measure: 40rem;
	--g-gutter: clamp(1.25rem, 4vw, 2.5rem);
	--g-bar: 3.75rem;
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	min-height: 100vh;
	background: var(--g-wall);
	color: var(--g-chalk);
	font-family: var(--g-text);
	font-size: 1rem;
	line-height: 1.5;
	font-kerning: normal;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
h1, h2, h3, p, ul, address { margin: 0; padding: 0; }
ul { list-style: none; }
address { font-style: normal; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--g-brass); outline-offset: 3px; border-radius: 2px; }

.g-sr,
.g-skip:not(:focus) {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.g-skip:focus { position: fixed; top: .75rem; left: .75rem; z-index: 50; background: var(--g-chalk); color: var(--g-deep); padding: .5rem .9rem; text-decoration: none; }

.g-icon { flex: none; }

.g-empty { color: var(--g-moss); padding: 2rem var(--g-gutter); text-align: center; }

/* ---------- Social + Credit ---------- */
.g-social { display: flex; gap: .5rem; }
.g-social__link {
	display: grid; place-items: center; width: 2.75rem; height: 2.75rem;
	border: 1px solid rgba(238, 240, 232, .28); border-radius: 50%;
	color: var(--g-chalk); transition: border-color .2s, color .2s;
}
.g-social__link svg { width: 1.15rem; height: 1.15rem; fill: currentColor; }
.g-social__link:hover { border-color: var(--g-brass); color: var(--g-brass); }

.g-credit {
	display: inline-flex; align-items: center; gap: .6rem;
	color: var(--g-moss); font-size: .8rem; text-decoration: none;
}
.g-credit img { width: 4.5rem; height: auto; opacity: .8; transition: opacity .2s; }
.g-credit:hover img { opacity: 1; }
.g-credit:hover { color: var(--g-chalk); }

/* =========================================================
 * "/" – zwei Türen
 * ======================================================= */
.g-doors {
	position: relative;
	display: grid;
	min-height: 100vh;
	min-height: 100svh;
	background: var(--g-deep);
}
.g-door {
	position: relative;
	isolation: isolate;
	display: flex; flex-direction: column; justify-content: flex-end; gap: 1.25rem;
	min-height: 50vh; min-height: 50svh;
	padding: 6.5rem var(--g-gutter) 2rem;
	overflow: hidden;
}
.g-door::before { /* Foto */
	content: ""; position: absolute; inset: 0; z-index: -2;
	background: var(--g-photo) center / cover no-repeat, var(--g-wall);
	transition: transform 1.2s cubic-bezier(.2, .7, .2, 1);
}
.g-door::after { /* Lesbarkeit */
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: linear-gradient(to top, rgba(20, 32, 25, .96) 8%, rgba(20, 32, 25, .55) 55%, rgba(20, 32, 25, .2));
}
.g-door + .g-door { border-top: 1px solid var(--g-olive); }
.g-door:hover::before, .g-door:focus-within::before { transform: scale(1.04); }

.g-door__link { display: flex; flex-direction: column; gap: 1.1rem; text-decoration: none; }
.g-door__link::after { content: ""; position: absolute; inset: 0; z-index: 0; } /* ganze Tür klickbar */
.g-door__name {
	font-family: var(--g-display);
	font-weight: 800;
	font-size: clamp(3.25rem, 13vw, 6.75rem);
	line-height: .88;
	letter-spacing: -.01em;
	max-width: 10ch;
}
.g-door__cta {
	align-self: flex-start;
	font-weight: 600; font-size: .95rem; color: var(--g-brass);
	border-bottom: 2px solid currentColor; padding-bottom: .15rem;
}
.g-door__meta {
	position: relative; z-index: 1; /* über dem Tür-Link */
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
	padding-top: 1.1rem; border-top: 1px solid rgba(133, 132, 84, .6);
}
.g-door__address { color: var(--g-moss); font-size: .9rem; line-height: 1.45; text-decoration: none; }
a.g-door__address:hover { color: var(--g-chalk); }

/* Logo-Plakette auf der Naht */
.g-badge {
	position: absolute; z-index: 3; left: 50%; top: 50%;
	width: clamp(7.5rem, 30vw, 11.5rem); aspect-ratio: 1;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: var(--g-deep);
	box-shadow: 0 0 0 .4rem var(--g-deep), 0 0 0 calc(.4rem + 1px) var(--g-olive);
	display: grid; place-items: center;
}
.g-badge a { display: block; width: 86%; }
.g-badge img { width: 100%; }
.g-doors[data-count="1"] .g-badge,
.g-doors[data-count="0"] .g-badge { top: 4.5rem; transform: translate(-50%, 0); }
.g-doors[data-count="1"] .g-door { min-height: 100vh; min-height: 100svh; padding-top: 16rem; }
/* auf schmalen Geräten sitzt die Plakette auf der Naht, die Namen liegen unten in der Tür */
.g-doors .g-door:first-of-type { padding-bottom: calc(clamp(7.5rem, 30vw, 11.5rem) / 2 + 1.5rem); }
.g-doors[data-count="1"] .g-door:first-of-type { padding-bottom: 2rem; }

.g-doors > .g-credit { position: absolute; z-index: 2; right: var(--g-gutter); bottom: .6rem; }
.g-door:last-of-type { padding-bottom: 3rem; }

@media (min-width: 900px) {
	.g-doors { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
	.g-door { min-height: 100vh; padding: 3rem clamp(2rem, 5vw, 4.5rem) 4rem; }
	.g-doors .g-door:first-of-type { padding-bottom: 4rem; }
	.g-door + .g-door { border-top: 0; border-left: 1px solid var(--g-olive); }
	.g-door:nth-of-type(2) { text-align: right; }
	.g-door:nth-of-type(2) .g-door__link { align-items: flex-end; }
	.g-door:nth-of-type(2) .g-door__cta { align-self: flex-end; }
	.g-door:nth-of-type(2) .g-door__meta { flex-direction: row-reverse; }
	.g-door__name { max-width: none; }
	.g-badge { top: 22%; }
	.g-doors > .g-credit { left: 50%; right: auto; transform: translateX(-50%); bottom: 1.25rem; }
}

/* =========================================================
 * Gemeinsame Leiste (/place, Fallback)
 * ======================================================= */
.g-topbar {
	position: absolute; z-index: 5; top: 0; left: 0; right: 0;
	padding: 1rem var(--g-gutter);
}
.g-back {
	display: inline-flex; align-items: center; gap: .35rem;
	min-height: 2.75rem; padding: 0 1rem 0 .7rem;
	border-radius: 999px; background: rgba(20, 32, 25, .72);
	-webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
	font-weight: 600; font-size: .95rem; text-decoration: none;
	border: 1px solid rgba(238, 240, 232, .2);
}
.g-back:hover { border-color: var(--g-brass); color: var(--g-brass); }

/* =========================================================
 * "/place" – Kategorien
 * ======================================================= */
.g-place { min-height: 100vh; display: flex; flex-direction: column; }
.g-place__hero {
	position: relative; isolation: isolate;
	min-height: 52vh; min-height: 52svh;
	display: flex; flex-direction: column; justify-content: flex-end; gap: .5rem;
	padding: 6rem var(--g-gutter) 2rem;
}
.g-place__hero::before {
	content: ""; position: absolute; inset: 0; z-index: -2;
	background: var(--g-photo) center / cover no-repeat, var(--g-deep);
}
.g-place__hero::after {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: linear-gradient(to top, var(--g-wall) 2%, rgba(30, 43, 36, .5) 50%, rgba(20, 32, 25, .25));
}
.g-place__logo { width: 4.5rem; margin-bottom: .75rem; }
.g-place__name {
	font-family: var(--g-display); font-weight: 800;
	font-size: clamp(3rem, 11vw, 6rem); line-height: .9;
}
.g-place__address { color: var(--g-moss); font-size: .95rem; }

.g-choices {
	display: grid;
	padding: .5rem var(--g-gutter) 2.5rem;
	width: 100%; max-width: calc(var(--g-measure) + 2 * var(--g-gutter));
}
.g-choice {
	display: flex; flex-direction: column; gap: .2rem;
	padding: 1.15rem 0 1.25rem;
	border-bottom: 1px solid var(--g-olive);
	text-decoration: none;
}
.g-choice__name {
	font-family: var(--g-display); font-weight: 700;
	font-size: clamp(2.6rem, 9vw, 3.75rem); line-height: 1;
	transition: color .2s;
}
.g-choice__preview { color: var(--g-moss); font-size: .92rem; max-width: 34rem; }
.g-choice:hover .g-choice__name, .g-choice:focus-visible .g-choice__name { color: var(--g-brass); }

.g-place__foot {
	margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
	padding: 1.5rem var(--g-gutter) 2rem;
	width: 100%; max-width: calc(var(--g-measure) + 2 * var(--g-gutter));
}

@media (min-width: 900px) {
	.g-place { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); grid-template-rows: 1fr auto; min-height: 100vh; }
	.g-place__hero { grid-row: 1 / span 2; min-height: 100vh; position: sticky; top: 0; padding: 3rem clamp(2rem, 5vw, 4.5rem) 4rem; }
	.g-place__hero::after { background: linear-gradient(to top, rgba(20, 32, 25, .92) 6%, rgba(20, 32, 25, .25) 60%); }
	.g-choices { align-self: center; padding: 6rem clamp(2rem, 5vw, 4.5rem) 2rem; }
	.g-place__foot { padding: 1.5rem clamp(2rem, 5vw, 4.5rem) 2.5rem; }
}

/* =========================================================
 * "/menu" – Karte
 * ======================================================= */
.g-menubar {
	position: sticky; top: 0; z-index: 10;
	background: var(--g-deep);
	border-bottom: 1px solid rgba(133, 132, 84, .55);
}
.g-menubar__row {
	display: flex; align-items: center; gap: .75rem;
	min-height: var(--g-bar);
	padding: 0 var(--g-gutter);
	max-width: calc(var(--g-measure) + 2 * var(--g-gutter)); margin: 0 auto;
}
.g-menubar__home { flex: none; display: block; width: 2.75rem; }
.g-menubar__venue {
	flex: 1; min-width: 0;
	font-family: var(--g-display); font-weight: 700; font-size: 1.35rem; line-height: 1;
	text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.g-menubar__venue:hover { color: var(--g-brass); }

.g-tabs { flex: none; display: flex; gap: .25rem; padding: .25rem; border-radius: 999px; background: rgba(238, 240, 232, .07); }
.g-tab {
	display: block; min-height: 2.25rem; padding: .45rem .95rem; border-radius: 999px;
	font-weight: 600; font-size: .92rem; line-height: 1.35; text-decoration: none; color: var(--g-moss);
	transition: background-color .2s, color .2s;
}
.g-tab:hover { color: var(--g-chalk); }
.g-tab.is-active { background: var(--g-brass); color: var(--g-deep); }

.g-jump {
	display: flex; gap: 1.25rem; overflow-x: auto;
	padding: .55rem var(--g-gutter) .7rem;
	max-width: calc(var(--g-measure) + 2 * var(--g-gutter)); margin: 0 auto;
	scrollbar-width: none;
	-webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
	mask-image: linear-gradient(to right, #000 85%, transparent);
}
.g-jump::-webkit-scrollbar { display: none; }
.g-jump[hidden] { display: none; }
.g-jump a { flex: none; font-size: .88rem; color: var(--g-moss); text-decoration: none; white-space: nowrap; padding: .15rem 0; border-bottom: 1px solid transparent; }
.g-jump a:hover, .g-jump a.is-current { color: var(--g-chalk); border-bottom-color: var(--g-brass); }

.g-menu { padding: 0 var(--g-gutter); }
.g-cat, .g-legend, .g-menu__foot { max-width: var(--g-measure); margin: 0 auto; }
.g-cat[hidden] { display: none; }

.g-sec { padding: 2.75rem 0 .5rem; scroll-margin-top: calc(var(--g-bar) + 3.25rem); }
.g-sec__img {
	aspect-ratio: 16 / 7;
	margin: 0 0 1.5rem;
	border-radius: .9rem;
	background: var(--g-photo) center / cover no-repeat, var(--g-deep);
}
.g-sec__title {
	font-family: var(--g-display); font-weight: 800;
	font-size: clamp(2.4rem, 8vw, 3.25rem); line-height: .95;
	margin-bottom: 1.1rem;
	text-wrap: balance;
}

.g-items { display: grid; gap: 1.05rem; }
.g-line { display: flex; align-items: baseline; gap: .55rem; }
.g-line__name { font-weight: 500; font-size: 1.05rem; line-height: 1.35; }
.g-line__dots { flex: 1; min-width: 1.5rem; border-bottom: 2px dotted var(--g-olive); transform: translateY(-.28em); }
.g-line__price {
	flex: none; color: var(--g-brass); font-weight: 600;
	font-variant-numeric: tabular-nums lining-nums; white-space: nowrap;
}
.g-item__desc { color: var(--g-moss); font-size: .9rem; margin-top: .15rem; max-width: 34rem; }

.g-variants { display: grid; gap: .3rem; margin-top: .4rem; padding-left: 1rem; border-left: 1px solid rgba(133, 132, 84, .5); }
.g-line--variant .g-line__name { font-weight: 400; font-size: .95rem; color: var(--g-moss); }
.g-line--variant .g-line__price { font-weight: 500; font-size: .95rem; }

.g-item__allergens { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .45rem; }
.g-item__allergens a { display: block; border-radius: 50%; }
.g-item__allergens img { width: 1.4rem; height: 1.4rem; }

.g-sauces { color: var(--g-moss); font-size: 1rem; max-width: 34rem; }

.g-legend { padding: 3.5rem 0 1rem; scroll-margin-top: calc(var(--g-bar) + 3.25rem); border-top: 1px solid var(--g-olive); margin-top: 2.5rem; }
.g-legend__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .75rem 1.5rem; }
.g-legend__list li { display: flex; align-items: center; gap: .65rem; font-size: .92rem; }
.g-legend__list img { width: 1.75rem; height: 1.75rem; flex: none; }
.g-legend:target { animation: g-flash 1.4s ease-out; }
@keyframes g-flash { from { box-shadow: inset 0 3px 0 var(--g-brass); } to { box-shadow: inset 0 3px 0 transparent; } }

.g-menu__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 2rem 0 2.5rem; }

/* Angemeldete Redakteure: Platz für die WordPress-Admin-Leiste */
body.admin-bar .g-menubar { top: 32px; }
@media (max-width: 782px) { body.admin-bar .g-menubar { top: 46px; } }
@media (max-width: 600px) { body.admin-bar .g-menubar { top: 0; } }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

/* =========================================================
 * Event-Popup (Bottom-Sheet / Dialog)
 * ======================================================= */
.g-sheet { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.g-sheet[hidden] { display: none; }
.g-sheet__backdrop { position: absolute; inset: 0; background: rgba(10, 16, 12, .7); opacity: 0; transition: opacity .35s; }
.g-sheet__panel {
	position: relative; width: 100%; max-width: 40rem; max-height: 92vh; overflow-y: auto;
	background: var(--g-wall); border-top: 2px solid var(--g-brass);
	border-radius: 1.25rem 1.25rem 0 0;
	padding: 1.75rem var(--g-gutter) 2rem;
	transform: translateY(105%); transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}
.g-sheet.is-open .g-sheet__backdrop { opacity: 1; }
.g-sheet.is-open .g-sheet__panel { transform: none; }
.g-sheet__close {
	position: absolute; top: .9rem; right: .9rem;
	display: grid; place-items: center; width: 2.75rem; height: 2.75rem;
	border: 1px solid rgba(238, 240, 232, .25); border-radius: 50%; background: transparent; cursor: pointer;
}
.g-sheet__close:hover { border-color: var(--g-brass); color: var(--g-brass); }
.g-sheet__title { font-family: var(--g-display); font-weight: 800; font-size: 2.6rem; line-height: 1; margin: 0 3rem 1.1rem 0; }
.g-sheet__subtitle { font-family: var(--g-display); font-weight: 700; font-size: 1.6rem; margin: 1.75rem 0 .8rem; }
.g-event { display: grid; gap: .5rem; text-decoration: none; }
.g-event img { width: 100%; border-radius: .75rem; }
.g-event__meta { font-weight: 600; }
.g-event__meta time { display: block; font-weight: 400; color: var(--g-brass); font-size: .9rem; }
.g-sheet__upcoming { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.g-sheet__upcoming .g-event__meta { font-size: .85rem; }
@media (min-width: 700px) {
	.g-sheet { align-items: center; }
	.g-sheet__panel { border-radius: 1.25rem; border: 1px solid var(--g-olive); border-top: 2px solid var(--g-brass); transform: translateY(2rem); opacity: 0; transition: transform .45s cubic-bezier(.2, .8, .2, 1), opacity .3s; }
	.g-sheet.is-open .g-sheet__panel { opacity: 1; }
}
@media (max-width: 520px) {
	.g-sheet__upcoming { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.g-sheet__upcoming li:nth-child(3) { display: none; }
}

/* =========================================================
 * Ladebildschirm (Logo wird von oben nach unten freigelegt)
 * ======================================================= */
.g-loading {
	position: fixed; inset: 0; z-index: 30;
	display: none; place-items: center;
	background: var(--g-deep);
	transition: opacity .45s, visibility .45s;
}
.g-loading__logo { position: relative; width: min(18rem, 60vw); }
.g-loading__cover { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; height: 100%; background: var(--g-deep); transition: height .7s; }
.g-loading.load-50 .g-loading__cover { height: 50%; }
.g-loading.load-80 .g-loading__cover { height: 20%; }
.g-loading.load-100 .g-loading__cover { height: 0; }
.g-loading.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
html.gymnase-js .g-loading { display: grid; }
html.gymnase-js.gymnase-loaded .g-loading { display: none; }

/* =========================================================
 * Fallback-Seiten
 * ======================================================= */
.g-page { max-width: var(--g-measure); margin: 0 auto; padding: 6rem var(--g-gutter) 3rem; line-height: 1.6; }
.g-page__content p { margin-bottom: 1rem; }
.g-page__content a { color: var(--g-brass); }

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
	.g-door:hover::before, .g-door:focus-within::before { transform: none; }
}
