/* nexapps.dev, Fassung 2. Eine Datei, kein Framework. */

@font-face { font-family: "Space Grotesk"; font-weight: 500; font-display: swap; src: url(../fonts/space-grotesk-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 600; font-display: swap; src: url(../fonts/space-grotesk-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 100 900; font-display: swap; src: url(../fonts/inter-latin-wght-normal.woff2) format("woff2"); }

@property --a {
  syntax: "<color>";
  inherits: true;
  initial-value: #e11d2f;
}

:root {
  --bg: #0a0b0e;
  --flaeche: #12141a;
  --flaeche-2: #181b22;
  --rand: rgba(255, 255, 255, .08);
  --rand-stark: rgba(255, 255, 255, .16);
  --text: #eceef3;
  --leise: #9aa1ad;
  --schatten: 0 30px 80px -20px rgba(0, 0, 0, .7);
  --licht-staerke: 30%;
  --ink-mix: 100%;
  --kopf-h: 64px;
  --breite: 1240px;
  --rund: 14px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f5f6f8;
    --flaeche: #ffffff;
    --flaeche-2: #eef0f3;
    --rand: rgba(15, 20, 30, .1);
    --rand-stark: rgba(15, 20, 30, .2);
    --text: #10131a;
    --leise: #586170;
    --schatten: 0 30px 70px -25px rgba(20, 30, 50, .35);
    --licht-staerke: 22%;
    --ink-mix: 62%;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f5f6f8;
  --flaeche: #ffffff;
  --flaeche-2: #eef0f3;
  --rand: rgba(15, 20, 30, .1);
  --rand-stark: rgba(15, 20, 30, .2);
  --text: #10131a;
  --leise: #586170;
  --schatten: 0 30px 70px -25px rgba(20, 30, 50, .35);
  --licht-staerke: 22%;
  --ink-mix: 62%;
  color-scheme: light;
}

/* Die Hausfarben der Anwendungen. Die Dachmarke selbst hat keine eigene. */
[data-app="nexview"]  { --a: #e11d2f; --a-auf: #fff; }
[data-app="nexcrate"] { --a: #f59e0b; --a-auf: #1a1204; }
[data-app="nexdeck"]  { --a: #22d3ee; --a-auf: #04161a; }
[data-app="nexmail"]  { --a: #23d19e; --a-auf: #03170f; }
[data-app="nextrmnl"] { --a: #a78bfa; --a-auf: #140c24; }
[data-app="nexbeat"]  { --a: #e11d2f; --a-auf: #fff; }
[data-app="nexpulse"] { --a: #a3e635; --a-auf: #111a03; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: "Space Grotesk", Inter, system-ui, sans-serif; font-weight: 600; letter-spacing: -.02em; margin: 0; }
:focus-visible { outline: 2px solid var(--a, var(--text)); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  background: var(--flaeche); padding: 8px 14px; border-radius: 8px; border: 1px solid var(--rand-stark);
}
.skip:focus { top: 12px; }

/* Kopf */
.kopf {
  position: sticky; top: 0; z-index: 20;
  height: var(--kopf-h);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--rand);
}
.kopf-innen {
  max-width: var(--breite); height: 100%; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.marke { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 19px/1 "Space Grotesk", sans-serif; letter-spacing: -.02em; }
.kopf-nav { display: flex; align-items: center; gap: 4px; }
.kopf-nav a { text-decoration: none; color: var(--leise); padding: 8px 12px; border-radius: 8px; font-size: 15px; }
.kopf-nav a:hover { color: var(--text); background: var(--flaeche-2); }
.sprache {
  display: inline-flex; align-items: center; margin-left: 6px; padding: 3px; gap: 2px;
  border: 1px solid var(--rand); border-radius: 10px; font-size: 13px; font-weight: 600; letter-spacing: .04em;
}
.sprache span, .sprache a { padding: 6px 8px; border-radius: 7px; line-height: 1; }
.sprache span { background: var(--flaeche-2); color: var(--text); }
.kopf-nav .sprache a { color: var(--leise); }
.kopf-nav .sprache a:hover { color: var(--text); background: var(--flaeche-2); }
.fassung {
  width: 38px; height: 38px; margin-left: 6px; border-radius: 10px; cursor: pointer;
  display: grid; place-items: center;
  background: transparent; border: 1px solid var(--rand); color: var(--leise);
}
.fassung:hover { color: var(--text); border-color: var(--rand-stark); }
.fassung svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; grid-area: 1 / 1; }
.i-mond { display: none; }
:root[data-theme="light"] .i-sonne { display: none; }
:root[data-theme="light"] .i-mond { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .i-sonne { display: none; }
  :root:not([data-theme="dark"]) .i-mond { display: block; }
}

/* Knöpfe */
.knoepfe { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.knopf {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 11px;
  font-weight: 600; font-size: 15px; text-decoration: none;
  border: 1px solid var(--rand-stark); background: var(--flaeche);
  transition: transform .15s ease, background-color .2s ease, border-color .2s ease;
}
.knopf:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--a) 60%, var(--rand-stark)); }
.knopf.voll { background: var(--a); color: var(--a-auf); border-color: transparent; }
.knopf.voll:hover { background: color-mix(in srgb, var(--a) 88%, white); }
.knopf::after {
  content: ""; width: 14px; height: 14px; flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5 11 11 5M6 5h5v5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5 11 11 5M6 5h5v5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: .75;
}

/* Bühne mit Slider */
.buehne {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--rand);
  transition: --a .9s ease;
}
.buehne-licht {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 70% at 78% 40%, color-mix(in srgb, var(--a) var(--licht-staerke), transparent), transparent 70%),
    radial-gradient(40% 50% at 8% 90%, color-mix(in srgb, var(--a) 10%, transparent), transparent 70%);
  transition: --a .9s ease;
}
.buehne-licht::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--rand) 1px, transparent 1px),
    linear-gradient(90deg, var(--rand) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(70% 80% at 60% 40%, black, transparent 75%);
          mask-image: radial-gradient(70% 80% at 60% 40%, black, transparent 75%);
  opacity: .5;
}
.buehne-innen {
  max-width: var(--breite); margin: 0 auto;
  padding: clamp(32px, 5vh, 64px) 24px 40px;
  min-height: min(calc(100svh - var(--kopf-h)), 820px);
  display: flex; flex-direction: column; justify-content: center; gap: clamp(28px, 4.5vh, 48px);
}

.buehne-titel {
  display: flex; align-items: center; gap: 14px;
  font: 500 13px/1 Inter, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--leise);
}
.buehne-titel::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--rand-stark), transparent); }
.folien { display: grid; }
.folie {
  grid-area: 1 / 1;
  display: grid; grid-template-columns: minmax(0, 4.4fr) minmax(0, 7.6fr); align-items: center;
  gap: clamp(32px, 4.5vw, 64px);
  opacity: 0; visibility: hidden;
  transition: opacity .6s ease, visibility 0s linear .6s;
}
.folie.an { opacity: 1; visibility: visible; transition: opacity .6s ease, visibility 0s; }
/* Ohne JS stehen alle Folien übereinander; dann nur die erste zeigen. */
.buehne:not(.bereit) .folie:first-child { opacity: 1; visibility: visible; }

