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

:root {
  color-scheme: light;
  --blue: #1976f3;
  --blue-dark: #0e2e61;
  --muted: #6f86aa;
  --line: #d8e5f8;
  --ink: #122d55;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  background: #f4f8ff;
}

.login-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 58fr) minmax(460px, 42fr);
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 12% 12%, #e1f1ff 0, transparent 36%),
    linear-gradient(135deg, #f6faff, #edf5ff 72%, #e4efff);
}

.login-shell::after {
  position: absolute;
  z-index: 0;
  right: 0;
  bottom: 0;
  width: 118px;
  height: 96px;
  border-top-left-radius: 100% 88%;
  background: linear-gradient(135deg, #e1efff 0 55%, #83baff 55% 77%, #2f88f5 77%);
  content: "";
  pointer-events: none;
}

.visual-panel {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 100vh;
  min-height: 100svh;
  flex-direction: column;
  overflow: hidden;
  padding: 32px clamp(36px, 6.5vw, 84px) 25px;
}

.brand {
  position: relative;
  z-index: 4;
  display: flex;
  width: max-content;
  align-items: center;
  gap: 7px;
}

.brand-carousel {
  position: relative;
  display: block;
  width: 184px;
  height: 72px;
  flex-shrink: 0;
}

.brand-mark {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 450ms ease;
}

.brand-mark.is-active {
  opacity: 1;
}

.hero-copy {
  position: relative;
  z-index: 3;
  margin-top: 25px;
  animation: copy-in 0.8s both;
}

.eyebrow {
  margin: 0 0 9px;
  color: #3979c7;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2.4px;
}

h1 {
  margin: 0;
  color: #102d5d;
  font-size: clamp(30px, 2.65vw, 37px);
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1.12;
}

h1 span {
  color: var(--blue);
}

.hero-description {
  margin: 13px 0 0;
  color: #6280ab;
  font-size: 14px;
  line-height: 1.55;
}

.scene {
  position: absolute;
  z-index: 1;
  top: 37%;
  right: 0;
  left: 0;
  height: 40%;
  min-height: 255px;
  overflow: hidden;
  pointer-events: none;
}

.scene-glow {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 40%;
  background: linear-gradient(0deg, rgba(227, 241, 255, 0.98), rgba(227, 241, 255, 0));
}

.scene-image {
  position: absolute;
  inset: 0;
  background-image: url("assets/fleet-scene.webp");
  background-position: center 62%;
  background-size: cover;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 12%, #000 78%, transparent 100%);
  mix-blend-mode: multiply;
  opacity: 0.9;
  animation: scene-drift 24s ease-in-out infinite alternate;
}

.road-ring {
  position: absolute;
  bottom: 4%;
  left: -8%;
  width: 92%;
  height: 35%;
  transform: rotate(-5deg);
  border: 3px solid rgba(35, 139, 255, 0.65);
  border-radius: 50%;
  filter: drop-shadow(0 0 8px #73b9ff);
  animation: ring-pulse 4s ease-in-out infinite;
}

.moving-light {
  position: absolute;
  width: 20%;
  height: 3px;
  transform: rotate(-4deg);
  border-radius: 100%;
  background: linear-gradient(90deg, transparent, #fff, #1285ff, transparent);
  filter: drop-shadow(0 0 6px #258cff);
  animation: light-travel 6s linear infinite;
}

.light-one {
  bottom: 19%;
  left: -22%;
}

.light-two {
  bottom: 9%;
  left: -40%;
  width: 15%;
  animation-delay: 2.7s;
}

.features {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: auto;
  padding-top: 18px;
}

.feature {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 10px;
  border-right: 1px solid rgba(125, 166, 218, 0.28);
  font-size: 11px;
}

.feature:first-child {
  padding-left: 0;
}

.feature:last-child {
  border: 0;
}

.feature-icon {
  height: 34px;
  margin-bottom: 1px;
  color: var(--blue);
}

.feature-icon svg {
  width: 29px;
  height: 29px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.feature b {
  color: #173b70;
  font-size: 10px;
}

.feature small {
  color: #7690b7;
  font-size: 10px;
}

.visual-footer {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 35px;
  color: #6e8bb5;
  font-size: 10px;
}

.visual-footer span {
  width: 24px;
  height: 2px;
  border-radius: 4px;
  background: #1c80ff;
}

.visual-footer i {
  font-style: normal;
}

.form-panel {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 100vh;
  min-height: 100svh;
  align-items: center;
  justify-content: flex-start;
  padding: 42px clamp(30px, 6.5vw, 84px) 30px 0;
}

.form-panel::before {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 45%, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.3) 60%, transparent 80%);
  content: "";
  pointer-events: none;
}

.login-card {
  position: relative;
  z-index: 2;
  width: min(100%, 460px);
  padding: 29px 30px 25px;
  border: 1px solid rgba(208, 225, 248, 0.95);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 70px rgba(49, 100, 164, 0.12);
  backdrop-filter: blur(14px);
  animation: card-in 0.75s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.brand-card {
  margin: 0 auto 25px;
}

.form-heading h2 {
  margin: 0 0 3px;
  color: #102f61;
  font-size: 29px;
  letter-spacing: -0.7px;
}

.form-heading p {
  margin: 0 0 26px;
  color: #7d94b8;
  font-size: 13px;
}

form {
  display: flex;
  flex-direction: column;
}

form > label {
  margin: 0 0 8px;
  color: #153764;
  font-size: 12px;
  font-weight: 700;
}

.input-wrap {
  display: flex;
  height: 44px;
  align-items: center;
  gap: 11px;
  margin-bottom: 19px;
  padding: 0 11px;
  border: 1px solid #d3e2f7;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 1px 2px rgba(25, 70, 125, 0.025);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrap:focus-within {
  border-color: #6ca9ff;
  box-shadow: 0 0 0 4px rgba(25, 118, 243, 0.09);
}

.input-wrap > svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: none;
  stroke: #5b80b3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.input-wrap input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #18375f;
  font: 500 13px Inter, "Segoe UI", Arial, sans-serif;
}

.input-wrap input::placeholder {
  color: #8da6ca;
  opacity: 1;
}

.toggle-password {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  padding: 3px;
  border: 0;
  background: transparent;
  color: #6d89b2;
  cursor: pointer;
}

.toggle-password svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.toggle-password .eye-slash {
  opacity: 0;
  transition: opacity 0.2s;
}

.toggle-password.is-visible .eye-slash {
  opacity: 1;
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -2px 0 21px;
  font-size: 11px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #24436f;
  cursor: pointer;
}

.remember input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--blue);
}

a {
  color: #1675f5;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(25, 118, 243, 0.35);
  outline-offset: 3px;
}

.input-wrap input:focus-visible {
  outline: 0;
}

.submit-button {
  display: flex;
  height: 44px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(100deg, #1977f3, #2380f8);
  box-shadow: 0 7px 18px rgba(25, 118, 243, 0.16);
  color: #fff;
  font: 700 13px Inter, "Segoe UI", Arial, sans-serif;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 11px 24px rgba(25, 118, 243, 0.24);
  filter: saturate(1.08);
}

.submit-button:active {
  transform: translateY(0);
}

.submit-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.submit-button.loading {
  opacity: 0.8;
  pointer-events: none;
}

.form-message {
  margin: 9px 0 0;
  color: #b45309;
  font-size: 12px;
  line-height: 1.5;
}

.form-message:empty {
  display: none;
}

.secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #e2ebf7;
  color: #7189ad;
  font-size: 10px;
}

.tiny-lock {
  color: #557aa9;
  font-size: 13px;
}

.drive-overlay {
  position: fixed;
  z-index: 20;
  inset: 0;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(237, 247, 255, 0.18), rgba(214, 235, 255, 0.32));
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.drive-overlay.is-visible {
  opacity: 1;
}

.drive-status {
  position: absolute;
  z-index: 2;
  top: 24%;
  right: 20px;
  left: 20px;
  color: #24436f;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  animation: none;
}

.drive-car {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 76%;
  width: clamp(150px, 22vw, 230px);
  overflow: visible;
  animation: none;
}

.drive-road {
  position: absolute;
  right: -10%;
  bottom: 23%;
  left: -10%;
  height: 5px;
  transform: rotate(-2deg);
  background: linear-gradient(90deg, transparent, #62a9ff 15%, #fff 50%, #62a9ff 85%, transparent);
  box-shadow: 0 0 22px rgba(25, 118, 243, 0.45);
  animation: none;
}

.drive-overlay.is-visible .drive-status {
  animation: status-fade 1.4s ease both;
}

.drive-overlay.is-visible .drive-car {
  animation: car-drive 1.35s cubic-bezier(0.25, 0.7, 0.35, 1) both;
}

.drive-overlay.is-visible .drive-road {
  animation: road-speed 0.35s linear infinite;
}

.login-card.is-folding {
  transform-origin: 50% 70%;
  animation: card-fold 280ms cubic-bezier(0.55, 0, 0.8, 0.25) forwards;
}

@keyframes card-fold {
  0% {
    transform: perspective(900px) rotateX(0) scale(1);
    opacity: 1;
  }

  45% {
    transform: perspective(900px) rotateX(-18deg) scale(0.8, 0.72);
    border-radius: 40% 40% 20% 20%;
    opacity: 1;
  }

  100% {
    transform: perspective(900px) rotateX(-70deg) scale(0.2, 0.12);
    border-radius: 50%;
    opacity: 0;
  }
}

@keyframes car-drive {
  0% {
    transform: translate(-50%, -50%) scale(0.22);
    opacity: 0;
  }

  25% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }

  45% {
    transform: translate(-50%, -50%) scale(1);
  }

  100% {
    transform: translate(120vw, -50%) scale(0.82);
    opacity: 0.15;
  }
}

@keyframes road-speed {
  to {
    background-position: 180px 0;
  }
}

@keyframes status-fade {
  0%,
  75% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

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

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes copy-in {
  from {
    transform: translateY(12px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes scene-drift {
  from {
    transform: scale(1.02) translateX(-0.5%);
  }

  to {
    transform: scale(1.08) translateX(1.5%);
  }
}

@keyframes ring-pulse {
  0%,
  100% {
    transform: rotate(-5deg) scale(0.99);
    opacity: 0.45;
  }

  50% {
    transform: rotate(-5deg) scale(1.015);
    opacity: 0.85;
  }
}

@keyframes light-travel {
  0% {
    left: -24%;
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 0.8;
  }

  100% {
    left: 110%;
    opacity: 0;
  }
}

@media (max-width: 1000px) and (min-width: 781px) {
  .login-shell {
    grid-template-columns: minmax(0, 1fr) minmax(420px, 0.95fr);
  }

  .visual-panel {
    padding-right: 26px;
    padding-left: 34px;
  }

  h1 {
    font-size: 31px;
  }

  .hero-description {
    font-size: 13px;
  }

  .feature {
    padding-right: 6px;
    padding-left: 6px;
  }

  .feature b,
  .feature small {
    font-size: 9px;
  }

  .form-panel {
    padding-right: 26px;
  }

  .login-card {
    padding: 27px 25px 23px;
  }
}

@media (max-width: 780px) {
  .login-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .visual-panel {
    min-height: 440px;
    padding: 23px 26px 18px;
  }

  .hero-copy {
    margin-top: 22px;
  }

  .eyebrow {
    font-size: 10px;
    letter-spacing: 2px;
  }

  h1 {
    font-size: clamp(28px, 5vw, 34px);
  }

  .hero-description {
    max-width: 390px;
    font-size: 13px;
  }

  .scene {
    top: 35%;
    height: 43%;
    min-height: 175px;
    opacity: 0.85;
  }

  .features {
    padding-top: 170px;
  }

  .feature {
    padding-right: 8px;
    padding-left: 8px;
  }

  .feature-icon {
    height: 29px;
  }

  .feature-icon svg {
    width: 25px;
    height: 25px;
  }

  .visual-footer {
    margin-top: 23px;
    font-size: 10px;
  }

  .form-panel {
    min-height: auto;
    justify-content: center;
    padding: 28px 22px 40px;
  }

  .drive-car {
    left: 50%;
  }

  .login-card {
    width: min(100%, 460px);
    padding: 28px 26px 24px;
  }
}

@media (max-width: 420px) {
  .visual-panel {
    min-height: 410px;
    padding: 20px 19px 15px;
  }

  .hero-copy {
    margin-top: 19px;
  }

  h1 {
    font-size: 27px;
    letter-spacing: -0.8px;
  }

  .hero-description {
    max-width: 310px;
  }

  .desktop-only {
    display: none;
  }

  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 12px;
    padding-top: 145px;
  }

  .feature:nth-child(2) {
    border: 0;
  }

  .feature:nth-child(3) {
    padding-left: 0;
  }

  .visual-footer {
    margin-top: 20px;
  }

  .form-panel {
    padding: 20px 13px 28px;
  }

  .login-card {
    padding: 25px 19px 22px;
    border-radius: 15px;
  }

  .form-options {
    font-size: 10px;
  }

  .input-wrap {
    height: 46px;
    margin-bottom: 17px;
  }
}

@media (max-height: 650px) and (min-width: 781px) {
  .visual-panel {
    padding-top: 22px;
    padding-bottom: 19px;
  }

  .brand-mark {
    width: 50px;
    height: 50px;
  }

  .hero-copy {
    margin-top: 17px;
  }

  .scene {
    top: 35%;
    height: 39%;
  }

  .visual-footer {
    margin-top: 24px;
  }

  .login-card {
    padding-top: 22px;
    padding-bottom: 19px;
  }

  .brand-card {
    margin-bottom: 17px;
  }

  .form-heading p {
    margin-bottom: 19px;
  }

  .input-wrap {
    margin-bottom: 15px;
  }

  .form-options {
    margin-bottom: 16px;
  }

  .secure-note {
    margin-top: 19px;
    padding-top: 16px;
  }
}

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

  .login-card.is-folding,
  .drive-car,
  .drive-road,
  .drive-status {
    animation-duration: 0.01ms !important;
  }
}
