/* Client proposal (proposal.html): an editorial document the owner decides on, built from a Studio link.
   Dark cinematic cover, limestone reading sections, a dark workshop band for the cut plan. */
.pp { --night: #141210; --night-2: #1f1b18; --glow: #e9b89f; background: var(--limestone); }
.pp h1, .pp h2, .pp h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; margin: 0; }
.pp h2 em, .pp h1 em { font-style: italic; color: var(--terracotta); }

/* header: floats over the cover */
.pp-head { position: absolute; z-index: 10; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 18px; padding: 18px var(--gutter); color: #fff; }
.pp-brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.pp-brand img { width: 40px; height: 40px; object-fit: contain; }
.pp-brand span { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.pp-brand em { font-family: "Allura", cursive; font-weight: 400; font-style: normal; font-size: 24px; color: var(--glow); margin-left: 4px; }
.pp-head-ref { margin-left: auto; color: rgba(255, 255, 255, 0.72); }
.pp-head-wa { color: #fff; text-decoration: none; font-weight: 700; font-size: 13px; padding: 9px 14px; border: 1px solid rgba(255, 255, 255, 0.45); }
.pp-head-wa:hover { background: #fff; color: var(--ink); }

/* editor: the architect's bar, pinned to the bottom of the screen */
.pp-editor { box-sizing: border-box; position: fixed; z-index: 20; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(1080px, calc(100% - 24px)); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 8px 10px; align-items: end;
  padding: 12px 14px; background: rgba(251, 249, 245, 0.94); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border: 1px solid var(--line); box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.45); }
.pp-editor > .mono { grid-column: 1 / -1; color: var(--terracotta); font-size: 10px; }
.pp-editor label { display: grid; gap: 3px; min-width: 0; }
.pp-editor label span { font-size: 11px; font-weight: 700; color: var(--mute); }
.pp-editor input { width: 100%; min-width: 0; box-sizing: border-box; min-height: 38px; padding: 0 10px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 14px; color: var(--ink); }
.pp-editor input:focus { outline: 2px solid var(--terracotta); outline-offset: -1px; }
.pp-editor-actions { display: flex; align-items: center; gap: 14px; }
.pp-editor-actions .btn { min-height: 40px; position: relative; }
.pp-editor-actions [data-done]::after { content: attr(data-done); position: absolute; bottom: calc(100% + 10px); right: 0; white-space: nowrap; padding: 6px 10px; background: var(--ink); color: var(--limestone); font-size: 12px; }
.pp-editor-actions .text-link { background: none; border-top: 0; border-left: 0; border-right: 0; cursor: pointer; font-size: 13px; color: var(--ink); white-space: nowrap; }

/* cover */
.pp-cover { position: relative; min-height: 100svh; display: grid; align-items: end; background: var(--night); color: #fff; overflow: hidden; }
.pp-cover canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); filter: blur(10px) brightness(0.7); transition: transform 2.4s var(--ease), filter 1.2s var(--ease); }
.pp:not(.is-rendering) .pp-cover canvas { transform: none; filter: none; }
.pp-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 9, 8, 0.55) 0%, transparent 22%, transparent 45%, rgba(10, 9, 8, 0.82) 100%); pointer-events: none; }
.pp-cover-text { position: relative; z-index: 1; padding: 0 var(--gutter) clamp(110px, 14vh, 150px); max-width: 1200px; }
.pp-cover-text .mono { color: var(--glow); }
.pp-cover h1 { font-size: clamp(46px, 8.4vw, 136px); line-height: 0.94; margin: 14px 0 18px; text-wrap: balance; }
.pp-cover p { margin: 0; font-size: clamp(15px, 1.4vw, 19px); color: rgba(255, 255, 255, 0.86); }
.pp-cover-cue { position: absolute; z-index: 1; right: var(--gutter); bottom: clamp(110px, 14vh, 150px); color: rgba(255, 255, 255, 0.7); writing-mode: vertical-rl; }
.pp-cover-cue::after { content: ""; display: inline-block; width: 1px; height: 46px; margin-top: 10px; background: currentColor; animation: pp-cue 2.4s var(--ease) infinite; transform-origin: top; }
@keyframes pp-cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.pp-loading { position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 8px 14px; background: rgba(255, 255, 255, 0.92); color: var(--ink); opacity: 0; transition: opacity 0.4s; }
.pp.is-rendering .pp-loading { opacity: 1; }

