/* ==========================================================================
   Product pages
   One layout for every product: a painted hero, the problem, how it works,
   what you get, who it is for, how people stay in control, questions, and a
   way in. Builds on styles.css and home.css (body carries .home), so type,
   buttons, header and footer match the homepage.
   --pa is the page accent; it defaults to the green used across the site.
   ========================================================================== */

.product-page { --pa: var(--a); }
.product-page .sec { padding-top: 120px; }
.product-page .sec-tag { color: var(--pa); }
.product-page .sec-title { max-width: 1040px; }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.p-hero { position: relative; display: flex; align-items: flex-end; min-height: min(80svh, 740px); padding: 150px 0 64px; overflow: hidden; }
.p-hero-art { position: absolute; inset: 0; }
/* Scrims: a left ramp for the copy, a fade into the page, a shade under the header. */
.p-hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--bg) var(--shift, 0%), rgba(7, 7, 7, 0) calc(var(--shift, 0%) + 16%)),
    linear-gradient(90deg, rgba(5, 5, 7, 0.95) 0%, rgba(5, 5, 7, 0.8) 34%, rgba(5, 5, 7, 0.24) 68%, rgba(5, 5, 7, 0.34) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(7, 7, 7, 0.5) 22%, rgba(7, 7, 7, 0) 50%),
    linear-gradient(180deg, rgba(5, 5, 7, 0.72) 0%, rgba(5, 5, 7, 0) 26%);
}
/* --shift and --flip come from the page: they put the painting's subject on
   the right, clear of the copy. */
.p-hero-art.paint .stage { transform: translateX(var(--shift, 0%)) scaleX(var(--flip, 1)); }
.p-hero-inner { position: relative; z-index: 1; }
.p-hero-inner > * { animation: hero-in 0.85s cubic-bezier(0.22, 1, 0.36, 1) both; }
.p-hero-inner > *:nth-child(2) { animation-delay: 0.08s; }
.p-hero-inner > *:nth-child(3) { animation-delay: 0.16s; }
.p-hero-inner > *:nth-child(4) { animation-delay: 0.24s; }
.p-hero-inner > *:nth-child(5) { animation-delay: 0.32s; }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 26px; font-size: 13px; color: var(--text-faint); }
.crumbs a { color: var(--text-muted); transition: color 0.18s ease; }
.crumbs a:hover { color: var(--text); }
.crumbs i { font-style: normal; opacity: 0.5; }
.crumbs span { color: var(--text); }
.p-kicker { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 18px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--pa); }
.p-kicker i { width: 7px; height: 7px; border-radius: 50%; background: var(--pa); box-shadow: 0 0 12px var(--pa); }
.p-title .s, .product-page .sec-title .s, .p-cta .cta-title .s { display: inline-block; }
.p-title { max-width: 840px; margin: 0 0 20px; font-family: var(--display); font-size: clamp(38px, 5vw, 72px); font-weight: 600; line-height: 1; letter-spacing: -0.042em; text-wrap: balance; }
.p-lede { max-width: 610px; margin: 0 0 30px; font-size: 19px; line-height: 1.5; color: rgba(242, 242, 240, 0.84); text-wrap: pretty; }
.p-hero .hero-actions { margin-bottom: 0; }

