/* Narcolepsy – Bewegung, Symbole und neue Bausteine.
   Ergänzt site.css. Alles hier schaltet sich bei «Bewegung reduzieren» ab. */

@view-transition { navigation: auto; }
.site-head { view-transition-name: kopf; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }

/* ---------- Symbole ---------- */

.ico { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.badge {
  --tint: var(--brand);
  display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; flex: none;
  color: #fff; font-size: 23px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--tint) 92%, #fff), color-mix(in srgb, var(--tint) 72%, #000));
  box-shadow: 0 10px 24px color-mix(in srgb, var(--tint) 34%, transparent), inset 0 1px 0 rgba(255, 255, 255, .32);
}
:where(.tile, .link-card, .types .glass) { --tint: #7C83FF; }
.t-low { --tint: #2FB98C; } .t-mod { --tint: #F0A332; } .t-high { --tint: #F2704A; }
.t-data { --tint: #0EA5B5; } .t-brand { --tint: #7C83FF; } .t-severe { --tint: #E2493C; }

/* ---------- Aurora in Bewegung ---------- */

.aurora::before { animation: drift-a 46s ease-in-out infinite alternate; }
.aurora::after { animation: drift-b 58s ease-in-out infinite alternate; }
.aurora i {
  position: absolute; width: 54vmax; height: 54vmax; left: 30vw; top: 46vh; border-radius: 50%; filter: blur(110px);
  background: radial-gradient(circle, rgba(14, 165, 181, .2), transparent 62%);
  animation: drift-c 70s ease-in-out infinite alternate;
}
@keyframes drift-a { to { transform: translate3d(14vmax, 9vmax, 0) scale(1.15); } }
@keyframes drift-b { to { transform: translate3d(-12vmax, 12vmax, 0) scale(.9); } }
@keyframes drift-c { to { transform: translate3d(-22vmax, -16vmax, 0) scale(1.25); } }

/* Sterne über dem Seitenkopf */
.stars { position: absolute; inset: 0; pointer-events: none; overflow: hidden; -webkit-mask-image: linear-gradient(#000 40%, transparent); mask-image: linear-gradient(#000 40%, transparent); }
.stars span { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; opacity: .5; animation: twinkle var(--t, 4s) ease-in-out var(--d, 0s) infinite; }
@keyframes twinkle { 0%, 100% { opacity: .12; transform: scale(.7); } 50% { opacity: .85; transform: scale(1.25); } }

/* ---------- Kopfzeile: mehr Einträge ---------- */

.site-nav .btn .ico { font-size: 17px; }
.site-nav a.btn-primary, .site-nav a.btn-primary:hover { color: #fff; background: linear-gradient(180deg, #8C93FF, #6A72F0); }
.subnav { display: none; }
@media (max-width: 760px) {
  .subnav { display: flex; gap: 4px; overflow-x: auto; padding: 0 var(--gutter) 10px; scrollbar-width: none; }
  .subnav a { color: var(--ink-soft); text-decoration: none; font-size: .93rem; font-weight: 500; padding: 7px 13px; border-radius: 999px; background: rgba(255, 255, 255, .06); white-space: nowrap; }
  .subnav a[aria-current="page"] { color: var(--ink); background: rgba(124, 131, 255, .26); }
  .site-nav a.lang { margin: 0 2px; padding: 6px 10px; }
  .site-nav .btn { white-space: nowrap; padding: 0 13px; font-size: .88rem; }
  .site-nav .btn .ico { display: none; }
  .site-head .wrap { gap: 10px; }
}

/* ---------- Einblenden beim Scrollen ---------- */

.js [data-reveal] { opacity: 0; transform: translate3d(0, 28px, 0) scale(.985); transition: opacity .8s cubic-bezier(.2, .7, .2, 1) var(--d, 0s), transform .9s cubic-bezier(.2, .8, .2, 1) var(--d, 0s); will-change: opacity, transform; }
.js [data-reveal="left"] { transform: translate3d(-44px, 0, 0); }
.js [data-reveal="right"] { transform: translate3d(44px, 0, 0); }
.js [data-reveal="zoom"] { transform: scale(.9); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---------- Seitenkopf ---------- */

.hero { position: relative; }
.js .hero h1 .w { display: inline-block; opacity: 0; transform: translateY(.5em) rotate(2deg); animation: word-in .8s cubic-bezier(.2, .8, .2, 1) calc(var(--i) * 70ms + 80ms) forwards; }
@keyframes word-in { to { opacity: 1; transform: none; } }
.store { gap: 11px; padding: 0 24px 0 20px; min-height: 54px; position: relative; overflow: hidden; }
.store .ico { font-size: 21px; }
.store::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .34) 50%, transparent 70%); transform: translateX(-120%); animation: sheen 5.5s ease-in-out 2s infinite; }
@keyframes sheen { 0%, 62% { transform: translateX(-120%); } 82%, 100% { transform: translateX(120%); } }

/* Karte mit Ring */
.tilt { transform-style: preserve-3d; transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .35s ease-out; }
.day-main { display: flex; align-items: center; gap: 22px; margin-top: 10px; }
.ring { position: relative; width: 136px; height: 136px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring .track { fill: none; stroke: rgba(255, 255, 255, .09); stroke-width: 10; }
.ring .value { fill: none; stroke: var(--risk); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--v, 0)); transition: stroke-dashoffset .5s cubic-bezier(.3, .8, .3, 1), stroke .6s; filter: drop-shadow(0 0 10px var(--risk)); }
.ring::before { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--risk) 30%, transparent), transparent 70%); animation: breathe 3.6s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(.86); opacity: .55; } 50% { transform: scale(1.12); opacity: 1; } }
.ring output { position: absolute; inset: 0; display: grid; place-items: center; font-size: 3rem; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.day-main .day-level { font-size: 1.5rem; display: block; }
.day-main .day-advice { margin-top: 4px; min-height: 3.1em; }
.day-chart .curve { stroke-dasharray: 1; stroke-dashoffset: 0; }
.js .day-chart .curve { animation: draw 2s cubic-bezier(.5, 0, .2, 1) .25s both; }
.js .day-chart .area { animation: fade-in 1.2s ease 1.5s both; }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.day-chart .now-pulse { fill: none; stroke: #fff; stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { from { transform: scale(1); opacity: .8; } to { transform: scale(3.4); opacity: 0; } }

/* ---------- Bildschirme: einheitlicher Rahmen ---------- */

.phone { position: relative; border-radius: 50px; background: #0b0c10; }
.phone img { border-radius: 43px; }
.phone::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(135deg, rgba(255, 255, 255, .16), transparent 28%, transparent 72%, rgba(255, 255, 255, .06)); mix-blend-mode: screen; }
.feature .phone { box-shadow: 0 34px 70px rgba(0, 0, 0, .55), 0 0 90px -20px color-mix(in srgb, var(--glow, #7C83FF) 55%, transparent); }

/* Fächer aus drei Bildschirmen */
.fan { position: relative; height: clamp(440px, 60vw, 680px); margin-top: clamp(20px, 4vw, 48px); -webkit-mask-image: linear-gradient(#000 74%, transparent 98%); mask-image: linear-gradient(#000 74%, transparent 98%); }
.fan .phone { position: absolute; left: 50%; top: 44px; width: clamp(190px, 25vw, 290px); max-width: none; margin: 0; }
.fan .p1 { transform: translate(calc(-50% - clamp(140px, 22vw, 290px)), calc(8% + var(--py, 0px))) rotate(-9deg); z-index: 1; }
.fan .p2 { transform: translate(-50%, var(--py, 0px)); z-index: 3; box-shadow: 0 50px 100px rgba(0, 0, 0, .7), 0 0 120px -10px rgba(124, 131, 255, .5); }
.fan .p3 { transform: translate(calc(-50% + clamp(140px, 22vw, 290px)), calc(8% + var(--py, 0px))) rotate(9deg); z-index: 1; }
.chip {
  position: absolute; z-index: 4; display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px; border-radius: 18px;
  font-weight: 600; font-size: .95rem; white-space: nowrap;
  background: rgba(22, 23, 30, .72); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
  animation: bob 6s ease-in-out var(--d, 0s) infinite;
}
.chip .badge { width: 34px; height: 34px; border-radius: 11px; font-size: 18px; }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
.fan .c1 { left: 4%; top: 12%; } .fan .c2 { right: 3%; top: 30%; } .fan .c3 { left: 9%; bottom: 14%; } .fan .c4 { right: 8%; bottom: 6%; }

/* ---------- Kacheln ---------- */

.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tile {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  padding: 24px; min-height: 290px; border-radius: var(--r-card); color: var(--ink); text-decoration: none; overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .03));
  border: 1px solid rgba(255, 255, 255, .09);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), border-color .3s;
}
.tile:hover { color: var(--ink); transform: translateY(-5px); border-color: color-mix(in srgb, var(--tint) 55%, transparent); }
.tile::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--tint) 30%, transparent), transparent 65%); }
.tile:hover::before { opacity: 1; }
.tile > * { position: relative; }
.tile h3 { margin-top: 4px; }
.tile p { color: var(--ink-soft); font-size: .98rem; }
.tile .more { margin-top: auto; padding-top: 8px; font-weight: 600; font-size: .93rem; color: color-mix(in srgb, var(--tint) 70%, #fff); display: inline-flex; align-items: center; gap: 6px; }
.tile .more .ico { transition: transform .25s; }
.tile:hover .more .ico { transform: translateX(4px); }
.mini { height: 78px; margin-top: 6px; }
.mini svg { width: 100%; height: 100%; overflow: visible; }
.mini .ln { fill: none; stroke: var(--tint); stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.in .mini .ln { animation: draw 1.6s cubic-bezier(.5, 0, .2, 1) .3s forwards; }
.mini .bar { fill: var(--tint); transform-box: fill-box; transform-origin: left center; transform: scaleX(0); }
.in .mini .bar { animation: grow-x .9s cubic-bezier(.2, .8, .2, 1) calc(var(--i, 0) * 110ms + .3s) forwards; }
.mini .col { fill: var(--tint); transform-box: fill-box; transform-origin: center bottom; transform: scaleY(0); }
.in .mini .col { animation: grow-y .8s cubic-bezier(.2, .8, .2, 1) calc(var(--i, 0) * 60ms + .3s) forwards; }
.mini .cell { opacity: 0; }
.in .mini .cell { animation: fade-in .5s ease calc(var(--i, 0) * 22ms + .2s) forwards; }
.mini .soft { opacity: .28; }
@keyframes grow-x { to { transform: scaleX(1); } }
@keyframes grow-y { to { transform: scaleY(1); } }
.no-js .mini .ln { stroke-dashoffset: 0; } .no-js .mini .bar, .no-js .mini .col { transform: none; } .no-js .mini .cell { opacity: 1; }

/* Drei Aufgaben mit Symbol */
.three .badge { margin-bottom: 16px; }

/* Grundsätze mit Symbol */
.principles > div { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 4px 18px; align-items: start; }
.principles .badge { grid-row: span 2; }
.principles h3 { align-self: center; }
.principles p { grid-column: 2; margin-top: 0; }

/* Schlussband */
.cta-band { position: relative; overflow: hidden; text-align: center; padding: clamp(48px, 8vw, 96px) clamp(24px, 5vw, 64px); }
.cta-band::after { content: ""; position: absolute; left: 50%; top: 100%; width: 90%; aspect-ratio: 2 / 1; translate: -50% -42%; border-radius: 50%; background: radial-gradient(closest-side, rgba(124, 131, 255, .55), rgba(14, 165, 181, .18) 60%, transparent); filter: blur(30px); animation: breathe 7s ease-in-out infinite; pointer-events: none; }
.cta-band > * { position: relative; z-index: 1; }
.cta-band img { width: 92px; height: 92px; border-radius: 22px; margin: 0 auto 26px; box-shadow: 0 24px 60px rgba(0, 0, 0, .6), 0 0 60px rgba(124, 131, 255, .45); animation: bob 7s ease-in-out infinite; }
.cta-band p { margin: 16px auto 30px; }
.cta-band .lead { max-width: 30em; }

/* Seitenkopf der Unterseiten */
.page-hero { position: relative; padding: clamp(56px, 8vw, 104px) 0 clamp(28px, 4vw, 48px); }
.page-hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); max-width: 14em; background: linear-gradient(180deg, #fff 30%, #B4B9FF 130%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .08em; }
.page-hero .lead { margin-top: 22px; }
.jumpbar { position: sticky; top: 68px; z-index: 10; margin-top: 8px; background: rgba(10, 11, 17, .78); -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px); border-bottom: 1px solid var(--line); }
.jump { display: flex; gap: 8px; padding: 10px 0; overflow-x: auto; scrollbar-width: none; }
.jump::-webkit-scrollbar, .subnav::-webkit-scrollbar { display: none; }
.jump a { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; padding: 9px 15px 9px 11px; border-radius: 999px; color: var(--ink-soft); text-decoration: none; font-weight: 550; font-size: .94rem; background: rgba(255, 255, 255, .06); border: 1px solid transparent; transition: background-color .2s, color .2s; }
.jump a .ico { font-size: 18px; }
.jump a:hover, .jump a.on { color: var(--ink); background: rgba(124, 131, 255, .22); border-color: rgba(124, 131, 255, .4); }
.feature { scroll-margin-top: 140px; }
.feature-text .badge { margin-bottom: 18px; }

/* Zeichnungen: Uhr und Widget */
.devices { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: clamp(24px, 6vw, 72px); margin-top: 40px; }
.devices svg { width: 100%; height: auto; overflow: visible; }
.devices figure { margin: 0; text-align: center; }
.devices figcaption { margin-top: 16px; color: var(--ink-soft); font-size: .95rem; }
.d-watch { width: min(100%, 210px); animation: bob 7s ease-in-out infinite; }
.d-widget { width: min(100%, 330px); animation: bob 8s ease-in-out -2s infinite; }
.d-island { width: min(100%, 330px); animation: bob 6.5s ease-in-out -4s infinite; }
.devices .ringv { stroke-dasharray: 100; stroke-dashoffset: 100; }
.in .devices .ringv, .devices.in .ringv { animation: ring-in 1.6s cubic-bezier(.3, .8, .3, 1) .4s forwards; }
@keyframes ring-in { to { stroke-dashoffset: 61; } }
.devices .ln { fill: none; stroke-dasharray: 1; stroke-dashoffset: 1; }
.devices.in .ln { animation: draw 1.8s cubic-bezier(.5, 0, .2, 1) .5s forwards; }
.no-js .devices .ln { stroke-dashoffset: 0; } .no-js .devices .ringv { stroke-dashoffset: 61; }

/* ---------- Narkolepsie-Seite ---------- */

.symptoms { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.symptom { grid-column: span 2; }
.symptom:nth-child(n+4) { grid-column: span 3; }
.symptom { padding: 24px; }
.symptom h3 { margin-top: 16px; }
.symptom p { margin-top: 8px; color: var(--ink-soft); font-size: .98rem; }
.types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.types .glass { padding: clamp(24px, 3.4vw, 36px); }
.types .tag { display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: .85rem; font-weight: 650; background: color-mix(in srgb, var(--tint) 22%, transparent); color: color-mix(in srgb, var(--tint) 60%, #fff); }
.types h3 { margin-top: 14px; font-size: 1.5rem; }
.types p { margin-top: 10px; color: var(--ink-soft); }
.steps { counter-reset: step; display: grid; gap: 0; max-width: 46em; margin: 0; padding: 0; list-style: none; }
.steps li { counter-increment: step; position: relative; padding: 0 0 30px 64px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -4px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: rgba(124, 131, 255, .2); border: 1px solid rgba(124, 131, 255, .5); color: var(--brand-bright); }
.steps li::after { content: ""; position: absolute; left: 19.5px; top: 42px; bottom: 2px; width: 1px; background: linear-gradient(rgba(124, 131, 255, .5), transparent); }
.steps li:last-child::after { display: none; }
.steps p { margin-top: 6px; color: var(--ink-soft); }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 5vw, 64px); }
.two-col ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 11px; color: var(--ink-soft); }
.two-col li { position: relative; padding-left: 22px; }
.two-col li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.fact { padding: 26px; }
.fact b { display: block; font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--brand-bright); }
.fact span { display: block; margin-top: 10px; color: var(--ink-soft); font-size: .97rem; }
.links { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.link-card { position: relative; display: block; padding: 20px 52px 20px 22px; border-radius: var(--r-inner); text-decoration: none; color: var(--ink); background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .09); transition: transform .25s, border-color .25s, background-color .25s; }
.link-card:hover { color: var(--ink); transform: translateY(-3px); border-color: color-mix(in srgb, var(--tint) 60%, transparent); background: rgba(255, 255, 255, .08); }
.link-card b { display: block; font-weight: 600; }
.link-card span { display: block; margin-top: 4px; color: var(--ink-soft); font-size: .93rem; }
.link-card small { display: block; margin-top: 8px; color: var(--ink-faint); font-size: .82rem; }
.link-card .ico { position: absolute; right: 20px; top: 22px; font-size: 20px; color: var(--ink-faint); transition: transform .25s, color .25s; }
.link-card:hover .ico { transform: translate(3px, -3px); color: var(--brand-bright); }
.link-group { margin-top: 44px; }
.link-group h3 { margin-bottom: 16px; }

/* ---------- Schmale Bildschirme ---------- */

@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { min-height: 0; }
  .types, .two-col, .facts, .symptoms { grid-template-columns: minmax(0, 1fr); }
  .symptom, .symptom:nth-child(n+4) { grid-column: auto; }
  .fan .c2, .fan .c3 { display: none; }
}
@media (max-width: 620px) {
  .bento { grid-template-columns: minmax(0, 1fr); }
  .day-main { gap: 16px; }
  .ring { width: 108px; height: 108px; }
  .ring output { font-size: 2.3rem; }
  .fan { height: 430px; }
  .fan .phone { width: 180px; }
  .fan .p1 { transform: translate(calc(-50% - 104px), calc(10% + var(--py, 0px))) rotate(-9deg); }
  .fan .p3 { transform: translate(calc(-50% + 104px), calc(10% + var(--py, 0px))) rotate(9deg); }
  .fan .chip { display: none; }
  .jumpbar { top: 107px; }
  .feature { scroll-margin-top: 170px; }
  .principles > div { grid-template-columns: 46px minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js .hero h1 .w { opacity: 1; transform: none; }
  .mini .ln, .devices .ln, .day-chart .curve { stroke-dashoffset: 0; }
  .mini .bar, .mini .col { transform: none; }
  .mini .cell { opacity: 1; }
  .devices .ringv { stroke-dashoffset: 61; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
