/* Plan pages (/plans/ and /plans/<slug>/). Built by metro-house-plans-tools/plan-pages/build.mjs: edit the copy in that folder's src/, then re-run the build.
   Everything here sits on the home page's own system (styles.css, tokens.css): same paper, ink, denim blue and cedar, same type, same rules. */

/* ---------- breadcrumb ---------- */
.pp-crumbs { padding-block: 6px 0; }
.pp-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; font-size: var(--fs-sm); color: var(--ink-2); }
.pp-crumbs li { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.pp-crumbs li + li::before { content: "/"; color: var(--ink-3); }
.pp-crumbs a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; color: var(--blue); font-weight: 600; text-underline-offset: 4px; }
.pp-crumbs a:hover { color: var(--ink); }

/* ---------- hero: name and price left, the house you can turn right ---------- */
.pp-hero { padding-block: var(--s-2) var(--s-5); }
.pp-hero-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
.pp-head { display: grid; gap: var(--s-2); }
.pp-head h1 span { display: block; padding-top: 10px; font-size: var(--fs-h3); font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; color: var(--blue); }
.pp-view { display: grid; gap: 10px; margin: 0; min-width: 0; align-content: start; align-self: start; }
.pp-stage { position: relative; border: var(--rule-thin) solid var(--ink); background: var(--stage); }
.pp-stage .spin-side { font-size: 0.75rem; }
.pp-buy { display: grid; gap: var(--s-2); align-content: start; }
.pp-buy .pf-specs { padding-bottom: var(--s-2); border-bottom: var(--rule-thin) solid var(--ink); }
.pp-buy .acts .btn { flex: 1 1 auto; }
.pp-reassure { font-size: var(--fs-sm); color: var(--ink-2); max-width: 52ch; }
@media (min-width: 960px) {
  .pp-hero-in { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "head view" "buy view"; grid-template-rows: auto 1fr; column-gap: var(--s-4); }
  .pp-head { grid-area: head; } .pp-view { grid-area: view; } .pp-buy { grid-area: buy; }
  .pp-buy .acts .btn { flex: 0 1 auto; }
}

/* front / rear switch (plans with no 360 yet): the next picture wipes in from the left */
.pp-flip { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--ink); }
.pp-flip img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.pp-flip img.is-on { opacity: 1; z-index: 1; }
.pp-flip img.is-in { opacity: 1; z-index: 2; animation: ppWipe 520ms var(--ease) both; }
@keyframes ppWipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.pp-seg { display: flex; flex-wrap: wrap; border: var(--rule-thin) solid var(--ink); border-width: var(--rule-thin) 0 0; }
.pp-seg button { flex: 1 1 auto; min-height: 48px; padding: 0 16px; border: 0; border-right: var(--rule-thin) solid var(--ink); background: var(--white); font-weight: 600; font-size: var(--fs-sm); white-space: nowrap; transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease); }
.pp-seg button:last-child { border-right: 0; }
.pp-seg button:hover { background: var(--line); }
.pp-seg button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.pp-seg button:active { transform: scale(.97); }

/* ---------- sections ---------- */
.pp-sec { padding-block: var(--s-5); border-top: var(--rule) solid var(--ink); }
.pp-sec--white { background: var(--white); }
.pp-sec .sec-head { padding-bottom: var(--s-3); }
.pp-note { padding-left: 12px; border-left: var(--rule) solid var(--cedar); font-size: var(--fs-sm); color: var(--ink); max-width: 64ch; }
.on-ink .pp-note { color: var(--on-ink-2); border-left-color: var(--cedar-lt); }

/* floor plan sheets: tap one and it opens full size */
.pp-sheets { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); padding-bottom: var(--s-3); }
.pp-sheet { display: grid; gap: 8px; margin: 0; min-width: 0; }
.pp-sheet-btn { position: relative; display: block; width: 100%; height: clamp(320px, 78vw, 640px); padding: 12px; border: var(--rule-thin) solid var(--ink); background: var(--white); cursor: zoom-in; transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease); }
.pp-sheet-btn:hover { box-shadow: 6px 6px 0 var(--ink); transform: translate(-3px, -3px); }
.pp-sheet-btn:active { transform: none; box-shadow: none; }
.pp-sheet-btn .plan { width: 100%; height: 100%; }
.pp-sheet-go { position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--ink); color: var(--on-ink); font-size: var(--fs-sm); font-weight: 600; line-height: 1; }
.pp-sheet figcaption { font-size: var(--fs-sm); color: var(--ink-2); }
.pp-sheet figcaption b { color: var(--ink); }
@media (min-width: 700px) { .pp-sheets--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pp-sheet-btn { height: clamp(380px, 46vw, 640px); } .pp-sheets--1 .pp-sheet-btn { height: clamp(380px, 52vw, 720px); } }

/* exterior pictures */
.pp-pics { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); padding-bottom: var(--s-3); }
.pp-pics .pic img { aspect-ratio: 16 / 9; object-fit: contain; }
@media (min-width: 700px) { .pp-pics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* video tour, on ink */
.pp-tour { background: var(--ink); color: var(--on-ink); border-top: 0; }
.pp-tour-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
.pp-tour-copy { display: grid; gap: var(--s-2); align-content: start; }
.pp-tour video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--ink); border: var(--rule-thin) solid var(--on-ink); }
@media (min-width: 960px) { .pp-tour-in { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--s-4); } }