.folie-art {
  display: inline-flex; align-items: center; gap: 12px; margin: 0 0 22px;
  font: 600 20px/1 "Space Grotesk", sans-serif; letter-spacing: -.01em;
}
.folie-art img { width: 36px; height: 36px; }
.folie-art span {
  font: 500 12px/1 Inter, sans-serif; letter-spacing: .08em; text-transform: uppercase;
  color: color-mix(in srgb, var(--a) var(--ink-mix), var(--text));
  padding: 6px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--a) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--a) 30%, transparent);
}
.folie h2 { font-size: clamp(34px, 4.2vw, 56px); line-height: 1.04; max-width: 13ch; }
.folie-text > p:not(.folie-art) { color: var(--leise); font-size: clamp(16px, 1.35vw, 18.5px); max-width: 42ch; margin: 22px 0 0; }

.folie-text > * { transform: translateY(14px); transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.folie.an .folie-text > * { transform: none; }
.folie.an .folie-text > :nth-child(2) { transition-delay: .04s; }
.folie.an .folie-text > :nth-child(3) { transition-delay: .08s; }
.folie.an .folie-text > :nth-child(4) { transition-delay: .12s; }

.folie-bild { margin: 0; perspective: 1600px; }
.folie-bild img, .app-bild img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top;
  border-radius: var(--rund);
  border: 1px solid var(--rand-stark);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--a) 22%, transparent),
    0 40px 120px -40px color-mix(in srgb, var(--a) 55%, transparent),
    var(--schatten);
  background: var(--flaeche);
}
.folie-bild img {
  transform: rotateY(-7deg) rotateX(2deg) translateX(40px) scale(.97);
  transform-origin: left center;
  transition: transform 1s cubic-bezier(.2, .7, .2, 1);
}
.folie.an .folie-bild img { transform: rotateY(-7deg) rotateX(2deg) translateX(0) scale(1); }

