/**
 * Craftvasi auth — centered sign-in composition
 */

:root {
  --auth-ink: #070b14;
  --auth-ink-2: #0d1524;
  --auth-teal: #0f766e;
  --auth-teal-mid: #12887f;
  --auth-teal-bright: #2dd4bf;
  --auth-gold: #d4b36a;
  --auth-gold-dim: rgba(212, 179, 106, 0.45);
  --auth-text: #e8eef7;
  --auth-muted: #8b9bb0;
  --auth-line: rgba(232, 238, 247, 0.12);
  --auth-panel: rgba(12, 18, 30, 0.78);
  --auth-field: rgba(255, 255, 255, 0.035);
  --auth-control-h: 3.15rem;
  --auth-radius: 10px;
  --auth-font: "Sora", system-ui, sans-serif;
  --auth-display: "Fraunces", Georgia, serif;
}

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

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

body.auth-wb {
  font-family: var(--auth-font);
  color: var(--auth-text);
  background: var(--auth-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.auth-wb__stage {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-wb__atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.auth-wb__wash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 0%, rgba(15, 118, 110, 0.32) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(212, 179, 106, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse 45% 35% at 15% 85%, rgba(15, 118, 110, 0.16) 0%, transparent 50%),
    linear-gradient(165deg, #070b14 0%, #0d1524 50%, #0a2424 100%);
}

.auth-wb__beam {
  position: absolute;
  width: 70%;
  height: 120%;
  top: -15%;
  left: 15%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.03) 42%,
    rgba(45, 212, 191, 0.05) 50%,
    transparent 58%
  );
  transform: rotate(-6deg);
  animation: auth-beam 14s ease-in-out infinite alternate;
}

.auth-wb__blueprint {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: rgba(148, 163, 184, 0.45);
  opacity: 0.4;
  animation: auth-blueprint 48s linear infinite;
}

/* Centered column: brand → form */
.auth-wb__compose {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 26.5rem;
  margin: 0 auto;
  padding: clamp(1.75rem, 5vh, 3rem) 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.auth-wb__brand {
  text-align: center;
  animation: auth-rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-wb__mark {
  display: inline-block;
  text-decoration: none;
}

.auth-wb__mark img {
  display: block;
  width: clamp(11rem, 42vw, 15.5rem);
  height: auto;
  margin-inline: auto;
  filter: drop-shadow(0 16px 36px rgba(0, 0, 0, 0.4));
  animation: auth-mark 1s 0.05s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-wb__eyebrow {
  margin: 1rem 0 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--auth-gold);
}

.auth-wb__tagline {
  margin: 0.55rem 0 0;
  max-width: 22rem;
  margin-inline: auto;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.55;
  color: #b6c4d6;
}

.auth-wb__gate {
  width: 100%;
  animation: auth-rise 0.85s 0.12s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-wb__gate-panel {
  position: relative;
  padding: 1.65rem 1.5rem 1.5rem;
  border-radius: 16px;
  background: var(--auth-panel);
  border: 1px solid var(--auth-line);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 24px 60px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
}

.auth-wb__gate-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.35rem;
  right: 1.35rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--auth-gold), transparent);
  opacity: 0.65;
}

.auth-wb__gate-head {
  margin-bottom: 1.35rem;
  text-align: center;
}

.auth-wb__kicker {
  margin: 0 0 0.45rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--auth-teal-bright);
}

.auth-wb__gate-head h1 {
  margin: 0;
  font-family: var(--auth-display);
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #fff;
}

.auth-wb__lede {
  margin: 0.45rem 0 0;
  font-size: 0.88rem;
  color: var(--auth-muted);
  line-height: 1.45;
}

.auth-wb__status {
  margin-bottom: 1rem;
  padding: 0.7rem 0.85rem;
  border-radius: 8px;
  font-size: 0.84rem;
  background: rgba(15, 118, 110, 0.2);
  border: 1px solid rgba(45, 212, 191, 0.28);
  color: #99f6e4;
}

.auth-wb__form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.auth-wb__field {
  position: relative;
}

