/* KnowGood Consultation Form Styles */

/* --- Variables --- */
:root {
  --bg: #F7F4EF;
  --fg: #1C1917;
  --accent: #C87D2F;
  --accent-light: #F0E4D0;
  --muted: #6B6357;
  --border: #E0D9CF;
  --surface: #EFEBE3;
  --error: #C0392B;
  --success: #2D7A3F;
}

/* --- Page layout --- */
body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'DM Sans', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  margin: 0;
}

/* --- Navigation (matches landing page) --- */
.nav {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.nav-logo:hover { color: var(--accent); }

.nav-tagline {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 400;
}

/* --- Page header --- */
.page-header {
  max-width: 680px;
  margin: 0 auto;
  padding: 4rem 2rem 2rem;
}

.page-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 0.75rem;
}

.page-header p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 520px;
}

/* --- Form card --- */
.form-card {
  max-width: 680px;
  margin: 0 auto 4rem;
  padding: 0 2rem;
}

.form-card-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem;
}

/* --- Form elements --- */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group:last-of-type { margin-bottom: 0; }

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.5rem;
}

.label-optional {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.8rem;
  margin-left: 0.25rem;
}

/* --- Service type toggle --- */
.service-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.service-toggle input[type="radio"] {
  display: none;
}

.service-toggle-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding: 1rem 1.1rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.service-toggle-label:hover {
  border-color: var(--accent);
}

.service-toggle input[type="radio"]:checked + .service-toggle-label {
  border-color: var(--accent);
  background: var(--accent-light);
}

.service-toggle-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--fg);
}

.service-toggle-desc {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

input[type="text"],
input[type="email"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--fg);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease;
  box-sizing: border-box;
  appearance: none;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B6357' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
}

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

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* --- File upload --- */
.file-upload-wrapper {
  position: relative;
}

.file-upload-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1.5px dashed var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.file-upload-label:hover {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}

.file-upload-label svg {
  flex-shrink: 0;
}

.file-upload-label:hover svg { stroke: var(--accent); }

.file-upload-wrapper input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
}

.file-name {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
}

/* --- Submit button --- */
.btn-submit {
  width: 100%;
  padding: 0.9rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  margin-top: 0.5rem;
}

.btn-submit:hover { background: #b06e25; }
.btn-submit:active { transform: scale(0.98); }

/* --- Success state --- */
.form-success {
  text-align: center;
  padding: 3rem 2rem;
}

.form-success-icon {
  width: 56px;
  height: 56px;
  background: var(--accent-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.form-success h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 0.75rem;
}

.form-success p {
  color: var(--muted);
  max-width: 400px;
  margin: 0 auto;
}

/* --- Error message --- */
.form-error {
  background: #FEE;
  border: 1px solid #FCC;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--error);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .form-card-inner { padding: 1.5rem; }
  .page-header { padding: 3rem 1.5rem 1.5rem; }
  .page-header h1 { font-size: 1.8rem; }
}