/*
 * Hess intake quiz styles.
 *
 * The quiz replaces the old three field box inside .contact-section, which is near-black with
 * white text. Everything here inherits that context deliberately: the card, the borders and the
 * input treatment are the SAME language the page's original form used, so the swap reads as the
 * page growing a better form rather than a widget being dropped onto it.
 *
 * Two rules drove the choices, both from the spec:
 *   1. It must not read as a qualification test. That is why the progress bar is thin and quiet,
 *      the count is plain words, and every option is a full-width answer rather than a radio.
 *   2. It is used by people on a phone, often badly shaken. Tap targets are at least 44px tall
 *      with real gaps between them, and nothing depends on a hover state.
 */

#hess-quiz {
  --hq-line: rgba(255, 255, 255, 0.14);
  --hq-line-strong: rgba(255, 255, 255, 0.28);
  --hq-surface: rgba(255, 255, 255, 0.05);
  --hq-surface-hover: rgba(255, 255, 255, 0.1);
  --hq-muted: rgba(255, 255, 255, 0.62);
}

.hq-card {
  background: var(--hq-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 32px;
}

/* --- Progress. Quiet on purpose: a loud tracker makes this feel like a test. --- */

.hq-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.hq-bar {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  overflow: hidden;
}

.hq-bar-fill {
  height: 100%;
  background: var(--bronze-on-dark);
  border-radius: 2px;
  transition: width 0.25s ease;
}

.hq-count {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--hq-muted);
  white-space: nowrap;
}

/* --- Question --- */

.hq-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  line-height: 1.3;
  font-weight: 600;
  color: var(--white);
  margin: 0 0 8px;
}

.hq-title:focus {
  outline: none;
}

.hq-title:focus-visible {
  outline: 2px solid var(--bronze-on-dark);
  outline-offset: 4px;
}

.hq-help {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--hq-muted);
  margin: 0 0 22px;
}

/* --- Options. One tap, full width, no radio buttons anywhere. --- */

.hq-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hq-option {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 15px 18px;
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hq-line);
  border-radius: 6px;
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.4;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.hq-option:hover {
  background: var(--hq-surface-hover);
  border-color: var(--hq-line-strong);
}

.hq-option:focus-visible {
  outline: 2px solid var(--bronze-on-dark);
  outline-offset: 2px;
}

.hq-option.is-chosen {
  border-color: var(--bronze-on-dark);
  background: rgba(196, 168, 130, 0.14);
}

/* --- Back. Deliberately understated; forward is the only emphasised direction. --- */

.hq-nav {
  margin-top: 20px;
}

.hq-back {
  background: none;
  border: none;
  padding: 10px 2px;
  min-height: 44px;
  color: var(--hq-muted);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hq-back:hover {
  color: var(--white);
}

.hq-back:focus-visible {
  outline: 2px solid var(--bronze-on-dark);
  outline-offset: 2px;
}

/* --- The one typing screen --- */

.hq-field {
  margin-bottom: 18px;
}

.hq-field label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hq-field input,
.hq-field textarea {
  width: 100%;
  padding: 14px 16px;
  min-height: 48px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: border-color 0.2s;
}

.hq-field input:focus,
.hq-field textarea:focus {
  outline: none;
  border-color: var(--bronze-on-dark);
}

.hq-field textarea {
  min-height: 84px;
  resize: vertical;
}

.hq-submit {
  width: 100%;
  min-height: 52px;
  background: var(--saddle-bronze);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  padding: 16px 32px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.hq-submit:hover:not(:disabled) {
  background: var(--saddle-bronze-hover);
}

.hq-submit:disabled {
  opacity: 0.6;
  cursor: default;
}

.hq-submit:focus-visible {
  outline: 2px solid var(--bronze-on-dark);
  outline-offset: 2px;
}

.hq-error {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  line-height: 1.5;
  color: #F2B8B5;
  margin: 0 0 12px;
  min-height: 0;
}

.hq-error:empty {
  margin: 0;
}

.hq-note {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.5);
  margin: 12px 0 0;
  text-align: center;
}

/* --- Thank you. It never names a tier and never turns anyone away. --- */

.hq-done .hq-title {
  margin-bottom: 12px;
}

.hq-call {
  display: inline-block;
  margin-top: 8px;
  padding: 15px 28px;
  min-height: 52px;
  background: var(--saddle-bronze);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none;
}

.hq-call:hover {
  background: var(--saddle-bronze-hover);
}

/*
 * Phones. David, 2026-10-02: a visitor must see every option of a step without scrolling. The
 * longest steps carry nine options, so the card is compacted here: 44px tap targets (the platform
 * minimum, still comfortable), tighter gaps and padding, and a smaller title. Measured, not
 * assumed: all nine fit inside a 390 x 664 viewport (an iPhone 12 to 15 with Safari's bars showing).
 */
@media (max-width: 600px) {
  .hq-card {
    padding: 16px 14px;
  }

  .hq-title {
    font-size: 1.18rem;
    margin-bottom: 4px;
  }

  .hq-help {
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 12px;
  }

  .hq-progress {
    margin-bottom: 10px;
  }

  .hq-options {
    gap: 5px;
  }

  .hq-option {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 0.95rem;
    line-height: 1.3;
  }

  .hq-nav {
    margin-top: 8px;
  }
}

/*
 * Short phones (an iPhone SE shows about 548px with Safari's bars): nine stacked options cannot fit,
 * so the options go two to a row. Measured 2026-10-02: single column ends at 653px on a 375 x 548
 * screen; two columns bring the nine-option steps inside it. Taller phones keep one column, which
 * reads faster.
 */
@media (max-width: 600px) and (max-height: 620px) {
  .hq-help {
    display: none;
  }

  .hq-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .hq-option {
    padding: 8px 10px;
    font-size: 0.86rem;
    line-height: 1.25;
  }
}

/*
 * The section around the quiz, on phones (David, 2026-10-02). Every "Talk to Kyle" button jumps to
 * #contact. On a phone that landed on a heading, a paragraph and a "Prefer to call?" block that
 * repeat the hero, with the first question 510px further down; the phone number is already pinned in
 * the sticky header. So on phones the jump lands on the form itself, just under the 62px header.
 * Desktop keeps the full section. Lives here, not in each page, so all six pages stay identical.
 */
@media (max-width: 600px) {
  #contact.contact-section {
    padding: 24px 0 48px;
    scroll-margin-top: 62px;
  }

  #contact .contact-text {
    display: none;
  }
}

/*
 * Laptop and desktop screens under about 960px tall (David, 2026-10-02): when a "Talk to Kyle"
 * button lands on the form, all nine options of the first step should show without scrolling. The
 * full-size card measured 787px, which does not fit an 834px browser window under the 72px header.
 * Same 46px buttons, a little less padding; taller screens keep the roomier version.
 */
@media (min-width: 601px) and (max-height: 960px) {
  .hq-card {
    padding: 24px 28px;
  }

  .hq-progress {
    margin-bottom: 16px;
  }

  .hq-help {
    margin-bottom: 14px;
  }

  .hq-options {
    gap: 7px;
  }

  .hq-option {
    min-height: 46px;
    padding: 11px 16px;
  }

  .hq-nav {
    margin-top: 10px;
  }
}
