:root {
  color-scheme: dark;
  --bg: #070a0f;
  --panel: rgba(18, 24, 35, .76);
  --panel-strong: rgba(25, 33, 47, .90);
  --text: #f4f7fb;
  --muted: #aeb9c8;
  --line: rgba(255, 255, 255, .12);
  --accent: #9bd241;
  --accent-2: #c7f36c;
  --shadow: 0 24px 80px rgba(0, 0, 0, .42);
  --radius: 30px;
  --page-pad: clamp(14px, 2.1vw, 30px);
  --page-pad-top: clamp(12px, 2.2vh, 26px);
  --page-pad-bottom: clamp(12px, 1.8vh, 26px);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; height: auto; overflow-anchor: none; }
html, body { width: 100%; max-width: 100%; }

body {
  min-height: 100vh;
  min-height: 100svh;
  overflow-anchor: none;
  margin: 0;
  padding: var(--page-pad-top) var(--page-pad) var(--page-pad-bottom);
  color: var(--text);
  background:
    radial-gradient(circle at 15% 12%, rgba(155, 210, 65, .18), transparent 30rem),
    radial-gradient(circle at 84% 22%, rgba(105, 155, 255, .13), transparent 34rem),
    linear-gradient(135deg, #05070b 0%, #0a0f18 54%, #080b10 100%);
  display: grid;
  place-items: start center;
  overflow-x: hidden;
}

button,
input,
select,
textarea { font: inherit; }

.page {
  width: min(1180px, 100%);
  margin-top: clamp(60px, 8.8vh, 96px);
}

.shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(22, 29, 42, .90), rgba(10, 14, 21, .88));
  box-shadow: var(--shadow);
  isolation: isolate;
}

.shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, .033) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .033) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 58% 40%, black, transparent 74%);
}

.shell::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 420px;
  height: 420px;
  right: -150px;
  bottom: -180px;
  background: radial-gradient(circle, rgba(155, 210, 65, .23), transparent 70%);
}

.topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px clamp(22px, 4vw, 48px) 0;
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -13px;
  height: 1px;
  background: var(--line);
  pointer-events: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: rgba(244, 247, 251, .96);
  font-weight: 800;
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
  letter-spacing: -.035em;
}

.brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .35));
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(320px, .84fr);
  align-items: center;
  gap: clamp(34px, 5vw, 72px);
  padding: 42px clamp(22px, 4vw, 48px) 42px;
}

.copy { min-width: 0; }

.eyebrow {
  margin: 0 0 15px;
  color: var(--accent-2);
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: clamp(.88rem, 1.25vw, 1.02rem);
  font-weight: 700;
  letter-spacing: .18em;
}

h1 {
  margin: 0;
  max-width: 650px;
  color: #ffffff;
  font-size: clamp(1.98rem, 3.05vw, 2.96rem);
  line-height: .98;
  letter-spacing: .038em;
  font-weight: 850;
}

.lead {
  max-width: 610px;
  margin: 17px 0 0;
  min-height: 3.15em;
  color: rgba(224, 231, 241, .76);
  font-size: clamp(1rem, 1.35vw, 1.14rem);
  line-height: 1.52;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 44px;
}

.chip {
  appearance: none;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 999px;
  background: rgba(255, 255, 255, .055);
  color: rgba(244, 247, 251, .88);
  cursor: pointer;
  font-weight: 750;
  font-size: .91rem;
  line-height: 1;
  transition: background-color .16s ease, border-color .16s ease, transform .16s ease, color .16s ease;
}

.chip:hover,
.chip:focus-visible {
  border-color: rgba(199, 243, 108, .42);
  background: rgba(155, 210, 65, .13);
  color: #f8ffe8;
}

.chip:focus-visible { outline: 3px solid rgba(155, 210, 65, .28); outline-offset: 3px; }
.chip:active { transform: translateY(1px); }
.chip[aria-pressed="true"] {
  border-color: rgba(155, 210, 65, .58);
  background: rgba(155, 210, 65, .22);
  color: #ecffc0;
}

.info-panel {
  width: min(620px, 100%);
  min-height: 112px;
  overflow-anchor: none;
  margin-top: 18px;
  padding: 15px 17px 16px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .062), rgba(255, 255, 255, .032));
  color: rgba(232, 239, 249, .80);
}

