/* ==========================================================================
   Sign-in / sign-up: one card, a form and a slanted "blade".
   Going from Sign in to Create account, the blade sweeps across the card
   (View Transitions between the two pages; other browsers just change page).
   ========================================================================== */

.auth-shell {
  position: relative; display: grid; grid-template-columns: 1fr 1fr;
  width: min(960px, calc(100vw - 32px)); min-height: 560px; margin: 32px auto;
  background: #fff; border-radius: 28px; overflow: hidden;
  box-shadow: 0 40px 100px rgba(6, 46, 44, .5), 0 2px 0 rgba(255, 255, 255, .6) inset;
  view-transition-name: ac-auth-shell;
}
.auth-form {
  position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center;
  padding: 48px clamp(28px, 5vw, 56px); color: var(--text, #1f1235);
}
.auth-shell.blade-left .auth-form { grid-column: 2; grid-row: 1; }
.auth-shell.blade-left .auth-blade { grid-column: 1; grid-row: 1; }

.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; font-weight: 800; letter-spacing: -.02em; }
.auth-brand i {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff !important;
  background: linear-gradient(135deg, #2fb5ad, #0f8a9a 60%, #34c3a8); -webkit-background-clip: border-box; background-clip: border-box;
}
.auth-form h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.03em; margin: 0 0 6px; }
.auth-form .auth-lead { color: var(--muted, #6b7280); margin-bottom: 24px; }

/* The blade: brand gradient, one slanted edge facing the form. */
.auth-blade {
  position: relative; display: flex; flex-direction: column; justify-content: center;
  padding: 48px clamp(28px, 5vw, 56px) 48px clamp(56px, 8vw, 96px); color: #fff;
  background:
    radial-gradient(120% 80% at 80% 10%, rgba(255, 255, 255, .18), transparent 60%),
    linear-gradient(155deg, #13908a 0%, #13908a 40%, #0e7482 80%, #34c3a8 115%);
  clip-path: polygon(16% 0, 100% 0, 100% 100%, 0 100%);
  view-transition-name: ac-auth-blade;
}
.auth-shell.blade-left .auth-blade {
  padding: 48px clamp(56px, 8vw, 96px) 48px clamp(28px, 5vw, 56px);
  clip-path: polygon(0 0, 100% 0, 84% 100%, 0 100%);
}
.auth-blade::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: radial-gradient(rgba(255, 255, 255, .35) 1px, transparent 1px); background-size: 20px 20px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 70%); mask-image: linear-gradient(180deg, transparent, #000 70%);
}
.auth-blade > * { position: relative; z-index: 1; }
.auth-blade .blade-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .8; margin-bottom: 14px; }
.auth-blade .blade-title { font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.05; font-weight: 800; letter-spacing: -.035em; margin: 0 0 14px; color: #fff !important; }
.auth-blade .blade-title em { font-style: italic; font-weight: 700; opacity: .92; }
.auth-blade p, .auth-blade li, .auth-blade small { color: rgba(255, 255, 255, .88) !important; }
.auth-blade ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.auth-blade li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.auth-blade li i { margin-top: 3px; color: #fde68a; }
.auth-blade .blade-badge { display: inline-block; align-self: flex-start; padding: 5px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .35); margin-bottom: 18px; }
.auth-blade .blade-wave { display: flex; gap: 4px; align-items: center; height: 28px; margin-top: 28px; }
.auth-blade .blade-wave span { width: 4px; border-radius: 4px; background: rgba(255, 255, 255, .85); height: 40%; }
.auth-blade .blade-wave span:nth-child(2n) { height: 80%; }
.auth-blade .blade-wave span:nth-child(3n) { height: 60%; }

.auth-switch { margin-top: 22px; font-size: 14px; color: var(--muted, #6b7280); }
.auth-langs { display: flex; gap: 6px; margin-top: 18px; }

/* Phones and small tablets: the blade becomes a band on top, no slant. */
@media (max-width: 767.98px) {
  .auth-shell, .auth-shell.blade-left { grid-template-columns: 1fr; min-height: 0; margin: 16px auto; border-radius: 22px; }
  .auth-shell .auth-blade, .auth-shell.blade-left .auth-blade {
    grid-column: 1; grid-row: 1; clip-path: none; padding: 28px 24px;
  }
  .auth-shell .auth-form, .auth-shell.blade-left .auth-form { grid-column: 1; grid-row: 2; padding: 28px 24px 32px; }
  .auth-blade .blade-title { font-size: 1.7rem; }
  .auth-blade ul, .auth-blade .blade-wave { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  /* The card (with its form) cross-fades while the blade sweeps over it. */
  ::view-transition-group(ac-auth-shell) { animation-duration: .62s; animation-timing-function: cubic-bezier(.77, 0, .18, 1); }
  ::view-transition-old(ac-auth-shell) { animation: none; mix-blend-mode: normal; }
  ::view-transition-new(ac-auth-shell) { animation: ac-auth-in .3s ease-out .3s both; mix-blend-mode: normal; }
  ::view-transition-group(ac-auth-blade) { animation-duration: .62s; animation-timing-function: cubic-bezier(.77, 0, .18, 1); }
  ::view-transition-old(ac-auth-blade), ::view-transition-new(ac-auth-blade) { height: 100%; }
  /* The blade's words change halfway, without mixing. */
  ::view-transition-old(ac-auth-blade) { animation: none; mix-blend-mode: normal; }
  ::view-transition-new(ac-auth-blade) { animation: ac-auth-in .16s linear .26s both; mix-blend-mode: normal; }
  @keyframes ac-auth-in { from { opacity: 0; } }
  .auth-blade .blade-wave span { animation: ac-auth-wave 1.2s ease-in-out infinite; transform-origin: center; }
  .auth-blade .blade-wave span:nth-child(2) { animation-delay: .1s; } .auth-blade .blade-wave span:nth-child(3) { animation-delay: .2s; }
  .auth-blade .blade-wave span:nth-child(4) { animation-delay: .3s; } .auth-blade .blade-wave span:nth-child(5) { animation-delay: .4s; }
  .auth-blade .blade-wave span:nth-child(6) { animation-delay: .5s; } .auth-blade .blade-wave span:nth-child(7) { animation-delay: .6s; }
  @keyframes ac-auth-wave { 0%, 100% { transform: scaleY(.55); } 50% { transform: scaleY(1); } }
}
