@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Syne:wght@600;700;800&display=swap");

:root {
  color-scheme: light;
  --page: #f7f6f3;
  --ink: #12141a;
  --muted: #5c6370;
  --subtle: #8b919c;
  --line: rgba(18, 20, 26, 0.1);
  --line-strong: rgba(18, 20, 26, 0.16);
  --surface: #ffffff;
  --surface-2: #f0efe9;
  --accent: #1f6bff;
  --accent-ink: #0b3fad;
  --accent-soft: rgba(31, 107, 255, 0.1);
  --accent-glow: rgba(31, 107, 255, 0.22);
  --success: #0f8a5f;
  --success-soft: rgba(15, 138, 95, 0.12);
  --danger: #c2314d;
  --danger-soft: rgba(194, 49, 77, 0.1);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px rgba(18, 20, 26, 0.08);
  --font: "Space Grotesk", system-ui, sans-serif;
  --display: "Syne", system-ui, sans-serif;
  --max: 920px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: var(--font);
  background:
    radial-gradient(900px 420px at 8% -10%, rgba(31, 107, 255, 0.14), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(15, 138, 95, 0.1), transparent 50%),
    linear-gradient(180deg, #fbfaf7 0%, var(--page) 40%, #eef1f6 100%);
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }

.hidden { display: none !important; }

.app {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 80px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background:
    linear-gradient(145deg, #1f6bff, #0f8a5f 70%);
  box-shadow: 0 10px 28px var(--accent-glow);
}

.link-quiet {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
}

.link-quiet:hover { color: var(--ink); }

.hero {
  margin-bottom: 22px;
}

.hero h1 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: clamp(28px, 4.5vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
  max-width: 54ch;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 28px 0 26px;
  position: relative;
}

.stepper::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 12%;
  right: 12%;
  height: 2px;
  background: var(--line);
  z-index: 0;
}

.step {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--subtle);
  font-size: 13px;
  font-weight: 650;
}

.step-icon {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--subtle);
}

.step.active { color: var(--ink); }
.step.active .step-icon {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 10px 24px var(--accent-glow);
}

.step.done { color: var(--accent-ink); }
.step.done .step-icon {
  background: var(--accent-soft);
  border-color: rgba(31, 107, 255, 0.35);
  color: var(--accent);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: 28px;
  animation: rise 0.45s ease both;
}

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

.card h2 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing: -0.035em;
}

.card-sub {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.5;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.badge-blue {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}

.field-hint {
  margin: -4px 0 0;
  color: var(--subtle);
  font-size: 13px;
  line-height: 1.45;
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
textarea,
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 13px 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

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

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
}

.actions-end { justify-content: flex-end; }
.actions-center { justify-content: center; }

.btn {
  border: 0;
  border-radius: 14px;
  padding: 13px 18px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.55; cursor: wait; transform: none; }

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 12px 28px var(--accent-glow);
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 10px 4px;
}

.btn-block { width: 100%; }

.notice {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
}

.notice.error {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(194, 49, 77, 0.2);
}

.notice.ok {
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid rgba(15, 138, 95, 0.2);
}

.notice.info {
  background: var(--accent-soft);
  color: var(--accent-ink);
  border: 1px solid rgba(31, 107, 255, 0.18);
}

.banner-trial {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(120deg, rgba(31, 107, 255, 0.1), rgba(15, 138, 95, 0.08));
  border: 1px solid rgba(31, 107, 255, 0.18);
  margin-bottom: 18px;
}

.banner-trial strong { display: block; margin-bottom: 2px; }

.building {
  text-align: center;
  padding: 18px 8px 8px;
}

.spinner {
  width: 64px;
  height: 64px;
  margin: 8px auto 20px;
  border-radius: 50%;
  border: 3px solid var(--accent-soft);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}

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

.build-status {
  font-weight: 750;
  margin: 0 0 18px;
}

.checklist {
  text-align: left;
  max-width: 360px;
  margin: 0 auto;
  display: grid;
  gap: 10px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--subtle);
  font-size: 14px;
  font-weight: 600;
}

.check-item.done { color: var(--success); }
.check-item.active { color: var(--ink); font-weight: 750; }