.info-kicker {
  margin: 0 0 8px;
  color: rgba(199, 243, 108, .82);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.info-panel h2 {
  margin: 0;
  color: rgba(255, 255, 255, .96);
  font-size: clamp(1rem, 1.4vw, 1.14rem);
  line-height: 1.25;
  letter-spacing: .01em;
}

.info-panel p[data-info-text] {
  margin: 8px 0 0;
  color: rgba(224, 231, 241, .76);
  font-size: .94rem;
  line-height: 1.48;
}

.info-panel.is-changing {
  animation: infoPanelFade .18s ease-out;
}

@keyframes infoPanelFade {
  from { opacity: .70; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(0); }
}

.visual {
  position: relative;
  min-height: 308px;
  height: 324px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% 22%, rgba(155, 210, 65, .14), transparent 47%),
    radial-gradient(circle at 76% 76%, rgba(105, 155, 255, .08), transparent 42%),
    rgba(255, 255, 255, .045);
  overflow: hidden;
}

.cube-stage {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 226px;
  display: grid;
  place-items: center;
  user-select: none;
  -webkit-user-select: none;
}

.cube-glow {
  position: absolute;
  width: 206px;
  height: 206px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(155, 210, 65, .13), transparent 65%);
  filter: blur(2px);
}

.cube-shadow {
  position: absolute;
  width: 100px;
  height: 18px;
  left: 50%;
  bottom: 49px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .34);
  filter: blur(12px);
  transform: translateX(calc(-50% + 3px)) rotate(-4deg);
}

/* Würfel selbst ist gekapselt in rsmet-cube.css. Hier nur Bühne/Schatten im TippWerk-Layout. */

.keys {
  position: absolute;
  inset: auto 28px 24px 28px;
  display: grid;
  grid-template-columns: repeat(9, minmax(16px, 1fr));
  gap: 7px;
  opacity: .48;
}

.keys span {
  height: 18px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 7px;
  background: rgba(255, 255, 255, .055);
}

.bottom-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 13px clamp(22px, 4vw, 48px);
  color: rgba(244, 247, 251, .62);
  background: rgba(255, 255, 255, .026);
  font-size: .86rem;
  line-height: 1.35;
}

.bottom-line span { min-width: 0; }
.bottom-line strong { color: rgba(244, 247, 251, .88); }
.landing-version { margin-left: auto; white-space: nowrap; color: rgba(244, 247, 251, .72); }


@media (min-width: 900px) and (min-aspect-ratio: 4 / 3) {
  body { overflow: hidden; }
}

@media (min-width: 900px) and (max-height: 780px) {
  :root { --page-pad: 16px; --page-pad-top: 14px; --page-pad-bottom: 14px; }
  .topbar { padding-top: 18px; }
  .hero {
    gap: clamp(28px, 4.4vw, 56px);
    padding-top: 22px;
    padding-bottom: 22px;
  }
  h1 {
    font-size: clamp(1.92rem, 2.92vw, 2.82rem);
    letter-spacing: .038em;
  }
  .lead {
    margin-top: 14px;
    min-height: 3.0em;
    font-size: 1rem;
    line-height: 1.5;
  }
  .chips { margin-top: 30px; }
  .info-panel { min-height: 104px; margin-top: 16px; padding-top: 13px; padding-bottom: 14px; }
  .visual {
    min-height: 296px;
    height: 310px;
  }
  .cube-stage { height: 214px; }
  .cube-shadow { bottom: 49px; }
  .bottom-line { padding-top: 11px; padding-bottom: 11px; }
}

@media (min-width: 900px) and (max-height: 690px) {
  .hero { padding-top: 18px; padding-bottom: 18px; }
  .chips { margin-top: 28px; }
  .info-panel { min-height: 98px; margin-top: 14px; padding: 12px 15px 13px; }
  .info-panel p[data-info-text] { font-size: .9rem; line-height: 1.42; }
  .visual { min-height: 276px; height: 288px; }
  .cube-stage { height: 200px; }
  .cube-shadow { bottom: 44px; width: 94px; }
  .bottom-line { font-size: .8rem; }
}

