/* Request a quote (request-quote/). Loads after category.css. The opening screen holds
   everything: the intro and standard route on the left, the product page's one-step
   form (with a product picker) on the right. */

.rq {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 37rem);
  gap: 2.5rem 4.5rem; align-items: start;
  padding: 6.75rem var(--col) 4rem;
  background:
    radial-gradient(ellipse 35% 45% at 88% 30%, rgba(243, 214, 184, 0.45), rgba(243, 214, 184, 0) 70%),
    linear-gradient(180deg, #fdfcfa, #f8f4ec);
  isolation: isolate;
}
/* Desktop: the hero fills the screen with the format strip pinned to its bottom. */
@media (min-width: 768px) {
  /* Content sits centred in the room between the nav and the strip. */
  .rq { min-height: 100vh; min-height: 100svh; align-content: center; padding-bottom: calc(3.625rem + 3rem); }
}
.rq .chero__grid { -webkit-mask-image: radial-gradient(ellipse 50% 60% at 80% 35%, #000 15%, transparent 80%); mask-image: radial-gradient(ellipse 50% 60% at 80% 35%, #000 15%, transparent 80%); }
.rq__head { position: relative; z-index: 1; max-width: 40rem; }
.rq__head .crumbs ol { margin-bottom: 1.25rem; }
.rq__title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(3rem, 4.4vw, 4.25rem); line-height: 1; letter-spacing: -0.025em; color: var(--ink-strong); text-wrap: balance; }
.rq__title em { color: var(--orange); }
.rq__lede { margin: 1.25rem 0 0; max-width: 46ch; font-size: max(15px, 1.0625rem); line-height: 1.55; color: var(--ink-soft); text-wrap: pretty; }

/* Standard route, as the flat shipping label from the product page */
.rq__facts {
  position: relative; inset: auto; width: auto; margin: 2rem 0 0;
  grid-template-columns: repeat(4, minmax(0, 1fr)); justify-content: stretch; row-gap: 0.875rem;
  padding: 0.875rem 1.25rem 1rem;
  rotate: 0deg; box-shadow: 0 0.0625rem 0.125rem rgba(26, 23, 18, 0.08);
}
.is-loading .rq__facts { rotate: 0deg; }
.rq__facts .label__row:nth-child(2) { padding-left: 0; }
.rq__facts dd { white-space: normal; text-wrap: balance; }
.rq__facts .label__code { color: #f08a45; font-weight: 600; letter-spacing: 0; }

.rq__contact { margin-top: 1.75rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1.5rem; }
.rq__contact p { flex: 1 1 100%; margin: 0; font-size: max(14px, 0.875rem); color: var(--ink-soft); }
.rq__contact .link { padding: 0.25rem 0; font-family: var(--serif); font-weight: 400; font-size: max(17px, 1.1875rem); }

/* ---------- The form (same component as the product page) ---------- */
.rq__formcol { position: relative; z-index: 1; }
/* White card sealed with a strip of orange packing tape across the top: the brand's
   orange at full strength, so the form is the brightest object on the screen. */
.wq, .wq__done {
  position: relative;
  padding: 1.5rem 1.625rem 1.625rem;
  background: #fff;
  border-radius: 1.5rem;
  box-shadow: 0 0.125rem 0.25rem rgba(60, 30, 10, 0.06), 0 2rem 4rem -1.75rem rgba(140, 60, 15, 0.38);
  scroll-margin-top: 6rem;
}
.wq { padding-top: 0; overflow: hidden; }
.wq__head {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 0.625rem;
  margin: 0 -1.625rem 1.375rem; padding: 1.125rem 1.625rem;
  background:
    radial-gradient(ellipse 55% 180% at 100% 0%, rgba(255, 190, 140, 0.35), rgba(255, 190, 140, 0) 70%),
    linear-gradient(100deg, var(--orange-deep) 0%, var(--orange) 55%, #d4651d 100%);
  color: #fff;
}
/* Tape edge: a light sheen on top, a soft shadow where the tape lifts off the card. */
.wq__head::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: rgba(255, 255, 255, 0.35); }
.wq__head::after { content: ""; position: absolute; left: 0; right: 0; bottom: -0.625rem; height: 0.625rem; background: linear-gradient(180deg, rgba(164, 69, 10, 0.16), rgba(164, 69, 10, 0)); pointer-events: none; }
/* The box mark: drawn in as the form arrives, then it sits and bobs like a parcel on a belt. */
.wq__box { flex: none; width: 2rem; height: 2rem; margin-right: 0.125rem; overflow: visible; fill: none; stroke: #fff; stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; animation: wq-bob 3.6s var(--ease-soft) 2.2s infinite; }
.wq__box path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.wq__box-shell { animation: wq-draw 1s var(--ease-soft) 0.7s backwards; }
.wq__box-fold { animation: wq-draw 0.7s var(--ease-soft) 1.4s backwards; }
@keyframes wq-draw { from { stroke-dashoffset: 1; } }
@keyframes wq-bob {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  30% { translate: 0 -0.1875rem; rotate: -6deg; }
  60% { translate: 0 0; rotate: 2deg; }
}
.wq:focus-within .wq__box { animation-duration: 1.8s; }
@media (prefers-reduced-motion: reduce) {
  .wq__box, .wq__box path { animation: none; }
}
.wq__title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(1.375rem, 1.8vw, 1.625rem); line-height: 1.1; letter-spacing: -0.015em; color: #fff; }
.wq__eta { margin-left: auto; padding: 0.3125rem 0.75rem; background: rgba(110, 38, 0, 0.32); border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 999px; font-size: 0.75rem; font-weight: 600; color: #fff; white-space: nowrap; }
.wq input:hover, .wq select:hover, .wq textarea:hover { border-color: rgba(26, 23, 18, 0.4); }
.wq input:focus, .wq select:focus, .wq textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(194, 83, 15, 0.16); }
.wq[hidden], .wq__done[hidden] { display: none; }
.req { margin-left: 0.125rem; color: var(--orange-deep); }
.wq .is-bad > label, .wq .is-bad > legend { color: #b3261e; }
.wq select { appearance: none; padding-right: 2.5rem; cursor: pointer; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%231a1712' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 1rem center / 0.875rem; }
.wq #q-product { font-weight: 500; text-overflow: ellipsis; }
.wq legend, .wq .field > label { margin-bottom: 0.375rem; }
.wq textarea { min-height: 4.75rem; }
.wq input[type="text"], .wq input[type="email"], .wq input[type="tel"], .wq input[type="number"], .wq select { min-height: 2.75rem; }
.wq__grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.875rem 1rem; }

/* Size: the unit switch sits on the label line, the three boxes below. */
.wq__size legend { float: left; }
.units { float: right; display: flex; gap: 0.25rem; }
.units label { position: relative; }
.units input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.units span { display: inline-grid; place-items: center; height: 1.5rem; padding: 0 0.5rem; border: 1px solid rgba(26, 23, 18, 0.18); border-radius: 999px; font-size: 0.75rem; font-weight: 600; color: var(--ink-soft); transition: background-color 0.25s, border-color 0.25s, color 0.25s; }
.units label:hover span { border-color: var(--ink-strong); }
.units input:checked + span { background: var(--ink-strong); border-color: var(--ink-strong); color: #fff; }
.units input:focus-visible + span { outline: 2px solid var(--ink-strong); outline-offset: 2px; }
.wq__size .dims { clear: both; gap: 0.5rem; }
.wq .dims input { padding: 0 0.5rem; text-align: center; }
.wq .dims input::placeholder { font-size: 0.875rem; }

.wq__foot { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.25rem; }
.wq__foot .btn { margin-left: auto; border: 0; font-family: inherit; cursor: pointer; }
.wq__terms { font-size: 0.875rem; color: var(--ink-soft); }
.wq__terms a { color: var(--ink-strong); text-decoration: underline; text-underline-offset: 0.2em; text-decoration-color: rgba(26, 23, 18, 0.3); transition: text-decoration-color 0.25s; }
.wq__terms a:hover { text-decoration-color: currentColor; }
.wq__terms input[aria-invalid="true"] + .tick__box { border-color: #b3261e; box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.12); }
.wq__error { margin: 0; flex: 1 1 100%; font-size: 0.875rem; line-height: 1.45; color: #b3261e; }

/* Three steps */
.steps--three .steps__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* Breathing room between the hero's strip and the dark steps card. */
.rqp .steps { margin-top: 1.25rem; }
.rqp .faqs { padding-top: 6.5rem; }

/* Entrance */
.rq__title, .rq__lede, .rq__facts, .rq__contact, .rq__formcol {
  transition-property: opacity, translate, filter;
  transition-duration: 1.2s, 1.4s, 1.2s;
  transition-timing-function: var(--ease-soft);
}
.is-loading .rq__title, .is-loading .rq__lede, .is-loading .rq__facts, .is-loading .rq__contact, .is-loading .rq__formcol { opacity: 0; translate: 0 1.5rem; filter: blur(0.5rem); }
.rq__lede { transition-delay: 0.12s; }
.rq__formcol { transition-delay: 0.24s; }
.rq__facts { transition-delay: 0.36s; }
.rq__contact { transition-delay: 0.48s; }

@media (prefers-reduced-motion: reduce) {
  .is-loading .rq__title, .is-loading .rq__lede, .is-loading .rq__facts, .is-loading .rq__contact, .is-loading .rq__formcol { translate: none; filter: none; }
}

/* Short desktop screens: tighten so the form still fits above the fold. */
@media (min-width: 1101px) and (max-height: 820px) {
  .rq { padding-top: 6rem; }
  .rq__title { font-size: clamp(2.75rem, 3.8vw, 3.5rem); }
  .rq__facts { margin-top: 1.5rem; }
  .wq { padding-top: 1.25rem; padding-bottom: 1.25rem; }
  .wq__grid { gap: 0.625rem 1rem; }
  .wq textarea { min-height: 3.5rem; }
}

/* Tablet: intro above, form below it. */
@media (max-width: 1100px) {
  .rq { grid-template-columns: minmax(0, 1fr); min-height: 0; align-items: start; }
  .rq__head { max-width: 46rem; }
  .rq__formcol { max-width: 46rem; }
}

/* ---------- Phones ---------- */
@media (max-width: 767.98px) {
  .rq { padding: 6.5rem var(--edge) 3.5rem; gap: 2rem; }
  .rq__title { font-size: clamp(2.3rem, 10.5vw, 3rem); }
  .rq__lede { margin-top: 1rem; }
  /* The form follows the intro straight away; the route and contact sit after it. */
  .rq__head { display: contents; }
  .rq__head > .crumbs, .rq__title, .rq__lede { order: -1; }
  /* The crumbs sit tight on the title instead of taking a full grid gap. */
  .rq__head .crumbs ol { margin-bottom: 0; }
  .rq__title { margin-top: -1.375rem; }
  .rq__lede { margin-top: -1rem; }
  .rq__facts { order: 2; margin-top: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rq__facts .label__row:nth-child(even) { padding-left: 0; border-left: 0; }
  .rq__facts .label__row:nth-child(odd) { padding-left: 0.875rem; }
  .rq__contact { order: 3; margin-top: 0; }
  .rq .strip { order: 4; grid-column: 1 / -1; margin: 0.5rem calc(-1 * var(--edge)) -3.5rem; }
  .wq, .wq__done { padding: 1.5rem 1.125rem; margin-inline: -0.25rem; }
  .wq { padding-top: 0; }
  .wq__head { margin-inline: -1.125rem; padding-inline: 1.125rem; flex-wrap: wrap; }
  .wq__eta { display: none; }
  /* The whole form fits one phone screen: tighter rows, and the two short fields
     (company, quantity) share a line. Inputs stay 16px so iOS does not zoom. */
  .wq__head { margin-bottom: 0.875rem; padding-block: 0.75rem; }
  .wq__box { width: 1.75rem; height: 1.75rem; }
  .wq__title { font-size: 1.375rem; }
  .wq__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.5rem 0.625rem; }
  .wq__grid > .field:nth-child(-n+4), .wq__grid > .wq__size { grid-column: 1 / -1; }
  .wq legend, .wq .field > label { margin-bottom: 0.25rem; }
  .wq input[type="text"], .wq input[type="email"], .wq input[type="tel"], .wq input[type="number"], .wq select { min-height: 2.5rem; }
  .wq .dims input { min-height: 2.5rem; }
  .wq textarea { min-height: 4.25rem; height: 4.25rem; padding-block: 0.625rem; }
  .wq { padding-bottom: 1.125rem; }
  .wq__foot { margin-top: 0.875rem; gap: 0.75rem; }
  .wq .btn { width: 100%; justify-content: center; }
  .steps--three .steps__list { grid-template-columns: 1fr; }
}
