/* Ingenieurbüro E. Schiele, Website V5: Vom Strich zur Serie
   Die vier Leistungen erzählen sich am Hut: Idee (Skizze), Konstruktion (Zeichnung),
   Prototyp (der Stich), Serie (fünfzehn Hüte). Schwarz auf Weiß, Georgia und Courier New.
   Kein JavaScript. Bei „Bewegung reduzieren" steht alles fertig da. */

:root {
  --papier: #fff;
  --tinte: #000;
  --tinte-2: rgba(0, 0, 0, .64);
  --tinte-3: rgba(0, 0, 0, .55);
  --haar: rgba(0, 0, 0, .14);
  --graphit: #2a2a2a;
  --serif: Georgia, "Times New Roman", serif;
  --mono: "Courier New", Courier, monospace;
  --breite: 1120px;
  --rand: clamp(20px, 5vw, 56px);
  --raus: cubic-bezier(.16, 1, .3, 1);
  --zug: cubic-bezier(.65, 0, .35, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--papier);
  color: var(--tinte);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--serif); font-weight: normal; margin: 0; }
a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  text-decoration-color: rgba(0, 0, 0, .32);
  transition: text-decoration-color 160ms var(--raus), opacity 160ms var(--raus);
}
@media (hover: hover) and (pointer: fine) { a:hover { text-decoration-color: var(--tinte); } }
a:active { opacity: .55; }
:focus-visible { outline: 1px solid var(--tinte); outline-offset: 4px; }
.wrap { max-width: var(--breite); margin: 0 auto; padding: 0 var(--rand); }
.filter-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Kopfleiste */
.kopfleiste { display: flex; justify-content: space-between; align-items: center; min-height: 108px; }
.kopfleiste .marke { display: inline-flex; align-items: center; gap: 16px; text-decoration: none; }
.hut-kopf { display: inline-block; flex: none; transform-origin: 18% 86%; }
.hut-kopf img { height: 46px; width: auto; transform-origin: 18% 86%; }
.kopfleiste .marke .name { font-family: var(--serif); font-size: clamp(1.25rem, 2vw, 1.55rem); line-height: 1.15; letter-spacing: -.01em; }
.sprache { margin-left: auto; font-size: 17px; letter-spacing: .06em; white-space: nowrap; }
.sprache a { text-decoration: none; color: var(--tinte-3); }
.sprache a:hover { color: var(--tinte); }
.sprache .trenner { color: var(--tinte-3); margin: 0 .45em; }

.etikett { display: block; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--tinte-3); margin: 0 0 18px; }

/* Eröffnung: der Leitsatz groß */
.eroeffnung { padding: clamp(28px, 6vw, 80px) 0 clamp(36px, 6vw, 64px); }
.eroeffnung h1 {
  font-size: clamp(2.5rem, 6.4vw, 5.3rem);
  line-height: 1.02;
  letter-spacing: -.03em;
  max-width: 15ch;
}

/* Vom Strich zur Serie */
.prozess { padding-bottom: clamp(64px, 10vw, 128px); }
.prozess-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; border-top: 1px solid var(--tinte); padding-top: 18px; margin-bottom: 28px; }
.prozess-kopf h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); letter-spacing: -.015em; }
.prozess-kopf .motto { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--tinte-2); }

.mass5 { position: relative; height: 44px; border-left: 1px solid var(--tinte); border-right: 1px solid var(--tinte); margin-bottom: 4px; }
.mass5::before { content: ""; position: absolute; left: 0; right: 0; top: 30px; border-top: 1px solid var(--tinte); }
.mass5 .pfeil { position: absolute; top: 27px; width: 14px; height: 7px; background: var(--tinte); }
.mass5 .pfeil.l { left: 0; clip-path: polygon(0 50%, 100% 0, 100% 100%); }
.mass5 .pfeil.r { right: 0; clip-path: polygon(100% 50%, 0 0, 0 100%); }
.mass5 .mass-label { position: absolute; top: 2px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--tinte-3); }
.mass5 .mass-label.l { left: 14px; }
.mass5 .mass-label.r { right: 14px; }
.mass5 .tick { position: absolute; top: 22px; height: 18px; border-left: 1px solid var(--tinte); }