@media (min-width: 861px) and (max-width: 1180px) and (orientation: landscape) {
  :root {
    --page-pad: clamp(34px, 5.4vw, 56px);
    --page-pad-top: clamp(13px, 2vh, 18px);
    --page-pad-bottom: clamp(10px, 1.8vh, 18px);
  }
  .page { width: 100%; margin-top: clamp(60px, 7.8vh, 76px); }
  .topbar { padding-top: 18px; }
  .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(290px, .95fr);
    gap: clamp(24px, 3vw, 42px);
    padding-top: 24px;
    padding-bottom: 24px;
  }
  .visual {
    min-height: 292px;
    height: 306px;
  }
  .cube-stage { height: 210px; }
  .keys { inset-bottom: 22px; }
}

@media (min-width: 861px) and (max-width: 1080px) and (orientation: landscape) and (max-height: 760px) {
  .topbar { padding-top: 16px; }
  .hero { padding-top: 20px; padding-bottom: 20px; }
  .chips { margin-top: 28px; }
  .info-panel { min-height: 100px; margin-top: 14px; padding: 12px 15px 13px; }
  .info-panel p[data-info-text] { font-size: .9rem; line-height: 1.42; }
  .visual { min-height: 280px; height: 294px; }
  .cube-stage { height: 202px; }
  .bottom-line { padding-top: 10px; padding-bottom: 10px; }
}

@media (max-width: 860px) {
  :root { --page-pad: 14px; --page-pad-top: 12px; --page-pad-bottom: 14px; }
  body {
    place-items: start center;
    overflow: auto;
  }
  .page { margin-top: clamp(54px, 6vh, 70px); }
  .topbar { align-items: flex-start; }
  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 28px;
    padding-bottom: 28px;
  }
  h1 {
    font-size: clamp(1.9rem, 6.2vw, 2.68rem);
    letter-spacing: .038em;
  }
  .chips { margin-top: 30px; }
  .info-panel { min-height: 108px; margin-top: 15px; }
  .visual {
    min-height: 276px;
    height: 292px;
  }
  .cube-stage { height: 200px; }
  .bottom-line {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 11px;
    padding-bottom: 11px;
  }
}

@media (orientation: portrait) and (max-width: 1180px) {
  html { min-height: 0; height: auto; }
  body {
    display: block;
    min-height: 0 !important;
    height: auto !important;
    padding-bottom: 14px;
    overflow-y: auto;
  }
  .page {
    margin-left: auto;
    margin-right: auto;
  }
  .hero {
    grid-template-columns: 1fr;
  }
}

@media (orientation: portrait) and (max-width: 860px) {
  .page { margin-top: clamp(54px, 6vh, 70px); }
}

@media (max-width: 460px) {
  .brand img { width: 38px; height: 38px; }
  .chips { gap: 8px; margin-top: 24px; }
  .info-panel { min-height: 116px; margin-top: 14px; padding: 13px 14px 14px; }
  .info-panel p[data-info-text] { font-size: .88rem; line-height: 1.43; }
  .chip { font-size: .86rem; min-height: 34px; padding-inline: 11px; }
  .visual { min-height: 260px; height: 280px; }
  .cube-stage { height: 184px; }
  .cube-shadow { bottom: 42px; width: 84px; }
  .keys { inset-inline: 18px; gap: 5px; }
  .keys span { height: 14px; }
}

/* Robuste Tablet-Rotation: nicht am Marken-/Textinhalt, sondern am gemessenen Viewport aus page.js orientiert. */
html[data-viewport-mode="portrait"] {
  min-height: 0 !important;
  height: auto !important;
}

html[data-viewport-mode="portrait"] body {
  display: block;
  min-height: 0 !important;
  height: auto !important;
  overflow-y: auto !important;
}

@media (max-width: 1180px) {
  html[data-viewport-mode="portrait"] .page {
    width: min(100%, 980px);
    margin-left: auto;
    margin-right: auto;
  }

  html[data-viewport-mode="portrait"] .hero {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 861px) and (max-width: 1180px) {
  html[data-viewport-mode="portrait"] {
    --page-pad: clamp(20px, 3vw, 34px);
  }

  html[data-viewport-mode="portrait"] .page {
    margin-top: clamp(68px, 6.3vh, 88px);
  }

  html[data-viewport-mode="portrait"] .hero {
    gap: 26px;
    padding-top: 28px;
    padding-bottom: 28px;
  }
}

@media (max-width: 640px) { .landing-version { margin-left: 0; } }
