/* ─────────────────────────────  AISIGNO · Login  ───────────────────────────── */

:root {
  --lime: #d2f70a;
  --ink: #0a0a0a;
  --card: #0b0b0b;
  --card-line: #262626;
  --card-field: #141414;
  --text: #f3f3ee;
  --muted: #8d8d86;
  --radius: 14px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-io: cubic-bezier(.65, 0, .25, 1);
  --gutter: clamp(20px, 4vw, 64px);
  --sheet-h: 0px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background: var(--lime);
  color: var(--ink);
  font-family: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button { font: inherit; color: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ─────────────  Video-Bühne  ───────────── */

.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--lime) url('assets/video/01-L-first.jpg') center / cover no-repeat;
  contain: strict;
}

/* Sobald Video läuft, kein Poster mehr dahinter – sonst blitzt es beim Wechsel an den Rändern */
.stage.is-live { background-image: none; }

.stage__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
}

.stage__video.is-front { opacity: 1; z-index: 1; }

/* Neuer Clip blendet über den alten, der dabei seine letzte Sekunde weiterläuft */
.stage__video.is-entering {
  opacity: 1;
  z-index: 2;
  animation: fade-in 1s ease-in-out both;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Leichter Lime-Schleier: unten flach, oben links hinter dem Logo */
.stage__fade {
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    radial-gradient(ellipse 48% 30% at 0% 50%, rgb(210 247 10 / .88) 35%, rgb(210 247 10 / 0)),
    linear-gradient(to top, rgb(210 247 10 / .7) 0%, rgb(210 247 10 / 0) 18%),
    radial-gradient(ellipse 30% 22% at 0% 0%, rgb(210 247 10 / .8), rgb(210 247 10 / 0));
}

/* Handy: Claim steht unten auf der Bühne, direkt über dem Sheet */
@media (max-width: 860px) {
  .stage__fade {
    background:
      linear-gradient(to top, rgb(210 247 10 / .9) 0%, rgb(210 247 10 / .75) 16%, rgb(210 247 10 / 0) 34%),
      radial-gradient(ellipse 60% 18% at 50% 0%, rgb(210 247 10 / .8), rgb(210 247 10 / 0));
  }
}

/* ─────────────  Rauschen  ───────────── */

.grain {
  position: fixed;
  inset: -100px;
  z-index: 4; /* über dem Video, unter Claim, Karte und Logo */
  pointer-events: none;
  opacity: .17;
  background-image: var(--grain, none);
  animation: grain .9s steps(1) infinite;
  will-change: transform;
}

@keyframes grain {
  0%   { transform: translate(0, 0); }
  16%  { transform: translate(-37px, 21px); }
  33%  { transform: translate(24px, -48px); }
  50%  { transform: translate(-61px, -12px); }
  66%  { transform: translate(43px, 55px); }
  83%  { transform: translate(-14px, 38px); }
}

/* ─────────────  Kopf  ───────────── */

.top {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  padding: calc(var(--gutter) * .75) var(--gutter);
  padding-top: max(calc(var(--gutter) * .75), env(safe-area-inset-top));
}

.logo { display: block; line-height: 0; animation: drop-in 1s var(--ease-out) .1s both; }
.logo img { height: clamp(22px, 2.1vw, 34px); width: auto; }

@keyframes drop-in { from { opacity: 0; transform: translateY(-12px); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(24px); } }

/* ─────────────  Layout  ───────────── */

.layout {
  position: relative;
  z-index: 5;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  gap: var(--gutter);
  padding: var(--gutter);
}

.hero {
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.panel { align-self: center; }

/* ─────────────  Claim  ───────────── */

.claim {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: .28em;
  line-height: 1;
  font-weight: 400;
  animation: rise-in 1.1s var(--ease-out) .25s both;
}

.claim__always {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: clamp(30px, 3.4vw, 62px);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.claim__slot {
  display: grid;
  justify-items: start;
  overflow: hidden;
  overflow: clip;
  font-family: 'Unbounded', 'Arial Black', sans-serif;
  font-weight: 800;
  font-size: clamp(34px, 4.4vw, 88px);
  line-height: 1.12;
  height: 1.12em;
  letter-spacing: -.02em;
  padding: 0 .1em;
}

.word {
  grid-area: 1 / 1;
  white-space: nowrap;
}

/* Buchstaben fallen von oben herein … */
.word .ch {
  display: inline-block;
  animation: ch-in .95s cubic-bezier(.22, 1, .36, 1) both;
  animation-delay: calc(420ms + var(--i) * 40ms);
}

/* … und rutschen nach unten wieder raus – fast fertig, bevor die neuen kommen */
.word.is-out .ch {
  animation: ch-out .42s cubic-bezier(.6, 0, .8, .25) both;
  animation-delay: calc(var(--i) * 16ms);
}

@keyframes ch-in  { from { transform: translateY(-110%); } }
@keyframes ch-out { to   { transform: translateY(110%); } }

/* ─────────────  Motiv-Fortschritt  ───────────── */

.reel-nav {
  display: flex;
  gap: 6px;
  margin-top: clamp(16px, 2.4vh, 28px);
  animation: rise-in 1.1s var(--ease-out) .4s both;
}

.reel-nav button {
  appearance: none;
  border: 0;
  background: none;
  padding: 10px 0;
  width: 26px;
  cursor: pointer;
}

.reel-nav button span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: rgb(10 10 10 / .2);
  overflow: hidden;
}

.reel-nav button span::after {
  content: '';
  display: block;
  height: 100%;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
}

.reel-nav button.is-done span::after { transform: none; }

.reel-nav button.is-active span::after {
  animation: fill var(--dur, 6s) linear forwards;
  animation-play-state: var(--play, running);
}

.reel-nav button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 2px; }

@keyframes fill { from { transform: scaleX(0); } to { transform: none; } }

/* ─────────────  Karte  ───────────── */

.card {
  position: relative;
  display: grid;
  background: var(--card);
  color: var(--text);
  border-radius: 28px;
  padding: 40px 36px 26px;
  box-shadow: 0 40px 90px -30px rgb(0 0 0 / .55), 0 0 0 1px rgb(255 255 255 / .04) inset;
  animation: rise-in 1s var(--ease-out) .15s both;
}

.card__step {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  transition: opacity .45s ease, transform .6s var(--ease-out), visibility 0s linear 0s;
}

.card__legal { grid-area: 2 / 1; }

.card[data-state="start"] .card__step--sent,
.card[data-state="sent"]  .card__step--start {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .3s ease, transform .3s ease, visibility 0s linear .3s;
}

.card__eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--lime);
  letter-spacing: .02em;
}

