/* Albisser AG – Entwurf Seetalwebsites
   Idee: die eigene Zeichnung «Ein Haus voller Handwerk» als Plan der Seite,
   dazu Masslinien wie auf dem Abbundplan. */

:root {
  --papier: #ECE8E0;
  --fichte: #E2D8C8;
  --halle: #2B241D;
  --rinde: #231D17;
  --hell: #EFE9DF;
  --orange: #C8570F;
  --orange-tief: #A9470B;

  --t1: rgba(35, 29, 23, .92);
  --t2: rgba(35, 29, 23, .68);
  --t3: rgba(35, 29, 23, .48);
  --linie: rgba(35, 29, 23, .16);

  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 40px; --s5: 64px; --s6: 104px;
  --rand: 20px;
  --radius: 4px;
  --expo: cubic-bezier(.19, 1, .22, 1);
}
@media (min-width: 900px) { :root { --rand: 40px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--papier);
  color: var(--t1);
  font: 400 17px/1.5 "Schibsted Grotesk", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
.zahl { font-variant-numeric: tabular-nums; }

.rahmen { width: 100%; max-width: calc(1200px + 2 * var(--rand)); margin: 0 auto; padding: 0 var(--rand); }

/* Knöpfe */
.knopf {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 var(--s3);
  background: var(--orange); color: var(--hell);
  border: 0; border-radius: var(--radius);
  font-family: inherit; font-size: 17px; font-weight: 600; line-height: 1; text-decoration: none; cursor: pointer;
  transition: background-color 150ms ease-out, color 150ms ease-out;
}
.knopf:hover { background: var(--orange-tief); }
.knopf--klein { min-height: 40px; padding: 0 var(--s2); font-size: 15px; background: transparent; color: var(--rinde); box-shadow: inset 0 0 0 1px var(--rinde); }
.knopf--klein:hover { background: var(--rinde); color: var(--hell); }
.textlink { text-decoration: underline; text-decoration-color: var(--linie); text-underline-offset: 4px; transition: text-decoration-color 150ms ease-out; }
.textlink:hover { text-decoration-color: currentColor; }

/* Lehrstellen-Balken (Vorbild r-o.com) */
.lehrbalken {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s2);
  padding: 10px var(--rand);
  background: var(--halle); color: rgba(239, 233, 223, .86);
  font-size: 14px; line-height: 1.35; text-decoration: none;
}
.lehrbalken b { color: var(--hell); font-weight: 600; }
.lehrbalken__pfeil { color: var(--orange); font-size: 17px; transition: transform 150ms ease-out; }
.lehrbalken:hover .lehrbalken__pfeil { transform: translateX(4px); }
@media (min-width: 900px) { .lehrbalken { justify-content: center; } }

/* Kopf */
.kopf { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding-top: var(--s2); padding-bottom: var(--s2); }
.marke img { width: 112px; mix-blend-mode: multiply; }
.kopf__nav { display: none; gap: var(--s4); margin-left: auto; font-size: 15px; }
.kopf__nav a { color: var(--t2); text-decoration: none; transition: color 150ms ease-out; }
.kopf__nav a:hover { color: var(--t1); }
@media (min-width: 900px) {
  .marke img { width: 148px; }
  .kopf__nav { display: flex; }
}

