/* Luna — landing page. Tokens and type from neuralhub.dev and the dashboard:
   cool neutral black, colour as light (Luna's blue), no tiles. */

@font-face { font-family: 'DM Sans'; src: url(fonts/dm-sans.woff2) format('woff2'); font-weight: 300 600; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url(fonts/plex-mono-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url(fonts/plex-mono-500.woff2) format('woff2'); font-weight: 500; font-display: swap; }

:root {
  --bg: #090a0c;
  --raised: #0e1013;
  --fg: #c4c9d1;
  --bright: #eef0f4;
  --dim: #8e95a0;
  --faint: #4a505a;
  --line: rgb(255 255 255 / .075);
  --glass: linear-gradient(180deg, rgb(255 255 255 / .055), rgb(255 255 255 / .02));
  --glass-line: rgb(255 255 255 / .09);

  --t-ice: 185 211 255;
  --t-azure: 96 128 255;
  --t-blue: 59 91 255;
  --t-lilac: 168 152 255;
  --t-sand: 234 220 188;
  --t-ember: 255 138 92;
  --t-mint: 159 231 200;

  --sans: 'DM Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --inset: clamp(16px, 6vw, 96px);
  --max: 1180px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
/* Lichtflächen ragen bewusst über den Rand: hier abschneiden, nicht am body (das würde auf den Viewport übertragen). */
main { overflow-x: clip; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; color: var(--bright); letter-spacing: -.035em; }
h1 { font-size: clamp(44px, 7vw, 104px); line-height: .98; }
h2 { font-size: clamp(32px, 4.4vw, 64px); line-height: 1.04; }
h3 { font-size: 17px; font-weight: 500; letter-spacing: -.01em; line-height: 1.3; }
p, figure { margin: 0; }
svg { display: block; }
.soft { color: var(--dim); }
::selection { background: #aab4ff; color: var(--bg); }
:focus-visible { outline: 2px solid rgb(var(--t-ice)); outline-offset: 3px; border-radius: 6px; }
[id] { scroll-margin-top: 80px; }
[hidden] { display: none !important; }

/* Film grain over everything, as on the portfolio. */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23fff' filter='url(%23n)' opacity='.6' d='M0 0h180v180H0z'/%3E%3C/svg%3E");
}

.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: var(--bright); color: var(--bg); text-decoration: none; }
.skip:focus { top: 16px; }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-bottom: 22px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: rgb(var(--t-mint)); box-shadow: 0 0 0 0 rgb(var(--t-mint) / .6); animation: live 2.4s ease-out infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgb(var(--t-mint) / .55); } 70%, 100% { box-shadow: 0 0 0 9px rgb(var(--t-mint) / 0); } }

/* ─── Header ─────────────────────────────────────────────────────────── */
.top { position: fixed; z-index: 40; inset: 0 0 auto; height: 68px; padding: 0 var(--inset); display: flex; align-items: center; justify-content: space-between; }
.top::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s;
  background: rgb(9 10 12 / .82); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%);
}
.top.is-scrolled::before { opacity: 1; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: 17px; font-weight: 500; letter-spacing: -.01em; color: var(--bright); }
.brand__orb { display: block; width: 34px; height: 34px; margin: -6px -2px -6px -8px; }
.brand__orb canvas { display: block; width: 100%; height: 100%; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 500; text-decoration: none; color: var(--bright); border: 1px solid var(--glass-line); background: rgb(255 255 255 / .04); transition: background .2s; }
.pill svg { width: 16px; height: 16px; }
.pill:hover { background: rgb(255 255 255 / .09); }

/* ─── Buttons ────────────────────────────────────────────────────────── */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.actions--center { justify-content: center; }
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 999px; font: 500 15px var(--sans); text-decoration: none; overflow: hidden; isolation: isolate; transition: transform .3s var(--ease-out), background .2s, box-shadow .35s var(--ease-out); }
.btn:active { transform: scale(.97); }
.btn--primary {
  color: var(--bg); background: var(--bright);
  box-shadow: 0 0 0 1px rgb(255 255 255 / .4) inset, 0 10px 40px -10px rgb(var(--t-blue) / .8), 0 0 60px -20px rgb(var(--t-lilac) / .9);
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgb(255 255 255 / .6) inset, 0 14px 50px -8px rgb(var(--t-blue) / .95), 0 0 80px -14px rgb(var(--t-lilac)); }
/* Ein Lichtstreif läuft ab und zu über den Knopf, beim Zeigen sofort. */
.btn--primary::after {
  content: ''; position: absolute; z-index: -1; top: 0; bottom: 0; left: -60%; width: 45%;
  background: linear-gradient(100deg, transparent, rgb(var(--t-ice) / .55), transparent);
  transform: skewX(-18deg); animation: sheen 5.5s var(--ease-out) 1.6s infinite;
}
.btn--primary:hover::after { animation: sheen-once .9s var(--ease-out); }
.btn--primary span { position: relative; }
@keyframes sheen { 0% { left: -60%; } 22%, 100% { left: 130%; } }
@keyframes sheen-once { from { left: -60%; } to { left: 130%; } }
.btn--ghost { color: var(--bright); border: 1px solid var(--glass-line); background: rgb(255 255 255 / .03); }
.btn--ghost:hover { background: rgb(255 255 255 / .08); transform: translateY(-1px); }