/* sections */
.pp-section { padding: clamp(70px, 10vw, 150px) var(--gutter); }
.pp-intro { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 10px clamp(24px, 5vw, 80px); align-items: end; margin-bottom: clamp(30px, 4.5vw, 60px); }
.pp-intro .mono { grid-column: 1 / -1; color: var(--terracotta); }
.pp-intro h2 { font-size: clamp(40px, 6vw, 92px); line-height: 0.98; }
.pp-intro p { margin: 0; max-width: 54ch; font-size: clamp(15px, 1.25vw, 18px); line-height: 1.55; color: var(--ink-soft); }

/* 01 compare */
.pp-compare-stage { --x: 50%; position: relative; overflow: hidden; background: var(--night); cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none; aspect-ratio: 16 / 9; }
.pp-compare-stage:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 3px; }
.pp-compare-stage img, .pp-compare-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-compare-stage img:not([src]) { visibility: hidden; }
.pp-compare-stage canvas { clip-path: inset(0 0 0 var(--x)); }
.pp-handle { position: absolute; top: 0; bottom: 0; left: var(--x); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 24px rgba(0, 0, 0, 0.4); pointer-events: none; }
.pp-handle i { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--ink);
  font-style: normal; font-weight: 700; font-size: 15px; letter-spacing: 0.1em; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.5); transition: transform 0.3s var(--ease); }
