/* =====================================================================
   Order page (form + click-wrap + price summary).
   Built on the brutalist tokens defined in /css/styles.css.
   ===================================================================== */

.order-page main {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) var(--gutter) clamp(3rem, 6vw, 5rem);
}

.order-page .order-hero {
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.order-page .order-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  margin: 0 0 0.75rem;
}
.order-page .order-hero .lead {
  margin: 0;
  max-width: 64ch;
}

/* ---------- Per-report cost breakdown ------------------------------ */
.order-page .cost-breakdown {
  border-top: var(--rule);
  padding-top: clamp(1.25rem, 2.5vw, 2rem);
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.order-page .cost-breakdown .eyebrow {
  margin: 0 0 1.25rem;
}

.order-page .cost-breakdown__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: var(--rule-thick);
  border-left: var(--rule-thick);
}

.order-page .cost-breakdown__item {
  border-right: var(--rule-thick);
  border-bottom: var(--rule-thick);
  padding: clamp(0.75rem, 1.5vw, 1.25rem) clamp(0.75rem, 1.5vw, 1.25rem);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.order-page .cost-breakdown__figure {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1;
  letter-spacing: -0.01em;
}

.order-page .cost-breakdown__label {
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--slate-60, #666);
}

.order-page .cost-breakdown__note {
  margin: 0.9rem 0 0;
  font-size: 0.875rem;
  color: var(--slate-60, #666);
}

@media (max-width: 480px) {
  .order-page .cost-breakdown__grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Form structure ----------------------------------------- */
.order-page form {
  display: flex;
  flex-direction: column;
  gap: clamp(1.25rem, 2vw, 1.75rem);
}

.order-page fieldset {
  border: var(--rule-thick);
  padding: clamp(1.25rem, 2.2vw, 1.75rem);
  margin: 0;
  background: transparent;
}

.order-page legend {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  padding: 0 0.5rem;
  background: var(--paper);
  color: var(--ink);
}

.order-page label {
  display: block;
  font-weight: 700;
  margin: 1rem 0 0.4rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-800);
}
.order-page label:first-of-type { margin-top: 0; }
.order-page label .required { color: var(--accent); margin-left: 0.25rem; }

.order-page input[type="text"],
.order-page input[type="email"],
.order-page input[type="file"],
.order-page textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: 0.75rem 0.85rem;
  border: 1.5px solid var(--ink);
  background: var(--paper-white);
  color: var(--ink);
  border-radius: 0;
}
.order-page input[type="file"] {
  padding: 0.6rem;
  cursor: pointer;
  background: var(--paper);
}
.order-page textarea { min-height: 5rem; resize: vertical; }
.order-page input::placeholder { color: var(--slate-500); }

.order-page .help {
  font-size: 0.85rem;
  color: var(--slate-700);
  margin: 0.4rem 0 0;
  line-height: 1.5;
}

.order-page .row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 540px) {
  .order-page .row-split { grid-template-columns: 1fr; }
}

/* ---------- Click-wrap ---------------------------------------------- */
.order-page .clickwrap {
  border: var(--rule-thick);
  padding: clamp(1.25rem, 2.2vw, 1.75rem);
  background: transparent;
}

.order-page .clickwrap h2 {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin: 0 0 0.75rem;
  padding: 0 0 0.6rem;
  border-bottom: var(--rule);
  line-height: 1.2;
}

.order-page .clickwrap p.intro {
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0 0 1.25rem;
  color: var(--slate-800);
}

.order-page .clickwrap-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--slate-200);
}
.order-page .clickwrap-item:first-of-type { border-top: none; padding-top: 0; }

.order-page .clickwrap-item input[type="checkbox"] {
  flex-shrink: 0;
  width: 1.4rem;
  height: 1.4rem;
  margin: 0.15rem 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.order-page .clickwrap-item label {
  margin: 0;
  font-weight: 400;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink);
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
}
.order-page .clickwrap-item label strong { font-weight: 800; }
.order-page .clickwrap-item label a {
  color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

/* ---------- Price summary + submit ---------------------------------- */
.order-page .price-summary {
  border: var(--rule-thick);
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  background: transparent;
}
.order-page .price-summary .label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}
.order-page .price-summary .amount {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
}

.order-page .submit-row { display: flex; flex-direction: column; gap: 0.5rem; }
.order-page button[type="submit"] {
  width: 100%;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
  border: var(--rule-thick);
  padding: 1.1rem 1.5rem;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, transform 80ms ease;
  line-height: 1;
}
.order-page button[type="submit"]:hover:not(:disabled),
.order-page button[type="submit"]:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
}
.order-page button[type="submit"]:active:not(:disabled) { transform: translateY(1px); }
.order-page button[type="submit"]:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--paper);
  color: var(--slate-500);
  border-color: var(--slate-300);
}
.order-page .submit-help {
  font-size: 0.85rem;
  color: var(--slate-700);
  text-align: center;
  margin: 0.25rem 0 0;
}

