:root {
  color-scheme: light;
  --ink: #071015;
  --body: #435158;
  --card: rgba(5, 14, 18, 0.94);
  --card-muted: #91a0aa;
  --field-line: rgba(226, 237, 242, 0.72);
  --accent: #68bee3;
  --accent-strong: #78cdef;
  --danger: #f06457;
  --shadow:
    0 46px 130px rgba(0, 0, 0, 0.5),
    0 0 70px rgba(104, 190, 227, 0.08);
  --bg-image: url("./desktop.png");
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: #000;
  color: var(--ink);
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  min-height: 100svh;
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(30px, 5vw, 72px);
  overflow-x: hidden;
  background: var(--bg-image) center / cover no-repeat;
}

.page-shell::before {
  content: "";
  position: absolute;
  inset: -18px;
  z-index: -2;
  background: inherit;
  filter: blur(12px) saturate(0.72);
  transform: scale(1.04);
}

.page-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 50%, rgba(3, 12, 15, 0.32), rgba(3, 12, 15, 0.76) 72%),
    rgba(0, 0, 0, 0.3);
}

.lead-stage {
  position: relative;
  isolation: isolate;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lead-stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(1040px, calc(100vw - 18px));
  height: min(920px, calc(100svh - 18px));
  border-radius: 48px;
  background:
    radial-gradient(ellipse at center, rgba(2, 9, 13, 0.94) 0%, rgba(2, 9, 13, 0.86) 42%, rgba(2, 9, 13, 0.5) 68%, transparent 86%),
    radial-gradient(circle at 50% 28%, rgba(104, 190, 227, 0.16), transparent 34%);
  filter: blur(18px);
  pointer-events: none;
}

.form-card {
  position: relative;
  isolation: isolate;
  width: min(820px, 100%);
  overflow: hidden;
  padding: clamp(46px, 5.4vw, 72px);
  border: 1px solid rgba(5, 14, 18, 0.94);
  border-radius: 36px;
  background:
    radial-gradient(circle at 50% 0%, rgba(104, 190, 227, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 44%),
    var(--card);
  box-shadow: var(--shadow);
  color: #f8fbff;
  display: grid;
  justify-items: center;
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
}

.form-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 0;
  border-radius: calc(36px - 1px);
  background:
    linear-gradient(135deg, rgba(5, 14, 18, 0.18), transparent 28%),
    linear-gradient(315deg, rgba(104, 190, 227, 0.05), transparent 34%);
  pointer-events: none;
}

.form-head {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-bottom: 36px;
  text-align: center;
}

.form-brand-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}

.form-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(360px, 86%);
  height: auto;
  flex: 0 0 auto;
}

.form-logo img {
  display: block;
  width: 100%;
  height: auto;
  filter: brightness(0) invert(1);
}

