:root {
  --bg: #f3efe7;
  --surface: rgba(255, 255, 255, 0.76);
  --surface-strong: #ffffff;
  --border: rgba(27, 43, 40, 0.12);
  --text: #17312e;
  --muted: #61746f;
  --accent: #c96d42;
  --accent-dark: #9e4f2d;
  --accent-soft: rgba(201, 109, 66, 0.14);
  --success: #1d7a4b;
  --error: #b93a32;
  --shadow: 0 24px 60px rgba(28, 39, 37, 0.12);
  --radius-lg: 28px;
  --radius-sm: 12px;
  --container: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(201, 109, 66, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(80, 130, 112, 0.14), transparent 24%),
    linear-gradient(180deg, #f8f4ed 0%, #f0ebe2 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.25), transparent 80%);
}

.page-shell {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
  padding: 28px 0 120px;
}

.hero {
  display: grid;
  grid-template-columns: 1.5fr minmax(260px, 360px);
  gap: 24px;
  align-items: start;
  margin-bottom: 28px;
}

.hero__content,
.hero__panel,
.form-section,
.sticky-submit,
.form-alert {
  backdrop-filter: blur(18px);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero__content {
  border-radius: 34px;
  padding: 36px;
}

.eyebrow,
.section-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.74rem;
  font-weight: 800;
}

.eyebrow {
  color: var(--accent-dark);
}

.hero h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero__lede {
  max-width: 58ch;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.hero__panel {
  border-radius: 28px;
  padding: 22px;
  position: sticky;
  top: 20px;
}

.progress-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
}

.progress-bar {
  margin-top: 14px;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(23, 49, 46, 0.08);
  overflow: hidden;
}

.progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #d99849);
  transition: width 180ms ease;
}

.progress-card__hint {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.intake-form {
  display: grid;
  gap: 20px;
}

.form-alert {
  border-radius: 18px;
  padding: 16px 18px;
  line-height: 1.55;
}

.form-alert.is-success {
  border-color: rgba(29, 122, 75, 0.22);
  color: var(--success);
  background: rgba(234, 247, 239, 0.95);
}

.form-alert.is-error {
  border-color: rgba(185, 58, 50, 0.2);
  color: var(--error);
  background: rgba(251, 239, 238, 0.96);
}

.form-section {
  border-radius: var(--radius-lg);
  padding: 28px;
}

.section-heading {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  margin-bottom: 24px;
}

.section-label {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.section-heading h2 {
  margin: 0;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
}

.section-heading p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

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

.field--full {
  grid-column: 1 / -1;
}

.field span,
.checklist-field legend {
  font-size: 0.95rem;
  font-weight: 700;
}

.field strong {
  color: var(--accent-dark);
}

.field em {
  color: var(--muted);
  font-style: normal;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.86);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(201, 109, 66, 0.85);
  box-shadow: 0 0 0 4px rgba(201, 109, 66, 0.12);
  background: var(--surface-strong);
}

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

input[type="file"] {
  padding: 12px;
}

.checklist-field {
  margin: 0;
  padding: 0;
  border: 0;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.68);
  font-weight: 600;
}

.checkbox-grid input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
}

.field-error {
  min-height: 1.1em;
  color: var(--error);
  font-size: 0.83rem;
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea {
  border-color: rgba(185, 58, 50, 0.58);
  box-shadow: 0 0 0 4px rgba(185, 58, 50, 0.08);
}

.sticky-submit {
  position: sticky;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 22px;
  z-index: 10;
}

.sticky-submit__meta p {
  margin: 0 0 4px;
  font-weight: 800;
}

.sticky-submit__meta span {
  color: var(--muted);
  font-size: 0.92rem;
}

.submit-button {
  border: 0;
  border-radius: 16px;
  padding: 15px 24px;
  min-width: 220px;
  font: inherit;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #d78a4b);
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, box-shadow 160ms ease;
  box-shadow: 0 16px 34px rgba(201, 109, 66, 0.28);
}

.submit-button:hover:enabled,
.submit-button:focus-visible:enabled {
  transform: translateY(-1px);
}

.submit-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

.submit-button.is-loading {
  position: relative;
  color: rgba(255, 255, 255, 0.82);
}

.submit-button.is-loading::after {
  content: "";
  width: 18px;
  height: 18px;
  margin-left: 10px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top-color: #fff;
  display: inline-block;
  vertical-align: middle;
  animation: spin 0.9s linear infinite;
}

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

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero__panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(calc(100% - 18px), var(--container));
    padding-top: 16px;
  }

  .hero__content,
  .hero__panel,
  .form-section {
    padding: 22px;
    border-radius: 24px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .sticky-submit {
    bottom: 8px;
    flex-direction: column;
    align-items: stretch;
  }

  .submit-button {
    width: 100%;
    min-width: 0;
  }
}
