/* MedType – Produktseite (index.html): Startbereich, Ablauf, Funktionen, Datenschutz, Voraussetzungen, Fragen */

.home { --page-w: var(--wide); }
:root {
  --led-blue: #1f6fe5;
  --led-green: #18803a;
  --ios-blue: #0066d6;
  --screen: #f2f2f7;
  --screen-text: #1c1918;
  --field: #ffffff;
  --dongle: #2b2628;
  --dot: rgba(120, 60, 60, .13);
}
@media (prefers-color-scheme: dark) {
  :root {
    --screen: #1c1c1e;
    --screen-text: #f3efed;
    --field: #2c2c2e;
    --dongle: #3a3436;
    --dot: rgba(255, 255, 255, .07);
  }
}

/* Startbereich */
.hero-band { overflow-x: clip; }
.hero-band::before,
.hero-band::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.hero-band::before {
  background: radial-gradient(90% 40% at 50% 100%, rgba(255, 59, 48, .75), transparent 70%);
}
.hero-band::after {
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1.6px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 35%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 35%, transparent);
}
.hero-band .band-inner { padding-bottom: 0; }
.hero { display: grid; gap: 2.75rem; padding-top: 2.75rem; }
.hero-app {
  display: flex; align-items: center; gap: .9rem;
  margin: 0 0 1.5rem;
  font-size: 1.3rem; font-weight: 700; letter-spacing: -.01em;
}
.hero-icon {
  width: 72px; height: 72px;
  border-radius: 22.5%;
  box-shadow: 0 12px 30px -8px rgba(60, 0, 10, .6), 0 0 0 1px rgba(255, 255, 255, .4);
}
.hero h1 {
  font-size: clamp(2.5rem, 1.3rem + 5.6vw, 4.75rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.035em;
  margin: 0 0 1.2rem;
  text-wrap: balance;
}
.hero-lead {
  font-size: clamp(1.1rem, 1rem + .5vw, 1.3rem);
  line-height: 1.5;
  max-width: 33rem;
  margin: 0 0 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.5rem; }
.hero-cta {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .8rem 1.35rem .8rem 1.15rem;
  border-radius: 999px;
  background: #ffffff; color: var(--on-pill);
  font-weight: 700; text-decoration: none;
  box-shadow: 0 14px 28px -12px rgba(60, 0, 10, .75);
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.hero-cta svg { width: 1.2rem; height: 1.2rem; flex: none; }
.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 20px 34px -14px rgba(60, 0, 10, .85); }
.hero-cta:active { transform: translateY(0) scale(.98); box-shadow: 0 8px 18px -10px rgba(60, 0, 10, .75); }
.hero-cta:focus-visible { border-radius: 999px; }
.status {
  display: inline-flex; align-items: center; gap: .55rem;
  margin: 1.6rem 0 0;
  padding: .3rem .85rem .3rem .7rem;
  border: 1.5px solid rgba(255, 255, 255, .7);
  border-radius: 999px;
  color: var(--on-band);
  font-size: .9rem; font-weight: 600;
}
.status-dot { position: relative; width: .5rem; height: .5rem; border-radius: 50%; background: #ffffff; }
.hero-link {
  color: var(--on-band); font-weight: 600;
  text-underline-offset: .3em;
  padding: .5rem 0;
}
.hero-link span { display: inline-block; transition: transform .25s var(--ease-out); }
.hero-link:hover span { transform: translateX(4px); }

.hero-visual {
  --phone: min(44vw, 230px);
  display: grid; place-items: center;
  margin-bottom: -5.5rem;
}
.hero-visual .phone { grid-area: 1 / 1; width: var(--phone); }
.phone--back { translate: -40% -3%; rotate: -8deg; scale: .9; }
.phone--front { translate: 22% 4%; rotate: 4deg; }

/* Handy-Rahmen für Bildschirmfotos */
.phone {
  position: relative;
  overflow: hidden;
  border: 7px solid var(--phone-bezel);
  border-radius: 15% / 7%;
  background: var(--phone-bezel);
  box-shadow: var(--shadow-phone);
}
.phone img { width: 100%; }

/* Abschnitte */
.section { padding: 4.5rem 0; }
.section-head { max-width: 40rem; margin-bottom: 2.5rem; }
.kicker {
  display: flex; align-items: center; gap: .7rem;
  margin: 0 0 .9rem;
  color: var(--accent);
  font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.kicker::before {
  content: ""; flex: none; width: 1.75rem; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--brand-1), var(--brand-2));
}
.display {
  font-size: clamp(1.9rem, 1.2rem + 3vw, 3.1rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.03em;
  margin: 0 0 1rem;
  text-wrap: balance;
}
.lede { font-size: 1.1rem; color: var(--muted); margin: 0; }
.path { font-weight: 600; }

/* So funktioniert's */
.how { padding-top: calc(5.5rem + 3.5rem); }
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.25rem; }
.how-steps li { position: relative; padding-top: 4.4rem; }
/* Schrittnummer als Dongle-LED in der Farbe, die der Dongle in diesem Schritt zeigt */
.how-led {
  --led: var(--led-blue);
  position: absolute; top: 0; left: 0;
  display: grid; place-items: center;
  width: 3.1rem; height: 3.1rem; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .35), transparent 55%), var(--led);
  color: #ffffff;
  font-size: 1.35rem; font-weight: 800;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--led) 16%, transparent);
}
.how-led::after {
  content: ""; position: absolute; inset: -10px; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, color-mix(in srgb, var(--led) 55%, transparent), transparent 70%);
}
.how-led--green { --led: var(--led-green); }
.how-steps h3 { font-size: 1.25rem; line-height: 1.25; letter-spacing: -.01em; margin: 0 0 .45rem; }
.how-steps p { margin: 0; color: var(--muted); }
.how-steps .led-note {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: .9rem;
  padding: .3rem .75rem .3rem .6rem;
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--text);
  font-size: .88rem; font-weight: 600; line-height: 1.4;
}
.led-dot { flex: none; width: .55rem; height: .55rem; border-radius: 50%; background: var(--led-blue); }
.led-dot--green { background: var(--led-green); }

