/* =====================================================================
   Packages — /packages, a bundle page, the quote and the client checkout.
   Split from app.css so every other page has 16 KB less render-blocking
   CSS. Uses app.css's tokens, so it loads after it.
   ===================================================================== */

.pk-jump { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: var(--s-5); }

/* Ready-made bundles */
.pk-bundle-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1.5rem; }
.pk-bundle {
  position: relative; display: flex; flex-direction: column; gap: var(--s-3);
  padding: clamp(1.6rem, 3vw, 2.25rem);
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-1);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.22s ease;
}
.pk-bundle:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--brand-line); }
/* Three across, with a short last row centred rather than left hanging. */
@media (min-width: 1000px) {
  .pk-bundle-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .pk-bundle { grid-column: span 2; }
  .pk-bundle:nth-child(3n+1):nth-last-child(2) { grid-column: 2 / span 2; }
  .pk-bundle:nth-child(3n+1):last-child { grid-column: 3 / span 2; }
}
.pk-bundle.is-featured { border-color: var(--brand-hot); box-shadow: var(--shadow-3); }
.pk-bundle__badge {
  position: absolute; top: -0.75rem; left: clamp(1.6rem, 3vw, 2.25rem);
  background: var(--grad-fill); color: var(--on-fill);
  font-family: var(--f-label); font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.32rem 0.85rem; border-radius: 100px;
}
.pk-bundle__name { font-size: 1.35rem; text-wrap: balance; }
.pk-bundle__name a { color: inherit; text-decoration: none; }
.pk-bundle__name a:hover { color: var(--brand); }
.pk-bundle__tagline { font-size: 0.95rem; color: var(--ink-3); line-height: 1.55; }
.pk-bundle__price,
.pk-buy__price {
  font-family: var(--f-display); font-size: clamp(2rem, 3vw, 2.6rem); font-weight: 800;
  letter-spacing: -0.03em; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums;
}
.pk-bundle__price span,
.pk-buy__price span { font-size: 0.36em; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.pk-bundle__save { font-size: 0.9rem; color: var(--ink-3); }
.pk-bundle__save s { color: var(--ink-4); }
.pk-bundle__save strong { color: var(--green); font-weight: 700; }
.pk-bundle__items { list-style: none; padding: 0; margin: var(--s-2) 0 0; display: flex; flex-direction: column; gap: 0.55rem; flex: 1; font-size: 0.93rem; }
.pk-bundle__items li { display: flex; gap: 0.6rem; color: var(--ink-2); }
.pk-bundle__items li::before {
  content: ""; flex-shrink: 0; width: 17px; height: 17px; margin-top: 0.22rem; border-radius: 50%;
  background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 4.8 8.5 9.5 3.8' stroke='%234648D4' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px no-repeat;
}
/* The light tick's indigo all but vanishes on the dark brand-soft disc. The
   same fix for .pkg__list, which service pages use too, is in app.css. */
:root[data-theme="dark"] .pk-bundle__items li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 4.8 8.5 9.5 3.8' stroke='%23B4B5FF' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.pk-bundle__time { display: flex; align-items: center; gap: 0.45rem; font-size: 0.88rem; color: var(--ink-3); }
.pk-bundle__time svg { color: var(--brand); flex-shrink: 0; }
.pk-bundle__actions { display: flex; flex-direction: column; align-items: center; gap: var(--s-3); margin-top: var(--s-2); }
.pk-bundle__actions form { width: 100%; }
.pk-bundle--compact .pk-bundle__price { font-size: clamp(1.6rem, 2.4vw, 2rem); }
.pk-bundle--compact .btn { margin-top: auto; }
.pk-bundles--more { padding-top: 0; }
.pk-note { margin-top: var(--s-5); font-size: 0.88rem; color: var(--ink-4); text-align: center; }

/* One service's three tiers */
.pk-services { background: var(--surface-2); }
.pk-service-nav { justify-content: center; }
.pk-service + .pk-service { margin-top: clamp(2.5rem, 5vw, 4rem); }
.pk-service__head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-2) var(--s-4);
  margin-bottom: var(--s-6); padding-bottom: var(--s-3); border-bottom: 1px solid var(--line);
}
.pk-service__title { font-size: var(--t-2); }

/* Phones: a service's tiers swipe sideways instead of stacking into a page
   twenty-one cards long. The padding keeps the "Most chosen" flag and the
   card shadows inside the scroller's clip. */
@media (max-width: 699px) {
  .pk-service .pkg-grid {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 86%;
    gap: var(--s-4); overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    margin-inline: calc(var(--gutter) * -1); padding: 0.9rem var(--gutter) var(--s-5);
    scroll-padding-inline: var(--gutter);
    scrollbar-width: thin;
  }
  .pk-service .pkg { scroll-snap-align: start; }
  .pk-service .pkg:hover { transform: none; }
  .pk-service__head { margin-bottom: var(--s-3); }
}

