/* Application pages (/applications/door-frames/, /window-facade/, /fire-rated/).
   The comparison, the five-step drawing and the drawing parts moved here from
   the homepage (16 Oct 2026), unchanged. */

/* ---------- Page head ---------- */
.ap-head { background: var(--steel-100); border-bottom: 1px solid var(--steel-200); padding: 40px 0 48px; }
.ap-head-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: center; }
.ap-crumb { margin: 0 0 12px; font-size: 15px; font-weight: 600; }
.ap-head h1 { margin: 0 0 16px; font-size: clamp(2rem, 1.3rem + 2.2vw, 3rem); line-height: 1.06; color: var(--ink); }
.ap-lead { margin: 0 0 16px; max-width: 52ch; font-size: 1.1875rem; line-height: 1.55; color: var(--ink-2); }
.ap-prod { margin: 0 0 24px; font-weight: 600; color: var(--ink); }
.ap-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.ap-figure { margin: 0; }
.ap-figure img { display: block; width: 100%; height: auto; }
.ap-figure figcaption { margin-top: 8px; font-size: 14px; color: var(--ink-2); text-align: right; }

/* ---------- Text sections ---------- */
.ap-why .wrap { max-width: 860px; }
.ap-why h2, .ap-steps h2, .ap-data h2, .ap-more h2 { margin: 0 0 20px; color: var(--ink); }
.ap-why p { margin: 0 0 14px; color: var(--ink-2); font-size: 1.0625rem; }
.ap-points { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 12px; }
.ap-points li { position: relative; padding-left: 28px; color: var(--ink-2); }
.ap-points li::before { content: ""; position: absolute; left: 0; top: .55em; width: 14px; height: 6px; border-radius: 3px; background: var(--foam); }
.ap-guardrail { margin: 24px 0 0; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--steel-100); border-radius: 0 4px 4px 0; color: var(--ink); }

/* ---------- Numbered steps (windows, fire-rated) ---------- */
.ap-steps { background: var(--paper); border-top: 1px solid var(--steel-200); }
.ap-steps-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; align-items: start; }
.ap-steps-aside { position: sticky; top: 104px; }
.ap-steps-aside img { display: block; width: 100%; height: auto; border: 1px solid var(--steel-200); border-radius: 8px; background: var(--steel-100); }
.ap-steps-aside p { margin: 12px 0 0; font-size: 14px; color: var(--ink-2); }
.step-list { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step-list > li { position: relative; padding: 0 0 32px 64px; counter-increment: step; }
.step-list > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--steel-200); background: var(--paper); font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.step-list > li::after { content: ""; position: absolute; left: 19px; top: 48px; bottom: 6px; width: 2px; background: var(--steel-200); }
.step-list > li:last-child::after { display: none; }
.step-list h3 { margin: 6px 0 8px; font-size: 1.375rem; color: var(--ink); }
.step-list p { margin: 0; max-width: 52ch; color: var(--ink-2); }
.step-list .how-tip { margin-top: 10px; }

/* ---------- Key data ---------- */
.ap-data { background: var(--steel-100); }
.data-table { width: 100%; max-width: 760px; border-collapse: collapse; background: var(--paper); border: 1px solid var(--steel-200); border-radius: 8px; overflow: hidden; }
.data-table th, .data-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--steel-200); vertical-align: top; }
.data-table th { font-weight: 600; color: var(--ink); width: 45%; }
.data-table td { font-family: var(--font-mono); font-size: 15px; color: var(--ink); }
.data-table tr:last-child th, .data-table tr:last-child td { border-bottom: 0; }
.data-table.compare-products th[scope="col"] { font-family: var(--font-body); background: var(--steel-100); }
.data-table.compare-products td { font-family: var(--font-body); }
.data-table.compare-products { table-layout: fixed; max-width: 960px; }
.data-table.compare-products th[scope="row"], .data-table.compare-products tr:first-child th:first-child { width: 28%; }
.ap-data .note, .ap-more .note { margin: 16px 0 0; font-size: 15px; color: var(--ink-2); max-width: 760px; }
.ap-table-wrap { overflow-x: auto; }

/* ---------- Downloads and related ---------- */
.ap-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-width: 760px; }
.ap-links a { font-weight: 600; }

/* ---------- Proof ---------- */
.proof { background: var(--paper); }
.proof-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px; }

/* Drawing parts (how-it-works joint drawings) */
.jt-wall { fill: var(--steel-100); stroke: var(--ink-2); stroke-width: 1.5; }
.jt-hatch { fill: url(#jt-hatch); stroke: none; }
.jt-floor { stroke: var(--ink-2); stroke-width: 1.5; }
.jt-frame rect { fill: var(--paper); stroke: var(--ink-2); stroke-width: 1.5; }
.jt-dim line { stroke: var(--ink-2); stroke-width: 1; }
.jt-dim text { font-family: var(--font-mono); font-size: 14px; fill: var(--ink-2); }
.jt-dim rect { fill: var(--paper); }

/* ---------- Old way vs foam way ---------- */
.compare-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.compare-col { padding: 32px; border-radius: 8px; }
.compare-col.old { background: var(--steel-100); }
.compare-col.new { background: var(--paper); border: 1px solid var(--steel-200); box-shadow: 0 1px 2px rgb(17 20 24 / .06), 0 8px 24px rgb(17 20 24 / .06); }
.compare-col h3 { margin: 0 0 20px; font-size: 1.375rem; color: var(--ink); }
.compare-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.compare-col li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); }
.compare-col .ic { flex: 0 0 22px; width: 22px; height: 22px; margin-top: 2px; }
.compare-col.old .ic { color: var(--steel-500); }
.compare-col.new .ic { color: var(--accent); }
.compare-col .result { margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--steel-200); font-size: 1.125rem; font-weight: 600; color: var(--ink); }
.compare .note { margin-left: 0; }

