/* ==========================================================================
   Rocketship — authentication pages
   Waybill card on paper, route rail on ink.
   ========================================================================== */

:root {
  --ink: #151a3b;
  --ink-deep: #0d1029;
  --ink-soft: #5a617f;
  --paper: #ffffff;
  --ground: #f4f5fa;
  --line: #e2e5f0;
  --flame: #ff3f3a;
  --brand-grad: linear-gradient(288deg, #ff9a3e 11.23%, #ff3f3a 46.66%, #d130ad 81.36%);

  --display: "Space Grotesk", "Poppins", -apple-system, sans-serif;
  --body: "Poppins", -apple-system, sans-serif;
  --utility: "Space Mono", ui-monospace, Menlo, monospace;
}

.auth-body {
  margin: 0;
  min-height: 100vh;
  background: var(--ground);
  font-family: var(--body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.auth {
  display: flex;
  min-height: 100vh;
  align-items: stretch;
}

/* --------------------------------------------------------------- ink rail */

.auth__aside {
  position: relative;
  flex: 0 0 42%;
  max-width: 520px;
  padding: 48px 52px 40px;
  background: var(--ink);
  background-image: radial-gradient(120% 80% at 0% 0%, #1d2450 0%, var(--ink) 45%, var(--ink-deep) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* A single arc of exhaust, anchored off the bottom-left corner */
.auth__aside::after {
  content: "";
  position: absolute;
  left: -180px;
  bottom: -220px;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: var(--brand-grad);
  opacity: 0.16;
  filter: blur(40px);
  pointer-events: none;
}

.auth__brand {
  display: inline-block;
  margin-bottom: 56px;
  position: relative;
  z-index: 1;
}

.auth__brand img {
  display: block;
  height: auto;
  max-width: 100%;
}

.auth__brand--mobile {
  display: none;
}

.auth__pitch {
  position: relative;
  z-index: 1;
}

.auth .auth__headline {
  font-family: var(--display);
  font-weight: 600;
  font-size: 40px;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 14px;
  color: #fff;
}

.auth .auth__sub {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.62);
  margin: 0;
  max-width: 30ch;
}

/* Wireframe rocket (js/rocket-hero.js) — takes up whatever room is left
   below the route, so the panel ends on the mark rather than on text. */
.auth__rocket {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 190px;
  margin: 28px -20px 0;
  pointer-events: none;
}

.auth__rocket .rocket-hero__canvas {
  display: block;
}

.auth .auth__legal {
  position: relative;
  z-index: 1;
  font-family: var(--utility);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.34);
  margin: 40px 0 0;
}

/* ------------------------------------------------------------- route stops */

.route {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 52px 0 0;
  padding: 0;
}

.route__item {
  position: relative;
  padding: 0 0 30px 34px;
  display: block;
}

.route__item:last-child {
  padding-bottom: 0;
}

/* connector */
.route__item::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 18px;
  bottom: 2px;
  width: 2px;
  background: rgba(255, 255, 255, 0.16);
  transform-origin: top center;
  animation: route-draw 0.5s ease-out both;
}

.route__item:nth-child(2)::before { animation-delay: 0.18s; }

.route__item:last-child::before {
  display: none;
}

.route__dot {
  position: absolute;
  left: 0;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.34);
  background: var(--ink);
}

.route__item.is-current .route__dot {
  border-color: transparent;
  background: var(--brand-grad);
  box-shadow: 0 0 0 6px rgba(255, 63, 58, 0.16);
}

.route__code {
  display: block;
  font-family: var(--utility);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  margin-bottom: 3px;
}

.route__item.is-current .route__code {
  color: #ff9a3e;
}

.route__name {
  display: block;
  font-family: var(--display);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: #fff;
}

.route__note {
  display: block;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.48);
  margin-top: 2px;
}

@keyframes route-draw {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}

/* ------------------------------------------------------------ paper column */

.auth__main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 32px;
  min-width: 0;
}

.auth__flash {
  width: 100%;
  max-width: 560px;
  margin: 0 0 20px;
  padding: 13px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--flame);
  background: #fff;
  font-size: 14px;
  line-height: 1.5;
}

