/* ==========================================================================
   GERÄTE — HTML/CSS-Mockups für BETON
   Telefon · Tablet · Monitor · Laptop · Bildschirmblatt (+ Kompositionen)
   Alle Maße in %, Schrift in den Bildschirmen in cqw → skaliert mit dem Gerät.
   ========================================================================== */

/* ---------- Bildschirm & App-UI ---------- */
.m-screen { position: relative; overflow: hidden; background: var(--beton); container-type: inline-size; }
.m-glanz::after {
  content: ""; position: absolute; inset: 0; z-index: 40; pointer-events: none;
  background: linear-gradient(118deg, rgba(255,255,255,.28) 0%, rgba(255,255,255,.06) 32%, rgba(255,255,255,0) 33%);
}
.ui { font-family: var(--f-grotesk); color: var(--schwarz); font-size: var(--ui, 4cqw); line-height: 1.25; height: 100%; display: flex; flex-direction: column; }
.ui-l { font-family: var(--f-mono); font-weight: 500; font-size: .7em; letter-spacing: .06em; text-transform: uppercase; color: var(--grau); }
.ui-m { font-family: var(--f-mono); font-feature-settings: "tnum" 1; }
.ui-h { font-weight: 900; letter-spacing: -.04em; line-height: 1; }
.ui-k { background: var(--papier); border: max(1px, .14em) solid var(--schwarz); }
.ui-s { box-shadow: .35em .35em 0 var(--schwarz); }
.ui-bar { height: .8em; border: max(1px, .12em) solid var(--schwarz); background: var(--papier); }
.ui-bar > i { display: block; height: 100%; background: var(--schwarz); }
.ui-row { display: flex; justify-content: space-between; align-items: center; gap: .6em; }
.ui-av { width: 2.1em; height: 2.1em; display: grid; place-items: center; border: max(1px, .12em) solid var(--schwarz); font-weight: 900; flex: none; }
.ui-gelb { background: var(--gelb); } .ui-rot { background: var(--rot); color: #fff; } .ui-schwarz { background: var(--schwarz); color: var(--beton); } .ui-papier { background: var(--papier); }

/* Statuszeile */
.m-status { display: flex; justify-content: space-between; align-items: center; padding: 4.6cqw 9cqw 2.4cqw; font: 700 4.3cqw/1 var(--f-grotesk); }
.m-status__rechts { display: flex; gap: 1.6cqw; align-items: center; }
.m-status__balken { display: flex; gap: .5cqw; align-items: flex-end; height: 3cqw; }
.m-status__balken i { width: .9cqw; background: currentColor; display: block; }
.m-status__akku { width: 6.5cqw; height: 3.1cqw; border: .45cqw solid currentColor; border-radius: 1cqw; padding: .4cqw; position: relative; }
.m-status__akku::after { content: ""; position: absolute; right: -1.2cqw; top: 30%; width: .6cqw; height: 40%; background: currentColor; border-radius: 0 .5cqw .5cqw 0; }
.m-status__akku i { display: block; height: 100%; width: 78%; background: currentColor; border-radius: .4cqw; }

/* ---------- Telefon ---------- */
.m-phone {
  position: relative; aspect-ratio: 71.5 / 146.7;
  border-radius: 16.5% / 8%; padding: 3.3%;
  background: linear-gradient(140deg, #5a5a60 0%, #232326 22%, #2c2c30 70%, #616166 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.3), inset 0 0 0 .35em #0b0b0c, 0 40px 60px -30px rgba(0,0,0,.6);
}
.m-phone > .m-screen { height: 100%; border-radius: 13.2% / 6.4%; --ui: 4.3cqw; }
.m-phone__insel { position: absolute; top: 2.3%; left: 50%; transform: translateX(-50%); width: 30%; aspect-ratio: 3.6; border-radius: 999px; background: #000; z-index: 50; }
.m-phone__insel::after { content: ""; position: absolute; right: 12%; top: 28%; height: 44%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #2b3550, #05060a 60%); }
.m-knopf { position: absolute; width: 1.5%; border-radius: 2px; background: linear-gradient(90deg, #18181a, #55555b); }
.m-knopf--power { right: -1.1%; top: 26%; height: 13%; }
.m-knopf--aktion { left: -1.1%; top: 16%; height: 4.5%; }
.m-knopf--laut1 { left: -1.1%; top: 23.5%; height: 7%; }
.m-knopf--laut2 { left: -1.1%; top: 32%; height: 7%; }

/* ---------- Tablet ---------- */
.m-tablet {
  position: relative; aspect-ratio: 178.5 / 247.6;
  border-radius: 7.5% / 5.4%; padding: 1.1%;
  background: linear-gradient(135deg, #e9eaec, #a9abaf 45%, #d7d8db 70%, #8e9094);
  box-shadow: 0 40px 70px -35px rgba(0,0,0,.55);
}
.m-tablet__rahmen { height: 100%; border-radius: 6.7% / 4.8%; background: #0b0b0c; padding: 4.2%; }
.m-tablet__rahmen > .m-screen { height: 100%; border-radius: 3.2% / 2.3%; --ui: 2.9cqw; }
.m-tablet__stift { position: absolute; right: -4.5%; top: 18%; width: 2.4%; height: 64%; border-radius: 999px; background: linear-gradient(90deg, #d9dadc, #fff 40%, #b7b8bb); box-shadow: 0 10px 20px -10px rgba(0,0,0,.4); }
.m-tablet__stift::after { content: ""; position: absolute; bottom: -4%; left: 20%; width: 60%; height: 5%; background: #9a9b9f; clip-path: polygon(0 0, 100% 0, 50% 100%); }

/* ---------- Monitor ---------- */
.m-monitor { position: relative; }
.m-monitor__rahmen {
  position: relative; background: #0b0b0c; padding: 2.1%; border-radius: 1.6% / 2.5%;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 30px 60px -30px rgba(0,0,0,.5);
}
.m-monitor__rahmen::before { /* Glanzkante oben rechts wie im Referenzbild */
  content: ""; position: absolute; top: 0; right: 0; width: 22%; height: 4%; border-top-right-radius: inherit;
  background: linear-gradient(110deg, transparent 0 30%, rgba(255,255,255,.22) 31%, rgba(255,255,255,.04) 100%);
}
.m-monitor__rahmen > .m-screen { aspect-ratio: 16 / 9.6; --ui: 1.55cqw; }
.m-monitor__arm { width: 74%; margin: 0 auto; aspect-ratio: 24 / 1.5; background: linear-gradient(#77777b, #5b5b5f 50%, #6a6a6e); }
.m-monitor__hals { width: 22%; margin: 0 auto; aspect-ratio: 6 / 2.6; background: linear-gradient(90deg, #4d4d51, #8a8a8e 50%, #4d4d51); clip-path: polygon(14% 0, 86% 0, 100% 100%, 0 100%); }
.m-monitor__fuss { width: 34%; margin: 0 auto; aspect-ratio: 12 / .9; border-radius: 0 0 50% 50% / 0 0 100% 100%; background: linear-gradient(#9a9a9e, #4f4f53); }
.m-monitor--weiss .m-monitor__rahmen { background: #fbfbfc; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08), 0 30px 60px -30px rgba(40,40,60,.45); }
.m-monitor--weiss .m-monitor__rahmen::before { display: none; }
.m-monitor--weiss .m-monitor__hals { width: 9%; aspect-ratio: 2 / 3; background: linear-gradient(90deg, #d8d8dc, #ffffff 50%, #d0d0d4); clip-path: polygon(20% 0, 80% 0, 100% 100%, 0 100%); }
.m-monitor--weiss .m-monitor__fuss { width: 46%; aspect-ratio: 16 / .8; background: linear-gradient(#ffffff, #cfcfd4); clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%); border-radius: 0; }

/* ---------- Laptop ---------- */
.m-laptop { position: relative; perspective: 1600px; }
.m-laptop__deckel {
  position: relative; width: 86%; margin: 0 auto; background: #0b0b0c;
  padding: 2.3% 2.3% 2.9%; border-radius: 2.6% 2.6% 0 0 / 4.2% 4.2% 0 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
  transform-origin: 50% 100%;
}
.m-laptop__deckel::before { content: ""; position: absolute; top: .9%; left: 50%; width: .9%; aspect-ratio: 1; border-radius: 50%; transform: translateX(-50%); background: radial-gradient(circle at 35% 35%, #34405e, #05060a 70%); }
.m-laptop__deckel::after { content: ""; position: absolute; top: 0; left: 0; width: 30%; height: 3%; border-top-left-radius: inherit; background: linear-gradient(90deg, rgba(255,255,255,.18), transparent); }
.m-laptop__deckel > .m-screen { aspect-ratio: 16 / 10; --ui: 1.75cqw; }
.m-laptop__basis {
  position: relative; width: 100%; aspect-ratio: 60 / 1.6;
  background: linear-gradient(#e2e3e5 0%, #b9babd 35%, #8b8c90 75%, #5e5f63 100%);
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  box-shadow: 0 18px 30px -18px rgba(0,0,0,.6);
}
.m-laptop__basis::after { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 13%; height: 55%; border-radius: 0 0 30% 30% / 0 0 100% 100%; background: linear-gradient(#8f9094, #b3b4b7); }

/* ---------- Bildschirmblatt (schwebende Website) ---------- */
.m-blatt { position: absolute; aspect-ratio: 16 / 10; background: var(--papier); box-shadow: 0 40px 60px -30px rgba(14,14,14,.55), 0 0 0 1px rgba(14,14,14,.08); --ui: 2cqw; }
.m-blatt > .m-screen { height: 100%; background: var(--papier); }

/* ---------- Kompositionen ---------- */
/* Gerätefamilie (Referenz 1) */
.m-familie { position: relative; width: 100%; aspect-ratio: 1374 / 720; }
.m-familie > * { position: absolute; }
.m-familie__monitor { left: 20%; top: 0; width: 50%; z-index: 1; }
.m-familie__laptop { right: 3%; bottom: 1%; width: 40%; z-index: 3; }
.m-familie__tablet { left: 11.5%; bottom: 2%; width: 18.5%; z-index: 2; }
.m-familie__phone { left: 5%; bottom: 1%; width: 7.4%; z-index: 4; }
.m-boden { position: absolute; left: 2%; right: 2%; bottom: -1%; height: 6%; background: radial-gradient(50% 50% at 50% 50%, rgba(14,14,14,.22), transparent 70%); z-index: 0; }

/* Bildschirmfächer (Referenz 2) */
.m-faecher { position: relative; width: 100%; aspect-ratio: 1338 / 760; perspective: 2200px; }
.m-faecher .m-blatt { width: 41%; transform: rotateY(16deg) rotateX(3deg); transform-origin: 0 50%; }
.m-faecher .m-blatt:nth-child(1) { left: 3%; top: 2%; z-index: 1; }
.m-faecher .m-blatt:nth-child(2) { left: 10%; top: 18%; z-index: 2; }
.m-faecher .m-blatt:nth-child(3) { left: 17%; top: 34%; z-index: 3; }
.m-faecher .m-blatt:nth-child(4) { left: 24%; top: 50%; z-index: 4; }
.m-faecher__monitor { position: absolute; right: 3%; top: 38%; width: 32%; z-index: 5; transform: rotateY(-10deg); }
.m-faecher__monitor .m-screen { --ui: 1.9cqw; }

/* 3D-Szene: Rückfall ohne WebGL */
.m-paar { display: grid; grid-template-columns: 30fr 58fr; gap: 8%; align-items: end; max-width: 620px; margin-inline: auto; }

@media (prefers-reduced-motion: reduce) { .m-laptop__deckel { transform: none !important; } }

/* ---------- 3D-Szene Telefon → Tablet ----------
   Ohne JS/WebGL: statische HTML-Mockups + alle Texte untereinander.
   Mit WebGL (.is-3d): 600vh Scrollstrecke, Bühne klebt, Texte wechseln. */
.b-szene { position: relative; background: var(--beton); }
.b-szene__buehne { position: relative; }
.b-szene__canvas { display: none; }
.b-szene__inhalt { display: grid; gap: 3rem; padding-block: 5rem; }
@media (min-width: 1024px) { .b-szene__inhalt { grid-template-columns: 5fr 7fr; align-items: center; } }
.b-szene__h { font-weight: 900; letter-spacing: -.04em; line-height: 1; font-size: clamp(1.9rem, 3.6vw, 3.3rem); }
.b-szene__p { font-size: clamp(1rem, 1.3vw, 1.18rem); line-height: 1.55; max-width: 46ch; }
.b-szene__caps article { margin-bottom: 2.5rem; }
.b-szene__fort { display: none; }

.b-szene.is-3d { height: 720vh; }
.b-szene.is-3d .b-szene__buehne { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.b-szene.is-3d .b-szene__canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.b-szene.is-3d .b-szene__rueckfall { display: none; }
.b-szene.is-3d .b-szene__inhalt { position: relative; height: 100%; padding: 0; pointer-events: none; }
.b-szene.is-3d .b-szene__text { align-self: center; }
.b-szene.is-3d .b-szene__caps { position: relative; min-height: 16rem; }
.b-szene.is-3d .b-szene__caps article { position: absolute; left: 0; top: 0; right: 0; margin: 0; opacity: 0; transform: translateY(22px); filter: blur(6px); transition: opacity .9s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1), filter .9s cubic-bezier(.16,1,.3,1); }
.b-szene.is-3d .b-szene__caps article.is-aktiv { opacity: 1; transform: none; filter: none; }
.b-szene.is-3d .b-szene__caps article:not(.is-aktiv) .b-btn { pointer-events: none; }
.b-szene.is-3d .b-szene__fort { display: block; }
@media (max-width: 1023px) {
  .b-szene.is-3d .b-szene__inhalt { grid-template-rows: 1fr auto; }
  .b-szene.is-3d .b-szene__text { grid-row: 2; align-self: end; background: rgba(231,228,221,.94); border-top: 2px solid var(--schwarz); margin-inline: -16px; padding: 1rem 16px 1.25rem; }
  .b-szene.is-3d .b-szene__caps { min-height: 9.5rem; margin-top: .75rem; }
  .b-szene.is-3d .b-szene__h { font-size: 1.55rem; }
  .b-szene.is-3d .b-szene__p { font-size: .93rem; }
  .b-szene.is-3d .b-szene__caps .b-btn { min-height: 44px; margin-top: .6rem; }
  .b-szene.is-3d .b-szene__fort { margin-top: .6rem; }
}