/* Reiter unter dem Slider */
.reiter {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 8px;
}
.reiter-knopf {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 9px;
  height: 44px; padding: 0 16px 0 12px; border-radius: 12px; cursor: pointer;
  font: 500 15px/1 Inter, sans-serif; color: var(--leise);
  background: color-mix(in srgb, var(--flaeche) 70%, transparent);
  border: 1px solid var(--rand);
  transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}
.reiter-knopf img { width: 20px; height: 20px; opacity: .7; transition: opacity .2s ease; }
.reiter-knopf:hover { color: var(--text); border-color: var(--rand-stark); }
.reiter-knopf:hover img, .reiter-knopf.an img { opacity: 1; }
.reiter-knopf.an { color: var(--text); background: var(--flaeche); border-color: color-mix(in srgb, var(--a) 55%, transparent); }
.reiter-knopf i {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--a);
}
.reiter-knopf.an i { animation: fortschritt 7s linear forwards; }
.buehne.pause .reiter-knopf.an i { animation: none; width: 100%; opacity: .7; }
@keyframes fortschritt { from { width: 0; } to { width: 100%; } }

/* Die Anwendungen */
.apps { max-width: var(--breite); margin: 0 auto; padding: clamp(72px, 10vw, 128px) 24px 40px; }
.apps-kopf { max-width: 640px; margin: 0 0 clamp(48px, 7vw, 88px); }
.apps-kopf h2 { font-size: clamp(32px, 4vw, 48px); line-height: 1.1; }
.apps-kopf p { color: var(--leise); font-size: 18px; margin: 14px 0 0; }

.app {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center;
  gap: clamp(32px, 5vw, 80px);
  padding: clamp(40px, 5vw, 64px) 0;
  border-top: 1px solid var(--rand);
}
.app:nth-of-type(even) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.app:nth-of-type(even) .app-bild { order: 2; }
.app-bild { margin: 0; position: relative; }
.app-bild::before {
  content: ""; position: absolute; inset: 12% 8% -6%; z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--a) 26%, transparent), transparent);
  filter: blur(30px);
}
.app-bild img { transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.app:hover .app-bild img { transform: translateY(-4px); }

.app h3 { display: flex; align-items: center; gap: 14px; font-size: clamp(28px, 3vw, 36px); line-height: 1; }
.app h3 img { width: 40px; height: 40px; }
.app-art {
  margin: 14px 0 0; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: color-mix(in srgb, var(--a) var(--ink-mix), var(--text));
}
.app-text > p:not(.app-art) { color: var(--leise); font-size: 17px; margin: 16px 0 0; max-width: 46ch; }
.app-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; }
.app-tags li {
  font-size: 13px; line-height: 1; font-weight: 500; color: var(--text);
  padding: 7px 11px; border-radius: 999px;
  background: color-mix(in srgb, var(--a) 9%, var(--flaeche));
  border: 1px solid color-mix(in srgb, var(--a) 26%, var(--rand));
}
.app .knoepfe { margin-top: 26px; }
.app .knopf:not(.voll) { background: transparent; }