.stufen { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 28px; }
.stufe { position: relative; }
.stufe-bild { position: relative; margin: 0; border: 1px solid var(--tinte); aspect-ratio: 1560 / 1140; background: var(--papier); }
.stufe-bild svg { display: block; width: 100%; height: 100%; overflow: hidden; }
.stufe:not(:last-child) .stufe-bild::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -23px;
  width: 18px;
  height: 9px;
  margin-top: -4.5px;
  background: var(--tinte);
  clip-path: polygon(0 40%, 62% 40%, 62% 0, 100% 50%, 62% 100%, 62% 60%, 0 60%);
}
.stufe-marke { display: block; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--tinte-3); margin: 16px 0 6px; }
.stufe h3 { font-size: 1.45rem; line-height: 1.15; letter-spacing: -.01em; margin-bottom: 10px; }
.stufe p { margin: 0; font-size: 14px; line-height: 1.65; color: var(--tinte-2); }

/* Zeichnungselemente in den Stufen */
.bleistift { fill: none; stroke: var(--graphit); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; stroke-opacity: .9; }
.s1 .teil-a { stroke-dasharray: .64 1; }
.s1 .teil-b { stroke-dasharray: .3 1; stroke-dashoffset: -.06; stroke-opacity: .55; stroke-width: 5; }
.s1 .hilfslinie { stroke-width: 4; stroke-opacity: .3; }
.linie { fill: none; stroke: var(--tinte); stroke-width: 7; stroke-linejoin: round; }
.linie.duenn { stroke-width: 4; }
.linie.mitte { stroke-width: 4; stroke-dasharray: 64 18 10 18; }
.pfeilspitze { fill: var(--tinte); }
.masszahl { font-family: var(--mono); font-size: 64px; fill: var(--tinte); }
.serie image { transform-box: fill-box; transform-origin: center; }

/* Projekte */
.abschnitt { border-top: 1px solid var(--tinte); padding: 18px 0 clamp(64px, 9vw, 112px); }
.abschnitt-kopf { display: flex; align-items: baseline; gap: 18px; margin-bottom: clamp(32px, 5vw, 56px); }
.abschnitt-kopf h1, .abschnitt-kopf h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); letter-spacing: -.015em; line-height: 1.1; }
.projekte { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3.5vw, 48px); }
.projekt { margin: 0; }
.rahmen { border: 1px solid var(--tinte); padding: 8px; }
.rahmen-innen { aspect-ratio: 4 / 5; overflow: hidden; }
.rahmen-innen img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--raus); }
@media (hover: hover) and (pointer: fine) { .projekt:hover .rahmen-innen img { transform: scale(1.025); } }
.projekt figcaption { padding-top: 16px; }
.projekt .pos { display: block; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--tinte-3); margin-bottom: 10px; }
.projekt h3 { font-size: 1.6rem; line-height: 1.1; letter-spacing: -.015em; margin-bottom: 8px; }
.projekt p { margin: 0 0 12px; font-size: 14px; line-height: 1.6; }
.projekt a { font-size: 14px; }
.projekt .notiz { font-size: 12px; color: var(--tinte-3); margin-top: 8px; }

/* Kontakt */
.mail {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.25;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
}

/* Fuß als Schriftfeld (aus V2) */
.schriftfeld {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1fr;
  gap: 1px;
  background: var(--tinte);
  border: 1px solid var(--tinte);
  margin: 0 0 40px;
  font-size: 13px;
  line-height: 1.45;
}
.sf { background: var(--papier); padding: 9px 12px 11px; min-height: 60px; }
.sf-label { display: block; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--tinte-3); margin-bottom: 7px; }
.sf-firma { grid-row: span 2; display: flex; align-items: center; gap: 16px; }
.hut-fuss { display: inline-block; flex: none; transform-origin: 18% 86%; }
.hut-fuss img { width: 64px; height: auto; }
.sf-firma .name { font-family: var(--serif); font-size: 19px; line-height: 1.2; letter-spacing: -.005em; }
.sf-recht a + a { margin-left: .9em; }

/* Rechtsseiten */
.rechtstext-inhalt { max-width: 70ch; }
.rechtstext-inhalt h2 { font-size: 1.3rem; line-height: 1.25; margin: 40px 0 10px; }
.rechtstext-inhalt h2:first-child { margin-top: 0; }
.rechtstext-inhalt p { margin: 0 0 14px; }
.rechtstext-inhalt .stand { color: var(--tinte-3); margin-top: 36px; }

