/* SUNSET Twelve — Sign-in (exclusive member gate) */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Outfit:wght@300;400;500;600&display=swap');

:root {
  --login-amber: #e8a838;
  --login-amber-soft: rgba(232, 168, 56, 0.55);
  --login-burnt: #c45c26;
  --login-ink: #0d0a08;
  --login-cream: #f5f0e8;
  --login-muted: rgba(245, 240, 232, 0.72);
  --login-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --login-sans: 'Outfit', system-ui, sans-serif;
}

body.login-page {
  font-family: var(--login-sans);
  overflow-x: hidden;
}

/* Ambient skyline — oversized canvas for soft drift / pointer parallax */
body.login-page .bg-parallax {
  --bg-x: 0px;
  --bg-y: 0px;
  --bg-scale: 1.06;
  --bg-warm: 0.5;
  --bg-focus-x: 50%;
  --bg-focus-y: 42%;
}

body.login-page .bg-parallax img {
  left: 50%;
  top: 50%;
  width: 118%;
  height: 118%;
  max-width: none;
  transform: translate3d(calc(-50% + var(--bg-x)), calc(-50% + var(--bg-y)), 0) scale(var(--bg-scale));
  transform-origin: center center;
  object-position: center 38%;
  will-change: transform;
  backface-visibility: hidden;
}

/* Keep the skyline readable; soft vignette + living warm focus */
body.login-page .bg-parallax::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 72% 58% at var(--bg-focus-x) var(--bg-focus-y),
      rgba(232, 168, 56, calc(0.045 + var(--bg-warm) * 0.055)) 0%,
      transparent 58%
    ),
    radial-gradient(ellipse 70% 55% at 50% 48%, rgba(13, 10, 8, 0.18) 0%, transparent 62%),
    linear-gradient(180deg, rgba(13, 10, 8, 0.22) 0%, rgba(13, 10, 8, 0.08) 35%, rgba(13, 10, 8, 0.45) 100%);
  pointer-events: none;
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  body.login-page .bg-parallax img {
    left: 0;
    top: 0;
    width: 100%;
    height: 140%;
    transform: none;
    will-change: auto;
  }

  body.login-page .bg-parallax::after {
    background:
      radial-gradient(ellipse 70% 55% at 50% 48%, rgba(13, 10, 8, 0.18) 0%, transparent 62%),
      linear-gradient(180deg, rgba(13, 10, 8, 0.22) 0%, rgba(13, 10, 8, 0.08) 35%, rgba(13, 10, 8, 0.45) 100%);
  }
}

.login-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.25rem 2rem;
  position: relative;
  z-index: 1;
}