/* plan details */
.pp-detail { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
.pp-dl { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: var(--s-4); margin: 0; border-top: var(--rule-thin) solid var(--ink); }
.pp-dl div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.pp-dl dt { color: var(--ink-2); }
.pp-dl dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.pp-side { display: grid; gap: var(--s-3); align-content: start; }
.pp-side h3 { font-size: 1.375rem; padding-bottom: 12px; }
.pp-rooms { color: var(--ink-2); max-width: 60ch; }
@media (min-width: 560px) { .pp-dl { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .pp-detail { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }

/* building outside Nebraska: one cedar band */
.pp-state { background: var(--cedar); color: var(--on-ink); padding-block: var(--s-5); }
.pp-state-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); align-items: end; }
.pp-state p { max-width: 56ch; font-size: clamp(1.0625rem, .95rem + .5vw, 1.25rem); line-height: 1.45; }
.pp-state .btn { justify-self: start; }
.pp-state :focus-visible { outline-color: var(--on-ink); }
@media (min-width: 960px) { .pp-state-in { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-4); } .pp-state-txt { display: grid; gap: var(--s-3); } }
.pp-state-txt { display: grid; gap: var(--s-2); }

/* FAQ sits on the page as a section of its own */
.pp-faq { padding-block: var(--s-5); border-top: 0; }

/* more plans like this */
.pp-rel { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
.pp-card { display: grid; grid-template-rows: auto 1fr; min-width: 0; background: var(--white); border: var(--rule-thin) solid var(--ink); text-decoration: none; transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease); }
.pp-card:hover { box-shadow: 6px 6px 0 var(--ink); transform: translate(-3px, -3px); }
.pp-card:active { transform: none; box-shadow: none; }
.pp-card img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-bottom: var(--rule-thin) solid var(--ink); }
.pp-card-b { display: grid; gap: 6px; padding: 16px; align-content: start; }
.pp-card h3, .pp-card h2 { font-size: 1.625rem; line-height: 1.05; }
.pp-card .pc-price { padding-top: 8px; }
.pp-card .pc-price b { font-size: 1.75rem; }
.pp-card-go { color: var(--blue); font-weight: 600; font-size: var(--fs-sm); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.pp-card:hover .pp-card-go { color: var(--ink); }
.pp-all { padding-top: var(--s-3); }
@media (min-width: 620px) { .pp-rel { grid-template-columns: repeat(3, minmax(0, 1fr)); } .pp-rel .pp-card h3 { font-size: 1.375rem; } }
@media (min-width: 620px) and (max-width: 899px) { .pp-rel { gap: var(--s-2); } .pp-rel .pp-card-b { padding: 12px; } .pp-rel .pc-specs { font-size: 0.75rem; } }

/* hub: every plan on one page */
.pp-hub-head { padding-block: var(--s-2) var(--s-4); display: grid; gap: var(--s-2); }
.pp-hub-head .lead { max-width: 62ch; }
.pp-hub { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); padding-bottom: var(--s-5); }
.pp-hub .pp-card h2 { font-size: 1.75rem; }
.pp-hub .pc-buy { border-top: 1px solid var(--line); margin-top: 8px; }
@media (min-width: 620px) { .pp-hub { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .pp-hub { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- full-size floor plan ---------- */
.pp-lb { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: var(--white); color: var(--ink); overflow: hidden; }
.pp-lb[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); animation: ppIn 220ms var(--ease) both; }
@keyframes ppIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.pp-lb-top { display: flex; align-items: center; gap: 8px; padding: 10px var(--gutter); border-bottom: var(--rule) solid var(--ink); background: var(--paper); }
.pp-lb-top h2 { margin-right: auto; font-size: 1.125rem; line-height: 1.2; letter-spacing: -0.01em; }
.pp-lb-body { position: relative; overflow: auto; overscroll-behavior: contain; display: grid; place-items: center; padding: 12px; cursor: zoom-in; -webkit-overflow-scrolling: touch; }
.pp-lb-body > * { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.pp-lb-body > svg { width: 100%; height: 100%; }
.pp-lb.is-big .pp-lb-body { display: block; cursor: grab; }
.pp-lb.is-big .pp-lb-body.is-drag { cursor: grabbing; }
.pp-lb.is-big .pp-lb-body > * { max-width: none; max-height: none; width: var(--nat, 1600px); height: auto; }
.pp-lb-hint { position: absolute; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); padding: 8px 12px; background: var(--ink); color: var(--on-ink); font-size: var(--fs-sm); font-weight: 500; white-space: nowrap; pointer-events: none; }

/* phone: the buy button follows you down the page */
.pp-sticky { gap: 10px; }
.pp-sticky b { font-variant-numeric: tabular-nums; }

/* footer links pack to the top of their column */
.foot nav { align-content: start; }

/* back from a cancelled checkout (plan-page.js) */
.pp-cancel { background: var(--white); border-bottom: var(--rule-thin) solid var(--ink); font-size: var(--fs-sm); font-weight: 500; }
.pp-cancel p { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.pp-cancel span { padding-left: 14px; border-left: var(--rule) solid var(--cedar); }
.pp-cancel button { flex: none; min-width: 44px; min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--blue); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.pp-cancel button:hover { color: var(--ink); }