/* ---------- Bewegung: die Geschichte läuft einmal beim Laden ---------- */
@media (prefers-reduced-motion: no-preference) {
  .s1 .hilfslinie { animation: pfad .7s var(--zug) .2s both; }
  .s1 .teil-a { animation: teil-a 1.2s var(--zug) .5s both; }
  .s1 .teil-b { animation: teil-b .8s var(--zug) 1.3s both; }
  .s2 .zeichnen { animation: pfad 1.1s var(--zug) 1.7s both; }
  .s2 .zeichnen.spaet { animation-delay: 2.4s; animation-duration: .6s; }
  .s2 .einblenden-svg { animation: einblenden-sanft .5s ease-out 2.8s both; }
  .s3 .stich { animation: aufdecken 1.1s var(--raus) 3.0s both; }
  .serie image { animation: auftauchen .45s var(--raus) both; }
  .serie image:nth-of-type(1)  { animation-delay: 3.9s; }
  .serie image:nth-of-type(2)  { animation-delay: 3.97s; }
  .serie image:nth-of-type(3)  { animation-delay: 4.04s; }
  .serie image:nth-of-type(4)  { animation-delay: 4.11s; }
  .serie image:nth-of-type(5)  { animation-delay: 4.18s; }
  .serie image:nth-of-type(6)  { animation-delay: 4.25s; }
  .serie image:nth-of-type(7)  { animation-delay: 4.32s; }
  .serie image:nth-of-type(8)  { animation-delay: 4.39s; }
  .serie image:nth-of-type(9)  { animation-delay: 4.46s; }
  .serie image:nth-of-type(10) { animation-delay: 4.53s; }
  .serie image:nth-of-type(11) { animation-delay: 4.6s; }
  .serie image:nth-of-type(12) { animation-delay: 4.67s; }
  .serie image:nth-of-type(13) { animation-delay: 4.74s; }
  .serie image:nth-of-type(14) { animation-delay: 4.81s; }
  .serie image:nth-of-type(15) { animation-delay: 4.88s; }
  .stufe-marke { animation: einblenden-sanft .5s ease-out both; }
  .stufe:nth-child(1) .stufe-marke { animation-delay: .4s; }
  .stufe:nth-child(2) .stufe-marke { animation-delay: 1.6s; }
  .stufe:nth-child(3) .stufe-marke { animation-delay: 2.9s; }
  .stufe:nth-child(4) .stufe-marke { animation-delay: 3.8s; }
  @supports (animation-timeline: view()) {
    .einblenden { animation: einblenden linear both; animation-timeline: view(); animation-range: entry 5% entry 80%; }
  }
  /* Die Melone lupft sich: auf der Startseite, wenn die Serie fertig ist; sonst gleich beim Öffnen */
  .hut-kopf img { animation: lupfen 1.2s .6s both; }
  .startseite .hut-kopf img { animation-delay: 5.6s; }
  @media (hover: hover) and (pointer: fine) {
    .marke:hover .hut-kopf { animation: lupfen 1.1s both; }
  }
}
@keyframes lupfen {
  0% { transform: none; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
  28% { transform: translateY(-30%) rotate(-12deg); }
  58% { transform: translateY(-30%) rotate(-12deg); animation-timing-function: cubic-bezier(.34, 1.5, .64, 1); }
  100% { transform: none; }
}
@keyframes pfad { from { stroke-dasharray: 1; stroke-dashoffset: 1; } to { stroke-dasharray: 1; stroke-dashoffset: 0; } }
@keyframes teil-a { from { stroke-dasharray: 0 1; } to { stroke-dasharray: .64 1; } }
@keyframes teil-b { from { stroke-dasharray: 0 1; } to { stroke-dasharray: .3 1; } }
@keyframes einblenden-sanft { from { opacity: 0; } to { opacity: 1; } }
@keyframes aufdecken { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes auftauchen { from { opacity: 0; transform: scale(.82); } to { opacity: 1; transform: none; } }
@keyframes einblenden { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Mittlere Breiten: Stufen 2 x 2 */
@media (max-width: 900px) {
  .stufen { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .stufe:not(:last-child) .stufe-bild::after { display: none; }
  .mass5 .tick { display: none; }
  .projekte { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .kopfleiste { min-height: 84px; }
  .hut-kopf img { height: 38px; }
  .kopfleiste .marke { gap: 12px; }
  .kopfleiste .marke .name { font-size: 1.12rem; }
  .schriftfeld { grid-template-columns: 1fr 1fr; }
  .sf-firma { grid-column: 1 / -1; grid-row: auto; }
  .prozess-kopf { flex-direction: column; gap: 4px; }
  .stufen { column-gap: 16px; }
  .stufe h3 { font-size: 1.2rem; }
  .stufe p { font-size: 13px; }
  .projekte { grid-template-columns: minmax(0, 1fr); }
  .projekt { max-width: 440px; }
}
