/* ==========================================================================
   Basis: Reset, Raster, Menü, Bildvergrösserung und die Bausteine der
   Unterseiten. Farben, Schriften und Abstände setzt src/designs/n/stil.css
   über Variablen. Mobil zuerst: unter 900 px gelten die Handy-Masse.
   ========================================================================== */

@font-face { font-family: 'Manrope'; font-weight: 700; font-display: swap; src: url(/fonts/manrope-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-weight: 700; font-display: swap; src: url(/fonts/manrope-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'DM Sans'; font-weight: 400; font-display: swap; src: url(/fonts/dm-sans-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'DM Sans'; font-weight: 400; font-display: swap; src: url(/fonts/dm-sans-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'DM Sans'; font-weight: 500; font-display: swap; src: url(/fonts/dm-sans-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'DM Sans'; font-weight: 500; font-display: swap; src: url(/fonts/dm-sans-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'DM Sans'; font-weight: 700; font-display: swap; src: url(/fonts/dm-sans-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------------------------------------------------------------- Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: var(--body); line-height: 1.5; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
/* Seite auf dem Handy nie seitlich verschiebbar (Safari auf dem iPhone beachtet overflow-x nur auf body nicht zuverlässig). clip macht keinen eigenen Scrollbereich, das Scrollen der Seite bleibt gleich */
@supports (overflow: clip) { html, body { overflow-x: clip; } }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus, var(--ink)); outline-offset: 3px; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 12px 16px; font-weight: 700; }
.skip:focus { top: 8px; }

/* ---------------------------------------------------------------- Raster */
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--pad)); margin-inline: auto; padding-inline: var(--pad); }
.schmal { max-width: calc(760px + 2 * var(--pad)); }

/* ---------------------------------------------------------------- Typografie */
.h1, .h2, .h3 { font-family: var(--f-head); font-weight: var(--w-head); letter-spacing: var(--ls-head, 0); color: inherit; text-wrap: balance; overflow-wrap: break-word; }
@media (max-width: 599.98px) { .h1, .h2, .h3 { hyphens: auto; -webkit-hyphens: auto; } }
.h1 { font-size: var(--h1); line-height: var(--lh-h1); }
.h2 { font-size: var(--h2); line-height: var(--lh-h2); }
.h3 { font-size: var(--h3); line-height: var(--lh-h3, 1.2); }
.lead { font-size: var(--lead); line-height: var(--lh-lead, 1.4); }
.body { font-size: var(--body); line-height: 1.5; }
.body p + p { margin-top: 1em; }
.small { font-size: var(--small); line-height: 1.45; }
.textlink { color: var(--accent); font-family: var(--f-link, var(--f-head)); font-weight: var(--w-link, 700); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.textlink:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------------------------------------------------------------- Buttons (52 px, Figma TOP/x/Button) */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 12px 20px; font-family: var(--f-btn); font-weight: 700; font-size: 16px; line-height: 1.25; letter-spacing: var(--ls-btn, 0); text-decoration: none; text-align: center; background: var(--accent); color: #fff; transition: background-color .15s ease; border-radius: var(--radius-btn, 0); }
.btn:hover { background: var(--hover); }
.btn--hell { background: #fff; color: var(--ink); }
.btn--hell:hover { background: var(--soft); }
.btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.dunkel .btn:focus-visible, .dunkel :focus-visible { outline-color: #fff; }

/* ---------------------------------------------------------------- Kopfzeile Grundlagen */
/* Kopfzeile: bleibt oben stehen und wird beim Scrollen kleiner (Klasse kopf-klein am body, gesetzt in seite.js).
   Höhe der grossen Kopfzeile pro Design in --kopf-h (stil.css), damit der Inhalt nicht darunter verschwindet. */
.kopf { position: fixed; top: 0; left: 0; right: 0; z-index: 30; transition: height .25s ease, padding .25s ease, background-color .25s ease, box-shadow .25s ease; }
.kopf .logo-link { transition: width .25s ease; }
body:not(.kopf-ueber-bild) { padding-top: var(--kopf-h, 0px); }
html { scroll-padding-top: 88px; }
.nav-links { display: none; }
.menue-knopf { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; font-weight: 700; }
@media (min-width: 900px) {
  .nav-links { display: flex; }
  .menue-knopf, .nur-mobil { display: none !important; }
}
@media (max-width: 899.98px) { .nur-desktop { display: none !important; } }
.nav-links a { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.nav-links a:not(.btn):hover { text-decoration: underline; text-underline-offset: 6px; }
.nav-links a[aria-current="page"]:not(.btn) { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.logo-link { display: inline-flex; color: inherit; }
.logo-link svg { width: 100%; height: auto; }

/* ---------------------------------------------------------------- Menü (Figma «Mobile / Menü geöffnet») */
.menue { margin: 0; padding: 0; border: 0; width: 100%; max-width: none; height: 100%; max-height: none; background: var(--bg); color: var(--ink); }
.menue[open] { display: block; animation: einblenden .18s ease-out; }
.menue::backdrop { background: transparent; }
@keyframes einblenden { from { opacity: 0; } to { opacity: 1; } }
.menue-innen { padding: 24px; padding-top: max(24px, env(safe-area-inset-top)); display: flex; flex-direction: column; gap: 32px; min-height: 100%; }
.menue-kopf { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 44px; }
.menue-kopf .logo-link { width: 200px; }
.menue-zu { min-height: 44px; display: inline-flex; align-items: center; }
.menue-liste { display: flex; flex-direction: column; gap: 32px; }
.menue-liste li + li { border-top: 1px solid var(--line); padding-top: 32px; margin-top: 0; }
.menue-liste a { display: flex; align-items: center; min-height: 44px; text-decoration: none; }
.menue-liste .klein a { min-height: 36px; }
.menue .btn { align-self: flex-start; min-width: 240px; }
body.menue-offen { overflow: hidden; }

/* ---------------------------------------------------------------- Bildvergrösserung */
.lightbox { margin: 0; padding: 0; border: 0; width: 100%; max-width: none; height: 100%; max-height: none; background: rgba(12, 12, 12, .96); color: #fff; }
.lightbox[open] { display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; }
.lightbox::backdrop { background: rgba(0, 0, 0, .6); }
.lightbox figure { grid-column: 2; display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); max-height: calc(100dvh - 140px); width: auto; object-fit: contain; }
.lightbox figcaption { font: 15px/1.4 system-ui, sans-serif; text-align: center; opacity: .9; min-height: 1.4em; }
.lightbox button { color: #fff; width: 56px; height: 56px; font-size: 40px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.lightbox button:hover { background: rgba(255, 255, 255, .1); }
.lb-zu { position: absolute; top: max(8px, env(safe-area-inset-top)); right: 8px; }
.lb-zurueck { grid-column: 1; }
.lb-weiter { grid-column: 3; }
.lightbox.einzeln .lb-zurueck, .lightbox.einzeln .lb-weiter { visibility: hidden; }
.lb-zahl { position: absolute; left: 0; right: 0; bottom: max(16px, env(safe-area-inset-bottom)); text-align: center; font: 14px system-ui, sans-serif; opacity: .8; }
@media (max-width: 599.98px) {
  .lightbox[open] { grid-template-columns: 0 1fr 0; }
  .lb-zurueck, .lb-weiter { position: absolute; bottom: max(4px, env(safe-area-inset-bottom)); }
  .lb-zurueck { left: 8px; } .lb-weiter { right: 8px; }
}

/* ---------------------------------------------------------------- Bausteine der Unterseiten */
.blk { padding-block: var(--sec); }
.blk > .wrap > .h2, .blk > .wrap > .h3 { margin-bottom: var(--gap); }
.blk .intro { max-width: 760px; margin-top: calc(var(--gap) * -0.5); margin-bottom: var(--gap); }

/* Bild und Text */
.bt-raster { display: grid; gap: 32px; }
.bt-bild img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.format-hoch .bt-bild img { aspect-ratio: 3 / 4; object-fit: contain; background: var(--soft); }
.bt-text { display: flex; flex-direction: column; gap: 24px; }
.bt-text .h2 { margin: 0; }
@media (min-width: 900px) {
  .bt-raster { grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
  .seite-links .bt-bild { order: 2; }
  .format-hoch .bt-raster { grid-template-columns: 2fr 3fr; }
  .format-hoch.seite-links .bt-raster { grid-template-columns: 3fr 2fr; }
}
.liste li { position: relative; padding-left: 24px; }
.liste li + li { margin-top: 8px; }
.liste li::before { content: ''; position: absolute; left: 0; top: .65em; width: 10px; height: 2px; background: var(--accent); }
.mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.mini img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.mini .g-titel { display: none; }

/* Kacheln */
.kacheln { display: grid; gap: 32px; }
@media (min-width: 600px) { .kacheln { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .kacheln.n3, .kacheln.n6 { grid-template-columns: repeat(3, 1fr); } }
.kachel { display: flex; flex-direction: column; gap: 12px; text-decoration: none; height: 100%; }
.k-bild { overflow: hidden; display: block; }
.k-bild img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .4s ease; }
.kachel:hover .k-bild img { transform: scale(1.03); }
.kachel:hover .k-titel { text-decoration: underline; text-underline-offset: 5px; }
.k-text { color: var(--muted); }
.dunkel .k-text { color: inherit; opacity: .85; }

/* Galerie */
.galerie { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 900px) { .galerie { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 1200px) { .galerie { grid-template-columns: repeat(4, 1fr); } }
.g-item { display: block; position: relative; overflow: hidden; text-decoration: none; background: var(--soft); }
.g-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .4s ease, opacity .2s; }
.g-item:hover img { transform: scale(1.03); }
.galerie .g-titel { display: block; padding: 8px 0 0; font-size: var(--small); line-height: 1.45; background: var(--bg); }

/* Zeitleiste */
.zeit li { display: grid; gap: 4px; padding-block: 20px; border-top: 1px solid var(--line); }
.zeit li:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .zeit li { grid-template-columns: 200px 1fr; gap: 32px; padding-block: 28px; } .zeit p { max-width: 760px; } }
.z-jahr { color: var(--accent); }

/* Team */
.team { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px 12px; }
@media (min-width: 900px) { .team { grid-template-columns: repeat(4, 1fr); gap: 40px 24px; } }
.team img, .t-leer { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 60% 30%; margin-bottom: 12px; display: block; background: var(--soft); }
.t-name { display: block; font-family: var(--f-head); font-weight: var(--w-head); letter-spacing: var(--ls-head, 0); font-size: 16px; line-height: 1.25; }
.t-rolle { display: block; color: var(--muted); }

/* Logos (gleichwertig, einfarbig gemäss Rüegg-Richtlinie S. 11) */
.logos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (min-width: 900px) { .logos { grid-template-columns: repeat(5, 1fr); gap: 24px; } }
.logos li { background: #fff; aspect-ratio: 2 / 1; display: flex; align-items: center; justify-content: center; padding: 12px; border: 1px solid var(--line); }
.logos img { max-height: 100%; width: auto; object-fit: contain; filter: grayscale(1) contrast(1.1); }

/* Rüegg Premium Partner: Siegel Ash Grey auf heller Fläche */
.partner { display: flex; flex-direction: column; gap: 24px; background: var(--partner-bg, var(--soft)); color: var(--ink); padding: 24px; }
.partner .siegel { width: 88px; height: 88px; flex: none; }
.p-text { display: flex; flex-direction: column; gap: 12px; }
.p-text .mehr .textlink { min-height: 32px; }
@media (min-width: 900px) { .partner { flex-direction: row; align-items: center; gap: 32px; padding: 32px; } .partner .siegel { width: 112px; height: 112px; } }

/* Meldungen */
.news { display: flex; flex-direction: column; gap: 56px; }
.meldung { display: grid; gap: 20px; }
.m-bild img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.m-text { display: flex; flex-direction: column; gap: 12px; }
.m-datum { color: var(--muted); }
.m-text .mini { margin-top: 8px; }
@media (min-width: 900px) { .meldung { grid-template-columns: 5fr 7fr; gap: 48px; align-items: start; } .news { gap: 72px; } }

/* Video */
.video { width: 100%; aspect-ratio: 16 / 9; background: #000; }

/* Kontakt */
.orte { display: grid; gap: 40px; }
@media (min-width: 900px) { .orte { grid-template-columns: repeat(3, 1fr); gap: 64px; } }
.orte li { display: flex; flex-direction: column; gap: 12px; }
.tel { font-family: var(--f-head); font-weight: 700; font-size: 18px; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.tel:hover { text-decoration: underline; }

/* Rechtstexte */
.blk-recht .h1 { margin-bottom: 16px; }
.blk-recht .h3 { margin-top: 40px; margin-bottom: 8px; }
.blk-recht .small { color: var(--muted); }

/* ---------------------------------------------------------------- Fusszeile (Kontaktbereich aus Figma) */
.fuss a { text-decoration: none; }
.fuss a:hover { text-decoration: underline; text-underline-offset: 4px; }
.fuss-seiten { display: flex; flex-wrap: wrap; gap: 0 24px; }
.fuss-seiten a { min-height: 44px; display: inline-flex; align-items: center; }
.fuss-recht { display: flex; flex-direction: column; gap: 0; }
.fuss-recht a { min-height: 44px; display: inline-flex; align-items: center; }
@media (min-width: 900px) { .fuss-recht { flex-direction: row; justify-content: space-between; align-items: flex-start; gap: 16px; } }