/* ─── Hero ───────────────────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 100svh; padding: 120px var(--inset) 72px;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); grid-template-rows: 1fr auto; column-gap: 40px; align-items: center;
  max-width: calc(var(--max) + 2 * var(--inset)); margin: 0 auto;
}
.hero__light {
  position: absolute; z-index: -1; pointer-events: none; left: 50%; top: 0; width: 140vw; height: 110%; translate: -50% 0;
  background:
    radial-gradient(34% 34% at 74% 40%, rgb(var(--t-blue) / .2), transparent 70%),
    radial-gradient(26% 26% at 80% 30%, rgb(var(--t-lilac) / .12), transparent 70%);
}
.hero__copy { grid-column: 1; grid-row: 1 / span 2; position: relative; z-index: 2; }
.lede { max-width: 50ch; margin-top: 28px; font-size: clamp(17px, 1.4vw, 19px); line-height: 1.65; }

/* Der Orb aus dem Dashboard, in derselben Grössenordnung wie im Luna-Tab. */
.orb { grid-column: 2; grid-row: 1; align-self: end; position: relative; aspect-ratio: 1; width: min(100%, 360px); justify-self: center; }
.orb canvas { position: relative; display: block; width: 100%; height: 100%; touch-action: pan-y; }
.orb__glow { position: absolute; inset: 0; border-radius: 50%; opacity: .5; pointer-events: none; will-change: transform; background: radial-gradient(circle at 50% 58%, rgb(59 91 255 / .42), rgb(168 152 255 / .18) 34%, transparent 62%); }
.orb--static canvas { display: none; }
.orb--static .orb__glow { opacity: 1; }