/* Build your own */
.builder { display: grid; gap: var(--s-6); align-items: start; }
@media (min-width: 1000px) {
  .builder { grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(2rem, 4vw, 3.5rem); }
  .builder__summary { position: sticky; top: calc(var(--header-h) + 1.5rem); }
}
.builder__choices { display: flex; flex-direction: column; gap: var(--s-5); min-width: 0; }
.builder__group {
  margin: 0; min-width: 0; padding: clamp(1.1rem, 2.5vw, 1.6rem);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.builder__group.is-flash { border-color: var(--brand-hot); box-shadow: 0 0 0 4px var(--brand-soft); }
.builder__legend {
  float: left; width: 100%; padding: 0; margin-bottom: var(--s-4);
  font-family: var(--f-display); font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; color: var(--ink);
}
.builder__legend + * { clear: both; }
.builder__options { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 136px), 1fr)); gap: 0.6rem; }
@media (min-width: 700px) { .builder__options { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } }
.builder__opt {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 0.6rem; align-items: center;
  padding: 0.75rem 0.9rem; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}
.builder__opt:hover { border-color: var(--brand-line); }
.builder__opt input { grid-row: 1 / span 2; width: 18px; height: 18px; margin: 0; accent-color: var(--brand-hot); }
.builder__opt:has(input:checked) { border-color: var(--brand-hot); background: var(--brand-soft); }
.builder__opt:has(input:focus-visible) { outline: 2px solid var(--brand-hot); outline-offset: 2px; }
.builder__opt-name { font-weight: 600; font-size: 0.93rem; color: var(--ink); line-height: 1.3; }
.builder__opt-price { grid-column: 2; font-size: 0.85rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.builder__opt--none input { grid-row: auto; }
.builder__opt--none .builder__opt-name { font-weight: 500; color: var(--ink-3); }
.builder__opt--none:has(input:checked) { border-color: var(--line); background: var(--surface-2); }

.builder__addons { display: flex; flex-direction: column; }
.builder__addon {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: 0.85rem 0; border-top: 1px solid var(--line-soft);
}
.builder__addon:first-child { border-top: 0; padding-top: 0; }
.builder__addon-label { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; font-size: 0.93rem; cursor: pointer; }
.builder__addon-label strong { font-weight: 600; color: var(--ink); }
.builder__addon-label span,
.builder__addon-label--check > span > span { font-size: 0.86rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.builder__addon-label small { font-size: 0.82rem; color: var(--ink-4); line-height: 1.45; }
.builder__addon-label--check { flex-direction: row; align-items: flex-start; gap: 0.7rem; width: 100%; }
.builder__addon-label--check input { width: 18px; height: 18px; margin: 0.15rem 0 0; flex-shrink: 0; accent-color: var(--brand-hot); }
.builder__addon-label--check > span { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.builder__qty { width: 5.25rem; flex-shrink: 0; padding: 0.55rem 0.7rem; text-align: center; font-variant-numeric: tabular-nums; }

.builder__bar {
  position: sticky; bottom: var(--s-3); z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: 0.65rem 0.65rem 0.65rem 1.1rem;
  background: var(--surface); border: 1.5px solid var(--brand-line);
  border-radius: 100px; box-shadow: var(--shadow-3);
}
.builder__bar[hidden] { display: none; }
.builder__bar p { display: flex; flex-direction: column; margin: 0; line-height: 1.2; }
.builder__bar span { font-size: 0.75rem; color: var(--ink-3); }
.builder__bar strong { font-family: var(--f-display); font-size: 1.2rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.builder__bar .btn { flex-shrink: 0; }
@media (min-width: 1000px) { .builder__bar { display: none; } }

.builder__summary {
  display: flex; flex-direction: column; gap: var(--s-4);
  padding: clamp(1.4rem, 3vw, 1.9rem);
  background: var(--surface); border: 1.5px solid var(--brand-line);
  border-radius: var(--radius); box-shadow: var(--shadow-2);
}
.builder__summary-title { font-size: 1.25rem; }
.builder__empty { font-size: 0.92rem; color: var(--ink-4); }
.builder__lines { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.9rem; }
.builder__lines:empty { display: none; }
.builder__lines li { display: flex; justify-content: space-between; gap: var(--s-3); color: var(--ink-2); }
.builder__lines li span:last-child { flex-shrink: 0; font-variant-numeric: tabular-nums; color: var(--ink); }
.builder__totals { margin: 0; display: flex; flex-direction: column; gap: 0.45rem; padding-top: var(--s-3); border-top: 1px solid var(--line); }
.builder__totals > div { display: flex; justify-content: space-between; gap: var(--s-3); font-size: 0.92rem; }
.builder__totals > div[hidden] { display: none; }
.builder__totals dt { color: var(--ink-3); }
.builder__totals dd { margin: 0; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.builder__totals [data-sum-discount] { color: var(--green); }
.builder__due { align-items: baseline; }
.builder__totals > div:not([hidden]) ~ .builder__due { padding-top: 0.55rem; margin-top: 0.2rem; border-top: 1px dashed var(--line); }
.builder__due dt { font-weight: 600; color: var(--ink); }
.builder__due dd { font-family: var(--f-display); font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.builder__quoted { font-size: 0.86rem; color: var(--ink-2); background: var(--surface-3); padding: 0.6rem 0.8rem; border-radius: 10px; }
.builder__fine { font-size: 0.82rem; line-height: 1.5; color: var(--ink-4); text-align: center; }
.builder__fine:empty { display: none; }

/* The quote */
.pk-quote-grid { display: grid; gap: var(--s-6); align-items: start; margin-top: var(--s-4); }
@media (min-width: 960px) { .pk-quote-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(2rem, 4vw, 4rem); } }
.pk-quote-page__title { font-size: var(--t-4); margin-bottom: var(--s-2); }
.pk-quote-page__name { font-size: var(--t-1); color: var(--ink-3); margin-bottom: var(--s-5); }
.pk-quote-page__edit { margin-top: var(--s-4); font-size: 0.93rem; }
.pk-quote-page__edit a { color: var(--brand); }
.pk-quote {
  width: 100%; border-collapse: separate; border-spacing: 0; margin-bottom: var(--s-3);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  overflow: hidden; font-size: 0.94rem;
}
.pk-quote th, .pk-quote td { padding: 0.8rem 1rem; text-align: left; vertical-align: top; border-top: 1px solid var(--line-soft); }
.pk-quote thead th {
  border-top: 0; background: var(--surface-2);
  font-family: var(--f-label); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-4);
}
.pk-quote tbody td { color: var(--ink-2); }
.pk-quote tfoot th { font-weight: 500; color: var(--ink-3); }
.pk-quote tfoot tr:first-child > * { border-top: 1px solid var(--line); }
.pk-quote .pk-quote__num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink); }
.pk-quote__save > * { color: var(--green) !important; }
.pk-quote__total > * { background: var(--surface-2); }
.pk-quote__total th { font-weight: 700; color: var(--ink); }
.pk-quote__total .pk-quote__num { font-family: var(--f-display); font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; }
.pk-quote + .builder__fine { text-align: left; }
@media (max-width: 479px) {
  .pk-quote th, .pk-quote td { padding: 0.7rem 0.75rem; }
  .pk-quote .pk-quote__num { white-space: normal; }
}

.pk-next { display: flex; flex-direction: column; gap: var(--s-5); }
.pk-next__card {
  display: flex; flex-direction: column; gap: var(--s-3);
  padding: clamp(1.4rem, 3vw, 2rem);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-1);
}
.pk-next__card:first-child { border: 1.5px solid var(--brand-line); box-shadow: var(--shadow-2); }
.pk-next__card h2 { font-size: 1.3rem; }
.pk-next__card > p { font-size: 0.94rem; color: var(--ink-3); line-height: 1.6; }
.pk-enquire .field { margin-bottom: 0; }
.pk-enquire { gap: var(--s-4); }

/* One bundle */
.pk-detail-head { display: grid; gap: var(--s-5); align-items: start; }
@media (min-width: 900px) { .pk-detail-head { grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s-7); } }
.pk-buy {
  display: flex; flex-direction: column; gap: var(--s-3);
  padding: clamp(1.4rem, 3vw, 1.9rem);
  background: var(--surface); border: 1.5px solid var(--brand-line);
  border-radius: var(--radius); box-shadow: var(--shadow-2);
}
.pk-buy .builder__fine { margin: 0; }
.pk-lead { font-size: var(--t-1); line-height: 1.65; color: var(--ink-2); max-width: 64ch; margin-bottom: var(--s-6); }
.pk-detail-title { font-size: var(--t-2); margin-bottom: var(--s-5); }
.pk-included { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--s-4); }
.pk-included__item {
  display: flex; flex-direction: column; gap: var(--s-3);
  padding: clamp(1.2rem, 2.5vw, 1.6rem);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.pk-included__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem var(--s-4); }
.pk-included__head h3 { font-size: 1.15rem; }
.pk-included__head a { color: inherit; text-decoration: none; }
.pk-included__head a:hover { color: var(--brand); text-decoration: underline; }
.pk-included__worth { font-size: 0.86rem; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.pk-included__item > p { font-size: 0.94rem; color: var(--ink-3); line-height: 1.6; }
.pk-included__item > .pkg__list { flex: none; }
.pk-body { margin-top: var(--s-7); }

@media (prefers-reduced-motion: reduce) {
  .pk-bundle, .builder__group, .builder__opt { transition: none; }
  .pk-bundle:hover { transform: none; }
}
