/* Tailored Intelligence — website quote builder. Builds on styles.css tokens.
   Left: the measurements (option groups). Right: the order ticket, chalk paper on ink, sticky. */

.quote-page .nav { background: rgba(10, 10, 14, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: var(--seam); padding-top: 12px; padding-bottom: 12px; }

/* ---------- hero ---------- */
.q-hero { padding: clamp(130px, 16vw, 190px) 0 clamp(36px, 5vw, 64px); }
.q-title { max-width: 16ch; }
.q-title em { font-style: italic; }
.q-measures { margin-top: 32px; max-width: 560px; }

/* ---------- layout ---------- */
.q-build { padding: 0 0 clamp(60px, 8vw, 110px); }
.q-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(28px, 4vw, 64px); align-items: start; }
@media (max-width: 1000px) { .q-layout { grid-template-columns: minmax(0, 1fr); } }

.q-loading { padding: 40px 0; }

/* ---------- groups ---------- */
.q-group { padding: clamp(36px, 5vw, 56px) 0; border-top: 1px solid var(--seam); position: relative; min-width: 0; }
.q-groups { min-width: 0; }
.q-group:first-child { border-top: 0; padding-top: 8px; }
.q-group-head { display: grid; grid-template-columns: 110px 1fr; gap: 16px; margin-bottom: 26px; }
.q-group-label { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--steel); padding-top: 12px; }
.q-group-label::before { content: ""; display: block; width: 18px; height: 1px; background: var(--blue); box-shadow: 0 0 8px var(--blue-glow); margin-bottom: 10px; }
.q-group-title { font-family: var(--display); font-weight: 450; font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.05; letter-spacing: -.01em; margin: 0 0 8px; }
.q-group-desc { color: var(--steel); font-size: 15px; max-width: 52ch; }
@media (max-width: 600px) { .q-group-head { grid-template-columns: 1fr; gap: 8px; } .q-group-label { padding-top: 0; } }

/* radio choice cards */
.q-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 640px) { .q-choices, .q-choices.q-choices-4 { grid-template-columns: minmax(0, 1fr); } }
.q-choice { position: relative; display: block; cursor: pointer; }
.q-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.q-choice-card {
  height: 100%; padding: 22px 22px 20px; border: 1px solid var(--seam); border-radius: 6px; background: var(--wool);
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}
.q-choice:hover .q-choice-card { border-color: var(--chalk-45); transform: translateY(-1px); }
.q-choice input:checked + .q-choice-card { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue), 0 0 28px var(--blue-glow); }
.q-choice input:focus-visible + .q-choice-card { outline: 2px solid var(--blue); outline-offset: 3px; }
.q-choice-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 12px; min-width: 0; }
.q-choice-label { font-family: var(--display); font-size: 1.35rem; line-height: 1.15; }
.q-choice-price { font-family: var(--mono); font-size: 13px; letter-spacing: .04em; color: var(--chalk); white-space: nowrap; }
.q-choice-price small { color: var(--steel); letter-spacing: .08em; margin-left: 4px; }
.q-choice-summary { color: var(--chalk-70); font-size: 15px; }
.q-includes { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--seam); display: grid; gap: 6px; }
.q-includes li { position: relative; padding-left: 18px; font-size: 13.5px; color: var(--chalk-70); line-height: 1.4; }
.q-includes li::before { content: ""; position: absolute; left: 0; top: .62em; width: 9px; height: 1px; background: var(--blue); }
.q-choice-mark { position: absolute; top: 16px; right: 16px; width: 18px; height: 18px; border: 1px solid var(--chalk-45); border-radius: 50%; display: grid; place-items: center; transition: border-color .25s, background .25s; }
.q-choice-mark::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); transform: scale(0); transition: transform .25s var(--ease); }
.q-choice input:checked + .q-choice-card .q-choice-mark { border-color: var(--blue); background: var(--blue); }
.q-choice input:checked + .q-choice-card .q-choice-mark::after { transform: scale(1); }
.q-choice-card:has(.q-choice-mark) .q-choice-top { padding-right: 28px; }

