/* ═══════════════════════════════════════════════════════════════════════
   einundachtzig — Strategische AZAV-Beratung
   Anmutung: Dokument. Ein ruhiger Textkörper, Haarlinien, sonst nichts.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Schriften (selbst gehostet, kein CDN) ───────────────────────────── */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/archivo-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/archivo-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, 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: 'Source Serif 4';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('/assets/fonts/source-serif-4-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('/assets/fonts/source-serif-4-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, 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: 'Source Serif 4';
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url('/assets/fonts/source-serif-4-latin-wght-italic.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
}

/* ── Tokens ──────────────────────────────────────────────────────────── */

:root {
  --papier:  #F6F6F2;
  --tinte:   #16181A;
  --grau:    #6B7075;
  --linie:   #DCDCD6;
  --stempel: #9E3B2F;

  --font-display: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-text:    'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --container: 900px;
  --col-text:  620px;
  --pad:       clamp(20px, 4vw, 32px);

  --band-y:    clamp(56px, 9vw, 104px);
  --header-h:  84px;

  --ease: cubic-bezier(0.22, 0.61, 0.24, 1);
}

/* ── Reset / Basis ───────────────────────────────────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--papier);
  color: var(--tinte);
  font-family: var(--font-text);
  font-size: 19px;
  line-height: 1.65;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (max-width: 640px) { body { font-size: 18px; } }

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.15em; max-width: var(--col-text); }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

hr.rule {
  border: 0;
  border-top: 1px solid var(--linie);
  margin: 28px 0;
  max-width: var(--col-text);
}

::selection { background: var(--tinte); color: var(--papier); }

:focus-visible {
  outline: 2px solid var(--tinte);
  outline-offset: 3px;
  border-radius: 1px;
}

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--tinte); color: var(--papier);
  font-family: var(--font-mono); font-size: 13px;
  padding: 10px 14px; text-decoration: none;
  transition: top 160ms var(--ease);
}
.skip-link:focus { top: 12px; }

/* ── Raster ──────────────────────────────────────────────────────────── */

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, var(--col-text));
  justify-content: center;
}

.band {
  border-top: 1px solid var(--linie);
  padding-block: var(--band-y);
  scroll-margin-top: var(--header-h);
}
.band--hero { border-top: 0; padding-top: clamp(60px, 12vw, 130px); }
.band--kontakt { padding-bottom: clamp(72px, 11vw, 128px); }

/* ── Kopfzeile ───────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--papier) 88%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 260ms var(--ease), background-color 260ms var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--linie); }

@supports not (backdrop-filter: blur(10px)) {
  .site-header { background: var(--papier); }
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
  padding-block: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
}

.brand__mark {
  width: 26px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: var(--tinte);
  stroke-width: 2.1;
  stroke-linecap: round;
  overflow: visible;
  transition: stroke 240ms var(--ease);
}
.brand:hover .brand__mark { stroke: var(--stempel); }

.brand__text { display: block; }

.brand__word {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  max-height: 24px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 300ms var(--ease), opacity 220ms var(--ease);
}
/* Beim Scrollen bleibt die 81 als Signet stehen, daneben der Deskriptor.
   Die ausgeschriebene Wortmarke zeigt sich nur am Seitenanfang. */
.site-header.is-scrolled .brand__word {
  max-height: 0;
  opacity: 0;
}

.brand__desc {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--grau);
  line-height: 1.4;
  margin-top: 2px;
}

.site-nav a {
  font-family: var(--font-mono);
  font-size: 13px;
  text-decoration: none;
  padding-bottom: 3px;
  background-image: linear-gradient(var(--tinte), var(--tinte));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size 320ms var(--ease);
}
.site-nav a:hover { background-size: 100% 1px; }

/* ── Hero ────────────────────────────────────────────────────────────── */

.hero__title {
  font-size: clamp(1.85rem, 5.2vw, 3.05rem);
  line-height: 1.05;
  overflow-wrap: break-word;
}
/* „AZAV-Trägerzulassung“ darf nicht am Bindestrich umbrechen — ein allein
   stehendes „AZAV-“ liest sich wie ein Fehler. Auf sehr schmalen Geräten
   wird der Umbruch wieder freigegeben, sonst läuft die Zeile über. */
.hero__title .nb { white-space: nowrap; }
@media (max-width: 430px) {
  .hero__title .nb { white-space: normal; }
}

.lead {
  font-size: 1.05em;
  color: var(--tinte);
}

/* ── Abschnittsköpfe ─────────────────────────────────────────────────── */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--grau);
  text-transform: lowercase;
  margin: 0 0 14px;
}

