/* Packages prototype: expanding cards + low-poly 3D set viewer (local only, not live). */

.pk-sec { padding-bottom: clamp(72px, 10vw, 140px); }
.pk-stage {
  --burgundy: #6E0F1E; --gold: #D9BC82; --rose: #FBF3F0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line-strong);
}
.pk-card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  padding: clamp(24px, 3vw, 40px); border-right: 1px solid var(--line-strong);
  background: var(--paper); color: var(--ink); overflow: hidden; overflow: clip;
  transition: background .3s var(--ease);
}
.pk-card:last-child { border-right: 0; }
.pk-card.featured { background: var(--ink); color: var(--paper); }
.pk-card.signature { background: var(--burgundy); color: var(--rose); }
.pk-card.signature::before {
  content: ""; position: absolute; right: -12%; bottom: -10%; width: 85%; aspect-ratio: 1;
  background: url("../img/g-mark-gold.png") center / contain no-repeat; opacity: .16; pointer-events: none;
}
.pk-card > * { position: relative; z-index: 1; }
.pk-card .label { color: var(--muted); }
.pk-card.featured .label { color: var(--inv-muted); }
.pk-card.signature .label, .pk-card.signature .pk-price small { color: var(--gold); }

/* the whole card is one big button in overview / mini state */
.pk-hit { position: absolute !important; inset: 0; z-index: 3 !important; background: none; border: 0; cursor: pointer; padding: 0; }
.pk-hit:focus-visible { outline: 2px solid currentColor; outline-offset: -6px; }
.pk-card:not(.is-open):hover .pk-more .arr, .pk-card:not(.is-open):hover .pk-mini .arr { transform: translateX(6px); }
.arr { display: inline-block; transition: transform .3s var(--ease); }

