/* ZTECJO — automotive motorsport unlock UI (desktop + mobile) */

:root {
  --asphalt: #0c0e12;
  --ink: #f2f4f7;
  --muted: #8b939e;
  --line: rgba(255, 255, 255, 0.08);
  --red: #e10600;
  --red-hi: #ff2a1f;
  --red-dim: #9a0400;
  --teal: #1faa6e;
  --panel: rgba(18, 22, 30, 0.88);
  --panel-border: rgba(255, 255, 255, 0.1);
  --font-display: "Bebas Neue", Impact, "Segoe UI", sans-serif;
  --font-body: "Manrope", "Segoe UI", system-ui, sans-serif;
  --radius: 2px;
  --max: 560px;
  --pad-x: clamp(16px, 4vw, 32px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

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

html {
  margin: 0;
  height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--asphalt);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Atmosphere ─────────────────────────────────────────── */

.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.asphalt {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 60% at 70% 10%, rgba(225, 6, 0, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 10% 90%, rgba(31, 170, 110, 0.08), transparent 50%),
    linear-gradient(165deg, #12151c 0%, #0a0c10 45%, #10141c 100%);
}

.asphalt::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: repeating-linear-gradient(
      -32deg,
      transparent,
      transparent 7px,
      rgba(255, 255, 255, 0.015) 7px,
      rgba(255, 255, 255, 0.015) 8px
    ),
    repeating-linear-gradient(
      58deg,
      transparent,
      transparent 11px,
      rgba(0, 0, 0, 0.12) 11px,
      rgba(0, 0, 0, 0.12) 12px
    );
  animation: weave 28s linear infinite;
}

.speed-lines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 48px,
    rgba(255, 255, 255, 0.015) 48px,
    rgba(255, 255, 255, 0.015) 49px
  );
  mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
  animation: streak 9s linear infinite;
  opacity: 0.55;
}

.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
}

.checker {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 10px;
  background: repeating-linear-gradient(90deg, #fff 0 12px, #111 12px 24px);
  animation: check-scroll 1.2s linear infinite;
  opacity: 0.85;
}

@keyframes weave {
  from { transform: translateX(0); }
  to { transform: translateX(40px); }
}

@keyframes streak {
  from { transform: translateX(0); }
  to { transform: translateX(49px); }
}

@keyframes check-scroll {
  from { background-position: 0 0; }
  to { background-position: 24px 0; }
}

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

@keyframes pulse-stripe {
  0%,
  100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ── Shell layout ───────────────────────────────────────── */

.shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  max-width: 100%;
  padding-top: var(--safe-t);
  padding-left: var(--safe-l);
  padding-right: var(--safe-r);
  padding-bottom: calc(12px + var(--safe-b));
}

.hero {
  flex: 1 1 auto;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(28px, 6vh, 72px) var(--pad-x) 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: rise 0.7s ease both;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
}

.brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 14vw, 6.75rem);
  line-height: 0.92;
  letter-spacing: 0.04em;
  font-weight: 400;
  color: var(--ink);
  text-shadow: 0 0 60px rgba(225, 6, 0, 0.25);
  word-break: keep-all;
}

.lede {
  margin: 14px 0 28px;
  max-width: 36ch;
  font-size: clamp(0.95rem, 2.6vw, 1.05rem);
  line-height: 1.55;
  color: var(--muted);
  font-weight: 500;
}

/* ── Form panel ─────────────────────────────────────────── */

.panel {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.5vw, 18px);
  width: 100%;
  padding: clamp(16px, 3vw, 24px);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  animation: rise 0.85s 0.12s ease both;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.field-label em {
  font-style: normal;
  color: var(--red);
  margin-left: 6px;
  letter-spacing: 0.08em;
}

.field input[type="email"] {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.35);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px; /* prevents iOS zoom */
  font-weight: 500;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input[type="email"]:focus {
  border-color: rgba(225, 6, 0, 0.65);
  box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.15);
}

.field input::placeholder {
  color: #5c6570;
}

.drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 140px;
  padding: clamp(20px, 4vw, 28px) 16px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.drop:hover,
.drop:focus-visible {
  border-color: rgba(225, 6, 0, 0.7);
  background: rgba(225, 6, 0, 0.06);
  outline: none;
}

.drop.is-drag {
  border-color: var(--red);
  background: rgba(225, 6, 0, 0.12);
  transform: scale(1.01);
}

.drop.has-file {
  border-style: solid;
  border-color: rgba(31, 170, 110, 0.55);
}

.drop.is-busy {
  pointer-events: none;
  opacity: 0.7;
}

.drop-visual {
  color: var(--red);
  margin-bottom: 2px;
}

.drop-visual svg {
  width: clamp(32px, 8vw, 40px);
  height: auto;
  display: block;
}

.drop-title {
  margin: 0;
  font-weight: 700;
  font-size: clamp(0.95rem, 2.8vw, 1.05rem);
}

.drop-title-mobile {
  display: none;
}

.drop-sub {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.file-name {
  margin: 8px 0 0;
  max-width: 100%;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.progress {
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--red-dim), var(--red-hi));
  transition: width 0.35s ease;
}

.cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  border: none;
  border-radius: var(--radius);
  background: var(--red);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  transition: background 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.cta-stripe {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #fff;
  animation: pulse-stripe 1.6s ease infinite;
}

.cta:hover:not(:disabled) {
  background: var(--red-hi);
  transform: translateY(-1px);
}

.cta:active:not(:disabled) {
  transform: translateY(0);
}

.cta:disabled {
  opacity: 0.55;
  cursor: wait;
}

.status {
  min-height: 1.35em;
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.status[data-kind="ok"] {
  color: var(--teal);
}

.status[data-kind="err"] {
  color: #ff6b5e;
}

.foot {
  flex: 0 0 auto;
  padding: 8px var(--pad-x) calc(18px + var(--safe-b));
  text-align: center;
}

.foot p {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: #5a616c;
}

/* ── Mobile / narrow ────────────────────────────────────── */

@media (max-width: 640px) {
  :root {
    --max: 100%;
  }

  .hero {
    justify-content: flex-start;
    padding-top: clamp(24px, 5vh, 40px);
    padding-bottom: 20px;
  }

  .lede {
    margin-bottom: 22px;
    max-width: none;
  }

  .drop-title-desktop {
    display: none;
  }

  .drop-title-mobile {
    display: block;
  }

  .drop {
    min-height: 120px;
  }

  .checker {
    height: 8px;
  }

  .speed-lines {
    opacity: 0.3;
  }
}

@media (max-width: 380px) {
  .brand {
    font-size: clamp(2.8rem, 16vw, 3.6rem);
  }

  .eyebrow {
    letter-spacing: 0.14em;
  }

  .cta {
    letter-spacing: 0.06em;
    font-size: 0.84rem;
  }
}

/* Windows / wide desktop */
@media (min-width: 900px) {
  :root {
    --max: 580px;
  }

  .hero {
    padding-top: clamp(48px, 12vh, 100px);
  }

  .panel {
    padding: 26px;
  }
}

/* Short laptop / landscape phone */
@media (max-height: 700px) and (orientation: landscape) {
  .hero {
    justify-content: flex-start;
    padding-top: 20px;
    padding-bottom: 16px;
  }

  .brand {
    font-size: clamp(2.6rem, 10vh, 4rem);
  }

  .lede {
    margin: 10px 0 16px;
  }

  .drop {
    min-height: 96px;
    padding: 14px 12px;
  }

  .checker {
    display: none;
  }
}

@media (hover: none) {
  .cta:hover:not(:disabled) {
    transform: none;
  }

  .drop:hover {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(0, 0, 0, 0.28);
  }

  .drop:active {
    border-color: rgba(225, 6, 0, 0.7);
    background: rgba(225, 6, 0, 0.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .asphalt::after,
  .speed-lines,
  .checker,
  .cta-stripe,
  .hero,
  .panel {
    animation: none;
  }
}
