/* Sascha Wett 2026: Unterseiten (Leistungen, Projekte, Kochbücher, Portfolio)
   Baut auf home-2026.css auf: gleiche Farben, Schriften, Kopfleiste und Fußzeile. */

.sub main { padding-top: 84px; }
.sub .section { padding-left: var(--m); padding-right: var(--m); }
.sub .section + .section { margin-top: clamp(72px, 9vw, 140px); }
.sub .eyebrow { display: block; font: 700 12px/1.3 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.sub h1 em, .sub h2 em { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 400; letter-spacing: -.045em; }

/* Knopf aus den alten Seiten bekommt die neue Form */
.sub .pill { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; background: var(--accent); color: var(--ink); font: 700 var(--t-s)/1 var(--body); text-decoration: none; transition: background-color .18s ease, color .18s ease, transform .14s var(--ease-out); }
.sub .pill:hover { background: var(--bg); color: var(--ink); }
.sub .pill:active { transform: scale(.97); }
.sub .text-link { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .25em; text-decoration-color: var(--accent); }

/* Kopf der Seite */
.project-hero { padding-top: clamp(40px, 6vw, 88px); }
.project-crumbs { margin-bottom: clamp(32px, 4vw, 56px); font-size: var(--t-xs); color: var(--muted); }
.project-crumbs a { text-decoration: underline; text-decoration-color: rgba(21,60,53,.3); text-underline-offset: .2em; transition: text-decoration-color .18s ease; }
.project-crumbs a:hover { text-decoration-color: var(--ink); }
.project-hero > .eyebrow { display: inline-block; margin-right: 14px; vertical-align: middle; }
.project-hero .project-badge { display: inline-block; vertical-align: middle; }
.project-hero h1 { margin-top: 28px; max-width: 18ch; hyphens: auto; overflow-wrap: break-word; font-size: var(--t-l); font-weight: 800; letter-spacing: -.03em; line-height: .98; }
.project-intro { margin-top: clamp(40px, 5vw, 72px); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: start; }
.project-intro > p { grid-column: 1 / 7; font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; }
.project-meta { grid-column: 8 / 13; margin: 0; border-top: 2px solid var(--ink); }
.project-meta div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(21,60,53,.2); }
.project-meta dt { font-size: var(--t-xs); color: var(--muted); }
.project-meta dd { margin: 0; font-size: var(--t-xs); font-weight: 700; line-height: 1.45; }

