/* client-site-rebuild: base page CSS on top of the taste-skill kit (copy to assets/site.css).
   Generic: logo/wordmark, card rows, picture walls, reference list, definition lists, form card,
   legal pages, lightbox, and the growth rules that stop sections overlapping on phones, tablets
   and short laptop screens (body.sub for sub pages; the min-width:640 + max-height:860 block for all).
   Lernstudio Heureka additions at the end. */

/* the client's logo (a framed PNG, its own colours) */
.nav__logo img.site-logo { height: 44px; width: auto; display: block; }
@media (max-width: 639px) { .nav__logo img.site-logo { height: 36px; } }
.footer .footer__name { font-size: 48px; line-height: 1; }
@media (max-width: 639px) { .footer .footer__name { font-size: 30px; } }

/* hero photograph: the client's photos are 900px to 1600px wide, kept sharp by cover */
.hero__media img { object-position: var(--ly-pos, 50% 50%); }

/* card rows: one panel height a row */
.cards-4 .panel { --p-h: 240px; }
.cards-3 .panel { --p-h: 260px; }
.cards-4 .panel img, .cards-3 .panel img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 1023px) { .cards-4 > .card { grid-column: auto / span 6; } .cards-3 > .card { grid-column: auto / span 6; } }
@media (max-width: 639px) { .cards-4 .panel, .cards-3 .panel { --p-h: 200px; } .cards-4 > .card, .cards-3 > .card { grid-column: 1 / -1; } }

