/* Base reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Color system */
:root {
  --page-bg: #f4f7fb;
  --card-bg: #ffffff;
  --text-main: #172033;
  --text-soft: #5d6880;
  --border: #d8dfeb;
  --border-focus: #5a7cff;
  --shadow: 0 20px 45px rgba(24, 39, 75, 0.12);
  --error: #d93025;
  --button-bg: #1f4ed8;
  --button-hover: #183fb0;
  --row-one: #f8faff;
  --row-two: #f5f9f7;
  --row-three: #fff9f1;
}

/* Page layout */
body {
  min-height: 100vh;
  font-family: "Poppins", sans-serif;
  background: var(--page-bg);
  color: var(--text-main);
}

.page-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

/* Card */
.form-card {
  width: min(100%, 760px);
  background: var(--card-bg);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 32px;
}

/* Header section */
.form-header {
  margin-bottom: 28px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #335cbb;
  margin-bottom: 10px;
}

.hero-title-box {
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  padding: 22px 24px;
  border-radius: 20px;
  background: linear-gradient(135deg, #eaf2ff 0%, #f8fbff 58%, #eef7f2 100%);
  border: 1px solid #d9e4f7;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.hero-title-box::before {
  content: "";
  position: absolute;
  top: -28px;
  right: -18px;
  width: 120px;
  height: 120px;
  border-radius: 30px;
  transform: rotate(20deg);
  background: rgba(58, 110, 230, 0.12);
}

.hero-title-box::after {
  content: "";
  position: absolute;
  bottom: -52px;
  right: 24px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(31, 78, 216, 0.08);
}

.form-header h1 {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  margin-bottom: 0;
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  line-height: 1.08;
}

.form-header h1 span:first-child {
  color: #21314e;
  font-weight: 600;
}

.form-header h1 span:last-child {
  width: fit-content;
  padding: 5px 14px 7px;
  border-radius: 999px;
  background: #1f4ed8;
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.form-header p {
  color: var(--text-soft);
  font-size: 0.98rem;
  line-height: 1.7;
}

/* Form structure */
#clientForm {
  display: grid;
  gap: 18px;
}

.field-row {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
}

.field-row--single {
  background: var(--row-one);
}

.field-row--accent {
  background: var(--row-two);
}

.field-row--soft {
  background: var(--row-three);
}

.field-row--budget {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  background: linear-gradient(180deg, #f9fbff 0%, #f6f8fc 100%);
}

.field-group {
  display: flex;
  flex-direction: column;
}

.field-group label {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.field-group input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  font: inherit;
  color: var(--text-main);
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.field-group input::placeholder {
  color: #8a94a8;
}

.field-group input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px rgba(90, 124, 255, 0.14);
  transform: translateY(-1px);
}

.field-group input.input-error {
  border-color: var(--error);
}

.error-message {
  min-height: 18px;
  margin-top: 8px;
  font-size: 0.84rem;
  color: var(--error);
}

/* Submit */
.submit-row {
  padding-top: 6px;
}

.submit-row button {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 15px 20px;
  font: inherit;
  font-weight: 600;
  color: #ffffff;
  background: var(--button-bg);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.submit-row button:hover {
  background: var(--button-hover);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(31, 78, 216, 0.22);
}

.submit-row button:active {
  transform: translateY(0);
}

/* Responsive behavior */
@media (max-width: 640px) {
  .form-card {
    padding: 22px;
    border-radius: 20px;
  }

  .hero-title-box {
    padding: 18px;
  }

  .field-row--budget {
    grid-template-columns: 1fr;
  }
}