/* 1 · Einstieg */
.einstieg { padding-top: var(--s4); }
h1 {
  font-size: clamp(44px, 11.6vw, 112px); font-weight: 560;
  letter-spacing: -.035em; line-height: .98; color: var(--rinde);
  max-width: 11ch; text-wrap: balance;
}
.einstieg__unten { margin-top: var(--s3); display: grid; gap: var(--s3); }
.einstieg__satz { max-width: 52ch; color: var(--t2); }
.einstieg__aktion { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.einstieg__aktion .textlink { font-weight: 500; }
@media (min-width: 900px) {
  .einstieg { padding-top: var(--s5); }
  h1 { max-width: none; font-size: min(7.2vw, 100px); }
  .einstieg__unten { grid-template-columns: minmax(0, 1fr) auto; align-items: end; margin-top: var(--s4); gap: var(--s5); }
}

/* Masslinie: |—— 40 Jahre ——| */
.mass { display: flex; align-items: center; gap: var(--s2); margin: var(--s4) 0 var(--s2); font-size: 14px; color: var(--t2); }
.mass__linie {
  position: relative; flex: 1; height: 1px; background: var(--orange);
  transform-origin: left center;
}
.mass__linie::before, .mass__linie::after {
  content: ""; position: absolute; top: -8px; width: 1px; height: 17px; background: var(--orange);
}
.mass__linie::before { left: 0; } .mass__linie::after { right: 0; }
.mass__wert {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  padding: 0 var(--s1); background: var(--papier); color: var(--orange-tief); font-weight: 600; white-space: nowrap;
}
.js .mass__linie { transform: scaleX(0); transition: transform 900ms var(--expo); }
.js .mass.ist-da .mass__linie { transform: scaleX(1); }
.js .mass__wert { opacity: 0; transition: opacity 400ms ease-out 500ms; }
.js .mass.ist-da .mass__wert { opacity: 1; }

.einstieg__bild { margin: 0; }
.einstieg__bildrahmen { overflow: hidden; height: min(72svh, 760px); min-height: 360px; }
.einstieg__bildrahmen img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.einstieg__bild figcaption { padding-top: var(--s1); font-size: 13px; color: var(--t3); }

/* Abschnitte */
.abschnitt { padding: var(--s5) 0; }
.abschnitt--fichte { background: var(--fichte); }
@media (min-width: 900px) { .abschnitt { padding: var(--s6) 0 calc(var(--s6) + var(--s4)); } }

h2 { font-size: clamp(36px, 7vw, 72px); font-weight: 540; letter-spacing: -.03em; line-height: 1; color: var(--rinde); }
h3 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; color: var(--rinde); }
.kopfzeile { display: grid; gap: var(--s2); margin-bottom: var(--s4); }
.kopfzeile__satz { max-width: 52ch; color: var(--t2); }
@media (min-width: 900px) {
  .kopfzeile { grid-template-columns: 1fr 1fr; align-items: end; gap: var(--s5); margin-bottom: var(--s5); }
}

/* 2 · Haus mit Punkten */
.haus { display: grid; gap: var(--s3); }
.haus__plan { position: relative; margin: 0 calc(var(--rand) * -1); }
@media (min-width: 900px) { .haus__plan { margin: 0; } }
.haus__plan > img { width: 100%; mix-blend-mode: multiply; }
.haus__punkte { position: absolute; inset: 0; }
.punkt {
  position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%);
  width: 32px; height: 32px; margin: -16px 0 0 -16px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; cursor: pointer;
  font-size: 0; color: transparent;
}
.punkt::after {
  content: ""; position: absolute; inset: 7px; border-radius: 50%;
  border: 2px solid var(--orange); opacity: 0; transform: scale(.6);
  transition: opacity 150ms ease-out, transform 150ms ease-out;
}
.punkt:hover::after, .punkt:focus-visible::after { opacity: .7; transform: scale(1); }
.punkt[aria-pressed="true"]::after { opacity: 1; transform: scale(1.35); border-color: var(--rinde); }
.punkt:focus-visible { outline: none; }

.haus__karte { display: grid; grid-template-columns: 120px 1fr; gap: var(--s2); align-items: center; padding: var(--s2); background: var(--fichte); border-radius: var(--radius); }
.haus__kartenbild { aspect-ratio: 4 / 3; overflow: hidden; border-radius: 2px; }
.haus__kartenbild img { width: 100%; height: 100%; object-fit: cover; transition: opacity 200ms ease-out; }
.haus__karte figcaption { display: grid; gap: 2px; font-size: 15px; color: var(--t2); line-height: 1.35; }
.haus__karte strong { font-size: 19px; font-weight: 600; color: var(--rinde); }
.haus__bereich { font-size: 13px; color: var(--orange-tief); font-weight: 600; }
@media (min-width: 900px) {
  .haus { grid-template-columns: minmax(0, 1fr) 300px; gap: var(--s5); align-items: center; }
  .haus__karte { grid-template-columns: 1fr; padding: var(--s3); }
}

