/* ==========================================================================
   Auth modal — frosted glass, aligned with hero / studio / footer styling.
   ========================================================================== */

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 28px);
  background: rgba(17, 18, 26, 0.38);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}
.auth-modal.hidden { display: none; }

.auth-card {
  position: relative;
  width: min(440px, 100%);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: clamp(22px, 4vw, 28px) clamp(20px, 4vw, 26px) clamp(20px, 3vw, 24px);
  text-align: left;
  border-radius: 22px;
  background: rgba(255, 251, 240, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow:
    0 28px 72px rgba(17, 18, 26, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(26px) saturate(165%);
  backdrop-filter: blur(26px) saturate(165%);
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0) 48%);
}

.auth-card > * { position: relative; z-index: 1; }

.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(17, 18, 26, 0.1);
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.14s ease, background 0.14s ease, transform 0.12s ease;
}
.auth-close:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  transform: scale(1.04);
}

.auth-head { margin-bottom: 18px; padding-right: 36px; }

.auth-kicker {
  margin: 0 0 6px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.auth-kicker .dot-pk { color: var(--pk); }

.auth-title {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 400;
  font-size: clamp(22px, 4.5vw, 26px);
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--ink);
}

.auth-sub {
  margin: 8px 0 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--soft);
  line-height: 1.55;
}

/* segmented Create / Sign in */
.auth-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
  background: rgba(17, 18, 26, 0.06);
  border: 1px solid rgba(17, 18, 26, 0.08);
  border-radius: 999px;
}

.auth-tab {
  flex: 1;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--soft);
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 9px 12px;
  cursor: pointer;
  transition: color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}
.auth-tab:hover { color: var(--ink); }
.auth-tab.active {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 10px rgba(17, 18, 26, 0.08);
}

/* plan picker */
.auth-plans {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.auth-plan {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 13px;
  text-align: left;
  background: rgba(255, 255, 255, 0.55);
  border: 1.5px solid rgba(17, 18, 26, 0.1);
  border-radius: 16px;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease, transform 0.12s ease;
}
.auth-plan:hover {
  background: rgba(255, 255, 255, 0.78);
  transform: translateY(-1px);
}
.auth-plan.active {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(61, 255, 176, 0.65);
  box-shadow: 0 0 0 3px rgba(61, 255, 176, 0.18);
}
.auth-plan.pro.active {
  border-color: rgba(43, 107, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(43, 107, 255, 0.14);
}

.ap-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.ap-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}
.auth-plan.pro .ap-name {
  display: inline-block;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  background: var(--mt);
  border-radius: 8px;
  padding: 2px 8px;
  line-height: 1.25;
}

.ap-price {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
}
.ap-price small { font-size: 10px; font-weight: 700; color: var(--soft); }

.ap-desc {
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--soft);
}

#auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#auth-form input {
  width: 100%;
  box-sizing: border-box;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(17, 18, 26, 0.12);
  border-radius: 14px;
  padding: 13px 16px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  transition: border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}
#auth-form input::placeholder { color: rgba(17, 18, 26, 0.38); font-weight: 600; }
#auth-form input:focus {
  border-color: rgba(61, 255, 176, 0.75);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 0 0 3px rgba(61, 255, 176, 0.2);
}

.auth-submit {
  margin-top: 4px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  background: var(--mt);
  border: none;
  border-radius: 999px;
  padding: 14px 18px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(61, 255, 176, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.auth-submit:hover:not(:disabled) {
  background: #62ffc0;
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(61, 255, 176, 0.42);
}
.auth-submit:active:not(:disabled) { transform: translateY(0); }
.auth-submit:disabled { opacity: 0.65; cursor: wait; }

.auth-error {
  min-height: 18px;
  margin-top: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 11.5px;
  font-weight: 700;
  color: #c62828;
  text-align: center;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 12px;
  color: var(--soft);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(17, 18, 26, 0.1);
}

#google-btn-slot { display: flex; justify-content: stretch; }

.auth-google-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  width: 100%;
  padding: 13px 18px;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 15px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(17, 18, 26, 0.12);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition: transform 0.12s ease, background 0.14s ease, border-color 0.14s ease;
}
.auth-google-fallback:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(17, 18, 26, 0.18);
  transform: translateY(-1px);
}
.auth-google-fallback:active { transform: translateY(0); }
.auth-google-fallback svg { width: 20px; height: 20px; flex: none; }

.auth-note {
  margin-top: 10px;
  font-family: 'Space Mono', monospace;
  font-size: 10.5px;
  color: var(--soft);
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 480px) {
  .auth-plans { flex-direction: column; }
  .auth-card { border-radius: 18px; }
}
