:root {
  --bg-sage: #dde2cd;
  --bg-ivory: #fbf0e0;
  --brown: #5c4d39;
  --brown-hover: #4a3e2e;
  --tan: #b69a73;
  --text: #1a1a1a;
  --text-muted: #4a4a4a;
  --border: #d4c8b5;
  --white: #ffffff;
  --shadow: 0 18px 48px rgba(92, 77, 57, 0.12);
  --radius: 6px;
  --font-serif: "Cormorant Garamond", "Palatino Linotype", Palatino, Georgia, serif;
  --font-sans: "Source Sans 3", "Segoe UI", sans-serif;
}

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

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

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg-sage);
  -webkit-font-smoothing: antialiased;
}

.login-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  overflow: hidden;
}

.login-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 15% 20%, rgba(251, 240, 224, 0.85) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 85%, rgba(182, 154, 115, 0.22) 0%, transparent 50%),
    linear-gradient(165deg, var(--bg-sage) 0%, #e8e4d4 45%, var(--bg-ivory) 100%);
  background-size: 100% 100%, 100% 100%, 200% 200%;
  animation: ambient-shift 22s ease-in-out infinite alternate;
}

.login-atmosphere::before {
  content: "";
  position: absolute;
  inset: -20%;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%235c4d39' fill-opacity='0.045'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  animation: pattern-drift 48s linear infinite;
}

.login-atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 30%, rgba(182, 154, 115, 0.12) 0%, transparent 42%),
    radial-gradient(circle at 25% 75%, rgba(92, 77, 57, 0.08) 0%, transparent 40%);
  animation: glow-breathe 14s ease-in-out infinite alternate;
}

/* Soft floating orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  will-change: transform;
}

.orb-a {
  width: clamp(180px, 28vw, 320px);
  height: clamp(180px, 28vw, 320px);
  top: -8%;
  left: -6%;
  background: radial-gradient(circle at 35% 35%, rgba(251, 240, 224, 0.95), rgba(221, 226, 205, 0.35) 55%, transparent 70%);
  animation: float-a 18s ease-in-out infinite;
}

.orb-b {
  width: clamp(140px, 22vw, 260px);
  height: clamp(140px, 22vw, 260px);
  right: -4%;
  bottom: 8%;
  background: radial-gradient(circle at 40% 40%, rgba(182, 154, 115, 0.45), rgba(182, 154, 115, 0.08) 60%, transparent 72%);
  animation: float-b 22s ease-in-out infinite;
}

.orb-c {
  width: clamp(100px, 16vw, 200px);
  height: clamp(100px, 16vw, 200px);
  left: 18%;
  bottom: -6%;
  background: radial-gradient(circle at 50% 50%, rgba(92, 77, 57, 0.18), transparent 68%);
  animation: float-c 16s ease-in-out infinite;
}

/* Rising bars — growth motif from the brand mark */
.rise {
  position: absolute;
  bottom: -8%;
  width: 7px;
  border-radius: 4px 4px 0 0;
  transform-origin: bottom center;
  opacity: 0.28;
  will-change: transform, opacity;
}

.rise-1 {
  left: 8%;
  height: 18vh;
  background: linear-gradient(to top, transparent, var(--brown));
  animation: rise-bar 9s ease-in-out infinite;
}

