/* Stütz Hausmeisterservice: self-hosted fonts and the few page rules the kit lacks.
   Fonts are local woff2 files (fontsource builds); nothing is loaded from another host. */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/newsreader-latin-opsz-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2");
}

/* the client's logo: a transparent PNG (no white box), a little taller than the kit's 24px mark */
.nav__logo img { height: 32px; width: auto; }
@media (max-width: 639px) { .nav__logo img { height: 26px; } }

/* a phone: the full name needs the bar, so the nav's button lives in the menu sheet and the logo and
   the menu button always fit, down to 320px (the kit does the same on a page with a phone action bar) */
@media (max-width: 639px) {
  .nav:not(.is-open) .nav__actions { display: none; }
  .nav:not(.is-open) .nav__actions + .nav__toggle { margin-left: auto; }
}

/* a nav link from the menu lands on its row below the fixed header */
#leistungen .rows > li { scroll-margin-top: calc(var(--nav) + var(--s-5)); }

/* services: the list beside its photograph; the photograph takes what the list leaves.
   The grid never gets shorter than its rows, so nothing runs into the next section. */
#leistungen .grid { flex: 1 0 auto; }
#leistungen .frame { min-height: 240px; }
@media (max-width: 1023px) { #leistungen .grid { grid-template-rows: auto minmax(240px, 1fr); } }
@media (min-width: 640px) and (max-width: 1023px) {
  #leistungen .rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gutter); }
  #leistungen .rows > li:first-child { padding-top: var(--s-4); }
}

/* steps: three cards across from 640px, one height for the three photographs */
#ablauf .panel { --p-h: 300px; }
@media (min-width: 640px) and (max-width: 1279px) { #ablauf .grid > .card { grid-column: auto / span 4; } }
@media (min-width: 1024px) and (max-width: 1279px) { #ablauf .panel { --p-h: 220px; } }
@media (min-width: 640px) and (max-width: 1023px) { #ablauf .panel { --p-h: 420px; } }
/* a phone: the three cards share the section's two screens, each photograph taking what is left */
@media (max-width: 639px) {
  #ablauf .grid { flex: 1 0 auto; grid-auto-rows: 1fr; }
  #ablauf .panel { --p-h: 200px; flex: 1 0 var(--p-h); }
}

/* beside the form: the promises as plain rows, then the contact line */
#anfrage .rows { margin-top: var(--s-2); }
.contact { display: grid; justify-items: start; gap: var(--s-3); margin-top: var(--s-6); }
.contact > img { width: auto; height: 48px; flex: none; }
.contact > .contact-list { margin: 0; min-width: 0; }
/* a tablet keeps the split (words left, the form in one column right); a phone stacks them */
@media (max-width: 639px) { #anfrage .grid > .card { grid-column: 1 / -1; } }
/* a phone: the words on the section's first screen, the form on its second (the kit's .g2m, on this grid) */
@media (max-width: 639px) {
  #anfrage .grid { flex: 1 0 auto; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); row-gap: calc(var(--padt) + var(--padb)); }
  #anfrage .grid > .card { align-self: start; }
}
@media (min-width: 640px) and (max-width: 1023px) {
  #anfrage .grid > .span-5 { grid-column: 1 / span 5; }
  #anfrage .grid > .card { grid-column: 6 / -1; }
  #anfrage .form { grid-template-columns: minmax(0, 1fr); }
  .closing__cta.close--type > .btn--xl:not(.btn--wide) { width: 100%; }
}

/* footer: two link columns reach the right line on a tablet */
@media (min-width: 640px) and (max-width: 1023px) { .footer .footer__col { grid-column: auto / span 6; } }

/* short laptop screens (under 860px high): a section grows with its content instead of running
   into the next one, the way the kit already lets it below 1280px wide */
@media (min-width: 1280px) and (max-height: 859px) {
  main > section:not(.hero), footer.closing { height: auto; min-height: calc(var(--h, 1) * 100svh); display: flex; flex-direction: column; }
  main > section:not(.hero) > .wrap, footer.closing > .wrap { flex: 1 0 auto; height: auto; min-height: 0; }
}

/* a light page only: form controls and scrollbars stay light in a dark-mode browser */
:root { color-scheme: light; }
a, button, input, select, textarea, label { touch-action: manipulation; }

/* contact line beside the form */
.contact-list { display: grid; gap: var(--s-1); margin: var(--s-6) 0 0; }
.contact-list dt { font-size: var(--t-small); color: var(--muted); }
.contact-list dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

/* legal pages (impressum, credits): a plain text column, as tall as its text */
.legal { padding: calc(var(--nav) + var(--s-8)) 0 var(--s-9); }
.legal__body { max-width: 68ch; }
.legal__body h1 { font-size: var(--t-h2); margin: var(--s-5) 0 var(--s-6); }
.legal__body h2 { font: 500 var(--t-card)/1.3 var(--font-text); letter-spacing: -0.01em; margin: var(--s-7) 0 var(--s-2); }
.legal__body p, .legal__body li { font-size: var(--t-body); line-height: 1.6; overflow-wrap: anywhere; }
.legal__body ul { padding-left: 1.2em; display: grid; gap: var(--s-3); }
.legal__note { margin: 0 0 var(--s-6); padding: var(--s-4) var(--s-5); background: var(--surface); border-radius: var(--r-md); }
.legal-foot { padding: var(--s-6) 0; border-top: 1px solid var(--line); font-size: var(--t-small); color: var(--muted); }
.legal-foot .wrap { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); justify-content: space-between; }
.legal-foot a { display: inline-flex; align-items: center; min-height: 44px; }