/* picture wall: its own grid, 2px gap, square tiles, line to line */
.wall { display: grid; gap: 2px; grid-template-columns: repeat(var(--wall-cols, 4), minmax(0, 1fr)); }
.wall--4 { --wall-cols: 4; }
.wall--3 { --wall-cols: 3; }
.wall--2 { --wall-cols: 2; align-self: start; }
.wall__item { display: block; position: relative; overflow: clip; aspect-ratio: 4 / 3; background: var(--surface); }
.wall__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 600ms var(--ease, ease); }
@media (hover: hover) and (pointer: fine) { .wall__item:hover .wall__img { transform: scale(1.03); } }
.wall__item:focus-visible { outline-offset: -4px; }
.wall--plans .wall__item { aspect-ratio: 1 / 1; background: #fff; }
.wall--plans .wall__img { object-fit: contain; padding: var(--s-4); }
@media (max-width: 1023px) { .wall--4 { --wall-cols: 3; } }
@media (max-width: 639px) { .wall--4, .wall--3 { --wall-cols: 2; } }

/* a map or plan shown whole */
.frame--contain .frame__img { object-fit: contain; background: #fff; }

/* reference list: names in columns */
.ref-list { columns: 4 240px; column-gap: var(--s-5); list-style: none; padding: 0; margin: 0; }
.ref-list li { break-inside: avoid; padding-block: 5px; font-size: var(--t-small); line-height: 1.45; border-bottom: 1px solid var(--line); }
@media (max-width: 639px) { .ref-list { columns: 2 150px; } }

/* small definition lists: contact lines, facts */
.contact-list, .fact-list { display: grid; gap: var(--s-4); margin-bottom: 0; }
.contact-list > div, .fact-list > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: var(--s-4); padding-bottom: var(--s-3); border-bottom: 1px solid var(--line); }
.contact-list dt, .fact-list dt { font-size: var(--t-label); font-weight: 500; color: var(--muted); padding-top: 2px; }
.contact-list dd, .fact-list dd { margin: 0; }

/* history rows: the year in the name column */
.rows--years > li { grid-template-columns: 72px minmax(0, 1fr); }
.rows--years .rows__name { font-family: var(--font-display); font-size: 20px; }
.rows--years > li > p { grid-column: 2; grid-row: 1; }

/* the enquiry form on its card */
.form-card { background: var(--g-main, var(--bg)); border-radius: var(--r-lg); padding: var(--s-7); }
.form textarea { width: 100%; min-height: 120px; font: inherit; font-size: 16px; padding: var(--s-3) var(--s-4); border: 1px solid var(--line-strong, var(--line)); border-radius: var(--r-sm); background: var(--bg); color: var(--ink); resize: vertical; }
@media (max-width: 639px) { .form-card { padding: var(--s-5); } }

/* legal pages: text pages, not screens */
main > section.legal { height: auto; min-height: 100svh; padding-top: calc(var(--nav) + var(--s-8)); }
.legal h1 { font-size: var(--t-h2); }
.legal h2 { font-size: var(--t-card); margin-top: var(--s-5); }

/* lightbox (site.js) */
.lb { position: fixed; inset: 0; z-index: 50; background: rgb(20 17 15 / .94); display: grid; place-items: center; padding: 56px 72px; }
.lb[hidden] { display: none; }
.lb img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 2px; }
.lb button { position: absolute; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgb(246 242 236 / .12); color: #f6f2ec; font-size: 24px; line-height: 1; cursor: pointer; }
.lb button:hover { background: rgb(246 242 236 / .24); }
.lb button:focus-visible { outline: 2px solid #f6f2ec; outline-offset: 2px; }
.lb__close { top: 12px; right: 12px; }
.lb__prev { left: 12px; top: calc(50% - 24px); }
.lb__next { right: 12px; top: calc(50% - 24px); }
.lb__count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #d8d2ca; font-size: 14px; }
@media (max-width: 639px) { .lb { padding: 64px 8px; } .lb__prev, .lb__next { top: auto; bottom: 8px; } }

/* the float card covers too much of the photo on a phone */
@media (max-width: 639px) { .hero__media .ly-float { display: none; } }

/* one heading size per level: portrait tiles take the card title size */
.tile > h3 { font-family: var(--font-text); font-weight: 500; font-size: var(--t-card); line-height: 1.3; letter-spacing: -0.01em; }

/* references beside a photograph: three columns in eight */
.ref-list--3 { columns: 3 200px; }
@media (max-width: 639px) { .ref-list--3 { columns: 2 140px; } .ref-list li { font-size: 13px; padding-block: 3px; } }

/* footer legal row: plain links side by side */
.footer__legal { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); align-items: center; }
.footer a { overflow-wrap: anywhere; }

/* phone: frames that stack under their words keep a real height */
@media (max-width: 639px) {
  .develop--fill { min-height: 280px; }
}

/* sub pages (not the one-screen home page): on phones and tablets a section grows with what it holds,
   so stacked splits and walls never run into the next section */
@media (max-width: 1023px) {
  main > section:not(.hero) { height: auto; min-height: 0; }
  main > section:not(.hero) > .wrap { height: auto; }
  footer.closing { height: auto; }
}

/* the contact column: the workshop photo takes what the words leave */
/* phone: lower card pictures so three cards stack within two screens */
@media (max-width: 639px) { .cards-3 .panel { --p-h: 160px; } }
/* the kit lays a phone section out as a fixed-row grid; a growing section is a plain block instead */
@media (max-width: 1023px) { main > section:not(.hero), footer.closing { display: block; } }
/* in a growing section the .fill block takes its own height instead of "what is left" */
@media (max-width: 1023px) {
  main > section:not(.hero) > .wrap > .fill { flex: none; }
  main > section:not(.hero) .frame--fill { min-height: 280px; height: auto; flex: none; }
}
/* 1024 and up: the home page's photo splits stay side by side; short screens get lower card pictures */
@media (min-width: 1024px) {
  .grid.fill:has(> .frame--fill, > .develop--fill) { display: grid; }
}
@media (min-width: 1024px) and (max-height: 820px) { .cards-3 .panel { --p-h: 170px; } }
/* short or mid-size desktop screens (1280x800, 1024x768): a section grows with what it holds instead of
   cutting it off; it still fills at least one screen, and a photo frame keeps a real height */
@media (min-width: 640px) and (max-height: 860px), (min-width: 1024px) and (max-width: 1279px) {
  main > section:not(.hero):not([data-moment]) { height: auto !important; min-height: calc(var(--h, 1) * 100svh); display: flex; flex-direction: column; }
  main > section:not(.hero):not([data-moment]) > .wrap { flex: 1 0 auto; height: auto; }
  main > section:not(.hero):not([data-moment]) > .wrap > .fill { flex: 1 0 auto; min-height: auto; }
  main > section:not(.hero):not([data-moment]) .frame--fill { min-height: 360px; }
  main > section:not(.hero):not([data-moment]) .develop--fill { min-height: 360px; }
  footer.closing { height: auto; min-height: 100svh; }
}

/* the hero card: its label and name each on one line */
.hero__media .ly-float { width: auto; min-width: 300px; max-width: calc(100% - 48px); }
.hero__media .ly-float__row > span { white-space: nowrap; }

/* footer, on the espresso ground: a light tile, larger name */
@media (max-width: 639px) {
}
/* very small phones: the header keeps the name, the trade line waits for the footer */



/* ---------------- Lernstudio Heureka ---------------- */
/* the client's logo (script lettering, cut free of its white box) */
.nav__logo img.site-logo { height: 34px; width: auto; display: block; }
.footer .nav__logo img.site-logo--footer { height: 44px; }
@media (max-width: 639px) { .nav__logo img.site-logo { height: 26px; } }
.nav--split .nav__logo { line-height: 0; }

/* chips: the subjects as small links */
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-4); border: 1px solid var(--line-strong, var(--line)); border-radius: 999px; font-size: var(--t-small); font-weight: 500; color: var(--ink); text-decoration: none; transition: background-color 200ms, border-color 200ms, transform 200ms; }
.chip:hover { background: var(--surface); border-color: var(--accent); }
.chip:active { transform: translateY(1px); }