.rise-2 {
  left: 14%;
  height: 26vh;
  width: 8px;
  background: linear-gradient(to top, transparent, #6b8f71);
  animation: rise-bar 11s ease-in-out 1.2s infinite;
}

.rise-3 {
  right: 12%;
  height: 22vh;
  background: linear-gradient(to top, transparent, var(--tan));
  animation: rise-bar 10s ease-in-out 0.6s infinite;
}

.rise-4 {
  right: 18%;
  height: 30vh;
  width: 6px;
  background: linear-gradient(to top, transparent, var(--brown));
  animation: rise-bar 13s ease-in-out 2s infinite;
}

.rise-5 {
  left: 48%;
  height: 14vh;
  width: 5px;
  opacity: 0.18;
  background: linear-gradient(to top, transparent, #6b8f71);
  animation: rise-bar 8s ease-in-out 0.3s infinite;
}

/* Soft expanding rings */
.ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(92, 77, 57, 0.14);
  will-change: transform, opacity;
}

.ring-a {
  width: 120px;
  height: 120px;
  top: 18%;
  right: 10%;
  animation: ring-pulse 12s ease-out infinite;
}

.ring-b {
  width: 90px;
  height: 90px;
  bottom: 22%;
  left: 10%;
  border-color: rgba(182, 154, 115, 0.28);
  animation: ring-pulse 15s ease-out 4s infinite;
}

@keyframes ambient-shift {
  0% {
    background-position: 0% 0%, 0% 0%, 0% 40%;
  }
  100% {
    background-position: 0% 0%, 0% 0%, 100% 60%;
  }
}

@keyframes pattern-drift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-60px, -60px, 0);
  }
}

@keyframes glow-breathe {
  from {
    opacity: 0.55;
    transform: scale(1);
  }
  to {
    opacity: 1;
    transform: scale(1.06);
  }
}

@keyframes float-a {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(36px, 28px, 0) scale(1.08);
  }
}

@keyframes float-b {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-42px, -24px, 0) scale(1.1);
  }
}

@keyframes float-c {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(24px, -36px, 0);
  }
}

@keyframes rise-bar {
  0%,
  100% {
    transform: scaleY(0.55);
    opacity: 0.12;
  }
  50% {
    transform: scaleY(1);
    opacity: 0.32;
  }
}

@keyframes ring-pulse {
  0% {
    transform: scale(0.65);
    opacity: 0.35;
  }
  70% {
    transform: scale(1.55);
    opacity: 0;
  }
  100% {
    transform: scale(1.55);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-atmosphere,
  .login-atmosphere::before,
  .login-atmosphere::after,
  .orb,
  .rise,
  .ring {
    animation: none !important;
  }
}

.login-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  animation: rise-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

.login-card {
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 2.5rem 2.25rem 2rem;
  border: 1px solid rgba(92, 77, 57, 0.06);
}

.login-brand {
  text-align: center;
  margin-bottom: 1.75rem;
}

.login-logo {
  display: block;
  width: min(220px, 72%);
  height: auto;
  margin: 0 auto 1.35rem;
  animation: logo-fade 0.9s ease 0.15s both;
}

@keyframes logo-fade {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.login-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tan);
}

.login-brand h1 {
  margin: 0 0 0.4rem;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 2.45rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  letter-spacing: -0.02em;
}

.login-lead {
  margin: 0;
  font-size: 0.98rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.field label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.forgot-link {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--tan);
  text-decoration: none;
  transition: color 0.2s ease;
}

.forgot-link:hover {
  color: var(--brown);
  text-decoration: underline;
}

.field input[type="email"],
.field input[type="password"] {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text);
  background: #faf8f4;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.field input::placeholder {
  color: #9a9080;
}

.field input:hover {
  border-color: #c4b49a;
}

.field input:focus {
  background: var(--white);
  border-color: var(--brown);
  box-shadow: 0 0 0 3px rgba(92, 77, 57, 0.12);
}

.remember {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.remember input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--brown);
  cursor: pointer;
}

.btn-login {
  margin-top: 0.35rem;
  width: 100%;
  padding: 0.85rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--white);
  background: var(--brown);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-login:hover {
  background: var(--brown-hover);
  box-shadow: 0 8px 20px rgba(92, 77, 57, 0.22);
}

.btn-login:active {
  transform: translateY(1px);
}

.btn-login:focus-visible {
  outline: 2px solid var(--tan);
  outline-offset: 3px;
}

.login-footer {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(92, 77, 57, 0.1);
  text-align: center;
}

.login-footer p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

@media (max-width: 480px) {
  .login-card {
    padding: 2rem 1.35rem 1.65rem;
  }

  .field-label-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}