/* Fuß */
.fuss { border-top: 1px solid var(--rand); margin-top: 40px; }
.fuss-innen {
  max-width: var(--breite); margin: 0 auto; padding: 32px 24px 40px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; color: var(--leise); font-size: 14px;
}
.fuss .marke { font-size: 16px; color: var(--text); }
.fuss p { margin: 0; flex: 1 1 240px; }
.fuss nav { display: flex; gap: 18px; }
.fuss nav a { text-decoration: none; }
.fuss nav a:hover { color: var(--text); }

.fuss-fassung { font: 400 12px/1 ui-monospace, "JetBrains Mono", monospace; opacity: .6; }

/* Datenschutz */
.recht { max-width: 760px; margin: 0 auto; padding: clamp(48px, 8vw, 96px) 24px 40px; }
.recht h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.05; margin-bottom: 28px; }
.recht h2 { font-size: 22px; margin: 44px 0 12px; }
.recht p, .recht li, .recht address { color: var(--leise); font-size: 16.5px; }
.recht p b, .recht li b { color: var(--text); }
.recht address { font-style: normal; padding: 14px 18px; border-left: 2px solid var(--rand-stark); margin: 12px 0; }
.recht code { font: 14px ui-monospace, "JetBrains Mono", monospace; background: var(--flaeche-2); padding: 2px 6px; border-radius: 6px; color: var(--text); }
.recht a { color: var(--text); text-underline-offset: 3px; }
.recht .na-lede { font-size: 19px; color: var(--text); line-height: 1.55; }
.recht .na-notiz { padding: 14px 18px; border-radius: 12px; background: var(--flaeche); border: 1px solid var(--rand); }

/* Fehlerseite */
.fehler { min-height: 100svh; max-width: 640px; margin: 0 auto; padding: 48px 24px; display: flex; flex-direction: column; justify-content: center; }
.fehler .marke { margin-bottom: 40px; }
.fehler-code { font: 600 14px/1 "Space Grotesk", sans-serif; letter-spacing: .15em; color: var(--leise); margin: 0 0 12px; }
.fehler h1 { font-size: clamp(32px, 6vw, 48px); line-height: 1.1; }
.fehler h2 { font-size: 22px; margin-top: 48px; color: var(--leise); }
.fehler .knopf { --a: var(--text); --a-auf: var(--bg); }

/* Tablet und Handy */
@media (max-width: 900px) {
  .buehne-innen { min-height: 0; padding-top: 36px; }
  .folie { grid-template-columns: 1fr; gap: 32px; align-content: start; }
  .folie h2 { max-width: 16ch; }
  .folie-bild img, .folie.an .folie-bild img { transform: none; }
  .folie-bild img { transform: translateY(16px); }
  .reiter { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; margin: 0 -24px; padding: 2px 24px 6px; scrollbar-width: none; }
  .reiter::-webkit-scrollbar { display: none; }
  .reiter-knopf { flex: none; }
  .app, .app:nth-of-type(even) { grid-template-columns: 1fr; gap: 28px; }
  .app:nth-of-type(even) .app-bild { order: 0; }
}
@media (max-width: 520px) {
  .kopf-innen, .buehne-innen, .apps, .fuss-innen { padding-left: 16px; padding-right: 16px; }
  .reiter { margin: 0 -16px; padding: 2px 16px 6px; }
  .kopf-nav a { padding: 8px; }
  .nav-apps { display: none; }
  .kopf-innen { gap: 8px; }
  .sprache, .fassung { margin-left: 2px; }
  .knopf { height: 42px; padding: 0 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}