/* ---------- Inline status / error from order.js --------------------- */
.order-page #orderStatus {
  margin: 0.75rem 0 0;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  line-height: 1.45;
  border: 2px solid currentColor;
}

/* ---------- Free-brief offer banner --------------------------------
   Revealed by order.js only when the visitor arrives from the brokerage
   free-brief campaign link. A bold navy callout so the "free, $0" promise
   from the email is the first thing on the page, instead of the $59 the
   standard order page leads with. Hidden by default; [hidden] wins over
   the display:flex below until JS removes the attribute. */
.order-page .freebrief-banner {
  border: var(--rule-thick);
  background: var(--ink);
  color: var(--paper);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  margin: 0 0 clamp(1.5rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.order-page .freebrief-banner[hidden] { display: none; }
.order-page .freebrief-banner__eyebrow {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin: 0;
}
.order-page .freebrief-banner__headline {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
}
.order-page .freebrief-banner p:last-child {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ---------- Contact page (/contact.html) extras --------------------- */
/* Honeypot field: hidden from sighted users + assistive tech, but a
   real <input> in the DOM. Bots that fill every input trip the trap.
   Off-screen rather than display:none so password managers and naive
   form-fillers still write to it. */
.order-page .contact-honeypot {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Native <select> styling parity with text inputs above. */
.order-page select {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: var(--rule);
  background: var(--paper-white);
  font: inherit;
  color: var(--ink);
  border-radius: 0;
  margin: 0 0 0.5rem;
}
.order-page select:focus { outline-offset: 3px; }

/* Contact-form result panels (success / retry). Match the .clickwrap
   visual treatment but tinted by accent. */
.order-page .contact-result {
  border: var(--rule-thick);
  padding: 1.5rem;
  margin: 1.5rem 0 0;
  background: var(--paper-white);
}
.order-page .contact-result h2 {
  margin: 0.25rem 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem);
}
.order-page .contact-result p { margin: 0 0 0.75rem; }
.order-page .contact-result .submit-row { margin-top: 0.75rem; }

/* Inline contact-form status surface (analogue to #orderStatus). */
.order-page .contact-status {
  margin: 0.75rem 0 0;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  line-height: 1.45;
  border: 2px solid currentColor;
}
.order-page .contact-status--error { color: var(--accent); }
.order-page .contact-status--pending { color: var(--ink); }

/* Subtle hint that the subject was pre-filled from ?subject= URL. */
.order-page select[data-prefilled="true"] {
  border-color: var(--accent);
}

/* ---------- Trust block (sample + what-you-get + guarantee) ----------
   Sits between the hero and the form. Front-loads proof (a real sample),
   the concrete deliverables, the money-back guarantee, and the data/payment
   reassurance before the form friction. Brutalist tokens, same as the
   fieldset/clickwrap boxes. */
.order-page .order-trust {
  border: var(--rule-thick);
  padding: clamp(1.25rem, 2.2vw, 1.75rem);
  margin: 0 0 clamp(1.5rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.order-page .order-trust__head {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.1rem, 1rem + 0.8vw, 1.5rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}
.order-page .order-trust__sample {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 1rem;
  border: var(--rule);
  background: var(--paper-white);
}
.order-page .order-trust__sample p {
  margin: 0;
  flex: 1 1 16rem;
  font-size: 0.95rem;
  line-height: 1.5;
}
.order-page .order-trust__list-lead {
  margin: 0;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-800);
}
.order-page .order-trust__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}
.order-page .order-trust__list li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.45;
}
.order-page .order-trust__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 0.6rem;
  height: 0.6rem;
  background: var(--accent);
}
.order-page .order-trust__guarantee {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1rem, 0.95rem + 0.4vw, 1.2rem);
  line-height: 1.3;
  padding: 0.9rem 1rem;
  border: var(--rule);
  background: var(--paper);
}
.order-page .order-trust__reassure {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--slate-700);
}
.order-page .submit-help--guarantee {
  font-weight: 700;
  color: var(--ink);
}

/* ---------- Print ---------------------------------------------------- */
@media print {
  .order-page button[type="submit"] { display: none; }
  .order-page input, .order-page textarea { border: 1px solid #000; }
}
@media (forced-colors: active) {
  .order-page fieldset, .order-page .clickwrap, .order-page .price-summary {
    border-color: CanvasText;
  }
  .order-page button[type="submit"] { border-color: ButtonBorder; }
}
