/* AN ECHO AWAY – landing page layout */

/* Top bar */
.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: rgba(7, 8, 10, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  max-width: var(--content);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter-r);
  padding-block: 0.6rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.topbar__brand { color: var(--text); text-decoration: none; }
.wordmark--small { font-size: 0.95rem; }
.lab-tag {
  font-size: 0.6875rem;
  color: var(--corona-hi);
  border: 1px solid var(--corona);
  padding: 0.1em 0.5em;
  text-transform: uppercase;
}
.topbar__nav { display: flex; gap: 1.6rem; margin-left: auto; }
.topbar__nav a { color: var(--muted); text-decoration: none; }
.topbar__nav a:hover { color: var(--text); }
.topbar__cta { min-height: 38px; padding: 0.5em 1.2em; margin-left: auto; }
.topbar__nav + .topbar__cta { margin-left: 0; }
.topbar .lang-switch { margin-left: auto; }
.topbar__nav + .lang-switch, .lang-switch + .topbar__cta { margin-left: 0; }

@media (max-width: 720px) {
  .topbar__nav { display: none; }
  .topbar__cta { margin-left: auto; }
  .topbar .lang-switch { margin-left: auto; }
  .topbar .lang-switch + .topbar__cta { margin-left: 0; }
}
@media (max-width: 440px) {
  .topbar__inner { gap: 0.6rem; }
  .topbar__cta { padding: 0.5em 0.85em; }
  .lang-switch a { min-width: 32px; padding: 0 0.4em; }
  .topbar .lab-tag { display: none; }
  .wordmark--small { font-size: 0.82rem; }
  .topbar__cta[href="#wishlist"] { display: none; }
}

/* Hero: the engine image carries the page; the type sits in the dark half */
.hero {
  position: relative;
  min-height: min(82vh, 760px);
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero__sky { position: absolute; inset: 0; }
.hero__sky img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% 50%;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 8, 10, 0.92) 0%, rgba(7, 8, 10, 0.55) 45%, rgba(7, 8, 10, 0) 70%),
              linear-gradient(0deg, rgba(7, 8, 10, 0.8) 0%, rgba(7, 8, 10, 0) 30%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--content);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter-r);
  padding-block: 5rem 4rem;
  display: grid;
  gap: 1.4rem;
  justify-items: start;
}
.wordmark--hero {
  font-size: var(--step-3);
  padding-left: 0.1em;
}
.hero__tagline { color: var(--corona-hi); margin: 0; }
.hero__pitch { max-width: 46ch; margin: 0.4rem 0 0; color: var(--text); font-size: 1.0625rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 0.6rem; }
.hero__caption {
  position: absolute;
  z-index: 1;
  right: var(--gutter-r);
  bottom: 1rem;
  margin: 0;
  font-size: 0.6875rem;
  color: var(--faint);
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .hero { display: block; min-height: 0; }
  .hero__sky { position: relative; display: block; aspect-ratio: 4 / 3; max-width: 100%; }
  .hero__sky img { object-position: 74% 50%; }
  .hero__sky::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, var(--void) 0%, rgba(7, 8, 10, 0) 45%);
  }
  .hero::after { display: none; }
  .hero__inner { margin-top: -2.5rem; padding-block: 0 2.75rem; }
  .hero__caption { top: 0.75rem; bottom: auto; }
  .wordmark--hero { font-size: 1.7rem; gap: 0.7em; }
}
@media (max-width: 380px) {
  .wordmark--hero { font-size: 1.45rem; }
}

/* Bands */
.band { border-bottom: 1px solid var(--line); }
.band__inner {
  max-width: var(--content);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter-r);
  padding-block: 4.5rem;
}
.section-head { display: grid; gap: 0.6rem; margin-bottom: 2.6rem; max-width: var(--measure); }
.section-head__eyebrow { color: var(--corona-hi); margin: 0; }
.section-head__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 300;
  font-size: var(--step-2);
  letter-spacing: 0.06em;
  line-height: 1.25;
  text-wrap: balance;
}
.section-head__lead { margin: 0.4rem 0 0; color: var(--muted); }