/* option rows */
.q-options { border-top: 1px solid var(--seam); }
.q-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 20px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--seam); transition: opacity .25s; }
.q-row.is-off { opacity: .4; }
.q-row.is-off input, .q-row.is-off button { pointer-events: none; }
.q-row-main { min-width: 0; }
.q-row-note { grid-column: 1 / -1; color: var(--steel); font-size: 13.5px; line-height: 1.45; max-width: 60ch; margin-top: -4px; padding-left: 32px; }
.q-row-qty .q-row-note { padding-left: 0; }
.q-row-price { font-family: var(--mono); font-size: 13px; letter-spacing: .04em; color: var(--chalk); text-align: right; white-space: nowrap; }
.q-row-price small { display: block; color: var(--steel); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; margin-top: 3px; }
.q-row-price.is-on { color: var(--blue); }

/* custom checkbox */
.q-check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.q-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.q-box { flex: none; width: 20px; height: 20px; margin-top: 2px; border: 1px solid var(--chalk-45); border-radius: 3px; background: var(--wool); position: relative; transition: border-color .2s, background .2s; }
.q-box::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid var(--ink); border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); transition: transform .2s var(--ease); }
.q-check:hover .q-box { border-color: var(--chalk); }
.q-check input:checked + .q-box { background: var(--blue); border-color: var(--blue); }
.q-check input:checked + .q-box::after { transform: rotate(45deg) scale(1); }
.q-check input:focus-visible + .q-box { outline: 2px solid var(--blue); outline-offset: 3px; }
.q-check-text { font-size: 16px; color: var(--chalk); line-height: 1.4; }

/* stepper */
.q-row-qty { grid-template-columns: 1fr auto auto; }
.q-row-qty .q-row-main { padding-left: 0; }
.q-qty-label { font-size: 16px; color: var(--chalk); display: block; }
.q-stepper { display: inline-flex; align-items: center; border: 1px solid var(--seam); border-radius: 3px; background: var(--wool); }
.q-stepper button { width: 40px; height: 40px; font-family: var(--mono); font-size: 18px; color: var(--chalk-70); transition: color .2s, background .2s; }
.q-stepper button:hover { color: var(--chalk); background: var(--seam); }
.q-stepper button:disabled { opacity: .3; pointer-events: none; }
.q-stepper input { width: 58px; height: 40px; text-align: center; font: inherit; font-family: var(--mono); font-size: 14px; color: var(--chalk); background: transparent; border: 0; border-left: 1px solid var(--seam); border-right: 1px solid var(--seam); -moz-appearance: textfield; }
.q-stepper input::-webkit-outer-spin-button, .q-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.q-stepper input:focus { outline: none; background: rgba(169, 189, 255, .08); }
.q-qty-unit { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--steel); margin-left: 10px; }
@media (max-width: 560px) {
  .q-row-qty { grid-template-columns: 1fr; }
  .q-row-qty .q-row-price { text-align: left; }
  .q-row-price small { display: inline; margin-left: 6px; }
}