/* ---------- How it works: sticky drawing + five steps ---------- */
.how { background: var(--paper); border-top: 1px solid var(--steel-200); }
.how-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; align-items: start; }
.how-sticky { position: sticky; top: 104px; }
.how-sticky h2 { margin-bottom: 24px; }
.how-figure { margin: 0; padding: 16px; border: 1px solid var(--steel-200); border-radius: 8px; background: var(--paper); }
.how-art svg { display: block; width: 100%; height: auto; }
.how-art.big svg { max-height: calc(100vh - 260px); width: auto; max-width: 100%; margin: 0 auto; }
.how-art .lay { opacity: 0; transition: opacity var(--dur-base) var(--ease-out); }
.how-art .l-wide { transform-box: fill-box; transform-origin: center; transform: scale(.82); transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-slow) var(--ease-foam); }
.how-art .f { fill: var(--foam); }
.how-art .tex { fill: url(#jt-bubbles); }
.how-art .l-clean { fill: none; stroke: var(--accent); stroke-width: 3; stroke-dasharray: 8 6; }
.how-art .l-trim rect { fill: #f7f8fa; stroke: var(--ink-2); stroke-width: 1.5; }
.how-art[data-step="1"] .l-clean,
.how-art[data-step="2"] :is(.l-frame, .l-dim, .l-shims, .l-jigs),
.how-art[data-step="3"] :is(.l-frame, .l-jigs, .l-wide),
.how-art[data-step="4"] :is(.l-frame, .l-foam),
.how-art[data-step="5"] :is(.l-frame, .l-foam, .l-trim) { opacity: 1; }
.how-art[data-step="3"] .l-wide { transform: none; }
.how-steps { list-style: none; margin: 0; padding: 72px 0 0; }
.how-step { position: relative; min-height: 46vh; padding: 0 0 48px 64px; }
.how-step::before { content: ""; position: absolute; left: 19px; top: 44px; bottom: 4px; width: 2px; background: var(--steel-200); }
.how-step:last-child::before { display: none; }
.how-step:last-child { min-height: 60vh; }
.how-num {
  position: absolute; left: 0; top: 0;
  width: 40px; height: 40px; border-radius: 8px;
  display: grid; place-items: center;
  font-weight: 600; font-variant-numeric: tabular-nums;
  border: 1px solid var(--steel-200); background: var(--paper); color: var(--ink-2);
  transition: background-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.how-step.is-active .how-num { background: var(--accent); border-color: var(--accent); color: #fff; }
.how-step h3 { margin: 6px 0 8px; font-size: 1.5rem; color: var(--ink); }
.how-step p { margin: 0; max-width: 46ch; color: var(--ink-2); }
.how-tip { margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid var(--foam-deep); background: var(--steel-100); border-radius: 0 4px 4px 0; font-size: 1rem; color: var(--ink-2); max-width: 46ch; }
.how-tip strong { color: var(--ink); }
.how-art .l-shims rect { fill: var(--ink-2); }
.how-art .l-jigs rect { fill: #e9dcc6; stroke: var(--ink-2); stroke-width: 1.5; }
.how-art.thumb { display: none; }
.how > .note { padding: 0 24px; max-width: 1240px; }


@media (prefers-reduced-motion: reduce) {
  .how-art .lay, .how-num { transition: none; }
}

@media (max-width: 1023px) {
  .ap-head-grid, .ap-steps-grid, .how-grid, .proof-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .ap-steps-aside { position: static; max-width: 560px; }
  .how-sticky { position: static; }
  .how-figure { display: none; }
  .how-steps { padding-top: 0; }
  .how-step, .how-step:last-child { min-height: 0; }
  .how-art.thumb { display: block; max-width: 220px; margin-top: 16px; padding: 8px; border: 1px solid var(--steel-200); border-radius: 8px; }
  .how-art.thumb .lay { transition: none; }
}
@media (max-width: 767px) {
  .data-table.compare-products { table-layout: auto; min-width: 560px; }
  .ap-head { padding: 28px 0 36px; }
  .ap-ctas .btn { flex: 1 1 auto; text-align: center; }
  .compare-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .compare-col { padding: 24px; }
  .how > .note { padding: 0 16px; }
  .step-list > li { padding-left: 56px; }
  .data-table th, .data-table td { padding: 10px 12px; }
  .data-table th { width: auto; }
}
