/* =====================================================================================================================
   /packages/ · Build your detail (owned by the packages page)
   A console that asks three questions, one at a time. Every answer switches on another LED strip on the rail.
   Cars are LED line drawings that switch on when picked; the condition cards show the studio car with more or less
   mud on it; the work cards are real photos. Then the plan builds itself under golden light, ready to book.
   ===================================================================================================================== */

.car-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- hero ---------- */
.pk-hero .phero-media img { object-position: 70% 50%; }
.pk-hero .cta-row { gap: 14px 18px; }

/* ---------- the builder console ---------- */
.pk-build { padding-top: clamp(80px, 8vw, 130px); }
.pk-head { margin-bottom: clamp(36px, 4.4vw, 64px); }
.bld {
  position: relative; max-width: 1180px; margin: 0 auto; padding: clamp(18px, 2.8vw, 42px); border-radius: clamp(22px, 2.4vw, 34px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.014) 34%, rgba(255, 255, 255, 0.022));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13), inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 60px 140px rgba(0, 0, 0, 0.6);
  scroll-margin-top: calc(var(--hdr-h) + 18px);
}
/* light pooling on the floor under the console */
.bld::after { content: ""; position: absolute; z-index: -1; left: 6%; right: 6%; bottom: -60px; height: 120px; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, rgba(139, 233, 255, 0.09), transparent 70%); }