.login-stage {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: login-rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes login-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Brand is the hero — not a card title */
.login-brand {
  text-align: center;
  margin-bottom: 1.75rem;
  animation: login-brand-in 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

@keyframes login-brand-in {
  from {
    opacity: 0;
    letter-spacing: 0.28em;
    filter: blur(4px);
  }
  to {
    opacity: 1;
    letter-spacing: 0.12em;
    filter: blur(0);
  }
}

.login-brand-mark {
  display: block;
  font-family: var(--login-serif);
  font-weight: 600;
  font-size: clamp(2.15rem, 6.5vw, 2.85rem);
  line-height: 1.05;
  color: #fff;
  letter-spacing: 0.12em;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.55),
    0 4px 24px rgba(0, 0, 0, 0.65);
}

.login-brand-mark em {
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #fff;
}

.login-brand-rule {
  display: block;
  width: 56px;
  height: 1px;
  margin: 0.95rem auto 0.85rem;
  background: linear-gradient(90deg, transparent, var(--login-amber), transparent);
  opacity: 0.85;
}

.login-brand-tag {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--login-muted);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

/* Interaction surface — allowed card */
.login-panel {
  width: 100%;
  padding: 1.75rem 1.5rem 1.35rem;
  border-radius: 16px;
  background: linear-gradient(
    165deg,
    rgba(20, 14, 10, 0.62) 0%,
    rgba(13, 10, 8, 0.78) 100%
  );
  border: 1px solid rgba(245, 240, 232, 0.14);
  box-shadow:
    0 0 0 1px rgba(232, 168, 56, 0.06) inset,
    0 28px 64px rgba(0, 0, 0, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.04) inset;
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  animation: login-panel-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

@keyframes login-panel-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-panel-lead {
  margin: 0 0 1.35rem;
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.45;
  color: var(--login-muted);
  text-align: center;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-field {
  position: relative;
}

.login-field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.88);
}

.login-field input {
  width: 100%;
  height: 48px;
  padding: 0 1rem;
  border: 1px solid rgba(245, 240, 232, 0.18);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.42);
  color: var(--login-cream);
  font-family: var(--login-sans);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.login-field input::placeholder {
  color: rgba(245, 240, 232, 0.38);
}

.login-field input:hover {
  border-color: rgba(245, 240, 232, 0.28);
  background: rgba(0, 0, 0, 0.5);
}

.login-field input:focus {
  border-color: var(--login-amber-soft);
  background: rgba(0, 0, 0, 0.55);
  box-shadow: 0 0 0 3px rgba(232, 168, 56, 0.16);
}

.login-field input:-webkit-autofill,
.login-field input:-webkit-autofill:hover,
.login-field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--login-cream);
  caret-color: var(--login-cream);
  box-shadow: 0 0 0 1000px rgba(18, 12, 8, 0.95) inset;
  transition: background-color 9999s ease-out;
}

.login-field--password input {
  padding-right: 3rem;
}

.login-toggle-pw {
  position: absolute;
  right: 0.35rem;
  bottom: 0.35rem;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(245, 240, 232, 0.55);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.login-toggle-pw:hover,
.login-toggle-pw:focus-visible {
  color: var(--login-amber);
  background: rgba(245, 240, 232, 0.06);
  outline: none;
}

.login-toggle-pw svg {
  width: 18px;
  height: 18px;
  display: block;
}

.login-toggle-pw[aria-pressed='true'] .icon-eye-off,
.login-toggle-pw[aria-pressed='false'] .icon-eye {
  display: none;
}

.login-error {
  min-height: 1.25em;
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.35;
  color: #f07878;
  text-align: center;
}

.login-error:empty {
  display: none;
}

.login-submit {
  width: 100%;
  height: 50px;
  margin-top: 0.15rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #d46a2e 0%, var(--login-burnt) 48%, #a8481c 100%);
  color: var(--login-cream);
  font-family: var(--login-sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(196, 92, 38, 0.35);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.login-submit:hover:not(:disabled) {
  filter: brightness(1.08);
  box-shadow: 0 14px 32px rgba(232, 168, 56, 0.32);
  transform: translateY(-1px);
}

.login-submit:active:not(:disabled) {
  transform: translateY(0);
  filter: brightness(0.96);
}

.login-submit:focus-visible {
  outline: 2px solid var(--login-amber);
  outline-offset: 3px;
}

.login-submit:disabled {
  opacity: 0.72;
  cursor: wait;
  transform: none;
}

.login-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(245, 240, 232, 0.08);
}

.login-admin {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.48);
  text-decoration: none;
  transition: color 0.15s ease;
}

.login-admin:hover,
.login-admin:focus-visible {
  color: var(--login-amber);
  outline: none;
}

.login-geo {
  margin-top: 1.1rem;
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: rgba(245, 240, 232, 0.55);
  text-align: center;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
  min-height: 1em;
}

@media (max-width: 480px) {
  .login-wrap {
    padding: 1.25rem 1rem 1.75rem;
    justify-content: flex-end;
    padding-bottom: max(1.75rem, env(safe-area-inset-bottom));
  }

  .login-brand {
    margin-bottom: 1.35rem;
  }

  .login-panel {
    padding: 1.45rem 1.2rem 1.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-stage,
  .login-brand,
  .login-panel {
    animation: none;
  }

  .login-submit,
  .login-field input,
  .login-toggle-pw,
  .login-admin {
    transition: none;
  }
}
