/* Holzmanufaktur – WordPress-Anpassungen. Lädt nach den Stilen des Entwurfs. */

/* ---------------------------------------------------------------- Schriften, lokal (keine Verbindung zu Google) */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 400 700; font-stretch: 75% 100%; font-display: swap;
  src: url(../../fonts/bricolage-latin.woff2) format("woff2");
  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: "Bricolage Grotesque"; font-style: normal; font-weight: 400 700; font-stretch: 75% 100%; font-display: swap;
  src: url(../../fonts/bricolage-latin-ext.woff2) format("woff2");
  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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(../../fonts/figtree-latin.woff2) format("woff2");
  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: "Figtree"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(../../fonts/figtree-latin-ext.woff2) format("woff2");
  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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------------------------------------------------------------- aus dem Entwurf (index.html, <style> im Kopf) */
:root {
  --p-bg: #dedad3; --p-surface: #d3cec6; --p-ink: #0a0a0a; --p-muted: #55514c;
  --p-accent: #256f82; --p-accent-ink: #ffffff; --p-action: #256f82; --p-action-ink: #ffffff;
  --p-inv-bg: #0a0a0a; --p-inv-surface: #151515; --p-inv-ink: #dedad3; --p-inv-muted: #84827e;
  --p-inv-accent: #256f82; --p-inv-accent-ink: #ffffff; --p-inv-action: #256f82; --p-inv-action-ink: #ffffff;
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-text: "Figtree", system-ui, sans-serif;
  --display-weight: 400;
  --display-tracking: -0.03em;
  --display-tracking-xl: -0.04em;
  --display-stretch: 96%;
  --ly-scale: 0.96;
}
.menu-card .panel { --p-h: 200px; }
#stuecke .tile { --tile-ratio: 1 / 1; }
/* tall-small: the words and the small picture left, the tall one right */
#holz .ts { grid-template-rows: 1fr auto; }
#holz .ts__text { grid-column: 1 / span 5; grid-row: 1; }
#holz .ts__small { grid-column: 1 / span 3; grid-row: 2; --ratio: 100%; }
#holz .ts__tall { grid-column: 8 / -1; grid-row: 1 / span 2; --ratio: 125%; }
#wunsch { --bg: color-mix(in oklab, var(--p-accent) 76%, #000); }
#anfrage .anfrage__pic { --ratio: 40%; }
#anfrage .form-card { background: var(--surface); border-radius: var(--r-lg); padding: var(--s-7); }
@media (min-width: 640px) and (max-width: 1023px) {
  #stuecke .grid > .tile { grid-column: 1 / -1; grid-template-columns: 180px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: var(--s-5); }
  #stuecke .tile__media { grid-row: 1 / span 2; }
  #stuecke .tile__head { align-self: end; }
  #holz .ts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #holz .ts__text { grid-column: 1; }
  #holz .ts__small { grid-column: 1; }
  #holz .ts__tall { grid-column: 2; }
}
@media (max-width: 639px) {
  .hero--product .hero__stage { aspect-ratio: auto; flex: 1 1 auto; min-height: 240px; }
  #holz .ts { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto auto; }
  #holz .ts__text { grid-column: 1 / -1; }
  #holz .ts__small { grid-column: 1; grid-row: 2; align-self: start; }
  #holz .ts__tall { grid-column: 2; grid-row: 2; }
  #anfrage .form-card { padding: var(--s-5); }
  #anfrage .anfrage__pic { --ratio: 100%; }
}

/* ---------------------------------------------------------------- Entwurfs-Prüfungen aus: keine roten Rahmen auf der Live-Seite */
[data-placeholder] { outline: 0 !important; }

/* Bildnachweis auf Deutsch */
.credits > summary::after { content: "Anzeigen"; }
.credits[open] > summary::after { content: "Ausblenden"; }
.hm-credits { list-style: none; padding: 0; display: grid; gap: var(--s-1); }

