/* =========================================================
   raffaelruppert.de – Stylesheet
   Designsystem: siehe CLAUDE.md
   Schwarz auf Weiß, Grau nur für Flächen und Linien.
   ========================================================= */

/* Schriften lokal gehostet (SIL Open Font License), nur der lateinische Zeichenvorrat */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url("../fonts/bricolage-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/schibsted-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Schibsted Grotesk";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/schibsted-italic-latin.woff2") format("woff2");
}

:root {
  /* Papier und Tinte */
  --papier: #FFFFFF;
  --flaeche: #F3F4F1;
  --tinte: #000000;
  --grau: #595959;
  --linie: #D9DAD6;

  /* Schrift */
  --schrift-display: "Bricolage Grotesque", "Arial Narrow", Arial, sans-serif;
  --schrift-text: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;

  /* Raster */
  --max: 1280px;
  --rand: 40px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--papier);
  color: var(--tinte);
  font-family: var(--schrift-text);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

a:hover { text-decoration-thickness: 2px; }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--tinte);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--rand);
}

.mitte { text-align: center; }

/* ---------- Überschriften ---------- */

.display {
  font-family: var(--schrift-display);
  font-weight: 500;
  font-variation-settings: "wdth" 100, "opsz" 96;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
}

.titel {
  font-size: clamp(44px, 6vw, 88px);
  margin: 0;
}

/* ---------- Kopf ---------- */

.kopf {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--papier);
  /* Hintergrund über die volle Breite, obwohl .wrap begrenzt ist */
  box-shadow: 0 0 0 100vmax var(--papier);
  clip-path: inset(0 -100vmax);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-top: 24px;
  padding-bottom: 24px;
}

.kopf::after {
  content: "";
  position: absolute;
  left: -100vmax;
  right: -100vmax;
  bottom: 0;
  height: 1px;
  background: var(--linie);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.kopf.gescrollt::after { opacity: 1; }

.logo {
  font-family: var(--schrift-display);
  font-weight: 600;
  font-variation-settings: "wdth" 100;
  font-size: 20px;
  text-decoration: none;
}

.navigation {
  display: flex;
  align-items: center;
  gap: 28px;
}

.navigation ul {
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 16px;
}

.navigation ul a { text-decoration: none; }
.navigation ul a:hover,
.navigation ul a[aria-current] { text-decoration: underline; }

/* ---------- Knöpfe ---------- */

.knopf {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  border: 2px solid var(--tinte);
  background: var(--tinte);
  color: var(--papier);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
}

.knopf:hover {
  background: var(--papier);
  color: var(--tinte);
}

.aktionen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 40px;
}

/* ---------- Einstieg ---------- */

.einstieg {
  padding-top: 88px;
  padding-bottom: 88px;
}

.einstieg h1 {
  font-size: clamp(44px, 6.6vw, 96px);
  max-width: 14em;
  margin: 0 auto;
}

.einstieg .lead {
  margin: 40px auto 0;
  max-width: 32em;
  font-size: 20px;
  color: var(--grau);
}

/* ---------- Foto und Text im Wechsel ---------- */

.paar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 96px;
  align-items: center;
  padding-bottom: 160px;
}

.paar img { display: block; width: 100%; height: auto; }
.paar figure { margin: 0; }

.paar h2 {
  font-size: clamp(36px, 4vw, 56px);
  margin-bottom: 32px;
}

.paar p { margin: 0; max-width: 30em; }
.paar p + p { margin-top: 18px; }
.paar .aktionen { margin-top: 36px; }

/* ---------- Arbeitsfelder: Titel links, Text rechts ---------- */

.zeilen { padding-bottom: 160px; }

.zeilen > .titel { margin-bottom: 88px; }

.zeilen ul {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  text-align: left;
}

.zeile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 64px;
  padding: 44px 0;
  border-top: 1px solid var(--linie);
  align-items: start;
}

.zeile:last-child { border-bottom: 1px solid var(--linie); }

.zeile h3 { font-size: clamp(26px, 2.8vw, 36px); }
.zeile p { margin: 0; font-size: 17px; line-height: 1.65; max-width: 30em; }