.listen { display: grid; gap: var(--s4); margin-top: var(--s5); }
.liste h3 { padding-bottom: var(--s2); border-bottom: 1px solid var(--rinde); }
.liste ul { columns: 2; column-gap: var(--s3); padding: var(--s2) 0; }
.liste li { padding: 6px 0; break-inside: avoid; font-size: 16px; line-height: 1.35; }
.liste__person { padding-top: var(--s2); border-top: 1px solid var(--linie); font-size: 15px; color: var(--t2); }
.liste__person a { display: inline-block; padding: 6px 0; color: var(--t1); font-weight: 500; text-decoration: none; white-space: nowrap; }
@media (min-width: 900px) { .listen { grid-template-columns: 1fr 1fr; gap: var(--s5); margin-top: var(--s6); } }

/* 3 · Projekte (Vorbild hastingsarchitecture.com: Bilder ohne Fugen) */
.projekte { display: grid; gap: var(--s4); }
.projekte__text { display: grid; gap: var(--s3); align-content: start; }
.projekte__text > p { color: var(--t2); max-width: 46ch; }
.bauten { display: grid; }
.bauten div { padding: var(--s2) 0; border-top: 1px solid var(--linie); }
.bauten dt { font-weight: 600; color: var(--rinde); }
.bauten dd { font-size: 15px; color: var(--t2); line-height: 1.45; }
.raster { display: grid; grid-template-columns: 1fr 1fr; margin: 0 calc(var(--rand) * -1); }
.raster li { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.raster img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--expo); }
.raster li:hover img { transform: scale(1.04); }
.raster span {
  position: absolute; left: 0; bottom: 0; max-width: calc(100% - 8px);
  padding: 4px 8px; background: var(--papier); color: var(--t1);
  font-size: 12px; line-height: 1.3;
}
@media (min-width: 900px) {
  .projekte { grid-template-columns: 340px minmax(0, 1fr); gap: var(--s5); align-items: start; }
  .projekte__text { position: sticky; top: var(--s4); }
  .raster { margin: 0; }
  .raster span { font-size: 13px; padding: 6px 10px; }
}

/* 4 · Masskette 1986–2026 im Massstab der Jahre */
.kette { position: relative; margin-bottom: var(--s5); }
.kette li { position: relative; }
.kette span { font-weight: 600; color: var(--orange-tief); }
.kette p { font-size: 15px; line-height: 1.4; color: var(--t2); }

@media (max-width: 899px) {
  .kette { display: grid; padding-left: var(--s3); border-left: 1px solid var(--orange); }
  .kette li { padding: 0 0 var(--s3); }
  .kette li:last-child { padding-bottom: 0; }
  .kette li::before { content: ""; position: absolute; left: calc(var(--s3) * -1 - 8px); top: 11px; width: 17px; height: 1px; background: var(--orange); }
  .js .kette { border-left-color: transparent; }
  .js .kette::before { content: ""; position: absolute; left: -1px; top: 0; bottom: 0; width: 1px; background: var(--orange); transform: scaleY(0); transform-origin: top; transition: transform 1000ms var(--expo); }
  .js .kette.ist-da::before { transform: scaleY(1); }
}
@media (min-width: 900px) {
  .kette { height: 232px; border-top: 1px solid var(--orange); margin-top: var(--s3); }
  .kette li {
    position: absolute; top: 0;
    left: calc((var(--jahr) - var(--von)) / (var(--bis) - var(--von)) * 100%);
    width: 190px; padding: var(--s2) 0 0 var(--s2);
  }
  .kette li::before { content: ""; position: absolute; left: 0; top: -8px; width: 1px; height: 17px; background: var(--orange); }
  .kette li:last-child { left: auto; right: 0; width: 128px; padding: var(--s2) var(--s2) 0 0; text-align: right; }
  .kette li:last-child::before { left: auto; right: 0; }
  .kette li:nth-child(even) { padding-top: 120px; }
  .kette li:nth-child(even)::before { height: 120px; }
  .kette li:nth-child(4) { transform: translateX(-100%); padding: 120px var(--s2) 0 0; text-align: right; }
  .kette li:nth-child(4)::before { left: auto; right: 0; }
  .js .kette { border-top-color: transparent; }
  .js .kette::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--orange); transform: scaleX(0); transform-origin: left; transition: transform 1000ms var(--expo); }
  .js .kette.ist-da::before { transform: scaleX(1); }
}

