/* EvCar27 login visual layer. No global selectors except the opt-in page class. */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("assets/manrope-cyrillic-variable.woff2") format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("assets/manrope-latin-variable.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
body.scenic-auth { background: #00150c; }
.ev-login,
.ev-login * { box-sizing: border-box; }
.ev-login {
  --ev-bg: #00180d;
  --ev-text: #f6f7f1;
  --ev-muted: #b9c8ad;
  --ev-lime: #c7ff32;
  --ev-border: #559667;
  --ev-headlight-cycle: 3s;
  --ev-energy-cycle: 1.05s;
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100svh;
  margin-inline: auto;
  padding-top: env(safe-area-inset-top, 0px);
  overflow: hidden;
  background: var(--ev-bg);
  color: var(--ev-text);
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
/* Real light-ribbon artwork, restricted to the empty right edge above the car. */
.ev-page-ribbon {
  position: absolute;
  z-index: -1;
  inset: env(safe-area-inset-top, 0px) 0 auto;
  width: 100%;
  aspect-ratio: 934 / 510;
  background: url("assets/login-art.webp") top center / 100% auto no-repeat;
  clip-path: inset(0 0 0 77%);
  -webkit-mask-image: linear-gradient(90deg, transparent 77%, #000 88%);
  mask-image: linear-gradient(90deg, transparent 77%, #000 88%);
  pointer-events: none;
}
.ev-brand {
  position: relative;
  width: 100%;
  aspect-ratio: 934 / 220;
  overflow: hidden;
}
.ev-brand-art,
.ev-scene-art {
  position: absolute;
  left: 0;
  width: 100%;
  max-width: none;
  height: auto;
  display: block;
  user-select: none;
  pointer-events: none;
}
.ev-brand-art { top: 0; }
.ev-intro { padding: 2cqw 7.7% 0; }
.ev-intro h1 {
  margin: 0;
  font-size: clamp(30px, 8.9cqw, 43px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.025em;
}
.ev-intro p {
  margin: 2cqw 0 0;
  color: var(--ev-muted);
  font-size: clamp(15px, 3.8cqw, 18.25px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0;
}
.ev-scene {
  position: relative;
  width: 100%;
  aspect-ratio: 934 / 360;
  overflow: hidden;
  isolation: isolate;
  pointer-events: none;
}
/* Exact source crop: x=0, y=510, width=934, height=360. */
.ev-scene-art { top: -141.666666667%; }
.ev-scene-effects {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
}
.ev-headlight-pulse {
  opacity: 0;
  animation:
    ev-login-headlights var(--ev-headlight-cycle) linear infinite,
    ev-login-haptic-tick var(--ev-headlight-cycle) calc(var(--ev-headlight-cycle) * .12) infinite,
    ev-login-haptic-tick var(--ev-headlight-cycle) calc(var(--ev-headlight-cycle) * .28) infinite;
  animation-play-state: paused;
  will-change: opacity;
}
.ev-energy-flow {
  stroke-dasharray: 8 25.333333;
  animation: ev-login-energy var(--ev-energy-cycle) linear infinite;
  animation-play-state: paused;
}
.ev-energy-core { stroke-dasharray: 3.5 29.833333; }
.ev-login[data-motion="running"] .ev-headlight-pulse,
.ev-login[data-motion="running"] .ev-energy-flow { animation-play-state: running; }
@keyframes ev-login-headlights {
  0%,10% { opacity: 0; }
  12%,16% { opacity: 1; }
  18%,26% { opacity: 0; }
  28%,32% { opacity: 1; }
  34%,100% { opacity: 0; }
}
/* Emit a CSS animation event at each visual brightness peak. */
@keyframes ev-login-haptic-tick {
  from { --ev-haptic-tick: 0; }
  to { --ev-haptic-tick: 1; }
}
/* Negative dashoffset follows the route from the station to the vehicle. */
@keyframes ev-login-energy {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -33.333333; }
}
.ev-auth-options {
  display: flex;
  flex-direction: column;
  gap: max(8px, 2.2cqw);
  padding-inline: 4.7%;
}
.ev-auth-button {
  appearance: none;
  display: flex;
  align-items: center;
  gap: clamp(14px, 4.3cqw, 21px);
  width: 100%;
  min-height: max(46px, 12.2cqw);
  padding: 9px 5.8%;
  border: 1px solid var(--ev-border);
  border-radius: clamp(15px, 3.7cqw, 18px);
  background: #052a16;
  background: linear-gradient(110deg, #062d18 0%, #062715 100%);
  color: var(--ev-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: border-color 140ms ease, filter 140ms ease, transform 140ms ease;
}
.ev-auth-primary {
  min-height: max(48px, 13cqw);
  border-color: transparent;
  background: #c7ff32;
  background: linear-gradient(105deg, #d4ff36 0%, #c4ff2d 100%);
  color: #071204;
}
.ev-auth-operator { min-height: max(52px, 14.1cqw); }
.ev-auth-copy { display: flex; flex: 1 1 auto; min-width: 0; flex-direction: column; gap: 2px; }
.ev-auth-label {
  font-size: clamp(15px, 4.2cqw, 20px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.025em;
}
.ev-auth-note {
  color: var(--ev-muted);
  font-size: clamp(12px, 3.15cqw, 15px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0;
}
.ev-auth-icon,
.ev-auth-arrow { display: block; flex: 0 0 auto; object-fit: contain; }
.ev-auth-icon { width: clamp(24px, 6.3cqw, 30px); height: clamp(24px, 6.3cqw, 30px); }
.ev-auth-arrow { width: clamp(22px, 5.7cqw, 27px); height: clamp(22px, 5.7cqw, 27px); margin-left: auto; }
.ev-auth-button:not(.ev-auth-primary) .ev-auth-icon,
.ev-auth-button:not(.ev-auth-primary) .ev-auth-arrow { filter: invert(1); opacity: 0.96; }
.ev-auth-button:focus-visible,
.ev-text-action:focus-visible { outline: 2px solid #d9ff8a; outline-offset: 4px; }
.ev-auth-primary:focus-visible { outline-color: #fff; }
.ev-auth-button:disabled { opacity: 0.55; cursor: default; transform: none; }
.ev-auth-button[aria-busy="true"] { cursor: progress; }
@media (hover: hover) {
  .ev-auth-button:not(:disabled):hover { filter: brightness(1.08); border-color: #9adc8e; }
  .ev-auth-primary:not(:disabled):hover { border-color: transparent; }
  .ev-text-action:hover { color: #f4f9ed; }
}
.ev-auth-button:not(:disabled):active { transform: translateY(1px); }
.ev-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: max(13px, 3.3cqw) 4.7% calc(max(18px, 4.5cqw) + env(safe-area-inset-bottom, 0px));
}
.ev-text-action {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 36px;
  padding: 4px 2px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ev-muted);
  font: 500 clamp(13px, 3.6cqw, 17px)/1.35 "Manrope", system-ui, sans-serif;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
}
.ev-documents { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
@media (max-width: 359px) {
  .ev-intro { padding-inline: 6.7%; }
  .ev-auth-button { gap: 12px; padding-inline: 5%; }
  .ev-auth-label { font-size: 15px; }
  .ev-auth-note { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .ev-login .ev-headlight-pulse,
  .ev-login .ev-energy-flow { animation: none !important; }
  .ev-login .ev-headlight-pulse { opacity: 0; }
  .ev-auth-button { transition: none; }
}
@media print {
  .ev-scene-effects { display: none !important; }
  .ev-login { min-height: 0; }
}

/* The wordmark is artwork. Its centered caption remains editable text. */
.ev-brand-mark { position: absolute; inset: 0 0 auto; height: 79%; overflow: hidden; }
.ev-brand-tagline {
  position: absolute;
  inset: 79.8% 0 auto;
  margin: 0;
  color: #aebfa2;
  text-align: center;
  font-size: clamp(8px, 2.62cqw, 13px);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: .32em;
  padding-inline: .32em 0;
}
.ev-login [hidden] { display: none; }
.ev-auth-state { font-size: 11px; color: var(--ev-muted); }
.ev-method-notice { margin: 0; color: var(--ev-muted); font-size: 12px; line-height: 1.45; }
.ev-login-waiting { margin-inline: 4.7%; }