/* ---------- Projekte ---------- */

.projekte-abschnitt { padding-bottom: 160px; }
.projekte-abschnitt > .titel { margin-bottom: 80px; }

.projekte {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 72px 40px;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

/* Screenshots im Querformat 3:2, feine Linie statt Schatten */
.projekt-bild {
  aspect-ratio: 3 / 2;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  overflow: hidden;
}

.projekt-bild img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.projekt-titel {
  font-size: 28px;
  margin: 24px 0 6px;
}

.projekt-ort { margin: 0; font-size: 16px; color: var(--grau); }
.projekt-kurz { margin: 8px 0 0; font-size: 16px; line-height: 1.5; }

/* ---------- Kontakt ---------- */

.kontakt {
  background: var(--flaeche);
  text-align: center;
  padding: 160px 0;
}

.kontakt h2 { font-size: clamp(44px, 6vw, 88px); }

.kontakt p {
  margin: 28px auto 0;
  font-size: 20px;
  max-width: 36em;
  color: var(--grau);
}

.kontakt .aktionen { justify-content: center; }
.kontakt .aktionen a:not(.knopf) { font-weight: 600; font-size: 20px; }

.fuss {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  padding-bottom: 32px;
  font-size: 15px;
  color: var(--grau);
}

.fuss ul { display: flex; gap: 20px; margin: 0; padding: 0; list-style: none; }

/* ---------- Sprachumschalter ---------- */

.sprache {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sprache a,
.sprache [aria-current] { display: flex; line-height: 0; }

.sprache svg {
  display: block;
  outline: 1px solid var(--linie);
  outline-offset: -1px;
}

.sprache a { opacity: 0.55; }
.sprache a:hover,
.sprache a:focus-visible { opacity: 1; }

.sprache [aria-current] svg {
  box-shadow: 0 0 0 2px var(--papier), 0 0 0 4px var(--tinte);
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Unterseiten ---------- */

.seite { padding-top: 72px; padding-bottom: 104px; }

.seite h1 { font-size: clamp(44px, 7vw, 88px); margin-bottom: 24px; }

.seite h2 {
  font-size: clamp(28px, 3vw, 40px);
  margin: 72px 0 16px;
}

.seite .einleitung {
  margin: 0;
  max-width: 34em;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.4;
}

.seite .fliess { max-width: 40em; margin: 0; }

.seite .aktionen-unten { margin: 72px 0 0; }

.recht { max-width: 40em; }
.recht h2 { font-size: clamp(22px, 2.4vw, 28px); margin: 48px 0 12px; }
.recht p { margin: 0; }
.recht .stand { margin-top: 48px; color: var(--grau); font-size: 15px; }

.eintraege { margin: 0; padding: 0; list-style: none; }

.eintraege li {
  display: grid;
  grid-template-columns: 6em minmax(0, 1fr);
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--linie);
}

.eintraege .jahr { color: var(--grau); font-size: 16px; }
.eintraege li span + span { max-width: 40em; }

/* ---------- Responsiv ---------- */

@media (max-width: 960px) {
  :root { --rand: 24px; }

  .kopf { flex-wrap: wrap; }
  .navigation { flex-wrap: wrap; gap: 16px; }

  .einstieg { padding-top: 64px; padding-bottom: 88px; }

  .paar {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    padding-bottom: 104px;
  }

  .zeilen { padding-bottom: 104px; }
  .zeilen > .titel { margin-bottom: 48px; }
  .zeile { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 28px 0; }

  .projekte { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .projekte-abschnitt { padding-bottom: 104px; }

  .kontakt { padding: 96px 0; }
}

@media (max-width: 700px) {
  .eintraege li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

@media (max-width: 600px) {
  body { font-size: 17px; }
  .navigation ul { display: none; }
  .projekte { grid-template-columns: minmax(0, 1fr); }
  .kontakt { padding: 72px 0; }
}

/* Einblenden beim Scrollen (siehe effekte.js) */
.js .ein {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--verz, 0s);
}

.js .ein.sichtbar { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