.fest { display: grid; gap: var(--s2); }
.fest figure { margin: 0; }
.fest img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.fest figcaption { padding-top: var(--s1); font-size: 13px; color: var(--t3); }
@media (min-width: 900px) { .fest { grid-template-columns: 2fr 1fr; align-items: end; gap: var(--s3); } }

.unterkopf { margin: var(--s5) 0 var(--s3); }
.lernende { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s2) var(--s1); }
.lernende img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 20%; margin-bottom: var(--s1); }
.lernende strong { display: block; font-size: 13px; font-weight: 600; line-height: 1.25; color: var(--rinde); }
.lernende span { font-size: 12px; color: var(--t3); }
@media (min-width: 900px) {
  .lernende { grid-template-columns: repeat(8, 1fr); gap: var(--s3) var(--s2); }
  .lernende strong { font-size: 15px; } .lernende span { font-size: 13px; }
}

.lehre { display: grid; gap: var(--s4); margin-top: var(--s5); }
.lehre__bild { margin: 0; }
.lehre__bild img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.lehre__text { display: grid; gap: var(--s2); align-content: start; }
.lehre__abschluss { font-size: 22px; line-height: 1.3; letter-spacing: -.01em; color: var(--rinde); padding-bottom: var(--s3); margin-bottom: var(--s2); border-bottom: 1px solid var(--linie); }
.lehre__text > p:not(.lehre__abschluss) { color: var(--t2); max-width: 46ch; }
.stellen { display: grid; gap: var(--s2); margin-top: var(--s1); }
.stellen div { padding: var(--s2); background: var(--fichte); border-radius: var(--radius); border-left: 3px solid var(--orange); }
.stellen dt { font-weight: 600; color: var(--rinde); }
.stellen dd { font-size: 15px; color: var(--t2); }
.stellen a { display: inline-block; padding: 6px 0; color: var(--t1); font-weight: 500; }
@media (min-width: 900px) {
  .lehre { grid-template-columns: 5fr 6fr; gap: var(--s5); align-items: center; }
  .lehre__abschluss { font-size: 28px; }
  .stellen { grid-template-columns: 1fr 1fr; }
}

/* 5 · Kontakt: dunkle Werkhalle */
.kontakt { background: var(--halle); color: rgba(239, 233, 223, .92); }
.kontakt h2 { color: var(--hell); }
.kontakt .kopfzeile__satz { color: rgba(239, 233, 223, .68); }
.leute { display: grid; gap: var(--s2); }
.leute li { display: grid; grid-template-columns: 88px 1fr; gap: var(--s2); align-items: center; padding-bottom: var(--s2); border-bottom: 1px solid rgba(239, 233, 223, .14); }
.leute img { width: 88px; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 20%; border-radius: 2px; }
.leute div { display: grid; gap: 2px; }
.leute strong { font-size: 19px; font-weight: 600; color: var(--hell); }
.leute span { font-size: 14px; line-height: 1.35; color: rgba(239, 233, 223, .6); }
.leute a { margin-top: var(--s1); font-size: 17px; font-weight: 500; color: var(--hell); text-decoration-color: var(--orange); text-underline-offset: 4px; }
@media (min-width: 900px) {
  .leute { grid-template-columns: repeat(3, 1fr); gap: var(--s3); }
  .leute li { grid-template-columns: 1fr; border: 0; padding: 0; align-items: start; }
  .leute img { width: 100%; }
}

