/* Gemeinsame Grundlage für Startseite und Projektseiten.
   Farben, Schriften und Abstände aus aigner.digital (Website_Business/DESIGN.md). */

/* Schriften: selbst gehostet (SIL OFL). optional + preload: kein Springen der Zeilen. */
@font-face { font-family: 'Literata'; font-weight: 600; font-style: normal; font-display: optional; src: url(schriften/literata-600.woff2) format('woff2'); }
@font-face { font-family: 'Mona Sans'; font-weight: 200 900; font-style: normal; font-display: optional; src: url(schriften/mona-sans.woff2) format('woff2'); }
/* Dieselbe Datei für große Titel: swap, damit sie sicher in Mona Sans erscheinen */
@font-face { font-family: 'Mona Sans Titel'; font-weight: 200 900; font-stretch: 75% 125%; font-style: normal; font-display: swap; src: url(schriften/mona-sans.woff2) format('woff2'); }

:root {
  --papier: #fbfaf7; --sand: #f3efe8; --linie: #e3ddd2;
  --tinte: #0f2330; --text: #24323b; --grau: #56636c;
  --blau-tief: #006b93; --blau-hell: #2aa8d8; --eis: #e4f1f6;
  --dunkel-text: #c9d3d9; --dunkel-linie: #2a3d4a;
  --a1: 8px; --a2: 16px; --a3: 24px; --a4: 32px; --a5: 48px; --a6: 64px; --a7: 96px;
  --sektion: var(--a7);
  --rand: clamp(16px, 4vw, 32px);
  --breite: 1120px;
  --serif: 'Literata', Georgia, 'Times New Roman', serif;
  --sans: 'Mona Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --titel: 'Mona Sans Titel', var(--sans);
  --r-klein: 8px; --r: 14px; --r-gross: 22px;
  --weich: cubic-bezier(.2, .7, .2, 1);
}
@media (max-width: 700px) { :root { --sektion: var(--a6); } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--a3); touch-action: manipulation; -webkit-tap-highlight-color: rgba(0, 107, 147, .15); }
body {
  margin: 0; background: var(--papier); color: var(--text);
  font: 400 1.0625rem/1.6 var(--sans);
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; color: var(--tinte); margin: 0; line-height: 1.15; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--blau-tief); outline-offset: 3px; border-radius: 4px; }
.nur-vorlesen { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.wrap { width: min(var(--breite), 100% - 2 * var(--rand)); margin-inline: auto; }
.sprung {
  position: absolute; left: var(--a2); top: var(--a2); z-index: 50;
  background: var(--tinte); color: var(--papier); padding: 12px 18px; border-radius: var(--r-klein);
  text-decoration: none; transform: translateY(-200%);
}
.sprung:focus { transform: none; }

/* Große Überschriften der Abschnitte */
.gross { font-size: clamp(2.5rem, 6vw, 4.75rem); letter-spacing: -.02em; line-height: 1.02; }

/* Textlinks: Unterstrich, der beim Darüberfahren kräftiger wird */
.link {
  color: var(--blau-tief); font-weight: 560; text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: .22em;
  transition: text-decoration-color .2s, text-decoration-thickness .2s;
  display: inline-flex; align-items: center; min-height: 44px;
}
.link:hover { text-decoration-thickness: 2px; }
.links { display: flex; flex-wrap: wrap; column-gap: var(--a3); }

/* Knöpfe */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--a1);
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font: 560 1rem/1 var(--sans); text-decoration: none;
  transition: transform .2s var(--weich), background-color .2s, box-shadow .2s;
}
.knopf:hover { transform: translateY(-1px); }
.knopf:active { transform: translateY(0); transition-duration: .05s; }
.knopf-voll { background: var(--blau-tief); color: #fff; box-shadow: 0 1px 0 rgba(15, 35, 48, .12); }
.knopf-voll:hover { background: #005a7c; box-shadow: 0 6px 16px -8px rgba(0, 107, 147, .6); }
.knopf-rand { color: var(--tinte); box-shadow: inset 0 0 0 1.5px var(--linie); background: var(--papier); }
.knopf-rand:hover { box-shadow: inset 0 0 0 1.5px var(--tinte); }

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  font-size: .875rem; line-height: 1; padding: 7px 11px; border-radius: 999px;
  background: var(--papier); box-shadow: inset 0 0 0 1px var(--linie); color: var(--text); white-space: nowrap;
}

/* Kopf mit Logo: Zeichen und Name wie marke/luca-aigner-kurz.svg (Name als echter Text) */
.kopf { padding-block: var(--a3); position: relative; z-index: 20; }
.kopf .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--a2); }
.marke {
  display: inline-flex; align-items: center; min-height: 44px; border-radius: 6px;
  color: var(--tinte); text-decoration: none;
  font: 600 1.75rem/1 var(--serif); white-space: nowrap; font-variation-settings: "opsz" 72;
}
.marke-innen { display: block; }
.zeichen { display: inline-block; width: 1.39em; height: .927em; vertical-align: -.274em; margin-right: .446em; transition: transform .25s var(--weich); }
.marke:hover .zeichen { transform: translateY(-1px); }
.kopf nav ul { display: flex; gap: clamp(4px, 2vw, 28px); margin-right: -8px; }
.kopf nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding-inline: 8px;
  text-decoration: none; color: var(--text); font-weight: 520; font-size: 1rem;
  background: linear-gradient(var(--tinte), var(--tinte)) no-repeat left calc(100% - 8px) / 0 1.5px;
  transition: background-size .25s var(--weich), color .2s;
}
.kopf nav a:hover { background-size: calc(100% - 16px) 1.5px; background-position-x: 8px; color: var(--tinte); }