.auth__flash--success { border-left-color: #23c48a; }
.auth__flash--info    { border-left-color: #3f8cff; }

/* ---------------------------------------------------------- waybill card */

.waybill {
  position: relative;
  width: 100%;
  max-width: 500px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  /* clips the top rule to the card's own corners — a 4px-tall element can't
     hold an 18px radius on its own, which left a gap where they met */
  overflow: hidden;
  box-shadow: 0 24px 60px -34px rgba(21, 26, 59, 0.45);
  animation: waybill-in 0.45s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.waybill--wide {
  max-width: 620px;
}

@keyframes waybill-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.waybill__rule {
  height: 4px;
  background: var(--brand-grad);
}

.waybill__stub {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 32px 16px;
}

.waybill__kind,
.waybill__ref {
  font-family: var(--utility);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.waybill__kind { color: var(--ink); }
.waybill__ref  { color: #a7adc4; letter-spacing: 0.12em; font-weight: 400; }

/* the tear line, punched through both edges of the card */
.waybill__perf {
  position: relative;
  height: 0;
  margin: 0 20px;
  border-top: 2px dashed var(--line);
}

.waybill__perf::before,
.waybill__perf::after {
  content: "";
  position: absolute;
  top: -11px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ground);
  border: 1px solid var(--line);
}

.waybill__perf::before { left: -32px; clip-path: inset(0 0 0 50%); }
.waybill__perf::after  { right: -32px; clip-path: inset(0 50% 0 0); }

.waybill__body {
  padding: 30px 32px 32px;
}

.auth .waybill__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 27px;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 6px;
  color: var(--ink);
}

.auth .waybill__lede {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 26px;
}

.waybill__foot {
  border-top: 1px solid var(--line);
  padding: 18px 32px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
}

.waybill__foot a {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1.5px solid var(--flame);
  padding-bottom: 1px;
}

.waybill__foot a:hover {
  color: var(--flame);
}

/* Honeypot / carried-over hidden inputs (mirrors .h in style.css) */
.auth .h {
  display: none !important;
}

/* ------------------------------------------------------------------ fields */

.auth-form .field {
  margin-bottom: 18px;
}

.auth-form .field__label {
  display: block;
  font-family: var(--utility);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 7px;
}

.white-content .auth-form .form-control,
.auth-form .form-control {
  display: block;
  width: 100%;
  height: auto;
  padding: 12px 15px;
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink);
  background-color: #fff;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.white-content .auth-form .form-control:focus,
.auth-form .form-control:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(255, 63, 58, 0.13);
}

.white-content .auth-form .form-control::placeholder,
.auth-form .form-control::placeholder {
  color: #aab0c6;
}

.white-content .auth-form .form-control[readonly],
.auth-form .form-control[readonly] {
  background-color: #f7f8fc;
  color: var(--ink-soft);
}

.white-content .auth-form select.form-control,
.auth-form select.form-control {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5L6 6.5L11 1.5' stroke='%235a617f' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 15px center;
}

.white-content .auth-form .form-control.is-invalid,
.auth-form .form-control.is-invalid {
  border-color: var(--flame);
}

.auth-form .field__error {
  display: block;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--flame);
  margin-top: 6px;
}

.auth-form .field-row {
  display: flex;
  gap: 16px;
}

.auth-form .field-row > .field {
  flex: 1 1 0;
  min-width: 0;
}

.field__aside {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.field__link {
  font-size: 12.5px;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.field__link:hover {
  color: var(--flame);
  border-bottom-color: currentColor;
}

/* ----------------------------------------------------------------- consent */

.consent {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 22px 0 4px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.consent label {
  display: inline;
  margin: 0;
  font-weight: inherit;
  font-size: inherit;
  color: inherit;
  text-transform: none;
  cursor: pointer;
}

.consent input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--flame);
  cursor: pointer;
}

.consent a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

/* ----------------------------------------------------------------- buttons */

.btn-rocket {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 14px 20px;
  border: 0;
  border-radius: 10px;
  background: var(--brand-grad);
  color: #fff;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.15s ease;
}

.btn-rocket:hover {
  filter: brightness(1.06);
  box-shadow: 0 12px 26px -12px rgba(255, 63, 58, 0.65);
}

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

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

.btn-quiet {
  display: inline-block;
  margin-top: 8px;
  padding: 12px 22px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.btn-quiet:hover {
  border-color: var(--ink);
  color: var(--ink);
  text-decoration: none;
}

/* ------------------------------------------------------------ status notes */

.note {
  padding: 14px 16px;
  border-radius: 12px;
  background: #f4f5fa;
  border-left: 3px solid #23c48a;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 22px;
}

.note--sent {
  border-left-color: #23c48a;
}

/* -------------------------------------------------------------- terms modal */

.terms-modal .modal-content {
  border-radius: 18px;
  border: 0;
  overflow: hidden;
}

.terms-modal .modal-header {
  border-bottom: 1px solid var(--line);
  padding: 20px 28px;
}

.terms-modal .modal-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}

.terms-modal .modal-body {
  padding: 22px 28px;
}

.terms-modal .terms-scroll {
  height: 52vh;
  overflow-y: auto;
  padding-right: 14px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-soft);
}

.terms-modal .terms-scroll h4 {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin: 22px 0 8px;
  letter-spacing: -0.01em;
}

.terms-modal .terms-scroll h4:first-child {
  margin-top: 0;
}

.terms-modal .modal-footer {
  border-top: 1px solid var(--line);
  padding: 16px 28px;
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 991px) {
  .auth {
    display: block;
  }

  .auth__aside {
    display: none;
  }

  .auth__brand--mobile {
    display: block;
    margin-bottom: 28px;
  }

  .auth__main {
    min-height: 100vh;
    padding: 40px 20px 48px;
  }
}

@media (max-width: 575px) {
  .auth__main {
    padding: 28px 14px 40px;
  }

  .waybill {
    border-radius: 16px;
  }

  .waybill__stub {
    padding: 16px 22px 14px;
  }

  .waybill__perf {
    margin: 0 14px;
  }

  .waybill__perf::before { left: -26px; }
  .waybill__perf::after  { right: -26px; }

  .waybill__body {
    padding: 24px 22px 26px;
  }

  .waybill__foot {
    padding: 16px 22px;
  }

  .waybill__title {
    font-size: 24px;
  }

  .auth-form .field-row {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .waybill,
  .route__item::before {
    animation: none;
  }

  .btn-rocket {
    transition: none;
  }
}
