/* Panarese Restaurierungen – Entwurf B */
@font-face { font-family: "DM Serif Display"; src: url("fonts/dm-serif-display-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Serif Display"; src: url("fonts/dm-serif-display-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Karla"; src: url("fonts/karla-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Karla"; src: url("fonts/karla-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --kalk: #f3f3f0;
  --kalk-2: #e6e6e1;
  --tinte: #211d1a;
  --grau: #5e5a55;
  --nuss: #6b4a2e;
  --blau: #1d4a5e;
  --blau-tief: #153846;
  --messing: #d9b865;
  --serif: "DM Serif Display", Georgia, serif;
  --sans: "Karla", "Segoe UI", system-ui, sans-serif;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --max: 88rem;
  --kopf-h: 4.25rem;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--kalk); color: var(--tinte); font: 400 1.125rem/1.6 var(--sans); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blau); outline-offset: 3px; }
.dunkel :focus-visible, .fuss :focus-visible { outline-color: var(--messing); }
p, dd, .inhalt li, .stueck-text li { max-width: 64ch; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.06; letter-spacing: -.012em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.6vw, 5.25rem); }
h2 { font-size: clamp(1.9rem, 3.8vw, 3.5rem); }
h3 { font-size: clamp(1.4rem, 2vw, 1.75rem); line-height: 1.15; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--tinte); color: var(--kalk); padding: .6rem 1rem; z-index: 20; }
.skip:focus { top: 1rem; }
.wrap { width: min(100% - 2 * var(--pad), var(--max)); margin-inline: auto; }
.klein { font-size: .9375rem; color: var(--grau); }
.meta { font-size: .9375rem; color: var(--grau); }