/* ---------- the ticket ---------- */
.ticket-wrap { position: sticky; top: 92px; }
.ticket {
  position: relative; color: var(--ink); background: var(--chalk);
  border-radius: 4px 4px 0 0; padding: 26px 26px 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
  display: flex; flex-direction: column; gap: 18px;
}
.ticket::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--indigo);
  border-radius: 4px 4px 0 0;
}
.ticket-perf {
  position: absolute; left: 0; right: 0; bottom: -10px; height: 10px;
  background: radial-gradient(circle at 6px 0, transparent 5px, var(--chalk) 5.5px) left top / 12px 10px repeat-x;
}
.ticket-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 14px; border-bottom: 1px dashed rgba(10, 10, 14, .3); }
.ticket-eyebrow { color: rgba(10, 10, 14, .62); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.ticket-eyebrow .sep { color: rgba(10, 10, 14, .35); margin: 0 6px; }
.ticket-name { font-family: var(--display); font-style: italic; font-size: 1rem; color: var(--ink); }
.ticket-lines { display: grid; gap: 9px; max-height: min(42vh, 380px); overflow: auto; padding-right: 4px; scrollbar-width: thin; }
.ticket-line { display: grid; grid-template-columns: 1fr auto; gap: 10px; font-size: 14px; line-height: 1.35; align-items: baseline; }
.ticket-line-label { color: var(--ink); }
.ticket-line-qty { font-family: var(--mono); font-size: 11px; color: rgba(10, 10, 14, .55); margin-left: 6px; letter-spacing: .04em; }
.ticket-line-amt { font-family: var(--mono); font-size: 13px; letter-spacing: .02em; color: var(--ink); white-space: nowrap; }
.ticket-line.is-monthly .ticket-line-amt { color: var(--indigo); }
.ticket-line.is-surcharge .ticket-line-label { color: rgba(10, 10, 14, .7); font-style: italic; }
.ticket-line.is-new { animation: ticketIn .45s var(--ease); }
@keyframes ticketIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.ticket-totals { border-top: 1px solid var(--ink); padding-top: 14px; display: grid; gap: 8px; }
.ticket-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ticket-total-key { color: rgba(10, 10, 14, .62); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.ticket-total-val { font-family: var(--display); font-weight: 500; font-size: clamp(2.1rem, 2.6vw, 2.6rem); line-height: 1; letter-spacing: -.01em; color: var(--ink); font-variant-numeric: tabular-nums; }
.ticket-total-val-sm { font-size: 1.5rem; color: var(--indigo); font-style: italic; font-weight: 400; }
.ticket-vat { color: rgba(10, 10, 14, .55); font-size: 11px; letter-spacing: .08em; }
.ticket-note { color: rgba(10, 10, 14, .62); font-size: 12.5px; line-height: 1.45; }
.btn-ink { background: var(--ink); color: var(--chalk); border-color: var(--ink); }
.btn-ink:hover { background: #1d1d26; color: var(--chalk); }
.ticket-send { width: 100%; }
.ticket.is-sent .ticket-eyebrow { color: var(--indigo); }

/* mobile: ticket collapses into a bottom bar */
.ticket-bar { display: none; }
@media (max-width: 1000px) {
  .ticket-wrap { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; transform: translateY(100%); transition: transform .4s var(--ease); max-height: 82vh; overflow: auto; }
  .ticket-wrap.is-open { transform: translateY(0); }
  .ticket { border-radius: 10px 10px 0 0; box-shadow: 0 -20px 60px rgba(0, 0, 0, .6); padding-bottom: 92px; }
  .ticket-perf { display: none; }
  .ticket-lines { max-height: none; }
  .ticket-bar { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; background: var(--chalk); color: var(--ink); border-top: 1px solid rgba(10, 10, 14, .2); box-shadow: 0 -10px 40px rgba(0, 0, 0, .5); }
  .ticket-bar-inner { display: flex; align-items: center; gap: 12px; padding: 12px var(--gutter); padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .ticket-bar-key { color: rgba(10, 10, 14, .62); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; }
  .ticket-bar-val { font-family: var(--display); font-weight: 500; font-size: 1.6rem; line-height: 1; font-variant-numeric: tabular-nums; margin-right: auto; }
  .ticket-bar-monthly { color: var(--indigo); font-size: 11px; letter-spacing: .06em; }
  .ticket-bar-btn { color: var(--ink); border-color: var(--ink); padding: 10px 16px; min-height: 40px; }
  .ticket-bar-btn:hover { color: var(--ink); }
  body.quote-page { padding-bottom: 72px; }
}

/* ---------- details ---------- */
.q-details { border-top: 1px solid var(--seam); }
.q-details-grid { align-items: start; }
.q-form { margin-top: 28px; }
.q-copy { margin-top: 2px; }
.q-copy .q-check-text { font-size: 14.5px; color: var(--chalk-70); }
.q-aside { display: grid; gap: 36px; }
.q-howitworks { padding: 26px 28px; border: 1px solid var(--seam); border-radius: 6px; background: var(--wool); }
.q-steps { display: grid; gap: 18px; margin-top: 18px; }
.q-steps li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; }
.q-steps strong { display: block; font-weight: 600; margin-bottom: 4px; color: var(--chalk); }
.q-steps .body { font-size: 14.5px; }
.q-step-n { color: var(--blue); padding-top: 3px; }
.q-figure img { aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .ticket-line.is-new { animation: none; }
  .ticket-wrap { transition: none; }
  .q-choice-card, .q-box, .q-box::after, .q-choice-mark, .q-choice-mark::after { transition: none; }
}