/* rows: small second line under a name */
.rows__name small { display: block; font-size: var(--t-small); font-weight: 400; color: var(--muted); margin-top: 2px; }
.rows--compact > li { padding-block: var(--s-3); }
.rows--levels { margin-top: var(--s-7); }

/* quotes on the dark band */
.quotes { align-content: start; }
.quote { margin: 0; padding: var(--s-6); border-radius: var(--r-lg); background: var(--surface); display: flex; flex-direction: column; justify-content: space-between; gap: var(--s-5); }
.quote blockquote { margin: 0; }
.quote blockquote p { font-size: 18px; line-height: 1.5; margin: 0; }
.quote figcaption { display: grid; gap: 2px; font-size: var(--t-small); }
.quote figcaption span { color: var(--muted); }
@media (max-width: 1023px) { .quotes > .quote { grid-column: auto / span 6; } }
@media (max-width: 639px) { .quotes > .quote { grid-column: 1 / -1; padding: var(--s-5); } }

/* data tables: course dates and prices */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-md, 8px); border: 1px solid var(--line); background: var(--bg); }
table.data { width: 100%; border-collapse: collapse; font-size: var(--t-small); line-height: 1.45; font-variant-numeric: tabular-nums; }
table.data th, table.data td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
table.data thead th { font-weight: 500; color: var(--muted); background: var(--surface); white-space: nowrap; }
table.data tbody th { font-weight: 500; }
table.data tbody tr:last-child > * { border-bottom: 0; }
.table-wrap--wide table.data { min-width: 760px; }
.course-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6) var(--gutter); align-items: start; }
.course-group { display: grid; gap: var(--s-3); }
.course-group:first-child { grid-column: 1 / -1; }
.course-group h3, .course-card h3 { font-size: var(--t-card); }
.course-card h3 small { display: block; font-size: var(--t-small); font-weight: 400; color: var(--muted); margin-top: 2px; }
.course-card { display: grid; gap: var(--s-3); align-content: start; }
.course-cards { margin-block: var(--s-6); row-gap: var(--s-6); }
@media (max-width: 1023px) { .course-groups { grid-template-columns: 1fr; } .course-cards > .course-card { grid-column: 1 / -1; } }

/* big facts beside the words */
.fact-list--big > div { grid-template-columns: 140px minmax(0, 1fr); padding-bottom: var(--s-5); }
.fact-list--big dd { font-family: var(--font-display); font-size: 24px; line-height: 1.25; letter-spacing: -0.01em; }
@media (max-width: 639px) { .fact-list--big dd { font-size: 20px; } .fact-list--big > div, .contact-list > div, .fact-list > div { grid-template-columns: 1fr; gap: 2px; } }

/* topic rows with long content lines */
.rows--topics > li > p { font-size: var(--t-small); }

/* people: small portraits (the old site keeps only 140px versions) */
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-5); align-content: start; }
.person { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--s-5); align-items: center; padding-bottom: var(--s-5); border-bottom: 1px solid var(--line); }
.person__img { width: 96px; height: 120px; object-fit: cover; border-radius: var(--r-md, 8px); background: var(--surface); }
.person h3 { font-family: var(--font-text); font-weight: 500; font-size: var(--t-card); line-height: 1.3; margin: 0 0 4px; }
.person p { margin: 0; color: var(--muted); }