/* Der Beispiel-Chat unter dem Orb: Luna „spricht“ ihn. Feste Höhe, damit nichts springt. */
.chat {
  grid-column: 2; grid-row: 2; position: relative; z-index: 2; width: min(100%, 460px); height: 286px; justify-self: center; margin-top: 4px;
  padding: 16px; border-radius: 22px; border: 1px solid var(--glass-line); background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .06), 0 24px 60px -32px rgb(0 0 0 / .9);
}
.chat__label { position: absolute; top: -10px; right: 18px; padding: 3px 9px; border-radius: 999px; background: var(--raised); border: 1px solid var(--glass-line); font: 500 10px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.chat__log { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 90%; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; animation: msg-in .45s var(--ease-out) both; }
.msg--me { align-self: flex-end; color: var(--bright); background: rgb(255 255 255 / .09); border-bottom-right-radius: 6px; }
.msg--luna { align-self: flex-start; color: var(--fg); background: rgb(var(--t-blue) / .12); border: 1px solid rgb(var(--t-azure) / .22); border-bottom-left-radius: 6px; }
.chat__log.is-leaving > * { animation: msg-out .35s ease-in both; }

/* Werkzeug-Spur wie im Dashboard (Trace.tsx): was Luna gerade tut, dann was sie getan hat. */
.trace { align-self: flex-start; display: flex; flex-direction: column; gap: 2px; padding-left: 2px; animation: msg-in .35s var(--ease-out) both; }
.trace__row { display: flex; align-items: center; gap: 8px; min-height: 24px; font-size: 13px; color: var(--dim); animation: msg-in .3s var(--ease-out) both; }
.trace__icon { display: grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 6px; border: 1px solid var(--line); background: rgb(255 255 255 / .03); color: var(--fg); }
.trace__icon svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.trace__row b { font-weight: 400; color: var(--bright); white-space: nowrap; }
.trace__row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 11px var(--mono); color: var(--dim); }
.trace__row.is-running .trace__icon { border-color: transparent; background: none; }
.spin { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid rgb(255 255 255 / .15); border-top-color: rgb(var(--t-ice)); animation: spin .7s linear infinite; }
.shimmer { color: transparent !important; background: linear-gradient(90deg, var(--dim) 0%, var(--dim) 40%, var(--bright) 50%, var(--dim) 60%, var(--dim) 100%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; animation: shimmer 1.6s linear infinite; }

@keyframes msg-in { from { opacity: 0; translate: 0 8px; } }
@keyframes msg-out { to { opacity: 0; translate: 0 -6px; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }

/* ─── Sections ───────────────────────────────────────────────────────── */
.block { max-width: calc(var(--max) + 2 * var(--inset)); margin: 0 auto; padding: 16vh var(--inset) 0; }
.block__lede { max-width: 56ch; margin-top: 26px; font-size: 18px; line-height: 1.65; }

/* Fähigkeiten als ruhige Zeilen; nur das Icon trägt die Farbe. */
.caps { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 64px; }
.caps li { display: flex; gap: 18px; padding: 26px 0; border-top: 1px solid var(--line); }
.ico { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; color: rgb(var(--hue)); background: rgb(var(--hue) / .08); box-shadow: inset 0 0 0 1px rgb(var(--hue) / .2), 0 0 24px -6px rgb(var(--hue) / .35); }
.ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.caps p { margin-top: 6px; font-size: 15px; line-height: 1.6; color: var(--dim); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { padding: 28px 0 0; border-top: 1px solid var(--line); }
.stat__n { display: block; font-size: clamp(44px, 5.4vw, 76px); letter-spacing: -.04em; line-height: 1; color: var(--bright); font-variant-numeric: tabular-nums; }
.stat__l { display: block; margin-top: 12px; font: 500 11px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }

.steps { position: relative; list-style: none; margin: 64px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.steps::before { content: ''; position: absolute; left: 0; right: 0; top: 19px; height: 1px; background: linear-gradient(90deg, rgb(var(--t-ice) / .6), rgb(var(--t-lilac) / .6), rgb(var(--t-sand) / .6), rgb(var(--t-ember) / .6)); }
.steps li { position: relative; }
.steps li:nth-child(1) { --hue: var(--t-ice); }
.steps li:nth-child(2) { --hue: var(--t-lilac); }
.steps li:nth-child(3) { --hue: var(--t-sand); }
.steps li:nth-child(4) { --hue: var(--t-ember); }
.steps__n { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 26px; border-radius: 50%; font-weight: 500; color: var(--bright); background: var(--bg); box-shadow: inset 0 0 0 1px rgb(var(--hue) / .7), 0 0 22px rgb(var(--hue) / .35); }
.steps p { margin-top: 10px; font-size: 15px; line-height: 1.65; color: var(--dim); }

.rules { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 64px; }
.rules li { padding: 22px 0; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.6; color: var(--dim); }
.rules strong { display: block; margin-bottom: 4px; font-size: 16px; font-weight: 500; color: var(--bright); }

.clips__row { margin-top: 56px; display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; }
.phone { width: min(100%, 260px); }
.phone video { display: block; width: 100%; aspect-ratio: 9 / 19.5; object-fit: cover; border-radius: 34px; border: 6px solid #15171b; outline: 1px solid var(--glass-line); background: var(--raised); }
.phone figcaption { margin-top: 14px; text-align: center; font-size: 14px; color: var(--dim); }

.cta { position: relative; text-align: center; padding-bottom: 18vh; }
.cta__light { position: absolute; z-index: -1; inset: 10% 0 0; pointer-events: none; background: radial-gradient(40% 50% at 50% 60%, rgb(var(--t-blue) / .16), transparent 70%); }
.cta p { max-width: 46ch; margin: 22px auto 0; font-size: 18px; }
.cta .cta__hint { margin-top: 18px; font: 12px var(--mono); color: var(--dim); }
.cta em { font-style: normal; color: var(--fg); }

.foot { max-width: calc(var(--max) + 2 * var(--inset)); margin: 0 auto; padding: 28px var(--inset) 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); font-size: 14px; color: var(--dim); }
.foot a { color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--faint); }
.foot a:hover { color: var(--bright); border-color: var(--bright); }

/* ─── Reveal on scroll (only with JS and motion) ─────────────────────── */
.js [data-reveal] { opacity: 0; translate: 0 18px; transition: opacity .9s var(--ease-out), translate .9s var(--ease-out); transition-delay: var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; translate: 0 0; }

@media (max-width: 1000px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 44px; }
  .steps::before { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; grid-template-rows: auto auto auto; padding-top: 84px; min-height: 0; }
  .orb { grid-column: 1; grid-row: 1; width: min(76vw, 300px); margin: 0 auto -8px; }
  .hero__copy { grid-row: 2; }
  .chat { grid-column: 1; grid-row: 3; margin-top: 44px; width: 100%; height: 300px; }
  .caps, .rules { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; row-gap: 28px; }
  .steps li { display: grid; grid-template-columns: 38px 1fr; gap: 4px 18px; }
  .steps__n { grid-row: span 2; margin: 0; }
  .steps p { margin-top: 0; }
  .block { padding-top: 12vh; }
  .actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; translate: none; transition: none; }
  .live-dot, .msg, .trace, .trace__row, .btn--primary::after, .shimmer { animation: none; }
  .btn--primary::after { display: none; }
}