/* ---------------------------------------------------------------- WordPress-Werkzeugleiste (nur angemeldet) */
body.admin-bar .nav { top: 32px; }
@media (max-width: 782px) { body.admin-bar .nav { top: 46px; } }
@media (max-width: 600px) { body.admin-bar .nav { top: 0; } #wpadminbar { position: fixed; } }

/* ---------------------------------------------------------------- Falle für Bots im Formular */
.hm-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form .t-small a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------------------------------------------------------------- Galerie-Vorschau auf der Startseite: vier Bilder in einer Reihe */
#galerie .section-head--row > .hm-galerie__aside { max-width: 62ch; }
.hm-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); }
.hm-strip > .hm-gallery__item { height: 100%; min-height: 0; }
/* weniger als vier Bilder in der Galerie: die vorhandenen teilen sich die Breite */
.hm-strip--1 { grid-template-columns: minmax(0, 1fr); }
.hm-strip--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hm-strip--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1023px) {
  .hm-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-strip--1 { grid-template-columns: minmax(0, 1fr); }
  .hm-strip--1 > .hm-gallery__item { --ratio: 75%; }
  .hm-strip--3 > .hm-gallery__item:last-child { grid-column: 1 / -1; --ratio: 50%; }
  .hm-strip > .hm-gallery__item { --ratio: 100%; height: auto; }
}

/* ---------------------------------------------------------------- Galerie-Seite: Raster */
.hm-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
.hm-gallery > .hm-gallery__item { --ratio: 100%; }
@media (max-width: 1023px) { .hm-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 479px) { .hm-gallery { gap: var(--s-3); } }
.hm-gallery__item { display: flex; overflow: hidden; border-radius: var(--r-lg); background: var(--surface); cursor: zoom-in; }
.hm-gallery__item > .frame__img { transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .hm-gallery__item:hover > .frame__img { transform: scale(1.03); }
}
.hm-gallery__item:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.hm-gallery__outro { margin-top: var(--s-8); }

/* ---------------------------------------------------------------- Lightbox */
.hm-lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: transparent; color: var(--p-inv-ink); }
.hm-lightbox::backdrop { background: rgb(10 10 10 / .94); }
.hm-lightbox[open] { display: grid; place-items: center; }
.hm-lightbox__fig { display: grid; gap: var(--s-3); justify-items: center; margin: 0; padding: var(--s-8) var(--s-9); max-width: 100%; max-height: 100%; }
.hm-lightbox__fig img { max-width: min(100%, 1600px); max-height: calc(100dvh - 160px); width: auto; height: auto; object-fit: contain; border-radius: var(--r-md); }
.hm-lightbox__fig figcaption { font-size: var(--t-small); color: var(--p-inv-muted); text-align: center; max-width: 70ch; }
.hm-lightbox__fig figcaption:empty { display: none; }
.hm-lightbox__btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 1px solid color-mix(in oklab, var(--p-inv-ink) 30%, transparent);
  background: transparent; color: var(--p-inv-ink); font-size: 22px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.hm-lightbox__btn:hover { background: color-mix(in oklab, var(--p-inv-ink) 12%, transparent); }
.hm-lightbox__btn:focus-visible { outline: 2px solid var(--p-inv-accent); outline-offset: 2px; }
.hm-lightbox__close { top: var(--s-5); right: var(--s-5); font-size: 28px; }
.hm-lightbox__prev { left: var(--s-5); top: 50%; translate: 0 -50%; }
.hm-lightbox__next { right: var(--s-5); top: 50%; translate: 0 -50%; }
.hm-lightbox[data-single] :is(.hm-lightbox__prev, .hm-lightbox__next) { display: none; }
@media (max-width: 639px) {
  .hm-lightbox__fig { padding: var(--s-8) var(--s-3); }
  .hm-lightbox__prev, .hm-lightbox__next { top: auto; bottom: var(--s-5); translate: none; }
}