/* teachers: a compact list in columns */
.teachers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5) var(--gutter); }
.teachers li { padding-top: var(--s-4); border-top: 1px solid var(--line); display: grid; gap: 4px; align-content: start; }
.teachers h3 { font-family: var(--font-text); font-weight: 500; font-size: 17px; line-height: 1.3; margin: 0; }
.teachers p { margin: 0; }
@media (max-width: 1023px) { .teachers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .teachers { grid-template-columns: 1fr; } }

/* a second heading inside one section (jobs beside press) */
.h2-like { font-size: var(--t-h3, 28px); }

/* blog posts */
.posts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-7) var(--gutter); }
.post { display: grid; gap: var(--s-3); align-content: start; max-width: 64ch; }
.post h3 { font-size: var(--t-card); margin: 0; }
.post p { margin: 0; }
@media (max-width: 1023px) { .posts { grid-template-columns: 1fr; } }

/* long sections (tables, lists): grow with what they hold at every width */
main > section.section--long { height: auto !important; min-height: 100svh; }
main > section.section--long > .wrap { height: auto; }
@media (max-width: 1023px) { main > section.section--long { display: block; } }

/* the form: two columns of fields, the message across */
.form-card .form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
@media (max-width: 639px) { .form-card .form { grid-template-columns: 1fr; } }

/* footer: three locations side by side */
.footer__locs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
.footer__addr strong { color: var(--p-inv-ink); font-weight: 500; }
@media (max-width: 639px) { .footer__locs { grid-template-columns: 1fr 1fr; } }
.footer__legal a { color: inherit; }

/* phones: the header keeps the logo and the menu button; the main action sits in the hero and the menu */
@media (max-width: 639px) { .nav.nav--split .nav__bar > .nav__actions { display: none !important; } }
/* footer legal row: copyright left, the links in one group */
.footer__legal { justify-content: space-between; }
.footer__legal-links { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
/* the contact column: photo above the locations */
.kontakt__side { display: grid; gap: var(--s-5); align-content: start; }
.kontakt__side .frame { aspect-ratio: 16 / 9; }
.kontakt__side .frame .frame__img { width: 100%; height: 100%; object-fit: cover; }
/* quotes beside a photograph */
.stimmen__photo { align-self: stretch; min-height: 320px; }
.stimmen__photo .frame__img { width: 100%; height: 100%; object-fit: cover; }
.quotes-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); align-content: start; }
@media (max-width: 639px) { .quotes-2 { grid-template-columns: 1fr; } }
.stufen__photo .frame__img { width: 100%; height: 100%; object-fit: cover; }

.stimmen__grid { align-items: stretch; }
.stimmen__grid > .stimmen__photo { height: auto; }
.kontakt__side .frame { aspect-ratio: 21 / 9; }
.stufen__photo { aspect-ratio: 4 / 3; }
@media (max-width: 639px) { .kontakt__side .frame { aspect-ratio: 4 / 3; } }
@media (max-width: 639px) { .nav--split .nav__toggle { margin-left: auto; } }
/* home page on phones and tablets: every section at least one screen, growing with what it holds */
@media (max-width: 1023px) { body.home main > section:not(.hero) { min-height: 100svh; } }
.stufen__wall { grid-template-columns: 1fr; align-self: stretch; }
.stufen__wall .wall__item { aspect-ratio: auto; min-height: 200px; }
@media (min-width: 1024px) { .stufen__wall { grid-template-rows: 1fr 1fr; } }
.stufen__wall .wall__item { min-height: 0; }
.stufen__wall .wall__img { position: absolute; inset: 0; }
@media (min-width: 1024px) { #stufen .grid.fill { display: grid; } .stufen__wall { height: 100%; } }
@media (max-width: 1023px) { .stufen__wall .wall__item { aspect-ratio: 4 / 3; } }
/* stacked hero on short tablet screens (1024x768 minus the scrollbar): the hero grows instead of cutting the photo */
@media (max-width: 1023px) and (max-height: 820px) {
  main > section.hero { height: auto; min-height: 100svh; padding-bottom: var(--s-7); }
  main > section.hero > .wrap { height: auto; }
}
/* a portrait photograph in a developing frame: it fills the frame instead of setting its height */
.develop--fill { position: relative; }
.develop--fill img { position: absolute; inset: 0; }
/* the developing photograph fills its column down to the section's foot */
.develop--fill { align-self: stretch; margin: 0; border-radius: var(--r-lg); overflow: clip; min-height: 420px; }
.develop--fill img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 639px) { .develop--fill { min-height: 300px; } }