/* ---------- the rail: one LED strip per step, switched on as you answer ---------- */
.bld-rail { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(8px, 1.2vw, 16px); margin-bottom: clamp(30px, 3.6vw, 52px); }
.bld-rail button { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 4px 10px; width: 100%; min-height: 44px; padding: 0 0 4px; border: 0; background: none; color: var(--mute); text-align: left; cursor: pointer; transition: color 0.3s; }
.bld-rail button:disabled { cursor: default; }
.bld-led { grid-column: 1 / -1; display: block; height: 3px; margin-bottom: 12px; border-radius: 3px; background: rgba(243, 245, 247, 0.1); transition: background 0.4s, box-shadow 0.4s; }
.bld-rail b { font: 500 12px/1 var(--mono); letter-spacing: 0.04em; color: inherit; }
.bld-name { font: 800 15px/1.1 var(--display); font-stretch: 118%; text-transform: uppercase; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bld-ans { grid-column: 2; min-height: 1.3em; font: 500 12.5px/1.3 var(--mono); color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bld-rail .is-now { color: var(--ink); }
.bld-rail .is-now b { color: var(--ice); }
.bld-rail .is-now .bld-led { background: linear-gradient(90deg, rgba(139, 233, 255, 0.55), rgba(139, 233, 255, 0.18)); box-shadow: 0 0 14px rgba(139, 233, 255, 0.3); }
.bld-rail .is-done { color: rgba(243, 245, 247, 0.84); }
.bld-rail .is-done b { color: var(--ice); }
.bld-rail .is-done .bld-led { background: linear-gradient(90deg, rgba(255, 255, 255, 0.5), #fff 10%, #fff 90%, rgba(255, 255, 255, 0.5)); box-shadow: var(--led); animation: pk-on 0.42s linear both; }
@media (hover: hover) { .bld-rail button:not(:disabled):hover { color: var(--ice-hi); } }

/* ---------- a step ---------- */
.bld-stage { position: relative; }
.bld-step { min-width: 0; border: 0; }
.bld-step legend { display: block; width: 100%; padding: 0; margin-bottom: 14px; }
.bld-n { display: block; margin-bottom: 14px; font: 500 13px/1 var(--mono); letter-spacing: 0.04em; color: var(--ice); }
.bld-n i { font-style: normal; color: var(--mute); }
.bld-q { font: 900 clamp(32px, 4.7vw, 70px)/0.9 var(--display); font-stretch: 125%; letter-spacing: -0.02em; outline: none; }
.bld-q:focus-visible { outline: 2px solid var(--ice); outline-offset: 8px; }
.bld-hint { margin-bottom: 26px; color: var(--dim); font-size: 17px; }
.bld-err { margin: -12px 0 16px; font: 500 14px/1.4 var(--mono); color: #ffb3a3; }
.bld-err:empty { display: none; }
.bld-err::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 10px; border-radius: 50%; background: #ff8f7a; box-shadow: 0 0 10px #ff8f7a; vertical-align: 1px; }

/* the switch-on flicker of a fluorescent tube */
@keyframes pk-on { 0% { opacity: 0; } 18% { opacity: 1; } 32% { opacity: 0.2; } 48% { opacity: 1; } 64% { opacity: 0.6; } 100% { opacity: 1; } }

/* ---------- 1. cars: LED line drawings ---------- */
.pk-cars { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 1.2vw, 16px); }
.pk-car { gap: 6px; align-content: start; min-height: 0; padding: 20px 22px 24px; border-radius: 22px;
  background: radial-gradient(80% 46% at 50% 64%, rgba(170, 225, 245, 0.05), transparent 72%), linear-gradient(180deg, #0f1215, #08090b); }
.carline { position: relative; display: block; aspect-ratio: 260 / 100; margin: 26px -4px 34px; pointer-events: none;
  -webkit-box-reflect: below 4px linear-gradient(transparent 50%, rgba(255, 255, 255, 0.26)); }
.carline svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.carline .off { stroke: rgba(243, 245, 247, 0.3); stroke-width: 1.45; }
.carline .lit { stroke: #fff; stroke-width: 1.55; opacity: 0; transition: opacity 0.3s;
  filter: drop-shadow(0 0 1.5px rgba(255, 255, 255, 0.95)) drop-shadow(0 0 7px rgba(139, 233, 255, 0.8)); }
/* the glossy floor line the car stands on */
.carline::after { content: ""; position: absolute; left: 2%; right: 2%; bottom: 7%; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent); }
.pk-car b { font: 900 clamp(24px, 2.3vw, 34px)/1 var(--display); font-stretch: 125%; text-transform: uppercase; letter-spacing: -0.01em; }
.pk-car small { font-size: 14.5px; }
@media (hover: hover) { .pk-cars label:hover .carline .lit { opacity: 0.38; } }
.pk-cars input:checked + .pk-car { background: radial-gradient(80% 50% at 50% 64%, rgba(139, 233, 255, 0.13), transparent 72%), linear-gradient(180deg, #0f1418, #08090b); }
.pk-cars input:checked + .pk-car .carline .lit { opacity: 1; animation: pk-on 0.5s linear both; }
.pk-cars input:checked + .pk-car .carline::after { background: linear-gradient(90deg, transparent, rgba(139, 233, 255, 0.6), transparent); box-shadow: 0 0 12px rgba(139, 233, 255, 0.5); }

/* ---------- 2. condition: the studio car, more or less muddy ---------- */
.pk-conds { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.2vw, 16px); }
.pk-cond { align-content: start; gap: 5px; min-height: 0; padding: 10px 10px 22px; border-radius: 22px; }
.pk-cond b, .pk-cond small { padding: 0 12px; }
.pk-cond b { font: 800 clamp(18px, 1.5vw, 22px)/1.1 var(--display); font-stretch: 118%; text-transform: uppercase; letter-spacing: 0.01em; }
.pk-dirt { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 10.5; margin-bottom: 14px; border-radius: 14px; background: var(--char); }
.choice .pk-dirt img { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; margin: 0; border-radius: 0; object-fit: cover; object-position: 50% 66%;
  transform: scale(1.3); filter: brightness(0.74) saturate(0.95); transition: transform 1.4s var(--ease), filter 0.5s; }
.choice .pk-dirt .mud { opacity: var(--dirt, 1); }
.pk-dirt::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); background: linear-gradient(170deg, rgba(255, 255, 255, 0.08), transparent 30%); }
.pk-cond::after { z-index: 2; top: 22px; right: 22px; background-color: rgba(4, 5, 6, 0.45); }
@media (hover: hover) { .pk-conds label:hover .pk-dirt img { transform: scale(1.36); filter: brightness(0.86); } }
.pk-conds input:checked + .pk-cond .pk-dirt img { transform: scale(1.36); filter: brightness(1) saturate(1); }

/* ---------- 3. the work: real photos, pick one or more ---------- */
.pk-work { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 1.2vw, 16px); }
.pk-svc { position: relative; isolation: isolate; overflow: hidden; align-content: end; min-height: 0; aspect-ratio: 4 / 5; padding: 0; border-radius: 22px; background: var(--char); }
.choice .pk-svc img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; aspect-ratio: auto; margin: 0; border-radius: 0; object-fit: cover;
  filter: brightness(0.62) saturate(0.85); transform: scale(1.02); transition: filter 0.5s, transform 1.3s var(--ease); }
.pk-svc::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(to top, rgba(4, 5, 6, 0.94) 0%, rgba(4, 5, 6, 0.45) 42%, rgba(4, 5, 6, 0) 72%); }
.pk-svc::after { z-index: 2; background-color: rgba(4, 5, 6, 0.45); }
.pk-svc-t { display: grid; gap: 5px; padding: 20px 20px 20px; }
.pk-svc-t b { font: 800 clamp(17px, 1.45vw, 21px)/1.1 var(--display); font-stretch: 118%; text-transform: uppercase; letter-spacing: 0.01em; }
.pk-svc-t small { color: rgba(243, 245, 247, 0.8); }
/* a band of studio light sweeps over a card as you pick it */
.pk-svc-t::before { content: ""; position: absolute; z-index: -1; top: -20%; bottom: -20%; left: -60%; width: 44%; pointer-events: none; opacity: 0; mix-blend-mode: screen;
  background: linear-gradient(90deg, transparent, rgba(139, 233, 255, 0.1) 30%, rgba(255, 255, 255, 0.42) 50%, rgba(139, 233, 255, 0.1) 70%, transparent); transform: skewX(-16deg); }
@media (hover: hover) { .pk-work label:hover .pk-svc img { filter: brightness(0.78) saturate(0.95); transform: scale(1.05); } }
.pk-work input:checked + .pk-svc img { filter: brightness(0.92) saturate(1); transform: scale(1.06); }
.pk-work input:checked + .pk-svc .pk-svc-t::before { animation: pk-sweep 1.1s var(--ease-io) both; }
@keyframes pk-sweep { 0% { opacity: 1; transform: translateX(0) skewX(-16deg); } 100% { opacity: 1; transform: translateX(380%) skewX(-16deg); } }

.pk-tip { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 18px; padding: 10px 10px 10px 22px; border-radius: 999px; font-size: 16.5px;
  background: rgba(139, 233, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(139, 233, 255, 0.24); }
.pk-tip[hidden] { display: none; }
.pk-tip span { flex: 1 1 16em; }

/* ---------- Back / Next ---------- */
.bld-nav { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: clamp(26px, 3vw, 40px); padding-top: 24px; border-top: 1px solid var(--line); }
.bld-nav[hidden] { display: none; }
.bld-back.off { visibility: hidden; }
.bld-count { font: 500 13px/1 var(--mono); letter-spacing: 0.04em; color: var(--dim); }
.bld-noscript { margin-top: 24px; color: var(--dim); }

/* ---------- 4. the plan ---------- */
.plan { display: grid; gap: clamp(30px, 3.6vw, 52px); }
.plan[hidden] { display: none; }
.plan-hero { position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: end; min-height: 400px; aspect-ratio: 21 / 9.4; padding: clamp(24px, 3.6vw, 52px);
  border-radius: clamp(18px, 2vw, 26px); background: #0b0805; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07); }
.plan-hero > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.plan-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(4, 5, 6, 0.9) 0%, rgba(4, 5, 6, 0.6) 34%, rgba(4, 5, 6, 0.05) 68%), linear-gradient(0deg, rgba(4, 5, 6, 0.75), transparent 46%); }
.plan-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: linear-gradient(165deg, rgba(255, 255, 255, 0.08), transparent 24%); }
/* three ceiling strips across the top of the plan, switched on as it appears */
.plan-ceiling { position: absolute; z-index: 1; top: 0; left: 50%; width: 84%; height: 40px; transform: translateX(-50%); pointer-events: none; }
.plan-ceiling i { position: absolute; left: 50%; height: 2px; border-radius: 2px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, #fff 12%, #fff 88%, transparent); box-shadow: var(--led); }
.plan-ceiling i:nth-child(1) { top: 0; width: 100%; }
.plan-ceiling i:nth-child(2) { top: 15px; width: 74%; height: 1.5px; opacity: 0.8; }
.plan-ceiling i:nth-child(3) { top: 27px; width: 52%; height: 1px; opacity: 0.6; }
.plan.is-lit .plan-ceiling i { animation: pk-on 0.45s linear both; }
.plan.is-lit .plan-ceiling i:nth-child(2) { animation-delay: 0.09s; }
.plan.is-lit .plan-ceiling i:nth-child(3) { animation-delay: 0.18s; }
.plan-title { display: grid; gap: 18px; justify-items: start; max-width: 760px; }
.plan-title .eyebrow { color: var(--ice); }
.plan-name { font: 900 clamp(42px, 6.8vw, 108px)/0.88 var(--display); font-stretch: 125%; letter-spacing: -0.02em; text-transform: uppercase; outline: none; text-shadow: 0 10px 50px rgba(0, 0, 0, 0.5); }
.plan-name:focus-visible { outline: 2px solid var(--ice); outline-offset: 8px; }
/* each beat rises out of its own mask; padding leaves room for the outline's glow */
.pn { display: block; overflow: hidden; padding: 0.06em 0.2em 0.05em; margin: -0.06em -0.2em -0.05em; }
.pn > * { display: inline-block; }
.plan-name em.gold { font-style: normal; color: transparent; -webkit-text-stroke: max(1.5px, 0.021em) var(--gold); text-shadow: 0 0 0.24em rgba(255, 181, 90, 0.38); }
.plan-line { max-width: 30em; font-size: var(--fs-lead); line-height: 1.4; color: rgba(243, 245, 247, 0.88); }

.plan-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(36px, 5vw, 84px); padding: 0 clamp(2px, 1vw, 14px); }
.plan-h { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; font: 500 13px/1.3 var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ice); }
.plan-h::before { content: ""; width: 24px; height: 2px; border-radius: 2px; background: currentColor; box-shadow: 0 0 8px currentColor; }
.plan-get { gap: 14px; font-size: 17px; }
/* the work in the plan, as real photos: two across, an odd last one runs wide */
.plan-shots { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 34px; }
.plan-shots li { position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 4 / 3.4; border-radius: 18px; background: var(--char); box-shadow: inset 0 0 0 1px var(--line); }
.plan-shots li:last-child:nth-child(odd) { grid-column: 1 / -1; aspect-ratio: 16 / 8; }
.plan-shots img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.82); }
.plan-shots li::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(4, 5, 6, 0.85), transparent 55%), linear-gradient(165deg, rgba(255, 255, 255, 0.08), transparent 26%); }
.plan-shots span { position: absolute; left: 14px; bottom: 12px; font: 800 14px/1.1 var(--display); font-stretch: 118%; text-transform: uppercase; letter-spacing: 0.02em; }
.plan-steps > li { padding-bottom: clamp(26px, 2.6vw, 34px); gap: 6px; }
.plan-steps .step-n { font-size: 12.5px; }
.plan-steps b { font: 800 clamp(18px, 1.5vw, 22px)/1.1 var(--display); font-stretch: 118%; text-transform: uppercase; letter-spacing: 0.01em; }
.plan-steps p { font-size: 16.5px; line-height: 1.5; }
.plan-steps .always { margin-left: 8px; padding: 3px 8px; border-radius: 999px; font: 500 11px/1 var(--mono); letter-spacing: 0.04em; color: var(--ice); box-shadow: inset 0 0 0 1px rgba(139, 233, 255, 0.4); vertical-align: 3px; }
.plan-note { margin-top: 26px; padding: 14px 18px; border-radius: 14px; font-size: 15.5px; line-height: 1.5; color: var(--dim); background: rgba(255, 255, 255, 0.03); box-shadow: inset 2px 0 0 var(--ice); }
.plan-note[hidden] { display: none; }