h2 {
  font-size: clamp(1.55rem, 3.1vw, 2.1rem);
  margin-bottom: 26px;
  max-width: 22ch;
}

h3 {
  font-size: 1.12rem;
  line-height: 1.25;
}

/* ── Aufzählungen ────────────────────────────────────────────────────── */

.points {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  max-width: var(--col-text);
  border-top: 1px solid var(--linie);
}
.points li {
  position: relative;
  padding: 13px 0 13px 26px;
  border-bottom: 1px solid var(--linie);
}
.points li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 1.42em;
  width: 9px;
  height: 1px;
  background: var(--grau);
}

.card .points { margin-top: 16px; }

/* ── Leistungskarten ─────────────────────────────────────────────────── */

.card {
  max-width: var(--col-text);
  padding: 26px 0 28px;
  border-top: 1px solid var(--linie);
  transition: border-color 300ms var(--ease);
}
.card:first-of-type { border-top-color: var(--tinte); }
.card:hover { border-top-color: var(--tinte); }
.card:last-of-type { border-bottom: 1px solid var(--linie); }

.card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 12px;
}
.card__head h3 { margin: 0; }

.card__no {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--grau);
  margin-right: 10px;
  letter-spacing: 0;
}

.price {
  flex: none;
  margin: 0;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.35;
  color: var(--tinte);
  white-space: nowrap;
}
.price__sub {
  display: block;
  color: var(--grau);
  font-size: 12px;
}

@media (max-width: 560px) {
  .card__head { flex-direction: column; gap: 6px; }
  .price { text-align: left; }
}

.note {
  font-style: italic;
  color: var(--grau);
  margin-top: 18px;
}

.fineprint {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--grau);
  margin-top: 20px;
  font-style: normal;
}
.fineprint a { color: var(--grau); text-underline-offset: 3px; }
.fineprint a:hover { color: var(--tinte); }

/* ── Zeitachse ───────────────────────────────────────────────────────── */

.timeline {
  position: relative;
  margin: 34px 0 0;
  max-width: var(--col-text);
}

.timeline__rail {
  position: absolute;
  left: 110px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: var(--linie);
}

.timeline__progress {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--tinte);
  transform-origin: top center;
  transform: scaleY(var(--p, 0));
}

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

.step {
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  column-gap: 44px;
  padding-bottom: 30px;
}
.step:last-child { padding-bottom: 0; }

.step__meta {
  margin: 0;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--grau);
}
.step__no {
  display: block;
  color: var(--tinte);
  font-weight: 500;
}
.step__dur { display: block; }

.step__dot {
  position: absolute;
  left: 110px;
  top: 6px;
  width: 9px;
  height: 9px;
  margin-left: -4px;
  border-radius: 50%;
  background: var(--papier);
  border: 1px solid var(--tinte);
  transition: background-color 320ms var(--ease), border-color 320ms var(--ease),
              transform 320ms var(--ease);
}
.step.is-active .step__dot {
  background: var(--stempel);
  border-color: var(--stempel);
  transform: scale(1.25);
}

.step__title {
  padding-top: 1px;
  font-size: 1.06rem;
  font-weight: 500;
}

@media (max-width: 900px) {
  .timeline__rail { left: 4px; }
  .step {
    grid-template-columns: minmax(0, 1fr);
    padding-left: 30px;
    padding-bottom: 26px;
  }
  .step__meta {
    text-align: left;
    display: flex;
    gap: 12px;
    margin-bottom: 2px;
  }
  .step__no, .step__dur { display: inline; }
  .step__dot { left: 4px; top: 5px; }
}

/* ── Über mich ───────────────────────────────────────────────────────── */

.about {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  column-gap: 36px;
  align-items: start;
}

.portrait { margin: 0; }

/* Nur sichtbar, wenn die Bilddatei fehlt: siehe .portrait--missing unten. */
.portrait__frame {
  display: none;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--linie);
  place-items: center;
  background:
    repeating-linear-gradient(
      -45deg,
      transparent 0 9px,
      color-mix(in srgb, var(--linie) 45%, transparent) 9px 10px
    );
}
.portrait__label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--grau);
  background: var(--papier);
  padding: 4px 8px;
}
.portrait img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 2px;
}

/* Fehlt die Bilddatei, springt die Schraffur ein statt eines
   kaputten Bildsymbols. Die Klasse setzt main.js beim Ladefehler. */
.portrait--missing img { display: none; }
.portrait--missing .portrait__frame { display: grid; }