/* Bilder: ruhiges Raster, einheitliche Ausschnitte, ganzes Bild per Klick */
.project-gallery, .case-gallery { display: grid; gap: 10px; }
.sub .project-gallery, .sub .case-gallery { padding-inline: max(var(--m), calc((100% - 1200px) / 2)); }
.project-gallery figure, .case-gallery figure { margin: 0; min-width: 0; overflow: hidden; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.project-gallery .image-open, .case-gallery .image-open { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.project-gallery img, .case-gallery img { display: block; width: 100%; height: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .6s var(--ease-out), opacity .25s ease; }
.project-gallery figure:hover img, .case-gallery figure:hover img { transform: scale(1.03); }
.image-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* neun Bilder: ein großes, acht kleine, vier Spalten */
.project-gallery.g-feature { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.project-gallery.g-feature > figure:first-child { grid-column: span 2; grid-row: span 2; }
/* drei oder vier Bilder: eine Reihe */
.project-gallery.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sub .project-gallery.g-3 { padding-inline: max(var(--m), calc((100% - 1040px) / 2)); }
.project-gallery.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.project-gallery.g-2, .project-gallery.g-1 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sub .project-gallery.g-2, .sub .project-gallery.g-1 { padding-inline: max(var(--m), calc((100% - 820px) / 2)); }
/* Projekte */
.case-gallery { grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); }
.case-gallery .lead { grid-column: 1 / -1; }
.case-gallery .lead img { aspect-ratio: 2 / 1; }
.case-gallery:not(.tall):not(.portrait) figure:not(.lead) img { aspect-ratio: 3 / 2; }
.sub .case-gallery.portrait { padding-inline: max(var(--m), calc((100% - 1040px) / 2)); }
/* Titelbild links, zwei Bilder rechts übereinander */
.case-gallery.g-side { grid-template-columns: 2fr 1fr; }
.case-gallery.g-side .lead { grid-column: 1; grid-row: span 2; }
.case-gallery.g-side .lead { position: relative; }
.case-gallery.g-side .lead img { position: absolute; inset: 0; aspect-ratio: auto; }
.case-gallery.g-side figure:not(.lead) img { aspect-ratio: 3 / 2; }
.zoom img { cursor: zoom-in; }

/* Leistungen und Anfrage */
.project-did { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: start; }
.project-did > div:first-child { grid-column: 1 / 7; }
.project-did ul { list-style: none; margin: 20px 0 0; padding: 0; border-top: 2px solid var(--ink); }
.project-did li { position: relative; padding: 16px 0 16px 26px; border-bottom: 1px solid rgba(21,60,53,.2); font-size: var(--t-s); line-height: 1.45; }
.project-did li::before { content: ""; position: absolute; left: 0; top: 1.15em; width: 9px; height: 9px; background: var(--accent); }
.project-cta { grid-column: 8 / 13; background: var(--ink); color: var(--on-dark); padding: clamp(28px, 3.2vw, 44px); display: grid; gap: 18px; justify-items: start; }
.project-cta h2 { font-size: var(--t-m); line-height: 1.1; }
.project-cta p { color: var(--on-dark-muted); }

/* Zitat */
.service-quote blockquote { margin: 0; padding-top: 28px; border-top: 2px solid var(--ink); max-width: 1100px; }
.service-quote p { font: 400 clamp(24px, 2.8vw, 42px)/1.3 Georgia, "Times New Roman", serif; font-style: italic; letter-spacing: -.02em; }
.service-quote footer { margin-top: 20px; font-size: var(--t-xs); font-weight: 700; }

/* Ablauf: dunkle Fläche wie auf der Startseite */
.service-steps { margin-left: var(--m); margin-right: var(--m); padding: clamp(32px, 5vw, 72px); background: var(--ink); color: var(--on-dark); }
.sub .service-steps.section { padding-left: clamp(32px, 5vw, 72px); padding-right: clamp(32px, 5vw, 72px); }
.service-steps .eyebrow { color: var(--on-dark); }
.service-steps ol { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; counter-reset: s; }
.service-steps li { counter-increment: s; display: grid; gap: 8px; align-content: start; }
.service-steps li::before { content: counter(s, decimal-leading-zero); font: 800 var(--t-s)/1.5 var(--head); color: var(--accent); }
.service-steps strong { font: 700 var(--t-s)/1.3 var(--head); }
.service-steps span { font-size: var(--t-xs); line-height: 1.55; color: var(--on-dark-muted); }

/* Weiterlesen */
.project-next-grid { margin-top: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); border-top: 2px solid var(--ink); }
.project-next-link { display: grid; gap: 6px; align-content: start; padding: 22px 24px 26px 0; border-bottom: 1px solid rgba(21,60,53,.2); text-decoration: none; }
.project-next-link span { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.project-next-link strong { font: 700 var(--t-m)/1.15 var(--head); }
.project-next-link strong::after { content: "\2192"; display: inline-block; margin-left: .3em; color: #2f8577; transition: transform .2s var(--ease-out); }
.project-next-link:hover strong { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--accent); text-underline-offset: .2em; }
.project-next-link:hover strong::after { transform: translateX(4px); }

/* Häufige Fragen: wie auf der Startseite, Überschrift aus der Zeile darüber */
.sub .faq { padding: 0 var(--m) var(--gap-section); }
.sub .faq.section { margin-top: var(--gap-section); }
.sub .faq > .eyebrow, .sub .faq > .sub-h { grid-column: 1 / 5; }
.sub-h, .sub .faq > h2.sub-h { font-size: clamp(30px, 2.9vw, 46px); hyphens: auto; overflow-wrap: break-word; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.service-steps .sub-h { font-size: clamp(28px, 2.8vw, 44px); }
.sub main > .section:last-child:not(.faq) { margin-bottom: var(--gap-section); }

/* Portfolio */
.portfolio-page main { padding-top: 84px; }
.portfolio-heading { padding: clamp(40px, 6vw, 88px) var(--m) 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: end; }
.portfolio-heading h1 { grid-column: 1 / 8; font-size: var(--t-l); font-weight: 800; letter-spacing: -.03em; line-height: .95; }
.portfolio-heading p { grid-column: 9 / 13; color: var(--muted); }
.portfolio-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 40px var(--m) 32px; }
.portfolio-filters button { min-height: 44px; padding: 0 18px; border: 1.5px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink); font: 700 var(--t-xs)/1 var(--body); cursor: pointer; transition: background-color .18s ease, color .18s ease, transform .14s var(--ease-out); }
.portfolio-filters button:hover { background: rgba(21,60,53,.08); }
.portfolio-filters button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.portfolio-filters button:active { transform: scale(.97); }
.filter-link { margin-left: 12px; font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .25em; text-decoration-color: var(--accent); }
.filter-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.photo-wall { columns: 3; column-gap: 8px; padding: 0 var(--m) var(--gap-section); }
.photo-wall button { display: block; width: 100%; margin: 0 0 8px; padding: 0; border: 0; background: none; break-inside: avoid; cursor: zoom-in; overflow: hidden; }
.photo-wall img { width: 100%; height: auto; transition: transform .6s var(--ease-out), opacity .25s ease; }
.photo-wall button:hover img { transform: scale(1.02); }
.photo-wall [hidden], .portfolio-film[hidden] { display: none !important; }
.portfolio-film { padding: 0 var(--m) var(--gap-section); text-align: center; }
.portfolio-film h2 { margin-bottom: 24px; font-size: var(--t-m); }
.portfolio-film video { display: block; width: min(100%, 420px); max-height: 80vh; margin: auto; background: var(--ink); }

/* Bildansicht */
dialog#lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 56px var(--m) 24px; border: 0; background: var(--dark); color: var(--on-dark); }
dialog#lightbox::backdrop { background: var(--dark); }
dialog#lightbox[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; gap: 14px; }
#full-image { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
#image-caption { font-size: var(--t-xs); color: var(--on-dark-muted); text-align: center; }
dialog#lightbox .close { position: absolute; top: 12px; right: var(--m); min-height: 40px; padding: 0 16px; border: 0; background: var(--accent); color: var(--ink); font: 700 var(--t-xs)/1 var(--body); cursor: pointer; }
.modal-open { overflow: hidden; }

/* Tablet */
@media (max-width: 1023px) {
  .project-intro > p, .project-meta { grid-column: 1 / -1; }
  .project-did > div:first-child, .project-cta { grid-column: 1 / -1; }
  .service-steps ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sub .faq > .eyebrow, .sub .faq > .sub-h { grid-column: 1 / -1; }
  .portfolio-heading h1, .portfolio-heading p { grid-column: 1 / -1; }
  .photo-wall { columns: 2; }
  .project-gallery.g-feature { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .project-gallery.g-feature > figure:first-child { grid-column: span 3; grid-row: auto; }
  .project-gallery.g-feature > figure:first-child img { aspect-ratio: 16 / 9; }
}

/* Telefon */
@media (max-width: 600px) {
  .sub main, .portfolio-page main { padding-top: 70px; }
  .project-hero > .eyebrow { display: block; margin: 0 0 10px; }
  .project-hero h1, .portfolio-heading h1 { font-size: min(var(--t-l), 9.4vw); }
  .project-meta div { grid-template-columns: 1fr; gap: 2px; }
  .project-gallery, .case-gallery { gap: 6px; }
  .sub .project-gallery, .sub .case-gallery, .sub .project-gallery.g-3, .sub .case-gallery.portrait { padding-inline: var(--m); }
  .project-gallery.g-feature, .project-gallery.g-3, .project-gallery.g-4, .case-gallery, .case-gallery.g-side { grid-template-columns: 1fr 1fr; }
  .project-gallery.g-feature > figure:first-child, .project-gallery.g-3 > figure:first-child { grid-column: 1 / -1; grid-row: auto; }
  .project-gallery.g-feature > figure:first-child img, .project-gallery.g-3 > figure:first-child img { aspect-ratio: 4 / 3; }
  .case-gallery .lead, .case-gallery.g-side .lead { grid-column: 1 / -1; grid-row: auto; }
  .case-gallery .lead img, .case-gallery.g-side .lead img { position: static; aspect-ratio: 3 / 2; }
  .case-gallery.tall figure:not(.lead):last-child, .case-gallery.portrait figure:first-child { grid-column: 1 / -1; }
  .case-gallery.tall figure:not(.lead):last-child img, .case-gallery.portrait figure:first-child img { aspect-ratio: 4 / 3; }
  .service-steps { margin-left: 0; margin-right: 0; }
  .service-steps ol { grid-template-columns: 1fr; gap: 24px; }
  .photo-wall { columns: 2; column-gap: 6px; }
  .photo-wall button { margin-bottom: 6px; }
  .filter-link { margin: 10px 0 0; flex-basis: 100%; }
}