/* Ablauf Smartphone → Dongle → PC */
.flow { margin: 0 0 3.25rem; }
.flow-visual {
  display: grid; justify-items: center;
  padding: 1.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(var(--dot) 1px, transparent 1.5px) 0 0 / 18px 18px,
    var(--surface);
  box-shadow: var(--shadow);
}
.flow > figcaption { margin-top: .8rem; color: var(--muted); font-size: .92rem; max-width: 40rem; }
.flow-node { position: relative; }
.flow-phone {
  width: min(100%, 15rem);
  padding: 7px;
  border-radius: 30px;
  background: var(--phone-bezel);
  box-shadow: var(--shadow-phone);
}
.flow-screen {
  display: grid; gap: .6rem; justify-items: start;
  padding: .8rem .75rem .75rem;
  border-radius: 23px;
  background: var(--screen);
  color: var(--screen-text);
}
.flow-status {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .15rem .6rem .15rem .35rem;
  border-radius: 999px;
  background: var(--field);
  font-size: .72rem; font-weight: 600;
}
.flow-status::before {
  content: "✓"; display: grid; place-items: center;
  width: .95rem; height: .95rem; border-radius: 50%;
  background: var(--led-green); color: #ffffff; font-size: .6rem; font-weight: 800;
}
.flow-draft {
  justify-self: stretch;
  min-height: 3.6rem;
  padding: .55rem .7rem;
  border-radius: 12px;
  background: var(--field);
  font-size: .98rem; font-weight: 500;
}
.flow-send {
  justify-self: stretch;
  padding: .4rem;
  border-radius: 999px;
  background: var(--ios-blue); color: #ffffff;
  text-align: center; font-size: .85rem; font-weight: 600;
}
.flow-link {
  position: relative;
  container-type: size;
  width: 100%; height: 5rem;
  display: grid; place-items: center;
}
.flow-link::before {
  content: ""; position: absolute; left: calc(50% - 1px); top: .35rem; bottom: .35rem; width: 2px;
  background: repeating-linear-gradient(180deg, var(--accent) 0 6px, transparent 6px 12px);
  opacity: .55;
}
.flow-label {
  position: relative;
  padding: .2rem .7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: .78rem; font-weight: 600; white-space: nowrap;
}
.flow-packets { position: absolute; inset: 0; --tx: 0px; --ty: 100cqb; }
.flow-packets i {
  position: absolute; left: calc(50% - 4px); top: 0;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  opacity: 0;
}
.flow-dongle { display: grid; justify-items: center; gap: .35rem; padding: .25rem 0; }
.flow-dongle-art { width: 8.25rem; height: auto; overflow: visible; }
.d-body { fill: var(--dongle); }
.d-pin { stroke: #d6b25e; stroke-width: 3; stroke-linecap: round; }
.d-button { fill: none; stroke: rgba(255, 255, 255, .45); stroke-width: 2.5; }
.d-led { fill: var(--led-green); }
.d-led-glow { fill: var(--led-green); opacity: .35; }
.flow-name { font-size: .82rem; font-weight: 700; color: var(--text); }
.flow-pc { display: grid; justify-items: center; width: min(100%, 17rem); }
.flow-monitor {
  width: 100%;
  padding: 8px 8px 12px;
  border-radius: 12px;
  background: var(--phone-bezel);
  box-shadow: var(--shadow-phone);
}
.flow-window { container-type: inline-size; border-radius: 4px; overflow: hidden; background: var(--field); color: var(--screen-text); }
.flow-bar {
  display: flex; justify-content: flex-end; gap: .55rem;
  padding: .35rem .55rem;
  background: var(--screen);
}
.flow-bar i { width: .55rem; height: 2px; background: var(--muted); }
.flow-bar i:nth-child(2) { height: .5rem; background: none; border: 1.5px solid var(--muted); }
.flow-bar i:nth-child(3) { height: .55rem; background: linear-gradient(45deg, transparent 44%, var(--muted) 44% 56%, transparent 56%), linear-gradient(-45deg, transparent 44%, var(--muted) 44% 56%, transparent 56%); }
.flow-line {
  position: relative; display: inline-block;
  margin: .9rem .8rem 2.4rem;
  font: 600 1rem/1.3 ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
  /* „Hallo vom Smartphone“ = 20ch (≈ 12em) + Ränder: Ist das Fenster schmaler (Desktop-Raster ca. 56–60rem),
     wird die Schrift so weit kleiner, dass die Zeile ganz hineinpasst. Ohne Containerabfragen bleibt es bei 1rem. */
  font-size: min(1rem, (100cqi - 1.8rem) / 12.5);
}
.flow-typed { display: inline-block; white-space: pre; }
.flow-caret {
  position: absolute; left: 100%; top: .1em; bottom: .1em;
  width: 2px; margin-left: 1px;
  background: var(--screen-text);
}
.flow-stand {
  width: 4.5rem; height: .9rem;
  background: linear-gradient(180deg, var(--phone-bezel), color-mix(in srgb, var(--phone-bezel) 70%, var(--surface)));
  clip-path: polygon(22% 0, 78% 0, 100% 100%, 0 100%);
}

/* Funktionen: abwechselnd Bild und Text */
.features { padding-bottom: 1rem; }
.feature { display: grid; gap: 2rem; align-items: center; padding: 2.5rem 0; }
.feature-media { margin: 0; }
.stage {
  position: relative;
  display: flex; justify-content: center; align-items: flex-start; gap: .9rem;
  aspect-ratio: 4 / 5;
  padding: 2.75rem 1.5rem 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(110% 70% at 15% 0%, rgba(255, 59, 48, .22), transparent 62%),
    linear-gradient(165deg, var(--surface-2), var(--accent-soft));
}
.stage .phone { width: min(62%, 270px); flex: none; }
/* dunkles Bildschirmfoto auf dunkler Bühne */
.stage--dark {
  background:
    radial-gradient(80% 60% at 85% 100%, rgba(255, 59, 48, .45), transparent 65%),
    linear-gradient(165deg, #2a1d20, var(--ink));
}
.stage--dark .phone { box-shadow: 0 40px 70px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .14); }
/* breiterer Ausschnitt, größeres Handy am Rand */
.stage--wide { aspect-ratio: 5 / 4; justify-content: flex-end; padding: 2rem 9% 0 0; }
.stage--wide .phone { width: min(70%, 330px); rotate: 3deg; transform-origin: 50% 0; }
/* zwei Handys, das zweite überlappt */
.stage--duo { gap: 0; padding-inline: 1rem; }
.stage--duo .phone { width: min(52%, 250px); }
.stage--duo .phone:first-child { rotate: -4deg; margin-top: 1rem; }
.stage--duo .phone + .phone { margin: 3.25rem 0 0 -12%; z-index: 1; }
.feature-media figcaption { margin-top: .7rem; color: var(--muted); font-size: .9rem; }
.feature-copy p { margin: 0 0 1rem; }
.feature-copy p:last-child { margin-bottom: 0; }

/* Außerdem */
.extras { padding-top: 2.5rem; }
.extras h2 { font-size: 1.35rem; letter-spacing: -.01em; margin: 0 0 1rem; }
.extras ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 0 2rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.extras li { border-top: 1px solid var(--line); padding: .95rem 0 1.1rem; color: var(--muted); }
.extras strong { display: block; color: var(--text); }

/* Datenschutz */
.ink {
  background:
    radial-gradient(70% 90% at 100% 0%, rgba(200, 16, 46, .5), transparent 62%),
    var(--ink);
  color: var(--ink-text);
}
.ink .kicker { color: var(--ink-accent); }
.ink a { color: var(--ink-accent); font-weight: 600; }
.ink .display { max-width: 18ch; }
.ink-list {
  list-style: none; margin: 2.5rem 0 2rem; padding: 0;
  display: grid; gap: 1.5rem 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}
.ink-list li { border-top: 2px solid rgba(255, 255, 255, .2); padding-top: 1.1rem; color: var(--ink-muted); }
.ink-list strong { display: block; color: var(--ink-text); font-size: 1.15rem; margin-bottom: .35rem; }

/* Voraussetzungen */
.needs-list {
  list-style: none; margin: 0 0 2rem; padding: 0;
  display: grid; gap: 2rem;
}
.needs-list li { display: grid; grid-template-columns: auto 1fr; gap: 0 1rem; align-items: start; align-content: start; }
.needs-icon {
  grid-row: span 2;
  width: 3.25rem; height: 3.25rem;
  display: grid; place-items: center;
  border-radius: 16px;
  background: var(--accent-soft); color: var(--accent);
}
.needs-icon svg { width: 1.6rem; height: 1.6rem; }
.needs-list h3 { font-size: 1.15rem; line-height: 1.3; margin: .1rem 0 .35rem; }
.needs-list p { margin: 0; color: var(--muted); }
.needs-note {
  margin: 0 0 1rem;
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: var(--accent-soft);
}
.disclaimer { margin: 0; color: var(--muted); font-size: .92rem; }

/* Fragen */
.ask { padding-top: 1rem; }
.ask-inner {
  display: grid; gap: 1rem 3rem;
  border-top: 4px solid transparent;
  border-image: linear-gradient(90deg, var(--brand-1), var(--brand-2)) 1;
  padding-top: 3rem;
}
.ask-title { font-size: clamp(2.6rem, 1.6rem + 5vw, 5rem); margin: 0; }
.ask-lead { font-size: 1.15rem; margin: 0 0 1rem; }
.mail {
  display: inline-block;
  margin: 0 0 1.25rem;
  font-size: clamp(1.25rem, 1rem + 1.6vw, 1.9rem);
  font-weight: 750;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}
.ask p.muted { color: var(--muted); margin: 0; }

@media (min-width: 40rem) {
  .how-steps { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .how-steps li:not(:last-child)::after {
    content: ""; position: absolute; top: calc(1.55rem - 1px); left: 4.4rem; right: -1rem;
    height: 2px; background: linear-gradient(90deg, var(--line), transparent);
  }
  .needs-list { grid-template-columns: repeat(3, 1fr); }
  .needs-list li { grid-template-columns: 1fr; }
  .needs-icon { grid-row: auto; margin-bottom: .9rem; }
}

@media (min-width: 56rem) {
  .hero { grid-template-columns: 1.1fr .9fr; align-items: center; gap: 2rem; padding-top: 2rem; }
  .hero-copy { padding-bottom: 4.5rem; }
  .hero-band::before {
    background: radial-gradient(45% 75% at 80% 55%, rgba(255, 59, 48, .8), transparent 70%);
  }
  .hero-visual { --phone: clamp(220px, 21vw, 275px); margin-bottom: -7rem; padding-top: 1.5rem; }
  .hero-icon { width: 84px; height: 84px; }
  .how { padding-top: calc(7rem + 4.5rem); }
  .feature { grid-template-columns: 1fr 1fr; gap: 4.5rem; padding: 4rem 0; }
  .feature--flip .feature-media { order: 2; }
  .stage { aspect-ratio: 1 / 1; }
  .stage--wide { aspect-ratio: 6 / 5; }
  .ask-inner { grid-template-columns: auto 1fr; align-items: start; }

  .flow-visual {
    grid-template-columns: minmax(0, 15rem) minmax(6rem, 1fr) auto minmax(6rem, 1fr) minmax(0, 17rem);
    align-items: center;
    padding: 2.5rem 2.25rem;
  }
  .flow-link { height: 6rem; }
  .flow-link::before {
    left: .4rem; right: .4rem; top: calc(50% - 1px); bottom: auto; width: auto; height: 2px;
    background: repeating-linear-gradient(90deg, var(--accent) 0 6px, transparent 6px 12px);
  }
  .flow-label { align-self: start; white-space: normal; text-align: center; max-width: 9rem; line-height: 1.3; }
  .flow-packets { --tx: 100cqi; --ty: 0px; }
  .flow-packets i { left: 0; top: calc(50% - 4px); }
  .flow-dongle { padding: 0 .25rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-visual { animation: rise 1s var(--ease-out) both; }
  .status-dot::after {
    content: ""; position: absolute; inset: 0; border-radius: 50%;
    background: #ffffff;
    animation: ping 2.6s var(--ease-out) 1s 3 both;
  }

  /* Ablauf: vorbereitet (is-armed), spielt einmal ab, sobald er sichtbar ist (is-playing) */
  .flow.is-armed .flow-typed { clip-path: inset(0 100% 0 0); }
  .flow.is-armed .flow-caret { transform: translateX(-20ch); }
  .flow.is-armed .flow-draft { opacity: 0; transform: translateY(6px); }
  .flow.is-playing .flow-draft { animation: appear .5s var(--ease-out) both; }
  .flow.is-playing .flow-send { animation: press .3s ease-in-out .6s both; }
  .flow.is-playing .flow-packets i { animation: travel .9s ease-in-out calc(var(--d, 0s) + .75s) both; }
  .flow.is-playing .flow-link ~ .flow-link .flow-packets i { animation-delay: calc(var(--d, 0s) + 1.25s); }
  .flow-packets i:nth-child(2) { --d: .15s; }
  .flow-packets i:nth-child(3) { --d: .3s; }
  .flow.is-playing .d-led, .flow.is-playing .d-led-glow { animation: flicker .14s steps(2, jump-none) 1.3s 14; }
  .flow.is-playing .flow-typed { animation: type 1.7s steps(20, end) 1.55s both; }
  .flow.is-playing .flow-caret {
    animation: caret 1.7s steps(20, end) 1.55s both, blink 1s steps(2, jump-none) 3.3s 3;
  }

  /* LED-Nummern: blinken kurz so wie am echten Dongle, danach leuchten sie ruhig */
  .how-steps.is-playing .how-led--slow::after { animation: led-slow 1.5s linear 3; }
  .how-steps.is-playing .how-led--fast::after { animation: led-fast .33s linear 12; }
  .how-steps.is-playing .how-led--green::after { animation: flicker .14s steps(2, jump-none) 1s 10; }
  @supports (animation-timeline: view()) {
    .stage .phone {
      animation: lift linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 90%;
    }
  }
}
@keyframes rise { from { transform: translateY(40px); } }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(2.8); opacity: 0; } }
@keyframes lift { from { transform: translateY(3.5rem); } }
@keyframes appear { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes press { 50% { transform: scale(.94); filter: brightness(1.15); } }
@keyframes travel {
  0% { opacity: 0; transform: translate(0, 0); }
  20%, 80% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)); }
}
@keyframes flicker { 50% { opacity: .25; } }
@keyframes type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes caret { from { transform: translateX(-20ch); } to { transform: translateX(0); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes led-slow { 0%, 12% { opacity: 1; } 13%, 100% { opacity: .15; } }
@keyframes led-fast { 0%, 50% { opacity: 1; } 51%, 100% { opacity: .15; } }

@media print {
  .hero-visual, .stage, .flow { display: none; }
  .ink { background: none; color: var(--text); }
}