/* ── One sourced number ─────────────────────────────────────────────────── */
.p-statw { padding-top: 56px; }
.p-stat { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 36px; padding: 28px 32px; border: 1px solid var(--edge); border-radius: 18px; background: var(--card); }
.p-stat-v { margin: 0; font-family: var(--display); font-size: clamp(38px, 4.4vw, 62px); font-weight: 600; line-height: 1; letter-spacing: -0.045em; white-space: nowrap; background: linear-gradient(95deg, var(--a), var(--b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.p-stat-l { max-width: 800px; text-wrap: balance; margin: 0; font-size: 17px; line-height: 1.5; color: rgba(242, 242, 240, 0.86); }
.p-stat-l small { display: block; margin-top: 6px; font-size: 12.5px; color: var(--text-faint); }

/* ── Steps ──────────────────────────────────────────────────────────────── */
.p-steps { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.p-steps li { position: relative; padding: 24px 24px 26px; border: 1px solid var(--edge); border-radius: 18px; background: var(--card); }
.p-steps b { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin-bottom: 26px; border-radius: 50%; background: color-mix(in srgb, var(--pa) 14%, transparent); color: var(--pa); font-size: 13px; font-weight: 500; }
.p-steps h3 { margin: 0 0 8px; font-family: var(--display); font-size: 21px; font-weight: 500; letter-spacing: -0.022em; }
.p-steps p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text-muted); }
.p-steps li:not(:last-child)::after { content: "→"; position: absolute; right: -18px; top: 28px; z-index: 1; display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--bg); color: var(--pa); font-size: 12px; }

/* ── Everything in the product: grouped lists that pack like a masonry ──── */
.p-caps { columns: 3 300px; column-gap: 14px; }
.p-cap { break-inside: avoid; margin: 0 0 14px; padding: 22px 24px 14px; border: 1px solid var(--edge); border-radius: 18px; background: var(--card); transition: border-color 0.3s ease; }
.p-cap:hover { border-color: var(--edge-2); }
.p-cap h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-family: var(--display); font-size: 18px; font-weight: 500; letter-spacing: -0.015em; }
.p-cap h3::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--pa); box-shadow: 0 0 10px var(--pa); }
.p-cap ul { margin: 0; padding: 0; list-style: none; }
.p-cap li { position: relative; padding: 8px 0 8px 22px; border-top: 1px solid var(--edge); font-size: 14.5px; line-height: 1.45; color: rgba(242, 242, 240, 0.84); }
.p-cap li:first-child { border-top: 0; }
.p-cap li::before { content: ""; position: absolute; left: 2px; top: 14px; width: 8px; height: 4px; border-left: 1.5px solid var(--pa); border-bottom: 1.5px solid var(--pa); transform: rotate(-45deg); }
.p-specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0; overflow: hidden; border: 1px solid var(--edge); border-radius: 18px; background: var(--edge); }
.p-specs > div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; align-items: baseline; padding: 16px 24px; background: var(--card); }
.p-specs > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.p-specs dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); }
.p-specs dd { margin: 0; font-size: 14.5px; line-height: 1.5; color: rgba(242, 242, 240, 0.88); }

/* ── Who it is for ──────────────────────────────────────────────────────── */
.p-fit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.p-fit.is-one { grid-template-columns: minmax(0, 1fr); }
.p-fit > div { padding: 24px 26px 26px; border: 1px solid var(--edge); border-radius: 18px; background: var(--card); }
.p-fit-k { margin: 0 0 16px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); }
.p-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.p-chips li { padding: 7px 14px; border: 1px solid var(--edge-2); border-radius: 999px; font-size: 14px; color: rgba(242, 242, 240, 0.88); }

