/* The web login keeps its own central form. Its two decorative wings occupy the remaining space. */
@media screen and (min-width: 880px) {
  body:has(#app .signup-screen .login-actions) {
    --login-border: #90928f;
    --login-center: #fff;
    background: #232524;
  }
  body.dark-mode:has(#app .signup-screen .login-actions) {
    --login-border: #717471;
    --login-center: #111;
    background: #202221 !important;
  }
  body #app.app-shell:has(.signup-screen .login-actions) {
    background: var(--login-center);
    border-inline: 1px solid var(--login-border);
    box-shadow: none;
    animation: none;
  }
  body #app.app-shell > .screen:has(> .signup-screen .login-actions) { padding-block: 24px; }
  body #app .signup-screen:has(.login-actions) { min-height: calc(100svh - 48px); }
  body:has(#app .signup-screen .login-actions) .login-scene {
    display: block !important; position: fixed; inset: 0; overflow: hidden;
    pointer-events: none; user-select: none; color: #f6f5ef;
  }
}

/* The same two films play in the web login and in the landing page phone frames. */
@media screen {
  .login-scene * { box-sizing: border-box; }
  html[lang^="en"] .login-scene [lang="ko"], html:not([lang^="en"]) .login-scene [lang="en"] { display: none; }
  .login-wing {
    position: absolute; inset-block: 0; width: calc((100% - 480px) / 2);
    overflow: hidden; container-type: inline-size;
  }
  .login-left {
    --screen-fill: radial-gradient(ellipse at 61% 45%, #4d504f, #323534 46%, #202321 88%);
    left: 0; background: var(--screen-fill);
  }
  .login-right {
    --screen-fill: radial-gradient(ellipse at 42% 43%, #454646, #2c2d2e 52%, #191a1b 93%);
    right: 0; background: var(--screen-fill);
  }
  .login-shot { position: absolute; inset: 0; opacity: 0; visibility: hidden; }
  .login-shot.is-current { visibility: visible; opacity: 1; z-index: 1; }
  .login-session {
    position: absolute; z-index: 2; left: 10%; right: 7%;
    top: max(7%,calc(50% - min(34svh,64cqw,300px)));
    font: 650 clamp(15px,5.3cqw,26px)/1.3 var(--yp-font-family,system-ui,sans-serif); letter-spacing: -.047em;
  }
  .login-session time { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; color: #d0d2cd; font: 550 11px/1.2 system-ui,sans-serif; font-variant-numeric: tabular-nums; letter-spacing: .075em; }
  .login-session time::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #edf0e9; }
  .login-actor { position: absolute; top: 53%; left: 50%; transform: translate(-50%, -50%); width: min(94cqw,55svh,460px); aspect-ratio: 21 / 20; }
  .login-sprite { position: absolute; inset: 0; background-repeat: no-repeat; background-position: 0% center; background-size: 400% 100%; }
  .login-shadow { position: absolute; left: 7%; width: 86%; height: 9%; bottom: 0; border-radius: 50%; background: radial-gradient(ellipse,#07080799,transparent 69%); }
  .shot-stride .login-actor { top: 49%; width: auto; height: min(58svh,109cqw,475px); aspect-ratio: 320 / 436; }
  .shot-stride .login-sprite { background-size: 800% 100%; }
  .shot-stride .login-shadow { bottom: -1%; height: 6%; }
  .login-track { position: absolute; top: calc(49% + min(28svh,53cqw,228px)); left: -12%; width: 124%; height: 85px; transform: rotate(-7deg); }
  .login-track i { display: block; width: 100%; height: 1px; margin-top: 12px; background: #ffffff22; }
  .login-track i:nth-child(2) { height: 3px; margin-top: 19px; background: repeating-linear-gradient(90deg,#e5e6e0aa 0 31px,transparent 31px 87px); }
  .login-track i:last-child { margin-top: 24px; }

  /* Loading the current pair first keeps the decoration out of the sign-in request path. */
  .shot-stride { --film: url("/landing/login-stride.webp"); }
  .shot-work { --film: url("/landing/login-work.webp"); --beat: 1.65s; }
  .shot-birthday { --beat: 2.55s; }
  .shot-mission { --beat: 2.1s; }
  .shot-meeting { --beat: 2.4s; }
  .shot-goal { --beat: 2.2s; }
  .shot-stretch { --beat: 2.35s; }
  .shot-guitar { --beat: 1.25s; }
  .shot-reading { --beat: 2.65s; }
  .shot-journal { --beat: 2.3s; }
  .login-sprite { background-image: var(--film,none); }

  .login-controls:not([hidden]) {
    position: absolute; right: max(16px,env(safe-area-inset-right)); bottom: max(16px,env(safe-area-inset-bottom));
    display: flex; pointer-events: none;
  }
  .login-motion-toggle {
    pointer-events: auto; color: #bdbfbd; background: none; border: 0; cursor: pointer;
    min-width: 44px; height: 44px; display: inline-grid; place-items: center; position: relative;
    margin: 0; padding: 0 4px; font: 620 12px/1.3 var(--yp-font-family,system-ui,sans-serif);
  }
  .login-motion-toggle:has(:focus-visible) { outline: 2px solid white; outline-offset: -2px; }
  .login-motion-toggle input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
  .login-motion-sign { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid #929592; }
  .login-motion-sign::after { content: ""; height: 9px; width: 7px; border-inline: 2px solid; }
  .login-motion-toggle input:checked + .login-motion-sign::after { height: 0; width: 0; border: 5px solid transparent; border-left: 7px solid; border-right: 0; margin-left: 2px; }
  .login-motion-caption { position: absolute; right: 0; bottom: 100%; padding: 5px 8px; border-radius: 4px; white-space: nowrap; font: 12px/1.5 system-ui,sans-serif; color: #fff; background: #141514; pointer-events: none; opacity: 0; }
  .login-motion-toggle:is(:hover,:focus-within) .login-motion-caption { opacity: 1; }
}
@media screen and (prefers-reduced-motion: no-preference) {
  .login-shot { transition: opacity .32s ease, visibility 0s linear .32s; }
  .login-shot.is-current { transition-delay: 0s; }
  .login-shot.is-current .login-sprite { animation: login-action var(--beat,2s) steps(1,end) infinite; }
  @keyframes login-action {
    0%,100% { background-position-x: 0%; } 20% { background-position-x: 33.333333%; }
    43% { background-position-x: 66.666667%; } 65% { background-position-x: 100%; }
    84% { background-position-x: 33.333333%; }
  }
  .shot-stride.is-current .login-sprite { animation: login-run 1.05s steps(1,end) infinite; }
  @keyframes login-run {
    0%,100% { background-position-x: 0%; } 12.5% { background-position-x: 14.285714%; }
    25% { background-position-x: 28.571429%; } 37.5% { background-position-x: 42.857143%; }
    50% { background-position-x: 57.142857%; } 62.5% { background-position-x: 71.428571%; }
    75% { background-position-x: 85.714286%; } 87.5% { background-position-x: 100%; }
  }
  .shot-stride.is-current .login-shadow { animation: login-footfall .525s ease-in-out infinite; }
  @keyframes login-footfall { 0%,100% { transform: scaleX(1); opacity: .86; } 74% { transform: scaleX(.68); opacity: .42; } }
  .shot-stride.is-current .login-track i:nth-child(2) { animation: login-lane .78s linear infinite; }
  @keyframes login-lane { to { background-position-x: -87px; } }
  .login-scene:not(.is-playing) .login-wing * { animation-play-state: paused !important; }
}
@media (prefers-reduced-motion: reduce) { .login-motion-toggle { display: none; } }
@media (forced-colors: active) {
  body:has(#app .signup-screen .login-actions) .login-scene { display: none !important; }
}
