@font-face {
  font-family: "Satoshi";
  src: url("fonts/satoshi-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Satoshi";
  src: url("fonts/satoshi-500.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Satoshi";
  src: url("fonts/satoshi-700.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Satoshi";
  src: url("fonts/satoshi-900.woff2") format("woff2");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #14171c;
  --paper: #f6f3ec;
  --error: #a8483d;
  --focus: rgba(130, 174, 207, 0.88);
  --muted: rgba(20, 23, 28, 0.54);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 280px;
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Satoshi", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

.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;
}

.auth-shell {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: max(18px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  overflow-x: hidden;
  overflow-y: auto;
  isolation: isolate;
}

.orb {
  position: fixed;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
}

.orb-main {
  left: 50%;
  top: 44%;
  width: min(760px, 120vw);
  height: min(760px, 120vw);
  margin-left: min(-380px, -60vw);
  margin-top: min(-380px, -60vw);
  opacity: 0.72;
  filter: blur(76px);
  background: conic-gradient(from 210deg, #d2e5d6, #a8d2d4 16%, #82aecf 34%, #747fc0 50%, #ac9bc9 66%, #e3b5c5 82%, #f0b6aa 92%, #d2e5d6 100%);
  animation: drift-a 22s ease-in-out infinite;
}

.orb-warm {
  right: 6%;
  top: 8%;
  width: min(360px, 58vw);
  height: min(360px, 58vw);
  opacity: 0.5;
  filter: blur(64px);
  background: radial-gradient(closest-side, #f0b6aa, rgba(240, 182, 170, 0));
  animation: drift-b 18s ease-in-out infinite;
}

.orb-cool {
  left: 4%;
  bottom: 6%;
  width: min(320px, 52vw);
  height: min(320px, 52vw);
  opacity: 0.45;
  filter: blur(60px);
  background: radial-gradient(closest-side, #82aecf, rgba(130, 174, 207, 0));
  animation: drift-c 26s ease-in-out infinite;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 432px;
  padding: clamp(20px, 5vw, 28px) clamp(18px, 4.6vw, 28px) clamp(18px, 4.4vw, 24px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 30px;
  background: linear-gradient(154deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.44) 58%, rgba(255, 255, 255, 0.6));
  box-shadow: 0 34px 74px rgba(38, 60, 96, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(30px) saturate(1.25);
  backdrop-filter: blur(30px) saturate(1.25);
  animation: rise-in 0.6s cubic-bezier(0.22, 0.7, 0.28, 1) both;
}

.auth-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -40px;
  height: 120px;
  pointer-events: none;
  opacity: 0.5;
  background: radial-gradient(58% 100% at 50% 100%, rgba(130, 174, 207, 0.55), rgba(172, 155, 201, 0.32) 46%, rgba(240, 182, 170, 0.14) 72%, rgba(240, 182, 170, 0) 100%);
  filter: blur(18px);
}

.card-top,
.heading-row,
.action-row {
  position: relative;
  display: flex;
  justify-content: space-between;
}

.card-top {
  align-items: center;
  gap: 14px;
}

.brand-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: 12px;
}

.brand-mark {
  display: block;
  width: 21px;
  height: 21px;
}

.brand-name {
  color: rgba(20, 23, 28, 0.62);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.19em;
  line-height: 1;
}

.text-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(20, 23, 28, 0.58);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.text-button:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.36);
}

.heading-row {
  align-items: flex-end;
  gap: 14px;
  margin-top: clamp(20px, 5vw, 30px);
}

.auth-title {
  margin: 0;
  font-size: clamp(30px, 8vw, 40px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
  text-wrap: balance;
}

.swap-in {
  animation: swap-in 0.38s cubic-bezier(0.22, 0.7, 0.28, 1) both;
}

.google-button {
  flex: 0 0 auto;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(38, 60, 96, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.google-button:hover:not(:disabled) {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 22px rgba(38, 60, 96, 0.16);
}

.google-icon {
  display: block;
  width: 17px;
  height: 17px;
}

.fields {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: clamp(18px, 4.6vw, 24px);
}

.field {
  position: relative;
}

.field-control {
  position: relative;
}

.field-icon {
  position: absolute;
  z-index: 1;
  left: 7px;
  top: 7px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  color: rgba(20, 23, 28, 0.5);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(24, 38, 58, 0.07);
  pointer-events: none;
}

.field-icon svg {
  display: block;
  width: 15px;
  height: 15px;
}

.field-input {
  width: 100%;
  height: 54px;
  padding: 0 20px 0 56px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  outline: none;
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
  font-size: 15px;
  font-weight: 400;
  box-shadow: inset 0 1px 2px rgba(38, 60, 96, 0.06);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-input.has-control {
  padding-right: 56px;
}

.field-input::placeholder {
  color: rgba(20, 23, 28, 0.4);
}

.field-input:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 60px #f4f1ea inset;
}

.field-input:focus {
  border-color: rgba(130, 174, 207, 0.8);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 0 0 3px rgba(130, 174, 207, 0.22);
}

.field-input[aria-invalid="true"] {
  border-color: rgba(168, 72, 61, 0.7);
  box-shadow: 0 0 0 3px rgba(168, 72, 61, 0.12);
}

.reveal-button {
  position: absolute;
  z-index: 2;
  right: 7px;
  top: 7px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  color: rgba(20, 23, 28, 0.6);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(38, 60, 96, 0.08);
  transition: color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.reveal-button:hover {
  color: var(--ink);
  background: #fff;
  transform: translateY(-1px);
}

.reveal-button svg {
  width: 17px;
  height: 17px;
}

.field-support {
  min-height: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 1px 6px 0;
  color: rgba(20, 23, 28, 0.48);
  font-size: 12.5px;
  line-height: 1.45;
}

.forgot-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  margin: -6px -6px -6px auto;
  padding: 0 6px;
  border-radius: 8px;
  color: rgba(20, 23, 28, 0.64);
  font-weight: 500;
  white-space: nowrap;
}

.forgot-link:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.action-row {
  align-items: flex-end;
  gap: 16px;
  margin-top: clamp(14px, 3.8vw, 20px);
}

.status-wrap {
  flex: 1 1 auto;
  min-width: 0;
}

.status-message {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
  text-wrap: pretty;
}

.status-message[data-tone="error"] {
  color: var(--error);
}

.status-message[data-tone="success"] {
  color: rgba(20, 23, 28, 0.74);
}

.legal-link {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-link:hover {
  color: var(--ink);
}

.retry-button {
  min-height: 36px;
  margin: 6px 0 -5px -9px;
  padding: 0 9px;
  border: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.56);
  color: rgba(20, 23, 28, 0.72);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}

.submit-button {
  position: relative;
  flex: 0 0 auto;
  width: 62px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(20, 23, 28, 0.24);
  transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.22s ease, background 0.3s ease, color 0.3s ease, opacity 0.2s ease;
}

.submit-button:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.03);
  background: linear-gradient(112deg, #d2e5d6, #a8d2d4 28%, #82aecf 54%, #ac9bc9 78%, #f0b6aa 100%);
  color: var(--ink);
  box-shadow: 0 18px 34px rgba(70, 104, 150, 0.3);
}

.submit-button:active:not(:disabled) {
  transform: translateY(0) scale(0.97);
}

.submit-button:disabled,
.google-button:disabled,
.text-button:disabled,
.field-input:disabled {
  cursor: wait;
  opacity: 0.58;
}

.submit-icon,
.submit-spinner {
  width: 21px;
  height: 21px;
}

.submit-icon {
  display: block;
}

.submit-icon[hidden],
.submit-spinner[hidden] {
  display: none !important;
}

.submit-spinner,
.callback-spinner {
  border: 2px solid rgba(246, 243, 236, 0.3);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.callback-spinner {
  width: 32px;
  height: 32px;
  margin-top: 24px;
  border-color: rgba(20, 23, 28, 0.14);
  border-top-color: rgba(20, 23, 28, 0.7);
}

.auth-footer-links {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.back-link,
.waitlist-link {
  position: relative;
  z-index: 1;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 12px;
  color: rgba(20, 23, 28, 0.54);
  font-size: 13px;
  transition: color 0.2s ease, background 0.2s ease;
}

.back-link:hover,
.waitlist-link:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.34);
}

body[data-auth-page="login"] .text-button,
body[data-auth-page="signup"] .text-button,
body[data-auth-page="login"] .waitlist-link,
body[data-auth-page="signup"] .waitlist-link,
body[data-auth-page="login"] .back-link,
body[data-auth-page="signup"] .back-link {
  border-radius: 0;
  transition: color 0.2s ease;
}

body[data-auth-page="login"] .text-button:hover,
body[data-auth-page="signup"] .text-button:hover,
body[data-auth-page="login"] .waitlist-link:hover,
body[data-auth-page="signup"] .waitlist-link:hover,
body[data-auth-page="login"] .back-link:hover,
body[data-auth-page="signup"] .back-link:hover {
  background: transparent;
}

.callback-card {
  min-height: 310px;
  display: flex;
  flex-direction: column;
}

.callback-body {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 28px 0 12px;
}

.callback-body .status-message {
  max-width: 34ch;
  margin-top: 18px;
  font-size: 14px;
}

.callback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.inline-action {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: rgba(20, 23, 28, 0.76);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.field-input:focus-visible {
  outline: none;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes swap-in {
  from {
    opacity: 0;
    transform: translateY(9px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes drift-a {
  0% {
    transform: translate3d(-34px, 14px, 0) rotate(0deg) scale(1);
  }
  33% {
    transform: translate3d(54px, -42px, 0) rotate(120deg) scale(1.12);
  }
  66% {
    transform: translate3d(28px, 38px, 0) rotate(240deg) scale(1.04);
  }
  100% {
    transform: translate3d(-34px, 14px, 0) rotate(360deg) scale(1);
  }
}

@keyframes drift-b {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.42;
  }
  50% {
    transform: translate3d(-64px, 52px, 0) scale(1.16);
    opacity: 0.58;
  }
}

@keyframes drift-c {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.38;
  }
  50% {
    transform: translate3d(58px, -46px, 0) scale(1.14);
    opacity: 0.54;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 370px) {
  .auth-shell {
    justify-content: flex-start;
    gap: 12px;
  }

  .heading-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .google-button {
    align-self: flex-start;
  }

  .field-support {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .forgot-link {
    margin-left: -6px;
  }
}

@media (max-height: 680px), (orientation: landscape) and (max-height: 600px) {
  .auth-shell {
    justify-content: flex-start;
  }

  .auth-card {
    margin-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