.kontakt__unten { display: grid; gap: var(--s5); margin-top: var(--s5); }
.kontakt__daten { display: grid; gap: var(--s3); align-content: start; }
.kontakt__adresse { font-size: 22px; line-height: 1.3; color: var(--hell); }
.kontakt__daten a { display: inline-block; padding: 6px 0; color: var(--hell); }
.kontakt__daten p:nth-child(2) { font-size: 17px; line-height: 1.4; }
.zeiten div { display: grid; grid-template-columns: 64px 1fr; padding: 6px 0; border-top: 1px solid rgba(239, 233, 223, .14); font-size: 15px; }
.zeiten dt { color: rgba(239, 233, 223, .6); }
.kontakt .textlink { text-decoration-color: var(--orange); justify-self: start; }

.formular { display: grid; gap: var(--s2); padding: var(--s3); background: var(--papier); color: var(--t1); border-radius: var(--radius); }
.wahl { display: flex; flex-wrap: wrap; gap: var(--s1); border: 0; margin: 0 0 var(--s1); padding: 0; }
.wahl legend { width: 100%; margin-bottom: var(--s1); font-size: 14px; color: var(--t2); }
.wahl input { position: absolute; opacity: 0; pointer-events: none; }
.wahl span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--s2); border: 1px solid var(--linie); border-radius: var(--radius); font-size: 15px; cursor: pointer; transition: background-color 150ms ease-out, border-color 150ms ease-out; }
.wahl input:checked + span { background: var(--rinde); color: var(--hell); border-color: var(--rinde); }
.wahl input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }
.feld { display: grid; gap: 4px; font-size: 14px; color: var(--t2); }
.feld input, .feld textarea {
  width: 100%; padding: 12px; font: inherit; font-size: 17px; color: var(--t1);
  background: #F6F3EE; border: 1px solid var(--linie); border-radius: var(--radius);
  transition: border-color 150ms ease-out;
}
.feld input:focus, .feld textarea:focus { outline: none; border-color: var(--orange); }
.formular .knopf { justify-self: start; margin-top: var(--s1); }
.formular__hinweis { font-size: 14px; color: var(--t2); }
@media (min-width: 900px) {
  .kontakt__unten { grid-template-columns: 1fr 1.4fr; gap: var(--s6); }
  .formular { grid-template-columns: 1fr 1fr; padding: var(--s4); }
  .wahl, .feld:first-of-type, .feld--breit, .formular .knopf, .formular__hinweis { grid-column: 1 / -1; }
}

/* Fuss */
.fuss { background: var(--halle); color: rgba(239, 233, 223, .48); border-top: 1px solid rgba(239, 233, 223, .1); font-size: 14px; }
.fuss__inhalt { display: grid; gap: var(--s1); padding-top: var(--s3); padding-bottom: var(--s4); }
.fuss a { display: inline-block; padding: 6px 0; color: rgba(239, 233, 223, .8); }
@media (min-width: 900px) { .fuss__inhalt { grid-template-columns: 1fr auto; } }

/* Bilder öffnen sich von unten */
.js .enthuellen { clip-path: inset(100% 0 0 0); transition: clip-path 1000ms var(--expo); }
.js .enthuellen img { transform: scale(1.12); transition: transform 1200ms var(--expo); }
.js .enthuellen.ist-da { clip-path: inset(0 0 0 0); }
.js .enthuellen.ist-da img { transform: scale(1); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .enthuellen, .js .enthuellen img, .js .mass__linie, .js .mass__wert, .js .kette::before { transition: none !important; }
  .js .enthuellen { clip-path: none; }
  .js .enthuellen img { transform: none; }
  .js .mass__linie { transform: none; }
  .js .mass__wert { opacity: 1; }
  .js .kette::before { transform: none !important; }
}
@media (min-width: 900px) { .umbruch { display: block; } }

/* Tippflächen am Handy und kein seitliches Scrollen */
html, body { overflow-x: clip; }
@media (max-width: 899px) { .haus { grid-template-columns: minmax(0, 1fr); } }
.textlink { display: inline-block; padding: 6px 0; }
.leute a { justify-self: start; padding: 4px 0; }
