/* ============================================================
   nytic.ch – Startseite «Gemeinsam Innovationen schaffen»
   ============================================================ */
.hm-body {
  --g: #90BE20;
  --ink: #fff;
  --muted: rgba(255, 255, 255, .62);
  --line: rgba(255, 255, 255, .09);
  --ease: cubic-bezier(.2, .75, .2, 1);
  --mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  background: #0b0c0a;
  margin-bottom: 0;
  overflow-x: hidden;
}
/* clip statt hidden: kein eigener Scrollbereich, damit position: sticky funktioniert */
@supports (overflow: clip) { html.hm-js, html.hm-js .hm-body { overflow-x: clip; overflow-y: visible; } }
.hm-wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(1rem, 3vw, 2rem); position: relative; z-index: 1; }
.hm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hm-eyebrow { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .18em; color: var(--g); margin: 0 0 .9rem; }
.hm-h2 { font-family: 'Thasadith', sans-serif; font-weight: 700; color: #fff; font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.05; letter-spacing: -.01em; margin: 0 0 2rem; }

/* ---------- Hero mit Lichtpunkten ---------- */
.hm-hero { position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; display: flex; align-items: flex-end;
  background: radial-gradient(70% 55% at 50% 38%, rgba(144, 190, 32, .10), transparent 70%), radial-gradient(50% 40% at 85% 90%, rgba(62, 224, 255, .06), transparent 70%), #0b0c0a; }
.hm-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hm-hero-inner { position: relative; z-index: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 clamp(1rem, 3vw, 2rem) clamp(4.5rem, 10vh, 7rem); text-align: center; pointer-events: none; }
.hm-hero-inner a, .hm-hero-inner button { pointer-events: auto; }
.hm-hero .hm-eyebrow { display: block; margin-bottom: .7rem; }
.hm-title { margin: 0 0 1rem; font-family: 'Thasadith', sans-serif; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.hm-title-line { display: block; font-size: clamp(2rem, 5.4vw, 4.4rem); color: #fff; }
.hm-lead { color: var(--muted); font-size: clamp(1rem, 1.3vw, 1.15rem); line-height: 1.7; max-width: 40rem; margin: 0 auto 1.6rem; }
.hm-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; margin-bottom: 1.6rem; }
.hm-btn { display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.3rem; border-radius: 999px; font-weight: 700; font-size: .95rem; color: #fff !important; text-decoration: none !important; border: 1px solid rgba(144, 190, 32, .55); transition: transform .2s, background .25s, box-shadow .25s; }
.hm-btn:hover { transform: translateY(-2px); background: rgba(144, 190, 32, .12); }
.hm-btn--primary { background: var(--g); color: #0d1203 !important; border-color: var(--g); box-shadow: 0 12px 34px -12px var(--g); }
.hm-btn--primary:hover { background: #a4d42c; }
.hm-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem .5rem; }
.hm-legend a { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .65rem; border-radius: 999px; font-size: .74rem; color: rgba(255, 255, 255, .62) !important; text-decoration: none !important; border: 1px solid transparent; transition: color .2s, border-color .2s, background .2s; }
.hm-legend a i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.hm-legend a:hover, .hm-legend a.is-on { color: #fff !important; border-color: color-mix(in srgb, var(--c) 55%, transparent); background: color-mix(in srgb, var(--c) 12%, transparent); }
.hm-down { position: absolute; left: 50%; bottom: 18px; width: 26px; height: 42px; margin-left: -13px; border-radius: 14px; border: 2px solid rgba(255, 255, 255, .35); z-index: 1; }
.hm-down span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--g); animation: hmWheel 1.6s ease-in-out infinite; }
@keyframes hmWheel { 0% { opacity: 0; transform: translateY(-3px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* Hero-Text erscheint, sobald das Wort steht */
.hm-js .hm-hero-inner > * { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform 1s var(--ease); }
.hm-js .hm-hero.is-formed .hm-hero-inner > * { opacity: 1; transform: none; }
.hm-js .hm-hero.is-formed .hm-title { transition-delay: .05s; }
.hm-js .hm-hero.is-formed .hm-lead { transition-delay: .25s; }
.hm-js .hm-hero.is-formed .hm-actions { transition-delay: .45s; }
.hm-js .hm-hero.is-formed .hm-legend { transition-delay: .7s; }

/* ---------- Leitsatz ---------- */
.hm-quote { padding: clamp(5rem, 12vw, 9rem) 0; background: linear-gradient(#0b0c0a, #10120e); text-align: center; }
.hm-quote-text { font-family: 'Thasadith', sans-serif; font-weight: 700; font-size: clamp(2rem, 5vw, 4rem); line-height: 1.05; color: rgba(255, 255, 255, .38); margin: 0 0 1.6rem; }
.hm-quote-text span { color: #fff; background: linear-gradient(100deg, #ff8a3d, #ffd166 20%, #92c020 40%, #3ee0ff 60%, #6aa8ff 80%, #ff5fa2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hm-quote-sub { max-width: 46rem; margin: 0 auto; color: var(--muted); font-size: clamp(1rem, 1.3vw, 1.12rem); line-height: 1.8; }

/* ---------- Netzwerk ---------- */
.hm-net { position: relative; background: #10120e; padding: clamp(3rem, 8vw, 6rem) 0 clamp(4rem, 10vw, 8rem); }
.hm-net-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 4vw, 4rem); }
.hm-net-steps { padding-bottom: 20vh; }
.hm-step {
  position: relative; margin: 0 0 32vh; padding: 1.4rem 1.5rem 1.3rem; border-radius: 20px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line);
  opacity: .35; transform: scale(.98); transition: opacity .5s var(--ease), transform .5s var(--ease), border-color .5s, background .5s, box-shadow .5s;
}
.hm-step:last-child { margin-bottom: 0; }
.hm-step.is-now { opacity: 1; transform: none; border-color: color-mix(in srgb, var(--c) 55%, transparent); background: color-mix(in srgb, var(--c) 6%, rgba(255, 255, 255, .03)); box-shadow: 0 24px 60px -30px color-mix(in srgb, var(--c) 60%, transparent); }
.hm-step-nr { position: absolute; right: 1.2rem; top: 1rem; font: 700 .8rem var(--mono); color: var(--c); }
.hm-step h3 { font-family: 'Thasadith', sans-serif; font-weight: 700; color: #fff; font-size: clamp(1.4rem, 2.2vw, 1.8rem); margin: 0 0 .2rem; }
.hm-step-with { color: var(--c); font-weight: 700; font-size: .95rem; margin: 0 0 .8rem; }
.hm-step-text { color: var(--muted); line-height: 1.75; font-size: .97rem; margin: 0 0 1rem; }
.hm-facts { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .35rem; }
.hm-facts li { font: 700 .7rem var(--mono); padding: .3rem .6rem; border-radius: 999px; color: #fff; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.hm-step-link { display: inline-flex; gap: .35rem; color: var(--c) !important; font-weight: 700; text-decoration: none !important; }
.hm-step-link:hover { text-decoration: underline !important; }
.hm-step--sie { --c: #fff; text-align: left; border-style: dashed; }
.hm-step--sie .hm-step-link { color: #0d1203 !important; background: var(--g); padding: .55rem 1.1rem; border-radius: 999px; }

.hm-net-fig { position: sticky; top: 76px; height: calc(100vh - 96px); margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.hm-graph { width: 100%; max-width: 640px; max-height: calc(100vh - 150px); overflow: visible; }
.hm-net-caption { margin-top: .4rem; font: .75rem var(--mono); color: rgba(255, 255, 255, .45); text-align: center; min-height: 1.2em; }
.hm-orbit { fill: none; stroke: rgba(255, 255, 255, .07); stroke-dasharray: 2 8; animation: hmOrbit 30s linear infinite; }
.hm-orbit--in { stroke: rgba(144, 190, 32, .14); animation-direction: reverse; }
@keyframes hmOrbit { to { stroke-dashoffset: -200; } }
.hm-sat { fill: #fff; opacity: .7; filter: drop-shadow(0 0 4px #90BE20); }
.hm-link { fill: none; stroke: var(--c); stroke-width: 2; stroke-linecap: round; opacity: .08; stroke-dasharray: 100; stroke-dashoffset: 100; transition: opacity .6s, stroke-dashoffset 1.1s var(--ease); }
.hm-link--open { stroke-dasharray: 2 4; stroke-dashoffset: 0; }
.hm-link.is-done { opacity: .35; stroke-dashoffset: 0; }
.hm-link.is-now { opacity: 1; stroke-dashoffset: 0; filter: drop-shadow(0 0 6px var(--c)); }
.hm-graph.is-all .hm-link:not(.hm-link--open) { opacity: .75; stroke-dashoffset: 0; stroke-dasharray: 3 6; animation: hmFlow 1.2s linear infinite; }
@keyframes hmFlow { to { stroke-dashoffset: -9; } }
.hm-core circle { fill: url(#hmGlass); stroke: var(--g); stroke-width: 2.5; filter: drop-shadow(0 0 16px rgba(144, 190, 32, .45)); }
.hm-core-spin { fill: none; stroke: url(#hmSpin); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 260 142; transform-box: fill-box; transform-origin: center; animation: hmSpin 4.5s linear infinite; }
.hm-core-dash { fill: none; stroke: rgba(144, 190, 32, .4); stroke-width: 1.2; stroke-dasharray: 1 8; stroke-linecap: round; transform-box: fill-box; transform-origin: center; animation: hmSpin 40s linear infinite reverse; }
@keyframes hmSpin { to { transform: rotate(360deg); } }
.hm-pulse { pointer-events: none; }
.hm-core text { fill: rgba(255, 255, 255, .6); font: 600 11px 'Thasadith', sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.hm-core-glow { animation: hmBreath 4s ease-in-out infinite; transform-origin: 320px 320px; }
@keyframes hmBreath { 50% { opacity: .55; transform: scale(1.08); } }
.hm-node-body { fill: url(#hmGlass); stroke: var(--c); stroke-width: 2; opacity: .3; transition: opacity .5s, fill .5s, stroke-width .5s; }
.hm-node-ring { fill: none; stroke: var(--c); stroke-width: 1.3; stroke-dasharray: 3 6; stroke-linecap: round; opacity: 0; transform-box: fill-box; transform-origin: center; transition: opacity .5s; }
.hm-node-ripple { fill: none; stroke: var(--c); stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.hm-node.is-now .hm-node-ring { opacity: .85; animation: hmSpin 7s linear infinite; }
.hm-node.is-now .hm-node-ripple { animation: hmRipple 2.4s ease-out infinite; }
@keyframes hmRipple { 0% { opacity: .75; transform: scale(1); } 100% { opacity: 0; transform: scale(2.2); } }
.hm-node text { transition: opacity .5s; }
.hm-node-ini { fill: #fff; font: 700 13px 'Thasadith', sans-serif; opacity: .35; }
.hm-node-name { fill: rgba(255, 255, 255, .9); font: 600 13px 'Thasadith', sans-serif; opacity: 0; }
.hm-node--offen .hm-node-body { stroke-dasharray: 4 5; }
.hm-node.is-done .hm-node-body, .hm-node.is-done .hm-node-ini { opacity: .75; }
.hm-node.is-done .hm-node-name { opacity: .55; }
.hm-node.is-now .hm-node-body { opacity: 1; stroke-width: 2.5; filter: drop-shadow(0 0 12px var(--c)); }
.hm-node.is-now .hm-node-ini, .hm-node.is-now .hm-node-name { opacity: 1; }
.hm-node--offen.is-now .hm-node-body { animation: hmPulse 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes hmPulse { 50% { transform: scale(1.18); } }
.hm-prod { opacity: 0; transition: opacity .5s var(--ease); }
.hm-prod-in { transform-box: fill-box; transform-origin: center; transform: scale(.55); transition: transform .7s cubic-bezier(.2, 1.5, .4, 1); }
.hm-prod.is-now .hm-prod-in, .hm-prod.is-done .hm-prod-in, .hm-graph.is-all .hm-prod-in { transform: none; }
.hm-prod rect { fill: color-mix(in srgb, var(--c) 18%, #0b0c0a); stroke: var(--c); stroke-width: 1.5; }
.hm-prod text { fill: #fff; font: 700 12px 'Thasadith', sans-serif; }
.hm-prod.is-done { opacity: .7; }
.hm-prod.is-now { opacity: 1; }
.hm-prod.is-now rect { filter: drop-shadow(0 0 8px var(--c)); }
.hm-graph.is-all .hm-node-body, .hm-graph.is-all .hm-node-ini, .hm-graph.is-all .hm-prod { opacity: 1; }
.hm-graph.is-all .hm-node-name { opacity: .85; }

/* ---------- Zahlen ---------- */
.hm-stats { background: #0b0c0a; padding: clamp(3rem, 7vw, 5rem) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hm-stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; text-align: center; }
.hm-stats b { display: block; font-family: 'Thasadith', sans-serif; font-size: clamp(2.4rem, 5vw, 3.8rem); line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.hm-stats div:nth-child(1) b { color: var(--g); }
.hm-stats span { display: block; margin-top: .5rem; color: var(--muted); font-size: .9rem; }

/* ---------- Wege ---------- */
.hm-ways { background: #10120e; padding: clamp(3.5rem, 8vw, 6rem) 0; }
.hm-ways-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.hm-way { position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 250px; padding: 1.5rem; border-radius: 22px; text-decoration: none !important; background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015)); border: 1px solid var(--line); transition: transform .3s var(--ease), border-color .3s; }
.hm-way:hover { transform: translateY(-4px); border-color: rgba(144, 190, 32, .5); }
.hm-way h3 { font-family: 'Thasadith', sans-serif; color: #fff; font-size: 1.45rem; line-height: 1.15; margin: 0 0 .5rem; }
.hm-way p { color: var(--muted); margin: 0 0 1rem; line-height: 1.6; }
.hm-way-go { margin-top: auto; color: var(--g); font-weight: 700; }
.hm-way--me { padding-right: 42%; background: radial-gradient(80% 90% at 90% 100%, rgba(144, 190, 32, .22), transparent 70%), linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015)); }
.hm-way--me picture { position: absolute; right: -6%; bottom: 0; width: 50%; }
.hm-way--me img { display: block; width: 100%; height: auto; -webkit-mask-image: linear-gradient(#000 80%, transparent); mask-image: linear-gradient(#000 80%, transparent); transition: transform .5s var(--ease); }
.hm-way--me:hover img { transform: translateY(-4px) scale(1.03); }

/* ---------- Einblenden ---------- */
.hm-js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--d, 0) * 110ms); }
.hm-js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Responsiv ---------- */
@media (max-width: 991.98px) {
  /* Flex statt Grid: so kann die Grafik über den ganzen Abschnitt oben kleben bleiben */
  .hm-net-grid { display: flex; flex-direction: column; }
  .hm-net-fig { order: -1; top: 58px; height: auto; z-index: 2; padding: .5rem 0 .3rem; background: linear-gradient(#10120e 85%, rgba(16, 18, 14, 0)); }
  /* Flacher Ausschnitt, der auf die aktive Partnerschaft zoomt (Kamera in home.js) */
  .hm-graph { width: 100%; max-width: none; height: clamp(180px, 30vh, 300px); max-height: none; overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
  .hm-net-caption { display: none; }
  .hm-step { margin-bottom: 18vh; }
  .hm-net-steps { padding-bottom: 6vh; }
  .hm-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-ways-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hm-legend a { font-size: .68rem; padding: .2rem .5rem; }
  .hm-way--me { padding-right: 38%; }
}
@media (prefers-reduced-motion: reduce) {
  .hm-body *, .hm-body *::before, .hm-body *::after { animation: none !important; transition: none !important; }
  .hm-js [data-reveal], .hm-js .hm-hero-inner > * { opacity: 1; transform: none; }
}
