/* Shared styles for the auth pages: login.html, forgot-password.html,
   reset-password.html. Mirrors the spec in design_handoff_login/README.md.
   The visual layers (perspective road, mountains, horizon haze, glass
   card) are identical across all three pages \u2014 only the form contents
   change per page. */

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #000;
  overflow: hidden;
  font-family: -apple-system, system-ui, 'Inter', sans-serif;
  color: #f5f5f4;
}
* { box-sizing: border-box; }

.stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  background:
    radial-gradient(ellipse 60% 40% at 50% 25%, rgba(15, 95, 46, 0.22), transparent 65%),
    radial-gradient(ellipse 90% 60% at 50% 100%, rgba(15, 95, 46, 0.10), transparent 70%),
    #000;
  overflow: hidden;
}

/* \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 Full-screen perspective road \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
.road-wrap {
  position: absolute;
  left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 100%; height: 100%;
  pointer-events: none;
  perspective: 800px;
  perspective-origin: 50% 38%;
  z-index: 0;
}
.road {
  position: absolute;
  left: 50%; bottom: 0;
  transform-origin: 50% 100%;
  width: 240%; margin-left: -120%;
  height: 100%;
  transform: rotateX(74deg);
  background-image:
    repeating-linear-gradient(0deg,  rgba(31,157,77,0.20) 0 2px, transparent 2px 90px),
    repeating-linear-gradient(90deg, rgba(31,157,77,0.10) 0 1px, transparent 1px 90px);
  mask-image: linear-gradient(to top, #000 35%, transparent 95%);
  -webkit-mask-image: linear-gradient(to top, #000 35%, transparent 95%);
}
.lane {
  position: absolute;
  left: 50%; top: 38%; bottom: 0;
  width: 4px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, transparent, rgba(31,157,77,0.5) 30%, rgba(74,222,128,0.7) 100%);
  box-shadow: 0 0 20px rgba(31,157,77,0.6);
  z-index: 1;
}

/* \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 Full-bleed mountains \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
.mountains {
  position: absolute;
  left: 0; right: 0;
  bottom: 35%;
  width: 100%; height: 55%;
  pointer-events: none;
  z-index: 2;
}
.mountains svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}

/* \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 Horizon haze + glow \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
.horizon {
  position: absolute;
  left: 0; right: 0;
  top: 38%;
  height: 3px;
  background: linear-gradient(90deg, transparent 5%, rgba(31,157,77,0.9) 50%, transparent 95%);
  filter: blur(2px);
  z-index: 3;
}
.horizon-glow {
  position: absolute;
  left: 0; right: 0;
  top: calc(38% - 60px);
  height: 120px;
  background: radial-gradient(ellipse 50% 100% at 50% 50%, rgba(31,157,77,0.18), transparent 70%);
  filter: blur(20px);
  z-index: 2;
}

/* \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 Auth card \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
.auth-card {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 440px;
  max-width: calc(100vw - 48px);
  background: rgba(10, 10, 10, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(31,157,77,0.18);
  border-radius: 20px;
  padding: 44px 40px 36px;
  z-index: 10;
  box-shadow:
    0 50px 120px -30px rgba(15, 95, 46, 0.55),
    0 0 0 1px rgba(255,255,255,0.04) inset;
  animation: rise 1.0s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes rise {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 12px)); }
  to   { opacity: 1; transform: translate(-50%, -50%); }
}

.icon-wrap {
  width: 96px; height: 96px;
  border-radius: 22px;
  overflow: hidden;
  margin: 0 auto 22px;
  box-shadow:
    0 16px 40px -8px rgba(15,95,46,0.55),
    0 0 0 1px rgba(31,157,77,0.35);
  filter: hue-rotate(-12deg) saturate(1.4) brightness(1.05);
}
.icon-wrap img {
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;
}

.title {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.6px;
  text-align: center;
  margin: 0;
}
.sub {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  text-align: center;
  margin: 8px 0 28px;
}

/* Inline status banner above the first form field. Used for "Check your
   email" success states and validation/error messages. */
.flash {
  border-radius: 8px;
  border: 1px solid;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
}
.flash.success {
  background: rgba(15,95,46,0.18);
  border-color: rgba(31,157,77,0.6);
  color: #f5f5f4;
}
.flash.error {
  background: rgba(220,38,38,0.18);
  border-color: rgba(239,68,68,0.7);
  color: #f5f5f4;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.field label {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
}
.field input {
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  color: #f5f5f4;
  outline: none;
  font-family: inherit;
}
.field input:focus { border-color: rgba(31,157,77,0.6); }
.field input::placeholder { color: rgba(255,255,255,0.3); }

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 6px 0 22px;
  font-size: 12px;
}
.row label {
  color: rgba(255,255,255,0.55);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.row a {
  color: rgba(31,157,77,0.9);
  text-decoration: none;
  font-weight: 700;
}

.btn {
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid #072d15;
  background: #0f5f2e;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 12px 36px -10px rgba(15,95,46,0.7);
  font-family: inherit;
}
.btn:hover:not(:disabled) { background: #135e30; }
.btn:disabled { opacity: 0.6; cursor: default; }

.alt {
  text-align: center;
  margin-top: 22px;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}
.alt a {
  color: #1f9d4d;
  text-decoration: none;
  font-weight: 700;
}
.alt a:hover { text-decoration: underline; }

/* \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 Corner UI \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
.corner {
  position: absolute;
  top: 24px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
}
.corner.left { left: 28px; }
.corner.right { right: 28px; }
.dot {
  width: 6px; height: 6px;
  border-radius: 3px;
  background: #1f9d4d;
  box-shadow: 0 0 8px #1f9d4d;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.copyright {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  z-index: 5;
}

/* \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 Responsive \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
@media (max-width: 767px) {
  .auth-card {
    width: calc(100vw - 32px);
    padding: 32px 24px 28px;
  }
  .icon-wrap {
    width: 80px; height: 80px;
  }
  .corner { display: none; }
}