.brand-phone {
  display: block;
  width: min(360px, 86%);
  color: #ff3b30;
  font-size: clamp(1.9rem, 3.6vw, 2.45rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-align: center;
}

.form-head h2 {
  margin: 0;
  color: #f8fbff;
  font-size: clamp(1.9rem, 3.8vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: 0;
  font-weight: 850;
}

.form-head p {
  margin: 12px 0 0;
  color: var(--card-muted);
  font-size: 1.12rem;
  line-height: 1.45;
}

form {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 700px;
  display: grid;
  gap: 24px;
}

form > label {
  display: grid;
  gap: 12px;
}

form > label > span {
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 820;
  letter-spacing: 0;
  line-height: 1.1;
  text-transform: uppercase;
}

input[type="text"],
input[type="tel"] {
  width: 100%;
  height: 52px;
  border: 0;
  border-bottom: 1px solid var(--field-line);
  border-radius: 0;
  outline: none;
  padding: 0 0 12px;
  color: #f8fbff;
  background: transparent;
  transition:
    border-color 160ms ease;
}

input[type="text"]::placeholder,
input[type="tel"]::placeholder {
  color: rgba(194, 205, 214, 0.7);
}

input[type="text"]:focus,
input[type="tel"]:focus {
  border-bottom-color: var(--accent-strong);
}

.submit-button {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 62px;
  margin-top: 0;
  padding: 0 28px;
  border: 2px solid var(--accent);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    transform 160ms ease;
}

.submit-button:hover {
  border-color: var(--accent-strong);
  background: rgba(104, 190, 227, 0.08);
  transform: translateY(-1px);
}

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

.submit-button:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
  box-shadow: none;
}

.submit-button i {
  display: none;
}

.call-now {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 62px;
  padding: 0 28px;
  border: 2px solid #23d16b;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 auto;
  color: #ffffff;
  text-decoration: none;
  line-height: 1;
  transition:
    background-color 160ms ease,
    transform 160ms ease;
}

.call-now:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.call-now:active {
  transform: translateY(0);
}

.call-now-text {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.call-now-icon {
  display: grid;
  place-items: center;
  width: 25px;
  aspect-ratio: 1;
  border: 2px solid currentColor;
  border-radius: 999px;
  color: #23d16b;
}

.call-now-icon::before {
  content: "\260E";
  font-size: 0.9rem;
  line-height: 1;
  transform: translateY(-1px);
}

.call-now-number {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0;
}

.toast {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 10;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 13px;
  width: min(470px, calc(100vw - 36px));
  padding: 14px 52px 16px 16px;
  border: 1px solid rgba(104, 190, 227, 0.14);
  border-radius: 20px;
  background:
    radial-gradient(circle at 10% 0%, rgba(104, 190, 227, 0.14), transparent 32%),
    #12110f;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
  color: #f8fbff;
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.toast-icon {
  display: grid;
  place-items: center;
  width: 44px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: var(--accent);
  color: #12110f;
  font-weight: 900;
}

.toast-icon::before {
  content: "!";
  line-height: 1;
}

.toast.is-success .toast-icon::before {
  content: "\2713";
}

.toast-close {
  position: absolute;
  top: 13px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 30px;
  aspect-ratio: 1;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.74);
  cursor: pointer;
}

.toast-close::before {
  content: "\00d7";
  font-size: 1.15rem;
  line-height: 1;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.toast-body {
  min-width: 0;
}

.toast strong {
  display: block;
  margin: 1px 0 4px;
  font-size: 1.08rem;
  line-height: 1.18;
}

.toast p {
  margin: 0;
  color: rgba(232, 232, 232, 0.76);
  line-height: 1.36;
  font-size: 0.98rem;
  font-weight: 650;
}

.toast-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  margin-top: 12px;
  padding: 8px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1;
}

.toast-action-icon {
  display: grid;
  place-items: center;
  width: 18px;
  aspect-ratio: 1;
  color: #ffffff;
}

.toast-action-icon::before {
  content: "\260E";
  font-size: 0.86rem;
  transform: translateY(-1px);
}

.toast-action strong {
  display: inline;
  margin: 0;
  color: var(--accent);
  font-size: 1rem;
  line-height: 1;
}

@media (max-width: 1180px) {
  .form-card {
    width: min(780px, 100%);
  }
}

@media (max-width: 960px) {
  :root {
    --bg-image: url("./mobile.png");
  }

  html,
  body {
    min-height: 100dvh;
    background: #000 var(--bg-image) center / cover no-repeat;
  }

  .page-shell {
    min-height: 100dvh;
    padding: 12px;
  }

  .form-card {
    width: min(720px, 100%);
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 10px 14px;
  }

  .form-card {
    padding: 28px 24px 24px;
    border-radius: 24px;
  }

  .form-head {
    margin-bottom: 28px;
  }

  .form-logo {
    width: min(300px, 88%);
  }

  .form-brand-row {
    gap: 8px;
    margin-bottom: 20px;
  }

  .form-head h2 {
    font-size: 2.1rem;
  }

  form {
    gap: 20px;
  }

  .call-now {
    gap: 8px;
  }

  .call-now-text {
    font-size: 0.9rem;
  }

  .call-now-icon {
    width: 22px;
  }

  .call-now-number {
    font-size: 1.08rem;
  }

  .submit-button {
    font-size: 1.32rem;
  }

  .toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 11px;
    padding: 14px 48px 14px 14px;
    border-radius: 18px;
  }

  .toast strong {
    font-size: 1rem;
  }

  .toast p {
    font-size: 0.92rem;
  }

  .toast-action {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    width: 100%;
    gap: 7px;
    margin-top: 10px;
    padding: 8px 12px;
    font-size: 0.86rem;
  }

  .toast-action span[data-i18n] {
    min-width: 0;
    line-height: 1.12;
  }

  .toast-action strong {
    font-size: 0.94rem;
    text-align: right;
  }

  .toast-close {
    top: 12px;
    right: 12px;
  }
}

@media (max-width: 390px) {
  .form-card {
    padding-inline: 18px;
  }

  .toast {
    left: 8px;
    right: 8px;
    bottom: 8px;
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 12px 44px 12px 12px;
  }

  .toast-icon {
    width: 40px;
  }

  .toast p {
    font-size: 0.88rem;
  }

  .toast-action {
    padding: 8px 10px;
    font-size: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