/* Fuß auf Nachtblau */
.fuss { background: var(--tinte); color: var(--dunkel-text); border-top: 1px solid var(--dunkel-linie); position: relative; z-index: 6; }
.fuss .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--a2); padding-block: var(--a3); font-size: .9375rem; }
.fuss ul { display: flex; flex-wrap: wrap; column-gap: var(--a3); }
.fuss-marke { display: flex; align-items: center; gap: var(--a3); }
.fuss-marke img { width: 150px; height: 20px; }
.fuss a { display: inline-flex; align-items: center; min-height: 44px; color: var(--papier); text-decoration-color: var(--dunkel-linie); text-underline-offset: .22em; }
.fuss a:hover { text-decoration-color: var(--blau-hell); }
.fuss :focus-visible { outline-color: var(--blau-hell); }

/* Geräte rein aus CSS: Laptop und Handy (Startseite und Projektseiten).
   Handy-Bilder behalten ihr eigenes Format, nichts wird verzerrt. */
.geraet-rahmen { justify-self: center; width: 100%; max-width: 660px; transform-origin: 50% 55%; }
.laptop-schirm { background: #0b1620; border-radius: 20px 20px 8px 8px; padding: 2.4% 2.4% 3.2%; box-shadow: 0 50px 80px -40px rgba(0, 0, 0, .55); position: relative; }
.laptop-schirm::before { content: ""; position: absolute; top: 1%; left: 50%; width: 6px; height: 6px; border-radius: 50%; background: #2a3d4a; translate: -50% 0; }
/* Der Bildschirm übernimmt das Format der Aufnahme (aus width/height), nichts wird beschnitten */
.laptop-schirm img { width: 100%; height: auto; border-radius: 6px; }
.laptop-fuss { height: 18px; margin-inline: -7%; background: #c7ced3; border-radius: 2px 2px 16px 16px; position: relative; }
.laptop-fuss::before { content: ""; position: absolute; left: 50%; top: 0; width: 18%; height: 7px; translate: -50% 0; background: #aab3b9; border-radius: 0 0 10px 10px; }
.geraet-rahmen.handy { max-width: 300px; }
/* Die Kerbe sitzt im Rahmen über dem Bild, nie auf dem Inhalt der Aufnahme */
.handy-schirm { background: #0b1620; border-radius: 46px; padding: 34px 11px 22px; position: relative; box-shadow: 0 50px 80px -40px rgba(0, 0, 0, .55); }
.handy-schirm::before { content: ""; position: absolute; top: 12px; left: 50%; width: 26%; height: 12px; border-radius: 8px; background: #1f3240; translate: -50% 0; }
.handy-schirm img { width: 100%; height: auto; border-radius: 10px; }

/* Kleines CSS-Handy für Vorschauen (Regal, „Nächstes Projekt“, Hero): zeigt die ganze Aufnahme.
   Die Höhe gibt die Fläche vor, die Breite folgt dem Bild (width/height). */
.mini-handy { display: block; height: 100%; width: fit-content; padding: 9px 5px 7px; border-radius: 16px; background: #0b1620; box-shadow: 0 16px 30px -18px rgba(15, 35, 48, .55); position: relative; }
.mini-handy::before { content: ""; position: absolute; top: 3px; left: 50%; width: 22%; height: 3px; border-radius: 2px; background: #2a3d4a; translate: -50% 0; }
.mini-handy img { display: block; height: 100%; width: auto; border-radius: 7px; }

/* Einlauf beim Scrollen. Standard: alles sichtbar. Nur mit Bewegung und Browser-Unterstützung
   (Scroll-Driven Animations) läuft es ein; sonst setzt start.js .ist-da per IntersectionObserver. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .einlauf { animation: einlaufen linear both; animation-timeline: view(); animation-range: entry 5% entry 80%; }
    .bild-auf { animation: bild-auf linear both; animation-timeline: view(); animation-range: entry 0% cover 35%; }
  }
  .io .einlauf:not(.ist-da) { transform: translateY(32px); clip-path: inset(0 0 100% 0); }
  .io .einlauf { transition: transform .8s var(--weich), clip-path .8s var(--weich); }
  .io .bild-auf:not(.ist-da) { clip-path: inset(8% 6% 8% 6% round 22px); }
  .io .bild-auf { transition: clip-path 1s var(--weich); }
}
/* Ohne Deckkraft: Text hat in jedem Moment vollen Kontrast, er wird nur von unten freigelegt */
@keyframes einlaufen { from { transform: translateY(32px); clip-path: inset(0 0 100% 0); } to { transform: none; clip-path: inset(0 0 -20% 0); } }
@keyframes bild-auf { from { clip-path: inset(8% 6% 8% 6% round 22px); } to { clip-path: inset(0 0 0 0 round 14px); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Unter 520 px bricht der Name sonst die Navigation um: nur das Zeichen */
@media (max-width: 700px) {
  .marke { font-size: 1.5rem; }
  .kopf nav a { font-size: .9375rem; padding-inline: 6px; }
}
@media (max-width: 519px) {
  .marke-name { display: none; }
  .zeichen { margin-right: 0; }
}
@media (max-width: 380px) {
  .marke { font-size: 1.25rem; }
  .kopf nav ul { gap: 0; }
  .kopf nav a { padding-inline: 5px; font-size: .875rem; }
}