.about__text h2 { margin-top: -0.15em; }

.pull {
  font-size: 1.05em;
  border-left: 1px solid var(--stempel);
  padding-left: 20px;
  margin-top: 26px;
}

@media (max-width: 700px) {
  .about { grid-template-columns: minmax(0, 1fr); row-gap: 26px; }
  .portrait { max-width: 190px; }
  .about__text h2 { margin-top: 0; }
}

/* ── Buttons ─────────────────────────────────────────────────────────── */

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  margin-top: 32px;
  max-width: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  border-radius: 2px;
  transition: background-color 240ms var(--ease), color 240ms var(--ease),
              border-color 240ms var(--ease);
}

.btn--primary {
  background: var(--stempel);
  color: var(--papier);
  padding: 14px 24px;
  border: 1px solid var(--stempel);
}
.btn--primary:hover {
  background: var(--tinte);
  border-color: var(--tinte);
}

.btn--ghost {
  color: var(--tinte);
  padding: 14px 0;
  border: 0;
  background-image: linear-gradient(var(--tinte), var(--tinte));
  background-repeat: no-repeat;
  background-position: 0 calc(100% - 12px);
  background-size: 100% 1px;
  transition: background-size 340ms var(--ease);
}
.btn--ghost:hover { background-size: 0% 1px; }

.btn__ext {
  font-family: var(--font-mono);
  font-size: 13px;
  transition: transform 260ms var(--ease);
}
.btn--primary:hover .btn__ext { transform: translate(2px, -2px); }

/* ── Fußzeile ────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--linie);
  padding-block: 30px 40px;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 32px;
}

.site-footer__brand {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--grau);
  max-width: none;
}
.site-footer__brand .dot { opacity: 0.6; }

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.site-footer__nav a {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--grau);
  text-decoration: none;
  background-image: linear-gradient(var(--grau), var(--grau));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  padding-bottom: 3px;
  transition: background-size 320ms var(--ease), color 240ms var(--ease);
}
.site-footer__nav a:hover { color: var(--tinte); background-size: 100% 1px; }

/* ── Rechtsseiten (Impressum, Datenschutz) ───────────────────────────── */

.legal { padding-block: clamp(48px, 8vw, 88px); }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: 8px; }
.legal h2 {
  font-size: 1.2rem;
  margin: 44px 0 14px;
  padding-top: 22px;
  border-top: 1px solid var(--linie);
  max-width: var(--col-text);
}
.legal h3 { font-size: 1rem; margin: 26px 0 8px; }
.legal .updated {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--grau);
  margin-bottom: 34px;
}
.legal address {
  font-style: normal;
  margin-bottom: 1.15em;
}
.legal dl { margin: 0 0 1.15em; max-width: var(--col-text); }
.legal dt {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--grau);
  margin-top: 14px;
}
.legal dd { margin: 2px 0 0; }
.legal ul { max-width: var(--col-text); padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.legal a { text-underline-offset: 3px; }

.back-link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--grau);
  text-decoration: none;
  margin-bottom: 30px;
}
.back-link:hover { color: var(--tinte); }

/* Platzhalter, die vor dem Launch gefüllt werden müssen. Sollen auffallen. */
.todo {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--stempel);
  border: 1px dashed var(--stempel);
  border-radius: 2px;
  padding: 1px 6px;
  overflow-wrap: anywhere;
}

/* ── Bewegung ────────────────────────────────────────────────────────── */

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.js body { animation: fade-in 200ms var(--ease) both; }

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
}

/* Staffelung. Als Attribut statt Inline-Style, damit die CSP ohne
   'unsafe-inline' für style-src auskommt. */
.reveal[data-d="1"] { --d:  55ms; }
.reveal[data-d="2"] { --d: 110ms; }
.reveal[data-d="3"] { --d: 165ms; }
.reveal[data-d="4"] { --d: 220ms; }
.reveal[data-d="5"] { --d: 275ms; }
.reveal[data-d="6"] { --d: 330ms; }
.js .reveal.is-in {
  opacity: 1;
  transform: none;
  transition:
    opacity 700ms var(--ease) var(--d, 0ms),
    transform 700ms var(--ease) var(--d, 0ms);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js body { animation: none; }
  .js .reveal { opacity: 1; transform: none; }
  .timeline__progress { transform: scaleY(1); }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  .site-header, .skip-link, .actions { display: none; }
  body { background: #fff; font-size: 11pt; }
  .js .reveal { opacity: 1; transform: none; }
  .layout { display: block; }
}