/* ---------------------------------------------------------------- Unterseiten (Galerie, Impressum, Datenschutz) */
/* Keine Bildschirm-Abschnitte wie die Startseite: Höhe nach Inhalt, mindestens ein Bildschirm. */
main.hm-page > .section.hm-page__section { height: auto; min-height: 100svh; padding-top: calc(var(--nav) + var(--s-9)); padding-bottom: var(--s-10); }
main.hm-page > .section.hm-page__section > .wrap { height: auto; }
.hm-page__title { font-size: var(--t-h1); }

/* Fließtext aus dem Block-Editor */
.hm-prose { max-width: 72ch; font-size: var(--t-body); line-height: 1.6; color: var(--ink); }
.hm-prose > * + * { margin-top: var(--s-4); }
.hm-prose :is(h2, h3, h4) { margin-top: var(--s-7); }
.hm-prose h2 { font-size: var(--t-h3); }
.hm-prose h3 { font-size: var(--t-card); }
.hm-prose h4 { font-size: var(--t-body); font-family: var(--font-text); font-weight: 600; }
.hm-prose :is(ul, ol) { padding-left: 1.25em; display: grid; gap: var(--s-2); }
.hm-prose ul { list-style: disc; }
.hm-prose ol { list-style: decimal; }
.hm-prose a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.hm-prose a:hover { text-decoration-color: currentColor; }
.hm-prose strong { font-weight: 600; }
.hm-prose img { border-radius: var(--r-lg); height: auto; }
.hm-prose figure { margin-inline: 0; }
.hm-prose figcaption { font-size: var(--t-small); color: var(--muted); margin-top: var(--s-2); }
.hm-prose blockquote { border-left: 2px solid var(--line-strong); padding-left: var(--s-5); color: var(--muted); }
.hm-prose hr { border: 0; border-top: 1px solid var(--line); margin-block: var(--s-7); }
.hm-prose table { width: 100%; border-collapse: collapse; font-size: var(--t-small); }
.hm-prose :is(th, td) { text-align: left; padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--line); vertical-align: top; }
.section-head .hm-prose { font-size: var(--t-lead); line-height: 1.5; }

/* ---------------------------------------------------------------- Galerie-Kategorien: Kachel mit Titelbild, Name, Anzahl */
.hm-cat { display: flex; flex-direction: column; gap: var(--s-3); min-height: 0; color: var(--ink); text-decoration: none; }
.hm-cat__pic { flex: 1 1 auto; min-height: 0; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); --ratio: 100%; }
.hm-cat__pic > .frame__img { transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .hm-cat:hover .hm-cat__pic > .frame__img { transform: scale(1.03); } }
.hm-cat:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: var(--r-lg); }
.hm-cat__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
/* Startseite: Kacheln füllen die Höhe des Abschnitts (Desktop) */
@media (min-width: 1024px) {
  .hm-strip--cats > .hm-cat { height: 100%; }
  .hm-strip--cats .hm-cat__pic { --ratio: 0px; flex: 1 1 0; }
}
/* Übersicht auf der Seite Galerie */
.hm-cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-8) var(--gutter); }
@media (max-width: 1023px) { .hm-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 479px) { .hm-cats { grid-template-columns: minmax(0, 1fr); } }
.hm-gallery--after { margin-top: var(--s-9); }
.hm-back { margin-bottom: var(--s-6); }
@media (max-width: 1023px) {
  .hm-strip--3 > .hm-cat:last-child { grid-column: 1 / -1; }
  .hm-strip--3 > .hm-cat:last-child .hm-cat__pic { --ratio: 50%; }
  .hm-cats > .hm-cat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .hm-cats > .hm-cat:last-child:nth-child(odd) .hm-cat__pic { --ratio: 50%; }
}
@media (max-width: 479px) { .hm-cats > .hm-cat:last-child:nth-child(odd) .hm-cat__pic { --ratio: 100%; } }