.pk-top { display: flex; justify-content: space-between; gap: 12px; }
.pk-name { font-size: clamp(32px, 3.6vw, 56px); font-stretch: 100%; margin: 28px 0 10px; padding-right: .08em; }
.pk-card.signature .pk-name { font-style: italic; }
.pk-price { font-family: var(--display); font-weight: 700; font-size: clamp(22px, 2vw, 28px); letter-spacing: -.02em; }
.pk-price small { display: block; font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.pk-card.featured .pk-price small { color: var(--inv-muted); }
.pk-close { display: none; }

.pk-one { font-size: 18px; line-height: 1.45; margin: 24px 0 20px; min-height: 4.4em; }
.pk-quick { list-style: none; margin: 0 0 28px; padding: 0; border-top: 1px solid var(--line); flex: 1; }
.pk-quick li { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.pk-quick li span { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: .6; padding-top: 3px; }
.pk-card.featured .pk-quick, .pk-card.featured .pk-quick li { border-color: var(--inv-line); }
.pk-card.signature .pk-quick, .pk-card.signature .pk-quick li { border-color: rgba(251,243,240,.22); }
.pk-quick li { text-align: right; }
.pk-more, .pk-mini { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.pk-more {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 16px 18px; font-size: 14px; font-weight: 500;
  background: var(--ink); color: var(--paper); border: 1px solid var(--ink);
  transition: background .25s var(--ease), color .25s var(--ease);
}
.pk-card.featured .pk-more { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.pk-card.signature .pk-more { background: var(--rose); color: var(--burgundy); border-color: var(--rose); }
.pk-card:not(.is-open):hover .pk-more { background: transparent; color: inherit; }
.pk-more .arr { animation: pk-nudge 1.8s var(--ease) infinite; }
@keyframes pk-nudge { 0%, 60%, 100% { transform: translateX(0); } 30% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .pk-more .arr { animation: none; } }
.pk-mini, .pk-detail { display: none; }

/* ---------- open state ---------- */
.pk-stage.is-open { grid-template-columns: minmax(0, 1fr) 210px; border: 0; gap: 12px; align-items: start; }
.pk-stage.is-open .pk-card { border: 1px solid var(--line-strong); }
.pk-stage.is-open .pk-card.is-open { grid-column: 1; grid-row: 1 / span 3; order: -1; }
.pk-card.is-open .pk-hit, .pk-card.is-open .pk-sum { display: none; }
.pk-card.is-open .pk-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px 24px; }
.pk-card.is-open .pk-top { grid-column: 1 / -1; }
.pk-card.is-open .pk-name { font-size: clamp(44px, 6vw, 96px); margin: 20px 0 0; }
.pk-card.is-open .pk-price { text-align: right; }
.pk-card.is-open .pk-close {
  display: inline-block; grid-column: 1 / -1; justify-self: start; margin-top: 12px;
  background: none; border: 0; padding: 4px 0; cursor: pointer;
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; opacity: .7;
}
.pk-card.is-open .pk-close:hover { opacity: 1; }
.pk-card.is-open .pk-detail {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(24px, 3vw, 48px);
  margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line);
}
.pk-card.featured.is-open .pk-detail { border-top-color: var(--inv-line); }
.pk-card.signature.is-open .pk-detail { border-top-color: rgba(251,243,240,.22); }
.pk-card.signature.is-open::before { width: 40%; right: -6%; bottom: -4%; opacity: .1; }

/* the small ones in the corner */
.pk-stage.is-open .pk-card:not(.is-open) { grid-column: 2; padding: 16px 18px; }
.pk-stage.is-open .pk-card:not(.is-open) .pk-sum { display: none; }
.pk-stage.is-open .pk-card:not(.is-open) .pk-name { font-size: 24px; margin: 10px 0 6px; }
.pk-stage.is-open .pk-card:not(.is-open) .pk-price { font-size: 15px; }
.pk-stage.is-open .pk-card:not(.is-open) .pk-price small { font-size: 10px; margin-bottom: 0; }
.pk-stage.is-open .pk-card:not(.is-open) .pk-mini { display: block; margin-top: 12px; }
.pk-stage.is-open .pk-card:not(.is-open)::before { width: 120%; right: -40%; bottom: -40%; }

/* detail text */
.pk-best { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.45; margin: 0 0 24px; }
.pk-best .label, .pk-worth .label { display: block; margin-bottom: 8px; }
.pk-facts { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 32px; border-top: 1px solid currentColor; }
.pk-facts div { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); }
.pk-facts div:nth-child(odd) { border-right: 1px solid var(--line); }
.pk-facts div:nth-child(even) { padding-left: 14px; }
.pk-card.featured .pk-facts div { border-color: var(--inv-line); }
.pk-card.signature .pk-facts div { border-color: rgba(251,243,240,.22); }
.pk-facts dt { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .6; }
.pk-facts dd { margin: 4px 0 0; font-weight: 600; font-size: 15px; line-height: 1.35; }
.pk-h { font-family: var(--mono); font-weight: 500; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin: 28px 0 10px; }
.pk-time { list-style: none; padding: 0; margin: 0; }
.pk-time li { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.45; }
.pk-time b { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; padding-top: 2px; }
.pk-team { list-style: none; padding: 0; margin: 0; }
.pk-team li { position: relative; padding: 6px 0 6px 22px; font-size: 15px; line-height: 1.45; }
.pk-team li::before { content: "—"; position: absolute; left: 0; }
.pk-card.featured .pk-time li { border-color: var(--inv-line); }
.pk-card.signature .pk-time li { border-color: rgba(251,243,240,.22); }
.pk-small { font-size: 13px; opacity: .65; margin: 8px 0 0; }
.pk-worth { margin: 32px 0 0; font-size: 16px; }
.pk-flex { margin: 20px 0 0; padding: 12px 14px; border: 1px dashed currentColor; font-size: 14px; opacity: .85; }
.pk-why { margin: 20px 0 0; border-top: 1px solid rgba(251,243,240,.22); border-bottom: 1px solid rgba(251,243,240,.22); }
.pk-why summary { cursor: pointer; padding: 12px 0; font-weight: 600; font-size: 15px; }
.pk-why p { margin: 0 0 14px; font-size: 15px; }
.pk-cta { margin-top: 28px; }
.pk-cta .btn { width: 100%; justify-content: space-between; }
.pk-card.featured .pk-cta .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.pk-card.signature .pk-cta .btn { background: var(--rose); color: var(--burgundy); border-color: var(--rose); }

/* ---------- 3D viewer ---------- */
.pk-viewer-slot { min-width: 0; }
.pk-viewer {
  position: sticky; top: 96px; height: min(66vh, 580px); min-height: 380px;
  background: #EDEBE6; color: var(--ink); border: 1px solid var(--line); overflow: hidden;
}
.pk-card.featured .pk-viewer { background: #E9E7E2; }
.pk-card.signature .pk-viewer { background: #F1E9E4; border-color: rgba(251,243,240,.3); }
.pk-canvas { position: absolute; inset: 0; cursor: grab; touch-action: none; }
.pk-canvas:active { cursor: grabbing; }
.pk-canvas canvas { display: block; }
.pk-viewer-bar {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 12px; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; pointer-events: none;
}
.pk-hint { opacity: .55; }
.pk-tools { display: flex; gap: 6px; pointer-events: auto; }
.pk-tools button { background: var(--paper); border: 1px solid var(--line-strong); padding: 6px 10px; cursor: pointer; font: inherit; letter-spacing: inherit; }
.pk-tools button[aria-pressed="false"] { opacity: .5; }
.pk-loading { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; opacity: .6; pointer-events: none; }
.pk-loading[hidden] { display: none; }
.pk3-tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  background: rgba(14,14,14,.86); color: #FAFAF8; padding: 3px 7px; pointer-events: none; transform: translateY(-14px);
}
.pk3-tag.gold { background: #6E0F1E; color: #E8CC8E; }
.pk-viewer.no-labels .pk3-tag { display: none; }

.pk-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 24px; font-size: 14px; color: var(--muted); }
.pk-notes p { margin: 0; }
.pk-notes b { color: var(--ink); }

::view-transition-group(*) { animation-duration: .45s; animation-timing-function: cubic-bezier(.2, .7, .1, 1); }

/* ---------- tablet / phone ---------- */
@media (max-width: 960px) {
  .pk-stage { grid-template-columns: 1fr; }
  .pk-card { border-right: 0; border-bottom: 1px solid var(--line-strong); }
  .pk-card:last-child { border-bottom: 0; }
  .pk-one { min-height: 0; }
  .pk-stage.is-open { grid-template-columns: 1fr 1fr; gap: 8px; }
  .pk-stage.is-open .pk-card.is-open { grid-column: 1 / -1; grid-row: 2; }
  .pk-stage.is-open .pk-card:not(.is-open) { grid-column: auto; grid-row: 1; padding: 12px 14px; }
  .pk-stage.is-open .pk-card:not(.is-open) .pk-name { font-size: 20px; margin: 6px 0 2px; }
  .pk-stage.is-open .pk-card:not(.is-open) .pk-top .label:last-child { display: none; }
  .pk-stage.is-open .pk-card:not(.is-open) .pk-mini { margin-top: 6px; }
  .pk-card.is-open .pk-detail { grid-template-columns: 1fr; }
  .pk-card.is-open .pk-viewer-slot { order: -1; }
  .pk-viewer { position: relative; top: 0; height: min(96vw, 520px); min-height: 320px; }
  .pk3-tag { font-size: 9px; padding: 2px 5px; }
  .pk-notes { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 520px) {
  .pk-card.is-open .pk-head { grid-template-columns: 1fr; }
  .pk-card.is-open .pk-price { text-align: left; }
  .pk-facts { grid-template-columns: 1fr; }
  .pk-facts div:nth-child(odd) { border-right: 0; }
  .pk-facts div:nth-child(even) { padding-left: 0; }
  .pk-time li { grid-template-columns: 78px 1fr; }
  .pk-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*) { animation-duration: 0s; } }

/* ---------- starter packs: how it works, minimum, add-ons ---------- */
.pk-how { list-style: none; padding: 0; margin: clamp(28px, 4vw, 44px) 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--ink); }
.pk-how li { padding: 16px 20px 4px 0; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.pk-how li + li { padding-left: 20px; border-left: 1px solid rgba(14,14,14,.15); }
.pk-how .label { display: block; margin-bottom: 6px; }
.pk-how b { color: var(--ink); }
.pk-min { margin: 14px 0 0; padding: 12px 14px; border: 1px dashed currentColor; font-size: 14px; line-height: 1.45; }
.pk-add { list-style: none; padding: 0; margin: 0; }
.pk-add li { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid rgba(127,127,127,.25); font-size: 15px; }
.pk-add b { font-family: var(--mono); font-weight: 500; font-size: 13px; white-space: nowrap; }
@media (max-width: 760px) {
  .pk-how { grid-template-columns: 1fr; }
  .pk-how li, .pk-how li + li { padding: 14px 0 0; border-left: 0; }
}
.pk-build-lead { margin: 0 0 12px; }
.pk-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pk-chips li { font-size: 13px; padding: 7px 12px; border: 1px solid currentColor; border-radius: 999px; opacity: .85; }

/* package cards: keep their own background transition alongside the entrance animation; never hide while a package is open */
.pk-card.reveal { transition: background .3s var(--ease), opacity 1s var(--ease), transform 1.2s var(--ease), filter 1s var(--ease); }
.pk-stage.is-open .pk-card.reveal { opacity: 1; transform: none; filter: none; transition-delay: 0s !important; }
/* budget section */
.pk-budget-more { margin: 18px 0 0; max-width: 46ch; font-size: 16px; line-height: 1.55; color: #D8D8D3; }
.pk-budget-steps { list-style: none; padding: 0; margin: 24px 0 0; border-top: 1px solid var(--inv-line, rgba(255,255,255,.2)); }
.pk-budget-steps li { display: grid; grid-template-columns: 44px 1fr; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--inv-line, rgba(255,255,255,.2)); font-size: 15px; }
/* masked prices: the real numbers live in the Packages Deck (Jordan 2026-12-01) */
.pk-mask { display: inline-block; white-space: nowrap; font-size: clamp(14px, 1.15vw, 17px); letter-spacing: .03em; opacity: .9; }
.pk-stage.is-open .pk-card:not(.is-open) .pk-mask { font-size: 11px; letter-spacing: .02em; }
.pk-ask { margin: 10px 0 0; font-size: 14px; line-height: 1.5; }
.pk-ask span:first-child { color: var(--muted); }
.pk-card.featured .pk-ask span:first-child { color: var(--inv-muted); }
.pk-ask a { text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.pk-notes a { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 520px) { .pk-stage.is-open .pk-card:not(.is-open) .pk-mask { white-space: normal; font-size: 10px; } }