/* Kopf */
.kopf { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--kalk) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--kalk-2); }
.kopf .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; min-height: 4.25rem; flex-wrap: wrap; }
.marke { font-family: var(--serif); font-size: 1.5rem; text-decoration: none; line-height: 1; display: flex; flex-direction: column; padding-block: .5rem; }
.marke small { font-family: var(--sans); font-size: .8125rem; color: var(--grau); margin-top: .25rem; }
.nav { display: flex; gap: .25rem 1.5rem; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.nav a { text-decoration: none; display: inline-block; padding: .65rem 0; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: currentColor; }
@media (max-width: 40rem) {
  :root { --kopf-h: 0px; }
  .kopf { position: static; }
  .kopf .wrap { padding-block: .5rem; }
  .nav { gap: 0 .7rem; font-size: .875rem; }
}

/* Hero */
.hero { padding-block: clamp(2.5rem, 7vw, 6rem) clamp(3rem, 8vw, 7rem); }
.hero .wrap { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2rem var(--pad); align-items: center; }
.hero-text { grid-column: 1 / span 6; grid-row: 1; position: relative; z-index: 1; }
.hero h1 { margin-bottom: 1.75rem; }
.hero-text p { font-size: 1.1875rem; max-width: 38ch; }
.hero-bild { grid-column: 7 / -1; grid-row: 1; margin: 0 calc(-1 * max(var(--pad), (100vw - var(--max)) / 2)) 0 0; max-width: 1000px; justify-self: end; width: calc(100% + max(var(--pad), (100vw - var(--max)) / 2)); }
.hero-bild img { width: 100%; aspect-ratio: 1000 / 654; object-fit: cover; }
.hero-bild figcaption { margin-top: .6rem; }
.knoepfe { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; margin-top: 2rem; align-items: center; }
.knopf { display: inline-block; background: var(--tinte); color: var(--kalk); text-decoration: none; padding: .9rem 1.4rem; font-weight: 600; transition: background-color .2s; }
.knopf:hover { background: var(--blau); }
@media (max-width: 56rem) {
  .hero-text, .hero-bild { grid-column: 1 / -1; grid-row: auto; }
  .hero-bild { width: auto; margin-right: 0; }
}

/* Vorher/Nachher */
.dunkel { background: var(--blau); color: var(--kalk); }
.dunkel .meta, .dunkel .klein { color: #c9d5da; }
.dunkel a { color: var(--kalk); }
.vergleich-abschnitt { padding-block: clamp(3.5rem, 8vw, 7rem); }
.vergleich-kopf { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.5rem var(--pad); margin-bottom: 2.5rem; align-items: end; }
.vergleich-kopf h2 { grid-column: 1 / span 7; }
.vergleich-kopf p { grid-column: 8 / -1; margin: 0; }
@media (max-width: 56rem) { .vergleich-kopf h2, .vergleich-kopf p { grid-column: 1 / -1; } }

.ba { margin: 0; }
.ba-buehne { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.ba-buehne > div { position: relative; margin: 0; }
.ba-buehne img { width: 100%; }
.ba-schild { position: absolute; top: .75rem; padding: .3rem .7rem; font-size: .875rem; font-weight: 600; background: var(--kalk); color: var(--tinte); }
.ba-vor .ba-schild { left: .75rem; }
.ba-nach .ba-schild { right: .75rem; }
.ba-regler { display: none; }
.ba figcaption { margin-top: .9rem; }

/* mit JS: übereinander, Regler */
.js .ba-buehne { display: block; position: relative; overflow: hidden; touch-action: pan-y; }
.js .ba-nach { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos, 50%)); }
.js .ba-nach img { height: 100%; object-fit: cover; }
.js .ba-buehne::after { content: ""; position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px; margin-left: -1px; background: var(--kalk); pointer-events: none; }
.js .ba-griff { position: absolute; top: 50%; left: var(--pos, 50%); width: 3rem; height: 3rem; margin: -1.5rem 0 0 -1.5rem; border-radius: 50%; background: var(--kalk); color: var(--tinte); display: grid; place-items: center; pointer-events: none; z-index: 2; box-shadow: 0 2px 10px rgb(0 0 0 / .25); }
.ba-griff { display: none; }
.js .ba-regler { display: block; position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; z-index: 3; }
.js .ba:has(.ba-regler:focus-visible) .ba-buehne { outline: 3px solid var(--messing); outline-offset: 4px; }
.ba-hinweis { display: none; }
.js .ba-hinweis { display: block; }

/* Scroll-Szene auf der Startseite */
.js .szene { height: 230vh; }
.js .szene-sticky { position: sticky; top: var(--kopf-h); height: calc(100vh - var(--kopf-h)); display: flex; flex-direction: column; justify-content: center; padding-block: 1rem; }
.js .szene .ba-buehne { width: min(100%, calc(68vh * 800 / 519)); aspect-ratio: 800 / 519; margin-inline: auto; }
.js .szene .ba-vor img { height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: reduce) {
  .js .szene { height: auto; }
  .js .szene-sticky { position: static; height: auto; }
}

/* Werkstücke-Index */
.abschnitt { padding-block: clamp(3.5rem, 8vw, 7rem); }
.abschnitt-kopf { display: flex; justify-content: space-between; align-items: end; gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: clamp(2rem, 5vw, 4rem); }
.abschnitt-kopf p { margin: 0; }
.objekte { list-style: none; margin: 0; padding: 0; }
.objekt { border-top: 1px solid #cfcfc8; }
.objekt:last-child { border-bottom: 1px solid #cfcfc8; }
.objekt a { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem var(--pad); padding-block: clamp(1.25rem, 3vw, 2.5rem); text-decoration: none; align-items: center; }
.objekt-bild { grid-column: 1 / span 6; overflow: hidden; }
.objekt-bild img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.objekt-text { grid-column: 8 / -1; }
.objekt h3 { font-size: clamp(1.9rem, 3.6vw, 3.25rem); line-height: 1.02; margin-bottom: .75rem; }
.objekt p { margin: .5rem 0 0; }
.objekt .mehr { display: inline-block; margin-top: 1.25rem; border-bottom: 1px solid currentColor; padding-bottom: .1rem; }
.objekt a:hover img { transform: scale(1.04); }
.objekt a:hover h3 { color: var(--blau); }
@media (max-width: 48rem) { .objekt-bild, .objekt-text { grid-column: 1 / -1; } }

/* Werkstatt-Teaser */

/* Leistungen kurz */
.leistung-kurz { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 2.5rem var(--pad); margin: 0; padding: 0; list-style: none; }
.leistung-kurz h3 { margin-bottom: .6rem; }
.leistung-kurz p { margin: 0; color: var(--grau); }

/* Kontakt */
.kontakt { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2rem var(--pad); }
.kontakt h2 { grid-column: 1 / span 6; }
.kontakt-daten { grid-column: 7 / -1; font-size: 1.1875rem; }
.kontakt-daten address { font-style: normal; margin-bottom: 1.5rem; }
.kontakt-daten dl { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1.5rem; margin: 0 0 1.5rem; }
.kontakt-daten dt { color: var(--grau); }
.dunkel .kontakt-daten dt { color: #c9d5da; }
.kontakt-daten dd { margin: 0; overflow-wrap: anywhere; }
.orte { margin-top: 2rem; }
@media (max-width: 56rem) { .kontakt h2, .kontakt-daten { grid-column: 1 / -1; } }

/* Unterseiten */
.seitenkopf { padding-block: clamp(2.5rem, 7vw, 6rem) clamp(1.5rem, 4vw, 3rem); }
.seitenkopf p { font-size: 1.1875rem; margin-top: 1.5rem; }
.band { width: min(100% - 2 * var(--pad), var(--max)); margin: 0 auto; }
.band img { width: min(100%, 820px); margin-left: auto; }

.stueck { padding-block: clamp(3rem, 7vw, 6rem); border-top: 1px solid #cfcfc8; }
.stueck-kopf { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.5rem var(--pad); margin-bottom: 2.5rem; }
.stueck-kopf h2 { grid-column: 1 / span 7; }
.stueck-kopf .meta { grid-column: 9 / -1; align-self: end; margin: 0; }
.stueck-text { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2rem var(--pad); margin-bottom: 2.5rem; }
.stueck-text > div { grid-column: span 6; }
.stueck-text h3 { font-size: 1.375rem; margin-bottom: .6rem; }
.stueck-text ul { padding-left: 1.1rem; margin: 0; }
.stueck-text li + li { margin-top: .35rem; }
@media (max-width: 56rem) { .stueck-kopf h2, .stueck-kopf .meta, .stueck-text > div { grid-column: 1 / -1; } }


.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 2rem 1.25rem; list-style: none; margin: 0; padding: 0; }
.raster figure { margin: 0; }
.raster img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--kalk-2); }
.raster figcaption { margin-top: .5rem; }

.zwei { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 2rem var(--pad); }
.zwei figure { margin: 0; }
.zwei figcaption { margin-top: .5rem; }

.leistung { padding-block: clamp(2.5rem, 6vw, 5rem); border-top: 1px solid #cfcfc8; display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.5rem var(--pad); }
.leistung > h2 { grid-column: 1 / span 5; font-size: clamp(1.9rem, 3.4vw, 3rem); }
.leistung > .inhalt { grid-column: 7 / -1; }
.leistung ul { padding-left: 1.1rem; margin: 0; }
.leistung li + li { margin-top: .4rem; }
.leistung .zwei, .leistung .daumen { margin-top: 2rem; }
.daumen { display: flex; gap: 1rem; flex-wrap: wrap; }
.daumen figure { margin: 0; width: 150px; }
.daumen figcaption { margin-top: .4rem; }
@media (max-width: 56rem) { .leistung > h2, .leistung > .inhalt { grid-column: 1 / -1; } }




.referenzen { list-style: none; padding: 0; margin: 0; columns: 2 22rem; column-gap: var(--pad); }
.referenzen li { break-inside: avoid; padding-block: .9rem; border-top: 1px solid #cfcfc8; }
.referenzen b { display: block; font-weight: 600; }

.recht { padding-block: clamp(2.5rem, 6vw, 5rem); }
.recht h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin: 2.5rem 0 .75rem; }
.recht address { font-style: normal; }
.offen { background: #fff3c4; padding: 0 .25rem; }

/* Fuß */
.fuss { background: var(--blau-tief); color: #dfe6e9; padding-block: 3rem 2rem; font-size: .9375rem; }
.fuss .wrap { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; justify-content: space-between; align-items: end; }
.fuss .marke { color: var(--kalk); }
.fuss .marke small { color: #c9d5da; }
.fuss ul { list-style: none; padding: 0; margin: 0; display: flex; gap: .5rem 1.5rem; flex-wrap: wrap; }
.fuss a { display: inline-block; padding-block: .7rem; }
.logo { width: 76px; filter: invert(1); opacity: .9; }

/* Karussell: volle Breite, ganze Bilder */
.karussell { margin-top: 1rem; }
.karussell-leiste { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.karussell-leiste .meta { margin: 0 auto 0 0; }
.k-btn, .nur-js { display: none; }
.js .nur-js { display: inline; }
.js .ohne-js { display: none; }
.js .k-btn { display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 50%; border: 1.5px solid currentColor; background: transparent; color: inherit; cursor: pointer; transition: background-color .2s, color .2s; }
.js .k-btn:hover:not(:disabled) { background: var(--tinte); color: var(--kalk); border-color: var(--tinte); }
.dunkel .k-btn:hover:not(:disabled) { background: var(--kalk); color: var(--blau); border-color: var(--kalk); }
.k-btn:disabled { opacity: .35; cursor: default; }
.karussell-spur { --rand: max(var(--pad), (100vw - var(--max)) / 2); display: flex; gap: clamp(.75rem, 2vw, 1.5rem); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--rand); padding: 0 var(--rand) 1rem; margin: 0; list-style: none; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--grau) transparent; }
.karussell-spur li { flex: 0 0 auto; scroll-snap-align: start; margin: 0; }
.karussell-spur img { height: clamp(16rem, 68vh, 46rem); width: auto; max-width: none; user-select: none; -webkit-user-drag: none; }
.karussell-spur:focus-visible { outline-offset: -3px; }
.js .karussell-spur { cursor: grab; }
.karussell-spur.ziehen { cursor: grabbing; scroll-snap-type: none; }
@media (max-width: 48rem) {
  .karussell-spur img { width: calc(100vw - 2 * var(--pad)); height: auto; max-height: 72vh; object-fit: contain; }
}
@media (prefers-reduced-motion: no-preference) { .karussell-spur { scroll-behavior: smooth; } .karussell-spur.ziehen { scroll-behavior: auto; } }

/* Der Restaurator auf der Startseite */
.person { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2.5rem var(--pad); align-items: center; }
.person-bild { grid-column: 1 / span 6; margin: 0; }
.person-text { grid-column: 8 / -1; }
.person-text h2 { font-size: clamp(2.6rem, 5.6vw, 5rem); line-height: 1; margin: .5rem 0 1.5rem; }
.person-text > p { font-size: 1.25rem; }
.stationen { display: grid; grid-template-columns: auto 1fr; gap: .6rem 1.5rem; margin: 2rem 0 2.25rem; padding: 1.25rem 0; border-block: 1px solid #c4c4bc; }
.stationen dt { font-family: var(--serif); font-size: 1.5rem; line-height: 1.2; }
.stationen dd { margin: 0; align-self: center; }
@media (max-width: 56rem) { .person-bild, .person-text { grid-column: 1 / -1; } }
.werkstatt-bild { margin: 0; }
.werkstatt-bild img { width: 100%; max-height: 88vh; object-fit: cover; }
.werkstatt-bild figcaption { margin-top: .6rem; }

/* Restaurator-Seite */
.r-hero { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2rem var(--pad); align-items: end; padding-block: clamp(2rem, 5vw, 4rem) clamp(3rem, 7vw, 6rem); }
.r-hero-text { grid-column: 1 / span 5; padding-bottom: 1rem; }
.r-hero-text h1 { font-size: clamp(3rem, 8vw, 7.5rem); line-height: .95; margin: .75rem 0 2rem; }
.r-hero-text p { font-size: 1.25rem; max-width: 36ch; }
.r-hero figure { grid-column: 6 / -1; margin: 0; }
.r-hero figure img { width: 100%; }
@media (max-width: 56rem) { .r-hero-text, .r-hero figure { grid-column: 1 / -1; } .r-hero figure { grid-row: 1; } }

.weg { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2rem var(--pad); }
.weg-kopf { grid-column: 1 / span 4; align-self: start; position: sticky; top: calc(var(--kopf-h) + 2rem); }
.weg-kopf p { margin-top: 1.25rem; }
.weg ol { grid-column: 6 / -1; list-style: none; margin: 0; padding: 0 0 0 2rem; position: relative; }
.weg ol::before { content: ""; position: absolute; left: 0; top: .5rem; bottom: .5rem; width: 2px; background: #c4c4bc; }
.weg ol::after { content: ""; position: absolute; left: 0; top: .5rem; bottom: .5rem; width: 2px; background: var(--blau); transform-origin: top; transform: scaleY(1); }
.weg li { position: relative; padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.weg li:last-child { padding-bottom: 0; }
.weg li::before { content: ""; position: absolute; left: calc(-2rem - 6px); top: .9rem; width: 14px; height: 14px; border-radius: 50%; background: var(--kalk); border: 2px solid var(--blau); z-index: 1; }
.jahr { display: block; font-family: var(--serif); font-size: clamp(2.6rem, 6vw, 5rem); line-height: 1; color: var(--blau); }
.weg h3 { margin: .5rem 0 .5rem; font-size: clamp(1.4rem, 2.2vw, 1.9rem); }
.weg li p { margin: 0; }
@media (max-width: 56rem) { .weg-kopf, .weg ol { grid-column: 1 / -1; } .weg-kopf { position: static; } }

.leitsatz { margin: 0; text-align: center; padding-block: clamp(4rem, 10vw, 9rem); }
.leitsatz p { font-family: var(--serif); font-size: clamp(2rem, 5vw, 4.5rem); line-height: 1.1; max-width: 22ch; margin: 0 auto; text-wrap: balance; }
.leitsatz footer { margin-top: 1.5rem; }

.ref-gruppen { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2rem var(--pad); }
.ref-gruppen > div:first-child { grid-column: 1 / span 5; }
.ref-gruppen > div:last-child { grid-column: 7 / -1; }
.ref-gruppen h3 { margin-bottom: 1rem; }
@media (max-width: 56rem) { .ref-gruppen > div { grid-column: 1 / -1 !important; } }
.referenzen { columns: auto; }

/* Bewegung – nur wenn erwünscht */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }

  .hero-bild img { animation: lasur 1.3s cubic-bezier(.65, 0, .25, 1) .15s both; }
  .hero h1 { animation: auftritt .9s cubic-bezier(.2, .7, .2, 1) both; }
  .hero-text p, .hero .knoepfe { animation: auftritt .9s cubic-bezier(.2, .7, .2, 1) .25s both; }
  @keyframes lasur { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
  @keyframes auftritt { from { opacity: 0; transform: translateY(1.25rem); } to { opacity: 1; transform: none; } }

  @supports (animation-timeline: view()) {
    .aufdecken { animation: aufdecken linear both; animation-timeline: view(); animation-range: entry 5% cover 35%; }
    .weg ol::after { animation: linie linear both; animation-timeline: view(); animation-range: entry 30% exit 60%; }
    @keyframes linie { from { transform: scaleY(0); } to { transform: scaleY(1); } }
    @keyframes aufdecken { from { clip-path: inset(22% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
  }
}