/* The game */
.game { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 3rem; align-items: start; }
.game__lead { margin: 0; font-size: 1.125rem; line-height: 1.65; max-width: 40ch; }
.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.feature {
  padding: 1.4rem 1.4rem 1.6rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.feature__title { margin: 0 0 0.6rem; color: var(--text); }
.feature p { margin: 0; color: var(--muted); font-size: 0.9375rem; }

@media (max-width: 900px) {
  .game { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
}
@media (max-width: 560px) {
  .features { grid-template-columns: minmax(0, 1fr); }
}

/* Demos: one live demo as the lead card, the rest in a 2 x 2 block */
.demos {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.demo-card {
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--hull);
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}
.demo-card--lead { grid-row: span 2; }
.demo-card__art {
  width: 100%;
  height: auto;
  aspect-ratio: 320 / 140;
  max-width: 100%;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse at 85% 50%, rgba(232, 137, 58, 0.08), transparent 60%);
}
.demo-card--lead .demo-card__art { aspect-ratio: 320 / 200; }
.demo-card__body { padding: 1.2rem 1.3rem 1.4rem; display: grid; gap: 0.45rem; align-content: start; }
.demo-card__meta { margin: 0; font-size: 0.75rem; color: var(--faint); text-transform: uppercase; }
.demo-card__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.demo-card__text { margin: 0; color: var(--muted); font-size: 0.9375rem; }
.demo-card__go { margin-top: 0.8rem; color: var(--corona-hi); }
.demo-card--live { transition: background 0.2s; }
.demo-card--live:hover { background: var(--hull-2); }
.demo-card--live:hover .demo-card__go { color: var(--text); }
.demo-card--lead .demo-card__title { font-size: 1.3rem; }
.demo-card--soon .demo-card__art { opacity: 0.55; }
.demo-card--soon .demo-card__title { color: var(--muted); }

.demo-card__ping { animation: card-ping 3.2s linear infinite; }
@keyframes card-ping {
  0% { transform: translateX(-34px); opacity: 0; }
  10% { opacity: 1; }
  45% { transform: translateX(132px); opacity: 1; }
  55% { transform: translateX(132px); opacity: 0; }
  100% { transform: translateX(132px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .demo-card__ping { animation: none; } }

@media (min-width: 901px) {
  .demo-card--lead { grid-template-rows: 1fr auto; }
  .demo-card--lead .demo-card__art { aspect-ratio: auto; height: 100%; min-height: 12rem; }
}
@media (max-width: 900px) {
  .demos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-card--lead { grid-row: auto; grid-column: 1 / -1; }
  .demo-card--lead .demo-card__art { aspect-ratio: 320 / 140; }
}
@media (max-width: 560px) {
  .demos { grid-template-columns: minmax(0, 1fr); }
}

/* Media placeholder */
.media-placeholder {
  border: 1px dashed var(--line-strong);
  min-height: 14rem;
  display: grid;
  place-items: center;
  padding: 2rem;
  text-align: center;
  color: var(--muted);
}
.media-placeholder p { max-width: 52ch; margin: 0; font-size: 0.875rem; }
@media (max-width: 560px) { .media-placeholder { min-height: 11rem; } }

/* Wishlist */
.cta { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 2rem; }
.cta__text { margin: 0.6rem 0 0; color: var(--muted); max-width: 48ch; }
.band--cta { background: radial-gradient(ellipse at 100% 100%, rgba(232, 137, 58, 0.10), transparent 55%), var(--void); }

/* Footer */
.footer__inner {
  max-width: var(--content);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter-r);
  padding-block: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer__note { margin: 0; font-size: 0.75rem; color: var(--faint); }

/* Demo overlay */
.demo-dialog {
  width: 100vw;
  max-width: 100vw;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--void);
  color: var(--text);
}
.demo-dialog::backdrop { background: rgba(0, 0, 0, 0.8); }
.demo-dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.demo-dialog__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-left: var(--gutter);
  padding-right: var(--gutter-r);
  padding-block: calc(0.5rem + env(safe-area-inset-top, 0px)) 0.5rem;
  border-bottom: 1px solid var(--line);
}
.demo-dialog__bar p { margin: 0; color: var(--muted); }
.demo-dialog__close { min-height: 38px; padding: 0.4em 1em; }
.demo-dialog__stage { min-height: 0; overflow: auto; }

/* Hero image smaller (Nico, 14.10.2026): the image is sized by the hero's height and anchored right,
   instead of covering the full width. The black hole appears smaller and less magnified; the left edge fades into the void. */
.hero { background: var(--void); }
.hero__sky img {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  height: 100%;
  max-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 35%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 35%);
}
@media (max-width: 720px) {
  .hero__sky { aspect-ratio: 16 / 9; }
  .hero__sky img {
    position: static;
    transform: none;
    width: 100%;
    height: auto;
    -webkit-mask-image: none;
            mask-image: none;
  }
}

/* Black-hole reading teasers on the landing page */
.reads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.read-card { display: grid; grid-template-rows: auto 1fr; background: var(--hull); color: var(--text); text-decoration: none; min-width: 0; transition: background 0.2s; }
.read-card:hover { background: var(--hull-2); }
.read-card:hover .demo-card__go { color: var(--text); }
.read-card__art { width: 100%; height: auto; aspect-ratio: 320 / 120; border-bottom: 1px solid var(--line); background: radial-gradient(ellipse at 75% 50%, rgba(232, 137, 58, 0.08), transparent 60%); }
.read-card__body { padding: 1.2rem 1.3rem 1.4rem; display: grid; gap: 0.45rem; align-content: start; }
@media (max-width: 720px) { .reads { grid-template-columns: minmax(0, 1fr); } }

/* Legal links (Impressum/Datenschutz), server addition 19.11.2026 */
.footer__legal { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; font-size: 0.75rem; }
.footer__legal a { color: var(--muted); text-decoration: underline; text-underline-offset: 0.2em; }
.footer__legal a:hover, .footer__legal a:focus-visible { color: var(--text); }

/* Demo grid without holes for any number of cards (public site has fewer demos than the lab), server addition 19.11.2026 */
@media (min-width: 901px) {
  .demos > .demo-card:last-child:nth-child(3n+1) { grid-column: span 2; }
  .demos > .demo-card:last-child:nth-child(3n+1) .demo-card__art { aspect-ratio: 640 / 140; }
  .demos > .demo-card:last-child:nth-child(3n):not(.demo-card--lead) .demo-card__art { aspect-ratio: 960 / 140; }
  .demos > .demo-card:last-child:nth-child(3n):not(.demo-card--lead) { grid-column: 1 / -1; }
}
@media (min-width: 561px) and (max-width: 900px) {
  .demos > .demo-card:last-child:nth-child(2n) { grid-column: 1 / -1; }
}
