/* kopf.css: Hero der Startseite (ruhiger, mehr Luft, schnittigere Überschrift), Pixel-Hintergrund und die
   mitfliegenden Kontaktknöpfe. Die Kopfleiste selbst steht in css/site-nav.css.
   Geladen von index.html nach dem Inline-Stil, deshalb gleichen Rangs gewinnen diese Regeln. */

/* ─── Pixel-Hintergrund (kopf.js) ─── */
#hero { overflow: clip; }
.kopf-pixel { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }

/* ─── Hero: Maße ─── */
#hero .hero-inner { padding: calc(var(--kopf-h) + 3.5rem) var(--gutter) 4rem; gap: clamp(3rem, 6vw, 6rem); }
#hero .hero-content { max-width: 540px; }
#hero .label { margin-bottom: 1.4rem; }

/* Überschrift: Schrift und Akzent wie im Original (Space Grotesk 700, grüner Teil in Cormorant Garamond Italic, siehe Inline-Stil), nur kleiner */
#hero .hero-headline {
  font-size: clamp(2.35rem, 3.9vw, 3.8rem); line-height: 1.05; letter-spacing: -0.025em;
  margin-bottom: 1.6rem; text-wrap: balance;
}
#hero .hero-sub {
  font-size: 1.06rem; font-weight: 400; line-height: 1.65; color: rgba(221, 232, 240, .78);
  max-width: 34rem; margin-bottom: 2.25rem;
}

/* Hauptknopf im Hero: flach, gefüllt, kein Glas */
#hero .hero-actions .btn-cta-main {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3.1rem; padding: 0 1.9rem;
  color: #06120c; background: #2dffa0; border: 0; box-shadow: none;
  font-size: .8rem; letter-spacing: .12em;
}
@media (hover: hover) {
  #hero .hero-actions .btn-cta-main:hover { background: #63ffb9; border: 0; box-shadow: none; transform: translateY(-2px); }
}
#hero .hero-actions .btn-cta-main:active { transform: scale(.98); }
#hero .hero-note { margin-top: 1.1rem; color: rgba(144, 174, 200, .9); }
#hero .hero-rating { margin-top: 2.6rem; }

/* ─── Geräte: echte Körper mit Tiefe ───
   Die Neigung setzt der Inline-Skript der Startseite (rotateY/rotateX auf #heroDevices) und schreibt --ry, --sx, --ex, --ey
   mit; am Touchgerät dreht das Scrollen. Monitor und Telefon sind keine Platten mit Schatten mehr, sondern Körper aus
   Flächen (preserve-3d): Monitor mit Seiten, Ober- und Unterkante und Rückseite, Telefon mit Titanrand aus Schichten,
   der Ständer mit Hals und Fuß aus Aluminium. Flächen stehen auf 89 statt 90 Grad, weil WebKit exakt senkrechte Flächen nicht zeichnet. Das Licht ist ein schräger Glanz auf dem Glas, der mit der Neigung wandert.
   Animiert wird nur transform (die Neigung), alles andere steht. */
.hero-devices-wrap { max-width: 680px; margin-left: auto; padding: 1rem 2.5rem 3rem 3.5rem; perspective: 950px; perspective-origin: 50% 36%; }
.hero-devices {
  --d: clamp(10px, 2.5vw, 26px);      /* Gehäusetiefe des Monitors */
  --sh: clamp(66px, 13vw, 104px);     /* Höhe des Ständers bis zum Tisch */
  --ft: calc(var(--sh) * .085);       /* Dicke des Fußes */
  --fd: calc(var(--sh) * 1.25);       /* Tiefe des Fußes */
  --nt: calc(var(--d) * .7);          /* Dicke des Halses */
  --dp: 36px;                          /* Abstand der drei Punkte und Breite ihrer Trefferfläche */
  transform: rotateY(-20deg) rotateX(-7deg);
}
.hero-devices::before { display: none; }
.hero-devices::after { bottom: -60px; opacity: .5; transform: translateZ(-120px); }