.card__title {
  margin: 0 0 28px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.15;
}

.card__text { margin: -14px 0 24px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.card__text strong { color: var(--text); font-weight: 500; word-break: break-all; }

.providers { display: grid; gap: 10px; }

/* ─────────────  Buttons  ───────────── */

.btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, transform .15s ease, opacity .2s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(.985); }
.btn:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.btn svg { width: 19px; height: 19px; flex: none; }

.btn--apple { background: #fff; color: #000; }
.btn--apple:hover { background: #e9e9e4; }
.btn--apple svg { margin-top: -3px; }

.btn--google { background: #1a1a1a; border-color: var(--card-line); color: var(--text); }
.btn--google:hover { background: #222; border-color: #333; }

.btn--ghost { background: transparent; border-color: var(--card-line); color: var(--text); }
.btn--ghost:hover { border-color: #3a3a3a; background: #121212; }

.btn--primary { background: var(--lime); color: var(--ink); font-weight: 600; }
.btn--primary:hover { background: #d3f73a; }
.btn--primary svg { transition: transform .25s var(--ease-out); }
.btn--primary:hover svg { transform: translateX(3px); }

.btn.is-loading { pointer-events: none; }
.btn.is-loading > * { opacity: 0; }
.btn.is-loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(1turn); } }

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--card-line); }

/* ─────────────  E-Mail  ───────────── */

.email-toggle { display: none; }

.email-form { display: grid; gap: 10px; }

.field { position: relative; }

.field input {
  width: 100%;
  height: 56px;
  padding: 22px 16px 6px;
  border-radius: var(--radius);
  border: 1px solid var(--card-line);
  background: var(--card-field);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* < 16px zoomt iOS beim Fokus */
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.field label {
  position: absolute;
  left: 17px;
  top: 50%;
  transform: translateY(-50%);
  transform-origin: left center;
  color: var(--muted);
  font-size: 15px;
  pointer-events: none;
  transition: transform .2s var(--ease-out), color .2s ease;
}

.field input:focus {
  border-color: var(--lime);
  box-shadow: 0 0 0 4px rgb(210 247 10 / .16);
}

.field input:focus + label,
.field input:not(:placeholder-shown) + label {
  transform: translateY(-122%) scale(.78);
}

.field input:focus + label { color: var(--lime); }

.field.is-invalid input { border-color: #ff6b5a; box-shadow: 0 0 0 4px rgb(255 107 90 / .14); }

.field__error {
  margin: 0;
  min-height: 0;
  font-size: 13px;
  color: #ff8b7d;
}
.field__error:empty { display: none; }

.card__switch {
  margin: 22px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.link {
  appearance: none;
  border: 0;
  background: none;
  padding: 0 0 0 4px;
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgb(210 247 10 / .6);
  text-underline-offset: 3px;
}
.link:hover { text-decoration-color: var(--lime); }

.card__legal {
  margin: 24px 0 0;
  padding-top: 18px;
  border-top: 1px solid #1c1c1c;
  font-size: 12px;
  line-height: 1.5;
  color: #6f6f69;
  text-align: center;
}
.card__legal a { color: #a5a59e; }

.sent__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  border-radius: 16px;
  background: var(--lime);
  color: var(--ink);
}
.sent__icon svg { width: 26px; height: 26px; }

/* ─────────────  Toast  ───────────── */

.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--text);
  font-size: 14px;
  box-shadow: 0 20px 40px -12px rgb(0 0 0 / .5);
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
  transition: opacity .3s ease, transform .4s var(--ease-out);
}
.toast::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ─────────────  Mittlere Breiten  ───────────── */

@media (max-width: 1100px) and (min-width: 861px) {
  .layout { grid-template-columns: minmax(0, 1fr) 380px; }
  .card { padding: 34px 28px 22px; }
}

/* ─────────────  Handy / Hochformat: Karte als Bottom-Sheet  ───────────── */

@media (max-width: 860px) {
  .stage { bottom: max(0px, calc(var(--sheet-h) - 28px)); }

  .top { left: 50%; transform: translateX(-50%); }
  .logo img { height: 24px; }

  .layout {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    gap: 0;
    padding: 0;
  }

  .hero { align-self: end; padding: 0 20px 22px; }
  .claim__always { font-size: clamp(20px, 5.4vw, 30px); }
  .claim__slot { font-size: clamp(24px, 7vw, 46px); }
  .reel-nav { margin-top: 12px; }
  .reel-nav button { width: 20px; }

  .card {
    border-radius: 28px 28px 0 0;
    padding: 26px 20px max(18px, env(safe-area-inset-bottom));
    box-shadow: 0 -20px 60px -30px rgb(0 0 0 / .5);
  }

  .card__eyebrow { margin-bottom: 4px; }
  .card__title { font-size: 22px; margin-bottom: 20px; }
  .providers { gap: 8px; }
  .divider { margin: 16px 0; }

  /* E-Mail-Feld erst auf Tipp */
  .email-toggle { display: flex; }
  .email-form { display: none; }
  .card.is-email-open .email-toggle { display: none; }
  .card.is-email-open .email-form { display: grid; animation: rise-in .4s var(--ease-out) both; }

  .card__switch { margin-top: 16px; }
  .card__legal { margin-top: 16px; padding-top: 14px; }
}

/* Niedrige Laptopfenster: Karte kompakter */
@media (min-width: 861px) and (max-height: 720px) {
  .card { padding: 28px 30px 20px; }
  .card__title { margin-bottom: 18px; font-size: 23px; }
  .divider { margin: 14px 0; }
  .card__legal { margin-top: 16px; padding-top: 12px; }
}

/* ─────────────  Weniger Bewegung  ───────────── */

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .word .ch { animation: fade-in .6s ease both; animation-delay: 0s; }
  .word.is-out .ch { animation: fade-in .4s ease reverse both; animation-delay: 0s; }
  .logo, .claim, .reel-nav, .card { animation: none; }
}
