/* =====================================================
   /survey.html — PMX shell around the HubSpot form.
   NOTE: HubSpot's v4 embed injects a cross-origin <iframe>
   (js-eu1.hsforms.net/.../frame.html). CSS from this file
   CANNOT penetrate the iframe — all form styling
   (colors, fonts, label text) MUST be configured inside
   HubSpot's Form Editor → Style & preview tab. This file
   only styles the wrapper page around the iframe.
   ===================================================== */

.page-survey {
  background: var(--pmx-charcoal);
}

/* ---------- Intro ---------- */
.survey-intro {
  padding: var(--s-8) 0 var(--s-6);
  text-align: center;
}
.survey-intro__title {
  font-size: var(--fs-h1);
  max-width: 22ch;
  margin: 0 auto var(--s-5);
  line-height: 1.12;
}
.survey-intro__lead {
  font-size: var(--fs-lead);
  color: var(--pmx-cool-slate);
  max-width: 58ch;
  margin: 0 auto var(--s-5);
}
.survey-intro__meta {
  display: inline-flex;
  flex-direction: column;
  gap: var(--s-2);
  text-align: left;
  padding: var(--s-4) var(--s-5);
  background: rgba(201, 141, 115, 0.06);
  border: 1px solid var(--pmx-border-strong);
  border-radius: var(--radius);
  color: var(--pmx-pale-peach);
  font-size: 0.92rem;
  margin: 0 auto;
}
.survey-intro__meta strong { color: var(--pmx-copper); }

/* ---------- Embed card ---------- */
.survey-embed {
  padding: var(--s-5) 0 var(--s-9);
}
.survey-embed__card {
  background: var(--pmx-white);
  border: 1px solid var(--pmx-border);
  border-radius: var(--radius-lg);
  padding: clamp(0.75rem, 2vw, 1.25rem);
  box-shadow: var(--shadow);
  max-width: 860px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}
.survey-embed__card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--pmx-copper-gradient);
}
/* HubSpot iframe sizing — the embed auto-resizes but we give
   a safety minimum so the form isn't visually collapsed on first paint. */
.survey-embed__card .hs-form-frame,
.survey-embed__card iframe {
  display: block;
  width: 100%;
  min-height: 640px;
  border: 0;
}
.survey-embed__trust {
  max-width: 860px;
  margin: var(--s-5) auto 0;
  text-align: center;
  font-size: var(--fs-small);
  color: var(--pmx-cool-slate);
}
.survey-embed__fallback {
  padding: var(--s-5);
  color: var(--pmx-burnt-umber);
}

/* Revealed by the timeout script in survey.html when HubSpot's embed
   hasn't rendered its iframe — gives the user a one-click escape to the
   HubSpot-hosted share page. Never hides the form; if the embed finishes
   late, both are visible and the user picks. */
.survey-embed__recover {
  padding: var(--s-6) var(--s-5);
  text-align: center;
  border-top: 1px solid var(--pmx-border);
  margin-top: var(--s-5);
  background: rgba(201, 141, 115, 0.04);
}
.survey-embed__recover-title {
  font-size: var(--fs-h4);
  margin: 0 0 var(--s-3);
  color: var(--pmx-charcoal);
}
.survey-embed__recover p {
  color: var(--pmx-cool-slate);
  max-width: 42ch;
  margin: 0 auto var(--s-4);
}
.survey-embed__recover .btn { display: inline-block; }

/* Always-visible escape hatch below the form card. Invisible noise for
   the majority who see the form fine, one-click rescue for anyone whose
   browser (Edge default Tracking Prevention, Safari ITP, adblockers, etc.)
   silently breaks the embedded iframe. Never hidden by JS — robust to any
   detection logic failure. */
.survey-embed__alt {
  max-width: 860px;
  margin: var(--s-4) auto 0;
  text-align: center;
  font-size: var(--fs-small);
  color: var(--pmx-cool-slate);
}
.survey-embed__alt a {
  color: var(--pmx-copper);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.survey-embed__alt a:hover,
.survey-embed__alt a:focus-visible {
  text-decoration: underline;
}