.auth-wb__input {
  display: block;
  width: 100%;
  height: var(--auth-control-h);
  padding: 1.15rem 0.95rem 0.45rem;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  color: #fff;
  background: var(--auth-field);
  border: 1px solid var(--auth-line);
  border-radius: var(--auth-radius);
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.auth-wb__field--password .auth-wb__input {
  padding-right: 4.25rem;
}

.auth-wb__float {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--auth-muted);
  pointer-events: none;
  transition:
    top 0.16s ease,
    transform 0.16s ease,
    font-size 0.16s ease,
    color 0.16s ease;
}

.auth-wb__input:focus,
.auth-wb__input:not(:placeholder-shown) {
  outline: none;
  border-color: rgba(45, 212, 191, 0.45);
  background: rgba(15, 118, 110, 0.12);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18);
}

.auth-wb__input:focus + .auth-wb__float,
.auth-wb__input:not(:placeholder-shown) + .auth-wb__float,
.auth-wb__field.is-filled .auth-wb__float {
  top: 0.55rem;
  transform: none;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--auth-teal-bright);
}

.auth-wb__input:-webkit-autofill,
.auth-wb__input:-webkit-autofill:hover,
.auth-wb__input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px #12352f inset;
  transition: background-color 9999s ease-in-out 0s;
}

.auth-wb__reveal {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  transform: translateY(-50%);
  height: 1.85rem;
  padding: 0 0.65rem;
  border: 1px solid var(--auth-line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--auth-muted);
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.auth-wb__reveal:hover {
  color: #fff;
  border-color: rgba(232, 238, 247, 0.28);
  background: rgba(255, 255, 255, 0.07);
}

.auth-wb__reveal-hide {
  display: none;
}

.auth-wb__reveal.is-on .auth-wb__reveal-show {
  display: none;
}

.auth-wb__reveal.is-on .auth-wb__reveal-hide {
  display: inline;
}

.auth-wb__error {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  color: #fda4af;
}

.auth-wb__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-top: 0.15rem;
}

.auth-wb__check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: #a8b6c8;
  cursor: pointer;
  user-select: none;
}

.auth-wb__check input {
  width: 0.95rem;
  height: 0.95rem;
  accent-color: var(--auth-teal);
}

.auth-wb__link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--auth-teal-bright);
  text-decoration: none;
}

.auth-wb__link:hover {
  color: #5eead4;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-wb__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  height: 2.85rem;
  margin-top: 0.35rem;
  padding: 0 1.1rem;
  border: 1px solid #0e6b64;
  border-radius: var(--auth-radius);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: #fff;
  background: linear-gradient(180deg, #14968c 0%, var(--auth-teal) 100%);
  cursor: pointer;
  transition:
    transform 0.12s ease,
    filter 0.15s ease,
    gap 0.2s ease;
}

.auth-wb__submit svg {
  transition: transform 0.2s ease;
}

.auth-wb__submit:hover {
  filter: brightness(1.06);
  gap: 0.75rem;
}

.auth-wb__submit:hover svg {
  transform: translateX(3px);
}

.auth-wb__submit:active {
  transform: translateY(1px);
}

.auth-wb__submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.28);
}

.auth-wb__hint {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--auth-muted);
}

.auth-wb__hint a,
.auth-wb__hint .auth-wb__link {
  color: var(--auth-teal-bright);
}

.auth-wb__legal {
  margin: 0.95rem 0 0;
  text-align: center;
  font-size: 0.72rem;
  color: rgba(148, 163, 184, 0.75);
}

@keyframes auth-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes auth-mark {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes auth-beam {
  from {
    opacity: 0.55;
    transform: rotate(-6deg) translateX(-1%);
  }
  to {
    opacity: 1;
    transform: rotate(-6deg) translateX(1.5%);
  }
}

@keyframes auth-blueprint {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-1%, -0.8%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-wb__beam,
  .auth-wb__blueprint,
  .auth-wb__mark img,
  .auth-wb__brand,
  .auth-wb__gate {
    animation: none !important;
  }
}

@media (max-width: 480px) {
  .auth-wb__compose {
    padding-inline: 1rem;
  }

  .auth-wb__gate-panel {
    padding: 1.35rem 1.15rem 1.25rem;
  }
}
