/* ── Design Tokens ────────────────────────────────────────────────────────── */
:root {
  --navy:    #0d1b2a;
  --navy2:   #1a2e44;
  --navy3:   #243b55;
  --orange:  #f4820a;
  --orange2: #e06b00;
  --white:   #ffffff;
  --text:    #e8edf2;
  --muted:   #8fa3b8;
  --border:  #2a3f57;
  --card-bg: #162234;
  --input-bg:#1e3048;
  --radius:  12px;
  --tap:     48px;
  --shadow:  0 4px 24px rgba(0,0,0,0.35);
}

/* ── Reset ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--navy);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
}

/* ── Layout ───────────────────────────────────────────────────────────────── */
.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

main { display: flex; flex-direction: column; gap: 20px; }

/* ── Header ───────────────────────────────────────────────────────────────── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--orange);
  color: var(--white);
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}

.logo-tag {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.header-phone {
  font-size: 13px;
  font-weight: 600;
  color: var(--orange);
  text-decoration: none;
  border: 1px solid var(--orange);
  padding: 6px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 20px 0 4px;
}

.hero h1 {
  font-size: clamp(22px, 5vw, 30px);
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 10px;
}

.hero p {
  font-size: 15px;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto;
}

/* ── Form Card ────────────────────────────────────────────────────────────── */
.form-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow);
}

form { display: flex; flex-direction: column; gap: 16px; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 400px) {
  .field-row { grid-template-columns: 1fr; }
}

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

label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.required { color: var(--orange); }

input, select, textarea {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 15px;
  padding: 12px 14px;
  width: 100%;
  min-height: var(--tap);
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238fa3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--orange);
}

textarea { resize: vertical; min-height: 100px; line-height: 1.5; }

input::placeholder, textarea::placeholder { color: var(--navy3); }

.btn-submit {
  background: var(--orange);
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  min-height: var(--tap);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.15s, transform 0.1s;
  margin-top: 4px;
}

.btn-submit:hover { background: var(--orange2); }
.btn-submit:active { transform: scale(0.98); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Spinner ──────────────────────────────────────────────────────────────── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Result Card ──────────────────────────────────────────────────────────── */
.result-card {
  background: var(--card-bg);
  border: 1px solid var(--orange);
  border-radius: var(--radius);
  padding: 28px 20px 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeUp 0.3s ease;
}

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

.result-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: 20px;
  width: fit-content;
}

.result-badge.urgency-low    { background: #1a3a2a; color: #4ade80; }
.result-badge.urgency-medium { background: #3a2e00; color: #fbbf24; }
.result-badge.urgency-high   { background: #3a1a1a; color: #f87171; }

.result-range {
  font-size: clamp(28px, 7vw, 40px);
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
}

.result-detail {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
}

.result-cta {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--navy2);
  border-radius: 10px;
  padding: 16px;
}

.cta-icon { font-size: 24px; flex-shrink: 0; margin-top: 2px; }

.result-cta strong {
  display: block;
  font-size: 15px;
  color: var(--white);
  margin-bottom: 4px;
}

.result-cta p { font-size: 13px; color: var(--muted); }

.btn-call {
  display: block;
  text-align: center;
  background: var(--orange);
  color: var(--white);
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  border-radius: 10px;
  padding: 14px;
  min-height: var(--tap);
  transition: background 0.15s;
}

.btn-call:hover { background: var(--orange2); }

.btn-again {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 10px;
  font-size: 14px;
  padding: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s;
}

.btn-again:hover { border-color: var(--muted); color: var(--text); }

/* ── Trust Bar ────────────────────────────────────────────────────────────── */
.trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.trust-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--orange);
}

.trust-label {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin-top: 2px;
}

.trust-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 24px 0 0;
  font-size: 12px;
  color: var(--navy3);
  line-height: 1.8;
}

/* ── Toast ────────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1e3048;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  transition: transform 0.25s ease;
  z-index: 999;
  white-space: nowrap;
  pointer-events: none;
}

.toast.show { transform: translateX(-50%) translateY(0); }

/* ── Utility ──────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
