/* ============================================================
   assessment.css — styles unique to the Nutrition Assessment page.
   Loaded after styles.css; reuses its tokens (--surface, --line,
   --orange, --cream, --muted). Only genuinely-new UI lives here.
   ============================================================ */

/* Header on a page with no arch hero: script.js keeps the bar
   transparent and hides the centred brand until you scroll past a
   .hero-scroll that doesn't exist here. Force the solid look + visible
   logo, but yield when the full-screen menu is open (matches styles.css). */
.js body.page-form:not(.nav-open) .site-header {
  background: rgba(21, 19, 17, 0.94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line-soft), 0 12px 30px rgba(0, 0, 0, 0.4);
}
.js body.page-form .site-header .brand { opacity: 1; visibility: visible; }

/* Clear the fixed header. */
.assessment-band { padding-top: clamp(132px, 18vh, 184px); }

/* ---- Card panel wrapping the form (mirrors .plan-card) ---- */
.assessment-card {
  max-width: 760px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: 16px; padding: clamp(24px, 4vw, 44px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
  position: relative;
}
.assessment-card::after {
  content: ""; position: absolute; top: 0; left: 20%; right: 20%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
  pointer-events: none;
}

/* ---- Fieldsets group the form into royal "chapters" ---- */
.form-group { border: 0; padding: 0; margin: 0 0 clamp(24px, 3.5vw, 38px); }
.form-group:last-of-type { margin-bottom: 0; }
.form-group > legend {
  font-family: 'Cinzel', serif; font-weight: 600; font-size: clamp(13px, 1.2vw, 15px);
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--orange);
  padding: 0 0 14px; margin-bottom: 18px; width: 100%;
  border-bottom: 1px solid var(--line);
}

/* ---- Field layout: single column, some pairs side-by-side ---- */
.field-grid { display: grid; grid-template-columns: 1fr; gap: 20px 24px; }
@media (min-width: 640px) { .field-grid--2 { grid-template-columns: 1fr 1fr; } }
.field--full { grid-column: 1 / -1; }

.field { display: grid; gap: 8px; }
.field > label,
.field > .field-label {
  font-family: 'Cinzel', serif; font-weight: 600; font-size: 12.5px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--cream);
}
.req { color: var(--orange); margin-left: 2px; }
.hint { font-family: 'Cormorant Garamond', serif; font-size: 14px; color: var(--muted); font-style: italic; }

/* ---- Inputs ---- */
.field input,
.field textarea,
.field select {
  width: 100%; box-sizing: border-box;
  font-family: 'Cormorant Garamond', Georgia, serif; font-size: 17px; color: var(--cream);
  background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: 10px;
  padding: 12px 14px;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
.field textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
.field input::placeholder,
.field textarea::placeholder { color: var(--muted); opacity: 0.7; }
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none; border-color: var(--orange); background: var(--surface);
  box-shadow: 0 0 0 3px rgba(239, 127, 44, 0.16);
}

/* ---- Radio groups rendered as selectable chips ---- */
.radio-group { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-chip { position: relative; }
.radio-chip input {
  position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0;
}
.radio-chip span {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Cinzel', serif; font-weight: 600; font-size: 12.5px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--cream);
  background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: 999px;
  padding: 10px 18px; cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.radio-chip:hover span { border-color: var(--orange); color: var(--orange); }
.radio-chip input:checked + span {
  background: var(--orange); color: var(--bg); border-color: var(--orange);
}
.radio-chip input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(239, 127, 44, 0.3);
}

/* ---- Honeypot: off-screen but still "fillable" by bots ---- */
.hp {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}

/* ---- Submit row + status ---- */
.form-actions { margin-top: clamp(26px, 3.5vw, 38px); display: grid; gap: 16px; justify-items: start; }
.form-actions .pill { border: 1.5px solid var(--orange); cursor: pointer; }
.form-actions .pill[disabled] { opacity: 0.6; cursor: default; }
.privacy-note { font-family: 'Cormorant Garamond', serif; font-size: 14.5px; color: var(--muted); }

.form-status { display: none; font-family: 'Cormorant Garamond', serif; font-size: 16px; padding: 12px 16px; border-radius: 10px; }
.form-status.is-error {
  display: block; color: #ffd0b8;
  background: rgba(192, 73, 43, 0.16); border: 1px solid var(--nonveg);
}

/* ---- Success panel (replaces the form) ---- */
.form-done { display: none; text-align: center; padding: clamp(20px, 5vw, 48px) 0; }
.form-done.is-shown { display: block; }
.form-done .script { color: var(--orange); font-size: clamp(34px, 6vw, 56px); }
.form-done h2 { margin: 6px 0 10px; }
.form-done p { color: var(--muted); max-width: 480px; margin: 0 auto; }
.form-done .footer-cta { justify-content: center; margin-top: 22px; }