.plan-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 22px clamp(24px, 3vw, 48px); padding-top: clamp(26px, 3vw, 40px); border-top: 1px solid var(--line); }
.plan-price.slot { min-height: 0; justify-items: start; align-content: center; gap: 6px; padding: 30px 42px; text-align: left; }
.plan-price.slot b { max-width: none; }
.plan-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- ready-made builds ---------- */
.pk-tiles .tile h3 { font-size: clamp(26px, 2.4vw, 40px); line-height: 0.95; }
.pk-tiles .tile > img { object-position: 50% 50%; }
.pk-tiles .tile:nth-child(3) > img { object-position: 52% 60%; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .pk-car { padding: 16px 16px 20px; }
  .pk-work { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pk-svc { aspect-ratio: 5 / 4; }
  .plan-foot { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .plan-body { grid-template-columns: 1fr; }
  .plan-hero { aspect-ratio: 16 / 10; }
}
@media (max-width: 720px) {
  .pk-head { justify-items: start; text-align: left; }
  .bld { margin-inline: -6px; padding: 18px 16px 20px; border-radius: 24px; }
  /* phones: four strips and their numbers; the step name is in the question itself */
  .bld-rail { gap: 6px; margin-bottom: 26px; }
  .bld-rail button { grid-template-columns: 1fr; gap: 0; align-content: start; }
  .bld-led { margin-bottom: 10px; }
  .bld-name, .bld-ans { display: none; }
  .bld-n { margin-bottom: 12px; }
  .bld-q { font-size: 9.2vw; } /* packages.js shrinks a beat that is still too wide, so each stays on one line */
  .bld-hint { margin-bottom: 20px; }
  .pk-cars { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pk-car { padding: 12px 14px 16px; border-radius: 18px; }
  .pk-car::after { top: 12px; right: 12px; width: 18px; height: 18px; }
  .carline { margin: 22px -2px 24px; }
  .pk-car b { font-size: 22px; }
  .pk-car small { font-size: 13.5px; line-height: 1.35; }
  /* condition: picture left, words right */
  .pk-conds { grid-template-columns: 1fr; gap: 8px; }
  .pk-cond { grid-template-columns: 42% 1fr; grid-template-rows: auto auto; align-content: center; column-gap: 0; padding: 8px 40px 8px 8px; min-height: 104px; border-radius: 18px; }
  .pk-dirt { grid-row: 1 / span 2; margin: 0 14px 0 0; aspect-ratio: 4 / 3; border-radius: 12px; }
  .pk-cond b, .pk-cond small { padding: 0; }
  .pk-cond b { align-self: end; font-size: 17px; }
  .pk-cond small { align-self: start; font-size: 13.5px; line-height: 1.35; }
  .pk-cond::after { top: 50%; right: 14px; margin-top: -10px; background-color: transparent; }
  .pk-work { gap: 8px; }
  .pk-svc { aspect-ratio: 4 / 5; border-radius: 18px; }
  .pk-svc::after { top: 12px; right: 12px; }
  .pk-svc-t { padding: 14px 14px 15px; gap: 3px; }
  .pk-svc-t b { font-size: 15.5px; }
  .pk-svc-t small { font-size: 13px; line-height: 1.35; }
  .pk-tip { border-radius: 18px; padding: 14px 16px; }
  html.pk-bld-on .dock { transform: translateY(170%); }
  .pk-tip .chip { width: 100%; justify-content: center; }
  .bld-nav { gap: 10px; padding-top: 18px; }
  .bld-back { padding: 0 18px; min-height: 56px; }
  .bld-next { flex: 1; min-height: 56px; padding: 0 22px; }
  .bld-count { display: none; }
  .plan { gap: 30px; }
  .plan-hero { aspect-ratio: auto; min-height: 0; padding: 0; display: block; overflow: visible; background: none; box-shadow: none; }
  .plan-hero > img { position: relative; z-index: 0; aspect-ratio: 4 / 3; height: auto; border-radius: 18px; object-position: 58% 60%; }
  .plan-hero::before { inset: 0 0 auto; height: auto; aspect-ratio: 4 / 3; z-index: 1; border-radius: 18px; background: linear-gradient(0deg, rgba(4, 5, 6, 0.92) 4%, rgba(4, 5, 6, 0.4) 30%, transparent 52%); }
  .plan-hero::after { display: none; }
  .plan-ceiling { width: 90%; }
  .plan-title { position: relative; z-index: 2; margin-top: -40px; padding: 0 6px; gap: 14px; }
  .plan-name { font-size: 10.6vw; }
  .plan-line { font-size: 18px; }
  .plan-body { padding: 0 4px; }
  .plan-get { font-size: 16.5px; }
  .plan-foot { padding-top: 24px; }
  .plan-price.slot { padding: 30px 36px; }
  .plan-cta { display: grid; grid-template-columns: 1fr; }
  .plan-cta .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .pk-work input:checked + .pk-svc .pk-svc-t::before { animation: none; }
}