/* ── The scene: the same hours, without and with the product ────────────── */
.p-scene, .p-shift { width: 100%; overflow: hidden; border: 1px solid var(--edge); border-spacing: 0; border-collapse: separate; border-radius: 18px; background: var(--card); }
.p-scene th, .p-scene td, .p-shift th, .p-shift td { padding: 18px 24px; border-top: 1px solid var(--edge); text-align: left; vertical-align: top; font-weight: 400; }
.p-scene thead th, .p-shift thead th { padding: 15px 24px; border-top: 0; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); }
.p-scene thead th:nth-child(2) { color: #ff8f80; }
.p-scene thead th:nth-child(3), .p-shift thead th:nth-child(3) { color: var(--pa); }
.p-scene tbody th { width: 128px; font-family: var(--mono); font-size: 13px; color: var(--text-faint); white-space: nowrap; }
.p-scene td { width: calc((100% - 128px) / 2); font-size: 15.5px; line-height: 1.5; }
.p-scene td:nth-child(2) { background: rgba(255, 107, 90, 0.04); color: var(--text-muted); }
.p-scene td:nth-child(3), .p-shift td:nth-child(3) { border-left: 1px solid var(--edge); background: color-mix(in srgb, var(--pa) 6%, transparent); color: rgba(242, 242, 240, 0.94); }
.p-scene .ps-end th { color: var(--text); }
.p-scene .ps-end td { padding-block: 22px; font-family: var(--display); font-size: 21px; font-weight: 500; line-height: 1.22; letter-spacing: -0.022em; }
.p-scene .ps-end td:nth-child(2) { color: #ff9d90; }
.p-scene .ps-end td:nth-child(3) { color: var(--pa); }

/* ── Chapters: a claim, why it matters, and the proof beside it ─────────── */
.p-chs { border-top: 1px solid var(--edge); }
.p-ch { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: start; gap: 56px; padding: 44px 0; border-bottom: 1px solid var(--edge); }
.p-ch-n { margin: 0 0 14px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--pa); }
.p-ch h3 { max-width: 560px; margin: 0 0 14px; font-family: var(--display); font-size: clamp(26px, 2.7vw, 37px); font-weight: 500; line-height: 1.07; letter-spacing: -0.036em; text-wrap: balance; }
.p-ch-l > p:last-child { max-width: 560px; margin: 0; font-size: 16.5px; line-height: 1.6; color: var(--text-muted); }
.p-ch-r { margin: 0; padding: 6px 24px; border: 1px solid var(--edge); border-radius: 18px; background: var(--card); list-style: none; }
.p-ch-r li { position: relative; padding: 13px 0 13px 24px; border-top: 1px solid var(--edge); font-size: 14.5px; line-height: 1.45; color: rgba(242, 242, 240, 0.86); }
.p-ch-r li:first-child { border-top: 0; }
.p-ch-r li::before { content: ""; position: absolute; left: 2px; top: 19px; width: 8px; height: 4px; border-left: 1.5px solid var(--pa); border-bottom: 1.5px solid var(--pa); transform: rotate(-45deg); }

/* ── Before and after ───────────────────────────────────────────────────── */
.p-shift tbody th { width: 22%; font-size: 15.5px; font-weight: 500; color: var(--text); }
.p-shift td { width: 39%; font-size: 15.5px; line-height: 1.45; }
.p-shift td:nth-child(2) { color: var(--text-faint); }

/* ── Where the product stops ────────────────────────────────────────────── */
.p-limits { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 14px; }
.p-limit { padding: 24px 24px 26px; border: 1px dashed var(--edge-2); border-radius: 18px; }
.p-no { position: relative; display: block; width: 30px; height: 30px; margin-bottom: 24px; border: 1.5px solid var(--text-faint); border-radius: 50%; }
.p-no::after { content: ""; position: absolute; left: 50%; top: 50%; width: 17px; height: 1.5px; background: var(--text-faint); transform: translate(-50%, -50%) rotate(-45deg); }
.p-limit h3 { margin: 0 0 8px; font-family: var(--display); font-size: 20px; font-weight: 500; line-height: 1.2; letter-spacing: -0.022em; }
.p-limit p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text-muted); }

/* ── The full list, folded away for whoever evaluates the product ───────── */
.p-sheet { border: 1px solid var(--edge); border-radius: 18px; background: var(--card); }
.p-sheet > summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 28px; cursor: pointer; list-style: none; }
.p-sheet > summary::-webkit-details-marker { display: none; }
.p-sheet summary b { display: block; font-family: var(--display); font-size: 22px; font-weight: 500; letter-spacing: -0.022em; }
.p-sheet summary small { display: block; margin-top: 4px; font-size: 14.5px; color: var(--text-muted); }
.p-sheet-mark { position: relative; flex: none; width: 34px; height: 34px; border: 1px solid var(--edge-2); border-radius: 50%; transition: border-color 0.2s ease, transform 0.3s var(--ease); }
.p-sheet-mark::before, .p-sheet-mark::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; background: var(--text); transform: translate(-50%, -50%); }
.p-sheet-mark::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform 0.3s var(--ease); }
.p-sheet[open] .p-sheet-mark::after { transform: translate(-50%, -50%) rotate(0deg); }
.p-sheet > summary:hover .p-sheet-mark { border-color: var(--pa); }
.p-sheet[open] > summary { border-bottom: 1px solid var(--edge); }
.p-sheet-in { padding: 24px; }
.p-sheet .p-cap, .p-sheet .p-specs > div, .p-sheet .p-fit > div { background: rgba(255, 255, 255, 0.025); }
.p-sheet .p-specs { margin-bottom: 14px; }

