:root {
  color-scheme: dark;
  --page: #07090d;
  --surface: #11141b;
  --field: #171b24;
  --border: #2a2f3b;
  --text: #f7f8fa;
  --muted: #a7adba;
  --accent: #5e6ad2;
  --warning: #d64b8a;
  --radius: 22px;
}

* { box-sizing: border-box; }
html { font-family: Inter, Geist, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--page); color: var(--text); }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 70% 12%, rgba(94,106,210,.12), transparent 32%), var(--page); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }

.page-shell { min-height: 100vh; display: grid; place-items: center; padding: 40px; }
.page-copy { width: min(560px, 100%); text-align: left; }
.page-logo { width: 172px; height: auto; margin-bottom: 70px; }
.eyebrow, .brand-row span { font: 600 11px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .16em; color: var(--muted); }
.page-copy h1 { max-width: 520px; margin: 18px 0; font: 700 clamp(42px, 6vw, 72px)/.98 Georgia, "Times New Roman", serif; letter-spacing: -.04em; }
.page-copy > p:not(.eyebrow) { max-width: 500px; margin: 0 0 30px; color: var(--muted); font-size: 18px; line-height: 1.6; }

.modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 26px; opacity: 0; visibility: hidden; transition: opacity .22s ease, visibility .22s ease; }
.modal.is-open { opacity: 1; visibility: visible; }
.modal-backdrop { position: absolute; inset: 0; border: 0; background: rgba(2,3,6,.82); backdrop-filter: blur(12px); }
.form-shell { position: relative; width: min(940px, 100%); max-height: calc(100vh - 52px); overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 28px; box-shadow: 0 32px 90px rgba(0,0,0,.55); }
.form-shell::before { content: ""; display: block; height: 5px; background: linear-gradient(90deg, var(--accent) 0 83%, var(--warning) 83% 89%, transparent 89%); }
.brand-row { display: flex; align-items: center; justify-content: space-between; padding: 24px 36px 20px; }
.brand-row img { width: 148px; height: auto; }
.close-button { position: absolute; z-index: 2; right: 18px; top: 50px; display: none; width: 36px; height: 36px; padding: 0; border: 1px solid var(--border); border-radius: 50%; color: var(--muted); background: var(--field); font-size: 24px; line-height: 30px; }
.form-step { display: none; animation: enter .24s ease; }
.form-step.is-active { display: block; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.offer-image, .success-image { height: 260px; margin: 0 36px; border-radius: 18px; background-position: center; background-size: cover; overflow: hidden; }
.offer-image { display: flex; align-items: flex-start; padding: 26px; background-image: linear-gradient(180deg, rgba(7,9,13,.08), rgba(7,9,13,.64)), url('/assets/operator.jpg'); }
.offer-image span { font: 600 11px/1.2 ui-monospace, monospace; letter-spacing: .14em; }
.success-image { background-image: linear-gradient(rgba(7,9,13,.16), rgba(7,9,13,.42)), url('/assets/cargo.jpg'); }
.route-line { height: 4px; width: 52%; margin: -2px 0 0 36px; background: var(--accent); position: relative; }
.route-line i { position: absolute; right: -6px; top: -4px; width: 12px; height: 12px; border-radius: 50%; background: var(--warning); }
.step-content { padding: 38px 58px 52px; }
.step-content h2, .step-two-heading h2 { max-width: 720px; margin: 0; font-size: clamp(31px, 4vw, 48px); line-height: 1.06; letter-spacing: -.035em; }
.step-content > p, .step-two-heading p { max-width: 720px; margin: 18px 0 26px; color: var(--muted); line-height: 1.6; }
.step-content ul { display: grid; gap: 13px; margin: 0; padding: 0; list-style: none; }
.step-content li { position: relative; padding-left: 25px; font-size: 15px; line-height: 1.45; }
.step-content li::before { content: ""; position: absolute; left: 0; top: .48em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.action-row { display: flex; align-items: center; gap: 24px; margin-top: 34px; }
.action-row small { color: var(--muted); }
.primary-button, .secondary-button { min-height: 52px; padding: 0 28px; border-radius: 12px; border: 1px solid transparent; font-weight: 700; color: white; }
.primary-button { background: var(--accent); }
.primary-button:hover { background: #6975df; }
.primary-button:focus-visible, .secondary-button:focus-visible, input:focus-visible, textarea:focus-visible, .close-button:focus-visible { outline: 3px solid rgba(94,106,210,.38); outline-offset: 2px; }
.primary-button[disabled] { cursor: wait; opacity: .68; }
.secondary-button { margin-top: 34px; color: var(--text); border-color: var(--border); background: var(--field); }

[data-step="2"] { padding: 14px 46px 48px; }
.step-two-heading { display: flex; gap: 20px; align-items: flex-start; margin: 8px 0 32px; }
.step-two-heading h2 { font-size: clamp(29px, 3.5vw, 42px); }
.step-two-heading p { margin: 9px 0 0; }
.back-button { flex: 0 0 auto; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 10px; color: var(--muted); background: var(--field); }
.fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 24px; }
.fields-grid label { display: grid; gap: 9px; font-size: 13px; font-weight: 700; }
.fields-grid label:has([required])::after { content: ""; position: absolute; }
.full-width { grid-column: 1 / -1; }
input, textarea { width: 100%; border: 1px solid var(--border); border-radius: 12px; background: var(--field); color: var(--text); padding: 14px 16px; transition: border-color .18s, box-shadow .18s; }
input { min-height: 50px; }
textarea { min-height: 94px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #747b89; }
input:focus, textarea:focus { border-color: var(--accent); }
.consent { display: flex; align-items: center; gap: 12px; margin-top: 24px; color: var(--text); font-size: 13px; }
.consent input { appearance: none; width: 19px; min-height: 19px; height: 19px; padding: 0; border-radius: 5px; }
.consent input:checked { background: var(--accent); box-shadow: inset 0 0 0 4px var(--field); }
.submit-row { margin-top: 20px; }
.form-error { min-height: 20px; margin: 12px 0 0; color: #f28bb8; font-size: 13px; }
.success-step strong { display: block; margin-top: 30px; }

@media (max-width: 720px) {
  .modal { padding: 0; align-items: end; }
  .form-shell { max-height: 96vh; border-radius: 24px 24px 0 0; }
  .brand-row { padding: 20px 22px 16px; }
  .brand-row img { width: 132px; }
  .offer-image, .success-image { height: 210px; margin: 0 20px; }
  .route-line { margin-left: 20px; }
  .step-content { padding: 30px 26px 38px; }
  .step-content h2 { font-size: 32px; }
  [data-step="2"] { padding: 8px 22px 38px; }
  .fields-grid { grid-template-columns: 1fr; gap: 17px; }
  .full-width { grid-column: auto; }
  .action-row { align-items: flex-start; flex-direction: column; gap: 12px; }
  .primary-button { width: 100%; }
  .close-button { display: block; }
}

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