.check-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid currentColor;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 11px;
}

.check-item.done .check-dot {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.check-item.active .check-dot {
  border-color: var(--accent);
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  margin-bottom: 16px;
}

.toolbar-left {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.configurator {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #fbfbf9;
}

.config-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: white;
}

.config-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.config-title .orb {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), #0f8a5f);
  display: grid;
  place-items: center;
  color: white;
  font-size: 14px;
}

.config-title h3 {
  margin: 0;
  font-size: 16px;
  font-family: var(--display);
}

.config-title p {
  margin: 2px 0 0;
  color: var(--subtle);
  font-size: 12px;
}

.progress-wrap {
  padding: 14px 18px 8px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
}

.progress-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.progress-bar > span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #0f8a5f);
  transition: width 0.35s ease;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 12px;
}

.chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.chip.done {
  background: var(--success-soft);
  border-color: rgba(15, 138, 95, 0.25);
  color: var(--success);
}

.chat {
  padding: 16px 18px;
  min-height: 220px;
  max-height: 340px;
  overflow: auto;
  display: grid;
  gap: 12px;
}

.bubble {
  max-width: min(520px, 92%);
  padding: 12px 14px;
  border-radius: 14px;
  line-height: 1.45;
  font-size: 14px;
}

.bubble.ai {
  background: white;
  border: 1px solid var(--line);
}

.bubble.user {
  margin-left: auto;
  background: var(--accent);
  color: white;
}

.chat-input {
  border-top: 1px solid var(--line);
  background: white;
  padding: 12px 14px 14px;
}

.chat-input textarea {
  min-height: 72px;
  border-color: var(--line);
}

.chat-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
  color: var(--subtle);
  font-size: 12px;
}

.plans {
  display: grid;
  gap: 14px;
}

.plan {
  position: relative;
  border: 1.5px solid var(--line-strong);
  border-radius: 16px;
  padding: 18px;
  background: white;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.plan:hover { border-color: rgba(31, 107, 255, 0.35); }

.plan.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.plan-popular {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 750;
  padding: 4px 10px;
  border-radius: 999px;
}

.plan-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.plan-top h3 {
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: 20px;
}

.plan-top p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.plan-price {
  text-align: right;
  white-space: nowrap;
}

.plan-price strong {
  font-size: 28px;
  letter-spacing: -0.03em;
}

.plan-price span {
  color: var(--muted);
  font-size: 13px;
}

.plan-price .trial-note {
  display: block;
  color: var(--accent);
  font-weight: 700;
  font-size: 12px;
  margin-top: 2px;
}

.plan-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.pill {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.features li {
  position: relative;
  padding-left: 22px;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.4;
}

.features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 800;
}

.pay-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface-2);
  margin-bottom: 18px;
  font-weight: 650;
}

.pay-summary small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 500;
}

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

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 22, 0.45);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 40;
}

.modal {
  width: min(640px, 100%);
  background: white;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
}

.modal h3 {
  margin: 0 0 8px;
  font-family: var(--display);
}

.call-panel {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 10px;
  padding: 18px;
  border: 1px dashed rgba(31, 107, 255, 0.35);
  border-radius: 14px;
  background: rgba(31, 107, 255, 0.04);
  margin-bottom: 14px;
}

.call-orb {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #fff, #8eb4ff 20%, var(--accent) 55%, #16325f);
  box-shadow: 0 0 40px var(--accent-glow);
}

.call-orb.live {
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  50% { transform: scale(1.06); filter: saturate(1.2); }
}

.success-screen {
  text-align: center;
  padding: 30px 10px;
}

.success-screen .big {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  display: grid;
  place-items: center;
  font-size: 32px;
  font-weight: 800;
}

@media (max-width: 720px) {
  .app { width: min(100% - 20px, var(--max)); padding-top: 18px; }
  .card { padding: 20px 16px; }
  .row-2, .features, .pay-grid { grid-template-columns: 1fr; }
  .stepper { gap: 10px; }
  .step span { font-size: 11px; text-align: center; }
  .plan-top { flex-direction: column; }
  .plan-price { text-align: left; }
}