/* Monitor als Körper */
.hd-monitor { position: relative; transform-style: preserve-3d; }
.device-desktop {
  background: linear-gradient(calc(172deg + var(--ry, -16) * .6deg), #eceef1 0%, #c9cdd2 34%, #a2a7af 78%, #868b93 100%);
  border: 0; border-radius: 8px; padding: 10px 10px 12px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(0, 0, 0, .4), inset 1px 0 0 rgba(255, 255, 255, .35), inset -1px 0 0 rgba(0, 0, 0, .25);
  transform-style: flat; backface-visibility: hidden;
}
.hd-face { position: absolute; display: block; pointer-events: none; backface-visibility: hidden; }
.hd-r, .hd-l { top: 8px; height: calc(100% - 16px); width: var(--d); }
.hd-r { left: calc(100% - var(--d) / 2); transform: translateZ(calc(var(--d) / -2)) rotateY(89deg);
  background: linear-gradient(90deg, #e3e6ea 0%, #b3b8bf 8%, #8d929a 45%, #5b5f66 100%); }
.hd-l { left: calc(var(--d) / -2); transform: translateZ(calc(var(--d) / -2)) rotateY(-89deg);
  background: linear-gradient(90deg, #4d5157 0%, #7d828a 55%, #b9bec5 92%, #e3e6ea 100%); }
.hd-t, .hd-b { left: 8px; width: calc(100% - 16px); height: var(--d); }
.hd-t { top: calc(var(--d) / -2); transform: translateZ(calc(var(--d) / -2)) rotateX(89deg);
  background: linear-gradient(180deg, #7a7f87 0%, #b7bcc3 70%, #f1f3f5 100%); }
.hd-b { top: calc(100% - var(--d) / 2); transform: translateZ(calc(var(--d) / -2)) rotateX(-89deg);
  background: linear-gradient(180deg, #7b8088 0%, #4c5056 60%, #35383d 100%); }
.hd-back { inset: 0; border-radius: 8px; transform: translateZ(calc(var(--d) * -1)) rotateY(180deg);
  background: linear-gradient(160deg, #d4d8dd 0%, #aeb3ba 50%, #8d929a 100%); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .3); }

/* Ständer: Aluminium-Hals und Fuß mit Dicke, Knopf zum Weiterschalten darüber */
.display-stand { position: relative; width: 100%; height: var(--sh); transform-style: preserve-3d; transform: none; pointer-events: auto; }
.hd-neck { position: absolute; left: 39%; width: 22%; top: -1px; height: calc(100% - var(--ft) + 1px);
  transform-style: preserve-3d; transform: translateZ(calc(var(--d) * -1 + 5px)); }
.hd-neck i { position: absolute; display: block; backface-visibility: hidden; }
.hd-nf { inset: 0; background: linear-gradient(90deg, #858a92 0%, #c5c9cf 14%, #eef0f3 34%, #cfd3d8 62%, #9ba0a7 88%, #70747c 100%);
  box-shadow: inset 0 10px 14px -6px rgba(0, 0, 0, .5), inset 0 -10px 12px -6px rgba(0, 0, 0, .25); }
.hd-nb { inset: 0; transform: translateZ(calc(var(--nt) * -1)) rotateY(180deg); background: #6c7077; }
.hd-nl, .hd-nr { top: 0; height: 100%; width: var(--nt); }
.hd-nl { left: calc(var(--nt) / -2); transform: translateZ(calc(var(--nt) / -2)) rotateY(-89deg); background: linear-gradient(90deg, #4c5056, #8a8f97 70%, #c2c6cc); }
.hd-nr { left: calc(100% - var(--nt) / 2); transform: translateZ(calc(var(--nt) / -2)) rotateY(89deg); background: linear-gradient(90deg, #d2d6db, #9ca1a8 40%, #5d6168); }

.hd-foot { position: absolute; left: 28%; width: 44%; top: calc(100% - var(--ft)); height: 0; transform-style: preserve-3d; }
.hd-foot i, .hd-foot-top { position: absolute; left: 0; top: 0; width: 100%; height: var(--fd); border-radius: 16px / 22px;
  transform-origin: 50% 0; backface-visibility: hidden; }
.hd-foot i { transform: translateY(calc(var(--k) * var(--ft) / 8)) translateZ(calc(var(--fd) * -.64)) rotateX(89deg);
  background: linear-gradient(180deg, hsl(215 5% calc(30% - var(--k) * 1.2%)) 0%, hsl(215 5% calc(78% - var(--k) * 3.4%)) 100%); }
.hd-foot-top { transform: translateZ(calc(var(--fd) * -.64)) rotateX(89deg);
  background: radial-gradient(ellipse 70% 55% at 38% 70%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 70%),
              linear-gradient(180deg, #a9aeb5 0%, #d7dadf 38%, #f0f2f4 78%, #dadde1 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5), inset 0 -3px 6px rgba(0, 0, 0, .12); }
.hd-foot-top::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: #fff; opacity: 0; }
.hd-dots { position: absolute; left: 50%; bottom: 14%; transform: translateX(-50%); display: flex; gap: calc(var(--dp, 36px) - 8px); }
.hd-dots i { position: relative; width: 8px; height: 8px; border-radius: 50%; background: rgba(40, 44, 50, .35);
  transform: none; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .4), 0 1px 0 rgba(255, 255, 255, .7); transition: transform .25s ease; }
.hd-dots i::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: #17b878; box-shadow: 0 0 6px 1px rgba(45, 255, 160, .65); opacity: 0; transition: opacity .3s ease; }
.hd-dots i.is-on::after { opacity: 1; }
.hd-dots i.is-hover { transform: scale(1.35); }
/* Drei einzeln klickbare Punkte: eine flache Ebene genau über den Punkten im Raum des Fußes, damit sie bei jeder Neigung unter ihnen bleibt.
   Jede Fläche ist so breit wie der Punktabstand und 44 px hoch. */
.hd-pick { position: absolute; left: 50%; top: calc(var(--sh) - var(--ft)); display: flex;
  transform: translate(-50%, -50%) translateZ(calc(var(--fd) * .22 + 4px)); transform-style: flat; }
.hd-pick-btn { display: block; width: var(--dp, 36px); height: 44px; padding: 0; margin: 0; border: 0; background: transparent; border-radius: 12px;
  cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.hd-pick-btn:focus-visible { outline: 2px solid #2dffa0; outline-offset: -3px; }
@media (hover: hover) { .display-stand:hover .hd-foot-top::after { opacity: .22; } }

/* Schatten in Ebenen auf dem Tisch: Kontakt, weicher Hof, Wurf des Monitors nach hinten */
.hd-ground { position: absolute; left: 0; right: 0; top: 100%; height: 0; transform-style: preserve-3d; pointer-events: none; }
.hd-ground i { position: absolute; display: block; transform-origin: 50% 0; }
.hd-sh-contact { left: 29%; width: 42%; height: calc(var(--fd) * 1.05); transform: translateZ(calc(var(--fd) * -.7)) rotateX(89deg);
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, .5) 55%, rgba(0, 0, 0, 0) 100%); }
.hd-sh-soft { left: 6%; width: 88%; height: calc(var(--fd) * 3.2); transform: translateZ(calc(var(--fd) * -1.9)) rotateX(89deg);
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, .28) 50%, rgba(0, 0, 0, 0) 100%); }
.hd-sh-cast { left: 14%; width: 100%; height: calc(var(--fd) * 2.2); transform: translateZ(calc(var(--fd) * -2.4)) rotateX(89deg);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .34) 45%, rgba(0, 0, 0, .12) 100%); }

/* Platzhalter, solange ein Bild lädt: dunkle Fläche mit festem Seitenverhältnis, kein Aufploppen */
.hero-devices .device-desktop-screen { background: linear-gradient(160deg, #141a22 0%, #0b0f14 100%); aspect-ratio: 16 / 10; }
.hero-devices .device-mobile-screen { background: linear-gradient(160deg, #141a22 0%, #0b0f14 100%); aspect-ratio: 780 / 1688; }
.hero-devices .device-desktop-screen img.hero-lyr, .hero-devices .device-mobile-screen img.hero-lyr { transition: opacity .7s cubic-bezier(.4, 0, .2, 1); }
@media (prefers-reduced-motion: no-preference) {
  .hero-devices .device-desktop-screen img:first-child, .hero-devices .device-mobile-screen img:first-child { animation: wrImgIn .6s ease; }
}
@keyframes wrImgIn { from { opacity: 0; } }

/* Bildschirm: Bild ohne Rand, darüber Glanz und feiner Innenschatten der Glasscheibe */
.device-desktop-screen { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .6); }
.device-desktop-screen::after, .device-mobile-screen::after {
  content: ''; position: absolute; inset: 0; z-index: 8; pointer-events: none;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0) calc(var(--sx, 30%) - 24%), rgba(255, 255, 255, .16) var(--sx, 30%), rgba(255, 255, 255, 0) calc(var(--sx, 30%) + 16%)),
    linear-gradient(180deg, rgba(255, 255, 255, .07) 0%, rgba(255, 255, 255, 0) 30%);
  box-shadow: inset 0 0 14px rgba(0, 0, 0, .28);
}

.device-mobile {
  --ps: 1.15px; /* Schichtabstand des Rands, sieben Schichten */
  left: -22px; top: 22%; width: 28%; border-radius: 17% / 7.8%; transform: translateZ(150px) rotateY(4deg);
  transform-style: preserve-3d;
  background: linear-gradient(calc(150deg + var(--ry, -16) * .8deg), #787b83 0%, #3a3d43 30%, #202227 55%, #3a3d43 80%, #666a71 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), inset 0 1px 0 rgba(255, 255, 255, .38), inset 0 -1px 0 rgba(0, 0, 0, .6);
}
.phone-rim { position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  transform: translateZ(calc(var(--k) * var(--ps) * -1));
  background: hsl(220 6% calc(44% - var(--k) * 4.6%)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05); }
.device-mobile::before, .device-mobile::after { content: ''; position: absolute; width: 3px; border-radius: 2px; background: linear-gradient(90deg, #5b5e66, #2a2c31); pointer-events: none; transform: translateZ(-3px); }
.device-mobile::before { left: -2px; top: 18%; height: 11%; box-shadow: 0 calc(var(--ps) * 28) 0 #3a3d43; }
.device-mobile::after { right: -2px; top: 26%; height: 15%; }
.device-mobile-frame { border-radius: 15.5% / 7.2%; }
.device-mobile-screen { border-radius: 13.5% / 6.3%; background: #000; }
.hero-devices .device-mobile-screen img { top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
/* Kamera als kleiner Punkt statt Insel, damit der Bildschirm bis oben die Seite zeigt */
.device-mobile-screen .dynamic-island { top: 1.1%; width: 3.6%; aspect-ratio: 1; background: #050608; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .55); }
.device-mobile-screen .dynamic-island::after { display: none; }
.device-home-bar { bottom: 1%; width: 26%; height: 3px; background: rgba(0, 0, 0, .55); box-shadow: 0 0 0 1px rgba(255, 255, 255, .35); }

@media (max-width: 1020px) {
  #hero .hero-inner { padding-top: calc(var(--kopf-h) + 3rem); gap: 3rem; }
  #hero .hero-content { width: 100%; max-width: 640px; align-self: flex-start; }
  .hero-devices-wrap { margin-left: auto; margin-right: auto; padding: 1rem 1rem 3.5rem 2.2rem; }
  .hero-devices-wrap { max-width: 600px; }
  .device-mobile { left: -4px; top: 24%; width: 30%; transform: translateZ(90px); }
}
/* iPad hochkant (1021 bis 1100 px): wie das Tablet gestapelt, Text oben, Geräte darunter */
@media (min-width: 1021px) and (max-width: 1100px) and (orientation: portrait) {
  #hero .hero-inner { flex-direction: column; padding-top: calc(var(--kopf-h) + 3rem); gap: 3rem; }
  #hero .hero-content { width: 100%; max-width: 640px; align-self: flex-start; }
  .hero-devices-wrap { margin-left: auto; margin-right: auto; padding: 1rem 1rem 3.5rem 2.2rem; max-width: 600px; width: 100%; }
  .device-mobile { left: -4px; top: 24%; width: 30%; transform: translateZ(90px); }
}
@media (max-width: 640px) {
  .hero-devices-wrap { max-width: none; margin: 0 -.25rem; padding: 0 .5rem 3rem .75rem; }
  .device-mobile { left: auto; right: -2px; top: 22%; width: 34%; padding: 3px; }
  .device-desktop { padding: 7px 7px 9px; border-radius: 6px; }
  .device-mobile { --ps: .75px; }
  .hd-r, .hd-l { top: 6px; height: calc(100% - 12px); }
  .hd-t, .hd-b { left: 6px; width: calc(100% - 12px); }
  .hd-back { border-radius: 6px; }
  .hero-devices { --dp: 34px; }
  .hd-dots i { width: 7px; height: 7px; }
}
@media (max-width: 768px) {
  #hero .hero-inner { padding-top: calc(var(--kopf-h) + 2.25rem); padding-bottom: 2.5rem; }
  #hero .hero-headline { font-size: clamp(2.1rem, 9.6vw, 2.9rem); line-height: .98; margin-bottom: 1.3rem; }
  #hero .hero-headline .accent-green { font-size: 1em; display: block; }
  #hero .hero-sub { font-size: 1rem; margin-bottom: 1.75rem; }
  #hero .hero-rating { margin-top: 2rem; }
}

/* ─── Mitfliegende Knöpfe unten rechts: Telefon und WhatsApp, stehen still ───
   Ab 768 px (iPad und Rechner) mit Text (Grundregel im Inline-Stil), am iPhone rund. Kein Hover-Rutschen. */
@media (max-width: 767px) {
  .fab { right: 1rem; bottom: 1rem; }
  .fab-item { width: 48px; height: 48px; min-width: 48px; min-height: 48px; padding: 0; justify-content: center; gap: 0; font-size: .84rem; }
  .fab-item span { display: none; }
}

/* Spät ladende Bilder: dunkle Platzhalterfläche, dann weiches Einblenden (js/portfolio.js, softImages) */
img.wr-soft { opacity: 0; background: rgba(255, 255, 255, .04); transition: opacity .55s ease; }
img.wr-soft.is-in { opacity: 1; }
