/* MH Software · Entwurf K3 · Layout „Seite als Scroll-Erlebnis“ (ergänzt site.css + device.css) */

/* ---------- Nav: schwebende Pille beim Runterscrollen ---------- */
.nav { transition: background-color .35s ease; }
.nav__inner {
  transition: max-width .5s cubic-bezier(.2, .8, .2, 1), height .4s ease, margin .4s ease, border-radius .5s ease, background-color .35s, padding .4s ease;
  border: 1px solid transparent; border-bottom-color: var(--line);
}
.nav.is-pill { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.nav.is-pill .nav__inner {
  max-width: 720px; height: 56px; margin-top: 10px; padding: 0 8px 0 20px; gap: 22px;
  background: #0f0f0f; border-color: #262626; border-radius: 999px;
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .9);
}
.nav.is-pill .nav__links { gap: 18px; }
.nav.is-pill .nav__links a { font-size: 14px; }
.nav.is-pill .nav__cta .btn--ghost { display: none; }
.nav.is-pill .nav__cta .btn { border-radius: 999px; height: 40px; }
.nav.is-pill .logo__word { font-size: 17px; }
.nav.is-pill .logo__icon { width: 26px; height: 26px; }

/* ---------- Journey: Hero + gepinnte Story, EIN iPhone ---------- */
.journey {
  --iw: min(340px, calc((100svh - 170px) / 2.0615));
  --ih: calc(var(--iw) * 2.0615);
  --peek: min(30svh, calc(var(--ih) * .42));
  --ptop: calc(50svh - var(--ih) / 2 + 26px);
  position: relative;
}
.hero3 {
  position: relative; z-index: 1; isolation: isolate; overflow: hidden;
  min-height: calc(100svh - 101px); padding: 52px 0 calc(var(--peek) + 28px); text-align: center;
}
.hero3__rays { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero3__cone {
  position: absolute; left: 50%; top: 0; width: 1400px; height: 100%; transform: translateX(-50%); transition: opacity 1.2s ease;
  background:
    conic-gradient(from 180deg at 50% -18%, transparent 156deg, rgba(59, 130, 246, .16) 172deg, rgba(59, 130, 246, .24) 180deg, rgba(59, 130, 246, .16) 188deg, transparent 204deg),
    radial-gradient(50% 55% at 50% 0%, rgba(59, 130, 246, .2), rgba(59, 130, 246, .05) 60%, transparent 80%);
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
  mask-image: linear-gradient(#000 55%, transparent);
}
.hero3__canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s ease; }
.hero3__rays.is-gl .hero3__canvas { opacity: 1; }
.hero3__rays.is-idle .hero3__canvas:not(.hero3__snap) { display: none; }
.hero3__snap { display: none; }
.hero3__rays.is-idle .hero3__snap { display: block; }
.hero3__rays.is-gl .hero3__cone { opacity: .35; }
.hero3__inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.hero3__h1 { font-size: min(104px, 7.3vw); line-height: 1.02; letter-spacing: -.052em; margin: 18px 0 22px; }
.hero3__l1 { white-space: nowrap; }
.hero3__l1 .rotate { display: inline-grid !important; vertical-align: bottom; justify-items: start; text-align: left; }
.rotate.is-fit { transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.rotate.is-fit .rotate__sizer { display: none; }
.rotate__probe { position: absolute; visibility: hidden; white-space: pre; }
.hero3__lead { max-width: 38em; text-wrap: balance; font-size: 17px; line-height: 1.55; color: #b5b5b5; }
.hero3__btns { display: flex; justify-content: center; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero3 .hero__note { margin-top: 16px; }

/* Das eine iPhone: steigt im Hero von unten ein, bleibt per sticky mittig stehen */
.journey__phone {
  position: relative; z-index: 3; width: var(--iw); pointer-events: none;
  margin: calc(-1 * var(--peek)) auto 0; height: var(--peek); overflow: hidden;
}
.journey__phone { animation: phone-rise 1.4s cubic-bezier(.16, 1, .3, 1) .45s backwards; }
@keyframes phone-rise { from { transform: translateY(110px); opacity: 0; } to { transform: none; opacity: 1; } }
.journey.is-pinned .journey__phone {
  position: sticky; top: var(--ptop); height: auto; overflow: visible;
  margin: calc(-1 * var(--peek)) auto calc(100svh - var(--ptop) - var(--ih));
}
.story__iphone { --iw: inherit; width: var(--iw); transform: perspective(1800px) rotateY(var(--sry, 0deg)); transition: transform .2s linear; }
.story__screen {
  position: absolute; inset: 0; opacity: 0; transform: translateY(42%);
  transition: opacity .45s ease, transform .65s cubic-bezier(.2, .8, .2, 1);
}
.story__screen.is-active { opacity: 1; transform: none; }
.story__screen.is-past { opacity: 0; transform: scale(.86); }
.story__screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

.techband { position: relative; z-index: 1; background: var(--bg); }
.journey.is-pinned .techband { margin-top: calc(var(--peek) + var(--ptop) - 100svh); }

/* Story (gepinnt, Desktop) */
.story { position: relative; z-index: 2; }
.journey.is-pinned .story { height: 500vh; }
.story__pin { display: none; }
.journey.is-pinned .story__pin { display: block; position: sticky; top: 0; height: 100svh; overflow: hidden; }
.story__glows { position: absolute; inset: 0; pointer-events: none; }
.story__glow { position: absolute; left: 50%; top: 50%; width: 1100px; height: 1100px; margin: -550px 0 0 -550px; opacity: 0; transition: opacity .9s ease; }
.story__glow.is-in { opacity: 1; }
.story__glow--taxi { background: radial-gradient(closest-side, rgba(245, 197, 24, .22), rgba(245, 197, 24, .07) 50%, transparent); }
.story__glow--holo { background: radial-gradient(closest-side, rgba(34, 211, 238, .2), rgba(34, 211, 238, .06) 50%, transparent); }
.story__glow--green { background: radial-gradient(closest-side, rgba(34, 197, 94, .2), rgba(34, 197, 94, .06) 50%, transparent); }
.story__glow--gebet { background: radial-gradient(closest-side, rgba(185, 28, 28, .22), rgba(185, 28, 28, .08) 50%, transparent); }
.story__glow--jagd { background: radial-gradient(closest-side, rgba(161, 98, 7, .22), rgba(161, 98, 7, .08) 50%, transparent); }
.story__grid { position: relative; height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) var(--iw) minmax(0, 1fr); column-gap: 64px; }
.story__left, .story__right { position: relative; height: 100%; }
.story__right { grid-column: 3; }
.story__h { position: absolute; top: 112px; left: 0; font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.story__items { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-46%); display: grid; }
.story__item { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility 0s linear .35s; }
.story__item.is-in { opacity: 1; visibility: visible; transition: opacity .35s ease, visibility 0s; }
.story__typ { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.story__name { color: #fff; font-size: clamp(40px, 4vw, 60px); font-weight: 550; letter-spacing: -.048em; line-height: 1; margin: 16px 0 26px; }
.story__facts li { padding: 14px 0; border-top: 1px solid rgba(255, 255, 255, .09); color: #c8c8c8; font-size: 15.5px; line-height: 1.55; }
.story__facts li:last-child { border-bottom: 1px solid rgba(255, 255, 255, .09); }
.story__cs { display: inline-block; margin-top: 18px; }
.story__web {
  position: absolute; top: 50%; left: -150px; width: min(600px, 44vw);
  opacity: 0; transform: translate(90px, -50%) perspective(1600px) rotateY(-22deg);
  transition: opacity .5s ease, transform .8s cubic-bezier(.2, .8, .2, 1);
}
.story__web.is-in { opacity: 1; transform: translate(0, -50%) perspective(1600px) rotateY(-14deg); }
.story__num {
  position: absolute; top: 50%; left: 30px; margin: 0; font: 500 150px/1 var(--mono); letter-spacing: -.07em; color: #fff;
  opacity: 0; transform: translate(60px, -50%); transition: opacity .5s ease, transform .8s cubic-bezier(.2, .8, .2, 1);
}
.story__num span { font-size: .4em; color: #4a4a4a; letter-spacing: -.02em; }
.story__num.is-in { opacity: 1; transform: translate(0, -50%); }
.story__dots { position: absolute; left: 26px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 4px; z-index: 4; }
.story__dot { position: relative; display: block; width: 28px; height: 28px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.story__dot::before { content: ""; position: absolute; left: 10px; top: 10px; width: 8px; height: 8px; border-radius: 4px; background: #3a3a3a; transition: height .35s cubic-bezier(.2, .8, .2, 1), top .35s cubic-bezier(.2, .8, .2, 1), background-color .25s; }
.story__dot:hover::before { background: #8a8a8a; }
.story__dot.is-active::before { top: 4px; height: 20px; background: var(--accent); }
.story__dotlabel { position: absolute; left: 34px; top: 50%; transform: translate(-4px, -50%); white-space: nowrap; font-size: 11px; color: #d4d4d4; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; }
.story__dot:hover .story__dotlabel, .story__dot:focus-visible .story__dotlabel { opacity: 1; transform: translate(0, -50%); }

/* Story statisch: Mobil und reduzierte Bewegung */
.storym { display: flex; flex-direction: column; gap: 110px; max-width: 1100px; margin: 0 auto; padding: 110px var(--pad) 20px; }
.journey.is-pinned .storym { display: none; }
.storym__item { position: relative; display: grid; justify-items: center; gap: 36px; }
.storym__glow { position: absolute; left: 50%; top: 26%; width: min(720px, 130vw); aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; }
.storym__phone { --iw: min(60vw, 300px); position: relative; }
.storym__text { position: relative; width: 100%; max-width: 540px; }
.storym .story__name { font-size: 40px; margin: 12px 0 18px; }
.has-io .storym__item { opacity: 0; transform: translateY(40px); transition: opacity .7s ease, transform .9s cubic-bezier(.2, .8, .2, 1); }
.has-io .storym__item.is-in { opacity: 1; transform: none; }
@media (min-width: 961px) {
  .storym__item { grid-template-columns: auto minmax(0, 1fr); justify-items: start; align-items: center; column-gap: 80px; }
  .storym__glow { left: 150px; top: 50%; }
}

/* ---------- Sektionen ---------- */
.section--bento { padding-top: 150px; }
.section--refs { padding-top: 190px; }
.section--reveal { padding-top: 220px; padding-bottom: 40px; }
.section--team { padding-top: 200px; }
.section--stack { padding-top: 190px; }
.section--vgl { padding-top: 120px; }
.section--stimmen { padding-top: 190px; }

.idxbox { margin-top: 48px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.idxbox summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 20px 0; color: var(--text); font-size: 17px; font-weight: 500; }
.idxbox summary::-webkit-details-marker { display: none; }
.idxbox summary::after { content: "+"; font: 300 26px/1 var(--sans); color: var(--accent); transition: transform .2s; }
.idxbox[open] summary::after { transform: rotate(45deg); }
.idxbox .idx { padding-bottom: 24px; }
.idxbox .idx__row:hover { background: #101010; }

.team3 { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 88px; align-items: center; }
.team3__text { display: flex; flex-direction: column; gap: 18px; }

.swapgrid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 72px; align-items: center; }
.swapgrid .h2 { margin-bottom: 28px; }
.swapgrid .fine { margin-top: 28px; }

/* „Wann wir passen“: Kästchen füllen sich Zeile für Zeile */
.cmp .box--full { background: linear-gradient(var(--accent), var(--accent)) no-repeat; }
.cmp .box--half { background: linear-gradient(135deg, var(--accent) 50%, transparent 50%) no-repeat; }
.cmp.will-fill .box { background-size: 100% 0%; background-position: bottom; transition: background-size .45s cubic-bezier(.2, .8, .2, 1) calc(var(--r, 12) * 90ms), border-color .3s ease calc(var(--r, 12) * 90ms); border-color: #3a3a3a; }
.cmp.will-fill.is-filled .box { background-size: 100% 100%; border-color: var(--accent); }
.cmp.will-fill.is-filled .box--empty { border-color: #6a6a6a; }

/* Section-Einblendung */
.rv { opacity: 0; transform: translateY(24px); filter: blur(6px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1), filter .6s ease; }
.rv.is-rv { opacity: 1; transform: none; filter: none; }

/* ---------- Responsiv ---------- */
@media (max-width: 1300px) {
  .story__grid { padding-left: 76px; column-gap: 48px; }
  .story__web { left: -130px; }
}
@media (max-width: 1100px) {
  .mb { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mb__card--big { grid-row: span 2; }
  .mb__card--wide .mb__title, .mb__card--wide .mb__text, .mb__card--wide .mb__label { max-width: 44%; }
  .vel__word, .vel__sep { font-size: 92px; }
  .stack__n { font-size: 160px; }
  .team3 { gap: 56px; }
}
@media (max-width: 960px) {
  .hero3 { min-height: 0; }
  .hero3__h1 { font-size: 64px; }
  .hero3__l1 { white-space: normal; }
  .cg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team3, .swapgrid { grid-template-columns: 1fr; }
  .pc { margin: 0 auto; }
  .nav.is-pill .nav__inner { max-width: calc(100% - 20px); padding: 0 6px 0 16px; }
}
@media (max-width: 767px) {
  .journey { --iw: min(60vw, 280px); --peek: calc(var(--ih) * .5); }
  .hero3 { padding: 36px 0 calc(var(--peek) + 24px); }
  .hero3__h1 { font-size: 44px; line-height: 1.04; margin: 16px 0 18px; }
  .hero3__lead { font-size: 16px; }
  .hero3__btns { width: 100%; }
  .hero3__btns > * { flex: 1 1 auto; }
  .hero3__btns .magnet .btn { width: 100%; }
  .storym { gap: 88px; padding-top: 88px; }
  .storym .story__name { font-size: 34px; }
  .vel { padding-top: 110px; }
  .vel__word, .vel__sep { font-size: 54px; }
  .vel__word { -webkit-text-stroke-width: 1px; }
  .mb { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .mb__card { min-height: 200px; padding: 22px; }
  .mb__card--big, .mb__card--wide { grid-column: auto; grid-row: auto; }
  .mb__card--big { min-height: 460px; padding: 24px; }
  .mb__card--big .mb__title { font-size: 32px; }
  .mb__phone { right: 50%; margin-right: -90px; bottom: -150px; }
  .mb__phone .iphone { --iw: 180px; }
  .mb__card--wide { min-height: 420px; justify-content: flex-start; }
  .mb__card--wide .mb__title, .mb__card--wide .mb__text, .mb__card--wide .mb__label { max-width: none; }
  .mb__browser { top: auto; bottom: -60px; right: -10%; width: 105%; }
  .cg { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cg__card { padding: 5px; gap: 6px; border-radius: 9px; }
  .cg__info { flex-direction: column; gap: 0; padding: 0 3px 2px; }
  .cg__name { font-size: 13px; }
  .cg__dom { font-size: 10px; }
  .reveal { font-size: 28px; line-height: 1.3; }
  .section--reveal { padding-top: 140px; }
  .section--bento, .section--refs, .section--team, .section--stack, .section--stimmen { padding-top: 120px; }
  .stack__slot, .stack__slot:nth-child(n) { top: calc(84px + var(--k, 0px)); }
  .stack__slot:nth-child(2) { --k: 10px; } .stack__slot:nth-child(3) { --k: 20px; } .stack__slot:nth-child(4) { --k: 30px; }
  .stack__slot + .stack__slot { margin-top: 8vh; }
  .stack__card { grid-template-columns: 1fr; height: auto; min-height: 300px; padding: 26px 24px; gap: 12px; align-content: space-between; }
  .stack__n { font-size: 96px; }
  .stack__title { font-size: 28px; }
  .stack__text { font-size: 15.5px; }
  .swap { padding: 40px 36px 0 0; }
  .swap__card { padding: 24px 22px; transform: translate3d(calc(var(--slot) * 22px), calc(var(--slot) * -22px), calc(var(--slot) * -60px)); }
  .swap__card blockquote { font-size: 17px; }
}
@media (max-width: 380px) {
  .hero3__h1 { font-size: 40px; }
  .vel__word, .vel__sep { font-size: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  .journey__phone { animation: none; }
  .story__iphone, .story__screen, .story__web, .story__num, .story__glow, .story__item, .nav__inner, .rotate.is-fit { transition: none; }
  .rv { opacity: 1; transform: none; filter: none; transition: none; }
}

/* Überstehende Lichtscheine (Story-Glow, Bento-Spotlight) nicht scrollbar machen; clip bricht sticky nicht */
main { overflow-x: clip; }