.pp-compare-stage.is-drag .pp-handle i { transform: translate(-50%, -50%) scale(0.9); }
.pp-lbl { position: absolute; top: 16px; width: 44px; height: 44px; display: grid; place-items: center; font-family: var(--serif); font-size: 24px; color: #fff; background: rgba(20, 18, 16, 0.55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); pointer-events: none; }
.pp-lbl-a { left: 16px; }
.pp-lbl-b { right: 16px; background: var(--terracotta); }
.pp-compare-stage.is-single { cursor: default; }
.pp-compare-stage.is-single .pp-handle, .pp-compare-stage.is-single .pp-lbl { display: none; }
.pp-specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(20px, 3vw, 48px); margin-top: clamp(24px, 3vw, 40px); }
.pp-tag { display: inline-block; padding: 5px 10px; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; background: var(--ink); color: var(--limestone); }
.pp-spec:nth-child(2) .pp-tag { background: var(--terracotta); }
.pp-spec dl { margin: 16px 0 0; display: grid; grid-template-columns: minmax(110px, auto) 1fr; column-gap: 18px; }
.pp-spec dt { grid-column: 1; padding-top: 12px; border-top: 1px solid var(--line); font-family: var(--serif); font-size: 18px; }
.pp-spec dd { grid-column: 2; margin: 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.pp-spec dd.pp-n { padding-top: 2px; border: 0; font-weight: 500; font-size: 13px; color: var(--mute); padding-bottom: 12px; }
.pp-total { margin: 4px 0 0; padding-top: 12px; border-top: 1px solid var(--ink); font-weight: 700; font-size: 14px; }

/* 02 the workshop band */
.pp-workshop { background: radial-gradient(90% 60% at 80% 0%, rgba(179, 71, 50, 0.18), transparent 60%), var(--night); color: #f4f0e9; }
.pp-workshop .pp-intro p { color: rgba(244, 240, 233, 0.72); }
.pp-workshop .pp-intro .mono { color: var(--glow); }
.pp-workshop h2 em { color: var(--glow); }
.pp-cut-tabs { grid-column: 1 / -1; display: inline-flex; justify-self: start; gap: 4px; padding: 4px; margin-top: 12px; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 999px; }
.pp-cut-tabs button { min-height: 36px; padding: 0 18px; border: 0; border-radius: 999px; background: none; color: rgba(255, 255, 255, 0.7); font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.pp-cut-tabs button[aria-pressed="true"] { background: #fff; color: var(--ink); }
.pp-cuts { display: grid; gap: clamp(50px, 6vw, 90px); }
.pp-cut header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 30px; align-items: end; margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.pp-cut h3 { font-size: clamp(28px, 3vw, 44px); }
.pp-cut header > p { grid-column: 1; margin: 0; color: rgba(244, 240, 233, 0.7); font-size: 14px; }
.pp-facts { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: clamp(16px, 2.4vw, 36px); margin: 0; padding: 0; list-style: none; }
.pp-facts li { display: grid; gap: 2px; text-align: right; }
.pp-facts b { font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 2.2vw, 32px); color: #fff; }
.pp-facts span { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(244, 240, 233, 0.6); }
.pp-slabs { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.pp-slabs figure { margin: 0; flex: 0 1 auto; }
.pp-slabs canvas, .pp-slabs .pp-print { display: block; max-width: 100%; height: auto; max-height: 340px; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.8); }
.pp-slabs figcaption { margin-top: 8px; max-width: 520px; font-size: 12px; line-height: 1.45; color: rgba(244, 240, 233, 0.66); }
.pp-slabs.is-elevation { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, max-content)); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.pp-slabs.is-elevation canvas { max-height: 300px; width: auto; }
.pp-slabs.is-elevation + .pp-slabs { margin-top: 18px; padding-top: 18px; border-top: 1px dashed rgba(255, 255, 255, 0.18); }
.pp-cut-note { margin: 18px 0 0; max-width: 70ch; font-size: 14px; line-height: 1.55; color: rgba(244, 240, 233, 0.8); padding-left: 14px; border-left: 2px solid var(--glow); }

/* 03 living with it */
.pp-passports { display: grid; gap: clamp(20px, 2.4vw, 32px); }
.pp-pass { display: grid; grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.4fr); background: #fbf9f5; border: 1px solid var(--line); }
.pp-pass-face { position: relative; min-height: 340px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 24px; color: #fff; background-size: cover; background-position: center; isolation: isolate; }
.pp-pass-face::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 35%, rgba(10, 9, 8, 0.78)); }
.pp-pass-face .mono { color: var(--glow); }
.pp-pass-face h3 { font-size: clamp(30px, 3.2vw, 46px); line-height: 1; }
.pp-pass-face p { margin: 0; font-size: 13px; color: rgba(255, 255, 255, 0.86); }
.pp-pass-body { padding: clamp(20px, 2.6vw, 34px); display: grid; gap: 16px; align-content: start; }
.pp-kind { margin: 0; font-family: var(--serif); font-size: clamp(18px, 1.6vw, 22px); line-height: 1.35; }
.pp-fit { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.pp-fit li { display: grid; gap: 2px; padding: 12px 12px 12px 30px; position: relative; background: #fbf9f5; }
.pp-fit li::before { content: ""; position: absolute; left: 12px; top: 17px; width: 10px; height: 10px; border-radius: 50%; }
.pp-fit li[data-fit="2"]::before { background: var(--leaf); }
.pp-fit li[data-fit="1"]::before { background: #c98a2b; }
.pp-fit li[data-fit="0"]::before { background: transparent; box-shadow: inset 0 0 0 2px var(--terracotta); }
.pp-fit li[data-fit="-1"]::before { background: linear-gradient(90deg, var(--leaf) 50%, #c98a2b 50%); }
.pp-fit span { font-size: 13px; font-weight: 700; }
.pp-fit b { font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.pp-fit small { font-size: 11.5px; line-height: 1.35; color: var(--mute); }
.pp-pass-body > .mono { color: var(--terracotta); margin-top: 4px; }
.pp-care { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
.pp-pass-body .text-link { justify-self: start; font-size: 13px; color: var(--ink); }

/* 04 decide */
.pp-decide { background: var(--bone); }
.pp-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(14px, 2vw, 24px); }
.pp-choice { position: relative; display: grid; grid-template-rows: auto 1fr; color: var(--ink); text-decoration: none; background: #fff; overflow: hidden; transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease); }
.pp-choice:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.45); }
.pp-choice img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--sand); transition: transform 1.2s var(--ease); }
.pp-choice:hover img { transform: scale(1.04); }
.pp-choice div { display: grid; gap: 8px; padding: 20px 64px 22px 22px; }
.pp-choice:nth-child(2) .pp-tag { background: var(--terracotta); }
.pp-choice .pp-tag { justify-self: start; }
.pp-choice strong { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 2.6vw, 38px); line-height: 1.05; }
.pp-choice small { font-size: 13px; color: var(--mute); }
.pp-choice i { position: absolute; right: 22px; bottom: 22px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; font-style: normal; transition: background-color 0.3s, transform 0.4s var(--ease); }
.pp-choice:hover i { background: var(--terracotta); transform: rotate(45deg); }
.pp-ask { margin-top: 26px; font-size: 14px; color: var(--ink); }

.pp-foot { padding: 34px var(--gutter) 130px; background: var(--night); color: rgba(244, 240, 233, 0.66); font-size: 13px; line-height: 1.6; }
.pp-foot p { margin: 0 0 8px; max-width: 110ch; }
.pp-foot a { color: #fff; }
body.pp:has(.pp-editor) .pp-foot { padding-bottom: 170px; }
body.pp:has(.pp-editor) .pp-cover-text, body.pp:has(.pp-editor) .pp-cover-cue { padding-bottom: 150px; }
@media (min-width: 761px) { body.pp:has(.pp-editor) .pp-cover-text, body.pp:has(.pp-editor) .pp-cover-cue { padding-bottom: 170px; } }
.pp-print { display: none; }

@media (max-width: 900px) {
  .pp-intro { grid-template-columns: 1fr; }
  .pp-pass { grid-template-columns: 1fr; }
  .pp-pass-face { min-height: 260px; }
  .pp-fit { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pp-cut header { grid-template-columns: 1fr; }
  .pp-facts { grid-column: 1; grid-row: auto; margin-top: 14px; justify-content: space-between; }
  .pp-facts li { text-align: left; }
  .pp-editor { grid-template-columns: 1fr 1fr; }
  .pp-editor label:first-of-type { grid-column: 1 / -1; }
  .pp-editor-actions { grid-column: 1 / -1; justify-content: space-between; gap: 10px; }
  .pp-editor-actions .btn { flex: 1; justify-content: center; }
}
@media (max-width: 760px) {
  .pp-head { padding: 14px var(--gutter); gap: 10px; }
  .pp-head-ref { display: none; }
  .pp-head-wa { margin-left: auto; }
  .pp-brand span { font-size: 16px; }
  .pp-compare-stage { aspect-ratio: 4 / 5; }
  .pp-cover-cue { display: none; }
  .pp-editor { bottom: 8px; padding: 10px; gap: 6px 8px; }
  .pp-editor input { min-height: 34px; font-size: 16px; }
  .pp-editor > .mono { display: none; }
  .pp-editor label span { display: none; }
  .pp-slabs canvas, .pp-slabs .pp-print { max-height: 220px; }
  .pp-slabs.is-elevation canvas { max-height: 180px; }
  .pp-facts b { font-size: 22px; }
}

@media print {
  @page { size: A4 landscape; margin: 10mm; }
  .pp-editor, .pp-head-wa, .pp-cover-cue, .pp-loading, .pp-cut-tabs, .pp-ask, .skip-link, .pp-choice i { display: none !important; }
  .pp { background: #fff; }
  .pp canvas { display: none !important; }
  .pp-print { display: block; }
  .pp-cover { min-height: 180mm; break-after: page; }
  .pp-cover .pp-print { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .pp-compare-stage .pp-print { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; clip-path: inset(0 0 0 50%); }
  .pp-handle i { display: none; }
  .pp-section { padding: 12mm 0; break-before: page; }
  .pp-cut, .pp-pass, .pp-choice { break-inside: avoid; }
  .pp-workshop, .pp-foot { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pp-head { position: absolute; }
}
