/* ============ Home ============ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding-top: 96px;
}

/* ---------- Dot grid, lit around the cursor ---------- */

.site-header, .hero > * { position: relative; z-index: 1; }
.site-header { position: fixed; z-index: 50; }

/* ---------- Top: wordmark + live feed ---------- */

.hero-top {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  padding-top: 16px;
  padding-bottom: clamp(32px, 4vw, 56px);
}

.wordmark {
  display: flex;
  font-size: clamp(48px, 8vw, 110px);
  line-height: .8;
  letter-spacing: -0.045em;
  font-weight: 300;
  margin-left: -0.04em;
  padding-top: .06em;
  white-space: nowrap;
  user-select: none;
  cursor: default;
  clip-path: inset(-20% -30% 0 -10%);
}
.wordmark span { display: inline-block; font-weight: inherit; will-change: font-variation-settings, transform; }

.hero-meta { margin-top: clamp(28px, 3.4vw, 44px); display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
/* The tagline is measured by the wordmark above it: both rules flex into
   whatever space the letters leave, so the group stays symmetric and never
   grows wider than the logo. */
.brand { width: fit-content; max-width: 100%; }
.hero-sub {
  width: 100%;
  margin-top: clamp(14px, 1.6vw, 22px);
  font-size: clamp(13px, 1.3vw, 19px); letter-spacing: -0.01em;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  white-space: nowrap;
}
.hero-sub::before, .hero-sub::after {
  content: ''; flex: 1 1 0; min-width: 0; height: 1px; background: var(--fg); opacity: .5;
}
/* Below this width the wordmark is barely wider than the tagline, so the rules
   would collapse to a hairline. Drop them and align the text with the logo. */
@media (max-width: 960px) {
  .brand { width: auto; }
  .hero-sub { justify-content: flex-start; }
  .hero-sub::before, .hero-sub::after { content: none; }
}
.hero-desc { font-size: clamp(18px, 1.4vw, 21px); line-height: 1.45; letter-spacing: -0.01em; color: var(--muted); }
.hero-h1 {
  font-size: clamp(27px, 2.7vw, 42px);
  line-height: 1.08; letter-spacing: -0.035em; font-weight: 500;
  color: var(--fg);
}
.hero-cta { margin-top: 6px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-loss { font-size: 16px; line-height: 1.45; color: var(--muted); }
.hero-loss b { color: var(--fg); font-weight: 500; font-variant-numeric: tabular-nums; }
.hero-loss a { color: var(--accent); border-bottom: 1px solid transparent; transition: border-color .25s; white-space: nowrap; }
.hero-loss a:hover { border-color: currentColor; }
@media (max-width: 520px) { .hero-cta .btn { width: 100%; } }

/* live panel */
.live {
  border-left: 1px solid var(--line);
  padding-left: clamp(24px, 3vw, 44px);
  max-width: 520px;
  justify-self: end;
  width: 100%;
}
.live-head { display: flex; align-items: center; gap: 12px; font-size: 16px; }
.live-head em { margin-left: auto; font-style: normal; font-size: 14px; color: var(--muted); border: 1px solid var(--line); border-radius: 100px; padding: 3px 10px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #3DDC84; box-shadow: 0 0 0 0 rgba(61, 220, 132, .5); animation: live 2s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 10px rgba(61, 220, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); } }

.live-count { display: flex; align-items: flex-end; gap: 18px; margin: 26px 0 22px; }
.live-count strong {
  font-size: clamp(48px, 4.6vw, 72px); font-weight: 400; letter-spacing: -0.04em; line-height: .85;
  font-variant-numeric: tabular-nums; min-width: 1.2ch;
  transition: color .6s;
}
.live-count strong.tick { color: var(--accent); transition: none; }
.live-count span { color: var(--muted); font-size: 16px; line-height: 1.35; max-width: 250px; }

.live-feed {
  list-style: none; margin: 0; padding: 0;
  height: 264px; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 60%, transparent);
  mask-image: linear-gradient(#000 60%, transparent);
}
.live-feed a { display: block; color: inherit; }
.live-feed li {
  display: grid; grid-template-columns: 78px 1fr; gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  animation: feedIn .7s var(--ease);
}
@keyframes feedIn { from { opacity: 0; transform: translateY(-12px); } }
.live-feed time { font-family: var(--mono); font-size: 14px; color: var(--muted); padding-top: 3px; }
.live-feed b { display: block; font-weight: 500; font-size: 14px; color: var(--muted); margin-bottom: 2px; }
.live-feed p { font-size: 17px; line-height: 1.35; }
.live-feed li:first-child p { color: #fff; }
.live-feed li:first-child b { color: var(--accent); }
.live-feed li { transition: opacity .3s; }
.live-feed:hover li { opacity: .55; }
.live-feed li:hover { opacity: 1; }
.live-feed li:hover p { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

@media (max-width: 960px) {
  .hero-top { display: contents; }
  .hero-main { order: 1; padding: 16px var(--gutter) 36px; }
  .paths { order: 2; }
  .live { order: 3; justify-self: auto; max-width: none; border-left: 0; padding: 32px var(--gutter) 8px; }
  .hero-foot { order: 4; }
  .live-feed { height: 200px; }
}

/* ---------- Two paths ---------- */

.paths {
  --edge: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.path {
  position: relative;
  overflow: hidden;
  min-height: clamp(190px, 25vh, 270px);
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 24px;
  padding: clamp(26px, 3vw, 44px) var(--gutter);
  isolation: isolate;
  container-type: inline-size;
  transition: color .5s var(--ease);
}
.path + .path { border-left: 1px solid var(--line); }
.path-auto { padding-left: var(--edge); }
.path-web { padding-right: var(--edge); }

.path-bg {
  position: absolute; inset: 0; z-index: -1;
  transform: translateY(101%);
  transition: transform .6s var(--ease);
}
.path-auto .path-bg { background: var(--paper); }
.path-web .path-bg {
  background-color: #131316;
  background-image: radial-gradient(rgba(210, 102, 74, .42) 1px, transparent 1.2px);
  background-size: 18px 18px;
}
.path:hover .path-bg, .path:focus-visible .path-bg { transform: none; }
.path-auto:hover, .path-auto:focus-visible { color: var(--ink); }
.path-web:hover, .path-web:focus-visible { color: var(--terra-lit); }

.path-body { display: flex; flex-direction: column; justify-content: flex-end; gap: 16px; position: relative; z-index: 1; }
.path-title { font-size: clamp(24px, 2.4vw, 36px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 500; }
.path-meta { font-size: 16px; opacity: .65; }

.path-arrow {
  flex: none; align-self: flex-end;
  width: 60px; height: 60px;
  border: 1px solid currentColor;
  border-radius: 50%;
  display: grid; place-items: center;
  opacity: .5;
  position: relative; z-index: 1;
  transition: transform .5s var(--ease), opacity .3s;
}
.path:hover .path-arrow { opacity: 1; transform: rotate(-45deg); }

/* hover preview: mini dialog */
.pv-chat {
  position: absolute; right: calc(var(--gutter) + 80px); top: 50%;
  transform: translateY(-50%);
  width: 200px;
  display: flex; flex-direction: column; gap: 6px;
  pointer-events: none;
}
.pv-chat .b {
  max-width: 88%;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 14px; line-height: 1.3;
  opacity: 0; transform: translateY(10px);
  transition: opacity .35s, transform .45s var(--ease);
}
.pv-chat .me { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 4px; }
.pv-chat .bot { align-self: flex-start; background: #fff; color: var(--ink); border: 1px solid rgba(10,10,11,.1); border-bottom-left-radius: 4px; }
.path-auto:hover .pv-chat .b { opacity: 1; transform: none; }
.path-auto:hover .pv-chat .b:nth-child(1) { transition-delay: .25s; }
.path-auto:hover .pv-chat .b:nth-child(2) { transition-delay: .75s; }
.path-auto:hover .pv-chat .b:nth-child(3) { transition-delay: 1.25s; }

/* hover preview: die sechs ersten Bildschirme drehen sich im Kreis
   Echte Aufnahmen der Konzepte, nicht nachgebaute Zeichen. Drei stehen
   sichtbar nebeneinander — vorn, links, rechts —, die drei anderen sinken
   dahinter weg und kommen rechts wieder hoch. Jede Karte haelt 2,1 s vorn
   und rueckt dann in 1,4 s eine Position weiter; ein Durchlauf dauert 21 s.
   Alles per animation-delay — kein Skript.
   --pv reserviert die rechte Haelfte der Karte: Pfeil 60 px + Karussell. */
.path-web { --pv: 372px; }

.pv-cards {
  position: absolute;
  right: calc(var(--edge) + 60px);
  top: 50%; margin-top: -52px;
  width: calc(var(--pv) - 60px); height: 104px;
  perspective: 900px; transform-style: preserve-3d;
  pointer-events: none;
}
.pv-cards i {
  position: absolute; left: 50%; top: 0; margin-left: -92px;
  width: 184px; height: 104px;
  border-radius: 7px; overflow: hidden;
  background: #0E0E0F;
  box-shadow: 0 22px 44px -16px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.18);
  opacity: 0;
  transform: translate3d(0, 34px, -220px) scale(.38);
}
.pv-cards img { display: block; width: 100%; height: 100%; object-fit: cover; }

.path-web:hover .pv-cards i {
  animation: reihum 21s cubic-bezier(.62,.02,.26,1) infinite;
  animation-delay: var(--d, 0s);
}
.pv-cards .c1 { --d: 0s; }
.pv-cards .c2 { --d: -3.5s; }
.pv-cards .c3 { --d: -7s; }
.pv-cards .c4 { --d: -10.5s; }
.pv-cards .c5 { --d: -14s; }
.pv-cards .c6 { --d: -17.5s; }

@keyframes reihum {
  0%, 9%             { transform: translate3d(0, 0, 0)            rotateY(0deg)   scale(1);   opacity: 1; }
  16.667%, 25.667%   { transform: translate3d(-76px, 9px, -55px)  rotateY(24deg)  scale(.78); opacity: .92; }
  33.333%, 42.333%   { transform: translate3d(-106px, 26px, -150px) rotateY(46deg) scale(.5); opacity: 0; }
  50%, 59%           { transform: translate3d(0, 34px, -220px)    rotateY(0deg)   scale(.38); opacity: 0; }
  66.667%, 75.667%   { transform: translate3d(106px, 26px, -150px) rotateY(-46deg) scale(.5); opacity: 0; }
  83.333%, 92.333%   { transform: translate3d(76px, 9px, -55px)   rotateY(-24deg) scale(.78); opacity: .92; }
  100%               { transform: translate3d(0, 0, 0)            rotateY(0deg)   scale(1);   opacity: 1; }
}

/* Ohne Bewegung: das Karussell steht — drei Bildschirme nebeneinander */
@media (prefers-reduced-motion: reduce) {
  .path-web:hover .pv-cards i { animation: none; }
  .path-web:hover .pv-cards .c1 { transform: none; opacity: 1; }
  .path-web:hover .pv-cards .c2 { transform: translate3d(-76px, 9px, -55px) rotateY(24deg) scale(.78); opacity: .92; }
  .path-web:hover .pv-cards .c6 { transform: translate3d(76px, 9px, -55px) rotateY(-24deg) scale(.78); opacity: .92; }
  .path-web:hover .pv-cards .c3,
  .path-web:hover .pv-cards .c4,
  .path-web:hover .pv-cards .c5 { opacity: 0; }
}

/* previews claim the right side only when the card has room; otherwise they stay hidden */
.pv-chat, .pv-cards { display: none; }
@container (min-width: 570px) {
  .pv-chat { display: flex; }
  .path-auto .path-body { max-width: calc(100% - 300px); }
}
@container (min-width: 570px) {
  .pv-cards { display: block; }
  .path-web .path-body { max-width: calc(100% - var(--pv)); }
}

@media (max-width: 760px) {
  .paths { grid-template-columns: 1fr; }
  .path + .path { border-left: 0; border-top: 1px solid var(--line); }
  .path { min-height: 180px; }
  .path-arrow { width: 50px; height: 50px; }
}

/* ---------- Foot ---------- */

.hero-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
  padding-top: 24px; padding-bottom: 24px;
  font-size: 16px;
}
.founding { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.founding i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex: none; }
.socials { display: flex; gap: 28px; flex-wrap: wrap; }
.socials a { color: var(--muted); transition: color .2s; }
.socials a:hover { color: var(--fg); }

/* ---------- Entrance ---------- */

.js .home .wordmark span { transform: translateY(105%); }
.js .home.is-ready .wordmark span { transform: none; transition: transform 1.2s var(--ease) calc(.15s + var(--i) * 90ms); }
.js .home .intro { opacity: 0; transform: translateY(18px); }
.js .home.is-ready .intro { opacity: 1; transform: none; transition: opacity 1s var(--ease) var(--d, 0s), transform 1s var(--ease) var(--d, 0s); }

@media (prefers-reduced-motion: reduce) {
  .js .home .wordmark span, .js .home .intro { transform: none; opacity: 1; }
}