/* ── A way in, and the rest of the portfolio ────────────────────────────── */
.product-page #contact { padding-bottom: 0; }
.p-cta { position: relative; overflow: hidden; padding: 56px 48px 50px; border: 1px solid var(--edge); border-radius: 22px; background: radial-gradient(90% 130% at 100% 0%, rgba(182, 156, 255, 0.13), transparent 60%), radial-gradient(80% 130% at 0% 100%, rgba(110, 231, 168, 0.1), transparent 60%), var(--card); }
.p-cta .cta-title { max-width: 920px; text-wrap: balance; }
.p-cta > p { max-width: 540px; margin: 0 0 28px; font-size: 17px; line-height: 1.55; color: var(--text-muted); }
.p-cta .hero-actions { margin-bottom: 0; }
.p-cta > .p-nda { max-width: none; margin: 24px 0 0; font-size: 13px; color: var(--text-faint); }
.p-more { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.p-more p { grid-column: 1 / -1; margin: 34px 0 4px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); }
.p-more a { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--edge); border-radius: 14px; background: var(--card); transition: border-color 0.25s ease, transform 0.4s var(--ease); }
.p-more a:first-of-type { grid-column: span 2; }
.p-more a:hover { border-color: var(--edge-2); transform: translateY(-2px); }
.p-more b { font-weight: 500; font-size: 15.5px; }
.p-more span { font-size: 13px; color: var(--text-faint); }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .p-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p-steps li:not(:last-child)::after { display: none; }
  .p-more { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p-ch { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .p-limits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .product-page .sec { padding-top: 88px; }
  .p-hero { min-height: 0; padding: 124px 0 44px; }
  .p-hero-art::after { background: linear-gradient(180deg, rgba(5, 5, 7, 0.78) 0%, rgba(5, 5, 7, 0.7) 50%, var(--bg) 100%); }
  .p-hero-art.paint .stage { transform: scaleX(var(--flip, 1)); }
  .crumbs a:first-child, .crumbs a:first-child + i { display: none; }
  .p-kicker { align-items: flex-start; }
  .p-kicker i { flex: none; margin-top: 4px; }
  .p-lede { font-size: 17px; }
  .p-hero .hero-actions .btn { flex: 1 1 auto; }
  .p-stat { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 24px 22px; }
  .p-stat-v { white-space: normal; }
  .p-steps, .p-fit, .p-limits { grid-template-columns: minmax(0, 1fr); }
  .p-cta { padding: 34px 24px 32px; }
  .p-scene thead, .p-shift thead { display: none; }
  .p-scene, .p-scene tbody, .p-scene tr, .p-scene th, .p-scene td, .p-shift, .p-shift tbody, .p-shift tr, .p-shift th, .p-shift td { display: block; width: auto; }
  .p-scene tbody th, .p-shift tbody th { padding: 18px 20px 6px; }
  .p-scene tr:first-child th, .p-shift tr:first-child th { border-top: 0; }
  .p-scene td, .p-shift td { padding: 10px 20px 14px; border-top: 0; }
  .p-scene td:nth-child(3), .p-shift td:nth-child(3) { border-left: 0; }
  .p-scene td::before, .p-shift td::before { content: attr(data-k); display: block; margin-bottom: 5px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); }
  .p-scene td:nth-child(2)::before { color: #ff8f80; }
  .p-scene td:nth-child(3)::before, .p-shift td:nth-child(3)::before { color: var(--pa); }
  .p-scene .ps-end td { font-size: 19px; }
  .p-ch { gap: 22px; padding: 34px 0; }
  .p-sheet > summary { padding: 20px; }
  .p-sheet-in { padding: 14px; }
  .p-cap { padding: 20px 20px 12px; }
  .p-specs { grid-template-columns: minmax(0, 1fr); }
  .p-specs > div { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 14px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .p-hero-inner > * { animation: none; }
  .p-more a:hover { transform: none; }
}
