/* ═══════════════════════════════════════════
   PAGE DEPTH: the main inner pages (js/page-depth.js). The homepage uses kai-stage.css.
   One light from the top left, as on the homepage: shadows fall down and to the right.
   Text is never transformed on its own; it only moves with the object it sits on.
═══════════════════════════════════════════ */
:root { --pd-ink: 15, 30, 60; }

/* ── shared: stages, tilt, glare ── */
.pd-stage { position: relative; transform-style: preserve-3d; }
.pd-tilt {
  transform: perspective(1300px) rotateX(calc(var(--pd-rx, 0) * 1deg)) rotateY(calc(var(--pd-ry, 0) * 1deg));
  transform-origin: 50% 55%;
}
.pd-stage > :last-child { position: relative; transform: translateZ(0); }
.pd-glare {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
  background: radial-gradient(circle at calc(50% + var(--pd-ry, 0) * 12%) calc(40% - var(--pd-rx, 0) * 12%), rgba(255, 255, 255, .5), transparent 60%);
  mix-blend-mode: soft-light;
  opacity: var(--pd-g, 0);
}
.pd-sheet { position: absolute; inset: 0; pointer-events: none; }
.pd-sheet i { display: block; height: 7px; border-radius: 3px; background: #dfe4ee; }

/* ── dark hero backgrounds in layers ── */
.pd-sec { isolation: isolate; }
.pd-sec > :not(.pd-back) { position: relative; z-index: 1; }
.pd-back { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.pd-far, .pd-mid { position: absolute; inset: -170px -40px; will-change: transform; }
.pd-far {
  background-image: radial-gradient(circle, rgba(255, 255, 255, .16) 1.1px, transparent 1.6px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 50% 55% at 80% 50%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 50% 55% at 80% 50%, #000 10%, transparent 75%);
}
.pd-mid { background: radial-gradient(ellipse 40% 45% at 78% 55%, rgba(96, 140, 255, .16), transparent 70%); }

/* ── Training: rough notes behind the clean card ── */
.pd-stage--notes > .training-example { box-shadow: 1px 2px 2px rgba(var(--pd-ink), .06), 8px 18px 40px -16px rgba(var(--pd-ink), .38); }
.pd-notes { border-radius: 4px; display: flex; flex-direction: column; gap: 11px; }
.pd-notes--page {
  background: #fbfaf5;
  inset: 8% 10% 6% -9%;
  padding: 26px 22px;
  transform: translate3d(-10px, -6px, -50px) rotate(-6deg);
  box-shadow: 4px 10px 26px -10px rgba(var(--pd-ink), .35);
  background-image: repeating-linear-gradient(180deg, transparent 0 21px, #d7e2f5 21px 22px);
}
.pd-notes--page u { display: block; width: 3px; position: absolute; left: 14px; top: 0; bottom: 0; background: #f2b8b0; }
.pd-notes--page i { background: #8aa0c8; height: 3px; border-radius: 2px; transform: rotate(-.6deg); }
.pd-notes--page i:nth-of-type(2n) { width: 74%; transform: rotate(.8deg); }
.pd-notes--page i:nth-of-type(3n) { width: 52%; }
.pd-notes--sticky {
  inset: auto auto -7% -14%;
  width: 150px; height: 140px;
  background: #fde99a;
  padding: 18px 16px;
  transform: translate3d(0, 0, -20px) rotate(7deg);
  box-shadow: 3px 9px 18px -8px rgba(90, 70, 10, .45);
}
.pd-notes--sticky i { background: #c7a43b; height: 3px; border-radius: 2px; }
.pd-notes--sticky i:nth-of-type(2) { width: 70%; } .pd-notes--sticky i:nth-of-type(4) { width: 45%; }

/* ── How it works: the three stages rise like steps ── */
.pd-steps { transform-style: preserve-3d; }
.pd-steps li { transform-style: preserve-3d; }
.clarity-method .pd-steps li:nth-child(1) a { transform: translateZ(0); }
.clarity-method .pd-steps li:nth-child(2) a { transform: translate3d(5px, 0, 18px); }
.clarity-method .pd-steps li:nth-child(3) a { transform: translate3d(10px, 0, 36px); }
.clarity-method .pd-steps a {
  box-shadow: 4px 4px 0 #c6d5ef, 6px 14px 28px -12px rgba(0, 0, 0, .55);
  transition: background .2s;
}
.clarity-method .pd-steps li:nth-child(2) a { box-shadow: 4px 4px 0 #c6d5ef, 10px 22px 34px -12px rgba(0, 0, 0, .6); }
.clarity-method .pd-steps li:nth-child(3) a { box-shadow: 4px 4px 0 #c6d5ef, 14px 30px 42px -12px rgba(0, 0, 0, .65); }
.clarity-method .pd-steps li + li::before { transform: translateX(calc(var(--pd-step, 14px) * -.5)); }

/* ── Insights: cards settle; topic chips are raised and press down ── */
.pd-settle { transform: perspective(1200px) rotateX(calc(var(--pd-settle, 0) * 1deg)); transform-origin: 50% 100%; }
.clarity-insights .topic-chip {
  box-shadow: 0 1px 0 #fff inset, 0 2px 0 #b9c9e6, 0 4px 10px -4px rgba(var(--pd-ink), .3);
  transition: transform .12s ease, box-shadow .12s ease, background .18s;
}
.clarity-insights .topic-chip:hover { transform: translateY(-1px); box-shadow: 0 1px 0 #fff inset, 0 3px 0 #b9c9e6, 0 7px 14px -6px rgba(var(--pd-ink), .35); }
.clarity-insights .topic-chip:active { transform: translateY(2px); box-shadow: 0 0 0 #b9c9e6, 0 1px 3px rgba(var(--pd-ink), .25); }

/* ── About: the portrait card as a badge, with thickness ── */
.clarity-about .pd-badge {
  position: relative;
  box-shadow:
    1px 1px 0 #d9e2f2, 2px 2px 0 #c9d5ea, 3px 3px 0 #b9c7e0, 4px 4px 0 #a9b9d6,
    calc(12px - var(--pd-ry, 0) * 4px) calc(26px + var(--pd-rx, 0) * 4px) 50px -12px rgba(0, 0, 0, .6);
}
.clarity-about .pd-badge .pd-glare { mix-blend-mode: normal; background: linear-gradient(calc(110deg + var(--pd-ry, 0) * 6deg), transparent 30%, rgba(255, 255, 255, .28) 46%, transparent 62%); }

/* ── Contact: starting-point cards are raised tiles ── */
.clarity-inquiry .intent-card {
  box-shadow: 0 1px 0 #fff inset, 0 3px 0 #c8d5ec, 0 10px 20px -12px rgba(var(--pd-ink), .35);
  transition: border-color .18s, box-shadow .14s ease, transform .14s ease, background .18s;
}
.clarity-inquiry .intent-card:hover { transform: translateY(-2px); box-shadow: 0 1px 0 #fff inset, 0 5px 0 #b7c8e8, 0 16px 26px -14px rgba(var(--pd-ink), .45); }
.clarity-inquiry .intent-card:active { transform: translateY(3px); box-shadow: 0 0 0 #c8d5ec, 0 2px 4px rgba(var(--pd-ink), .2); }

/* ── Roadmap: the report's pages behind the price card ── */
.pd-stage--report > .roadmap-price-sheet { box-shadow: 1px 2px 2px rgba(var(--pd-ink), .06), 8px 18px 40px -16px rgba(var(--pd-ink), .4); }
.pd-page {
  border-radius: 10px; background: #fbfaf6;
  padding: 0 22px 18px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: 4px 12px 28px -12px rgba(var(--pd-ink), .45);
  overflow: hidden;
}
.pd-page b { display: block; height: 10px; margin: 0 -22px 12px; background: #1f45b5; }
.pd-page i:nth-of-type(2n) { width: 80%; } .pd-page i:nth-of-type(3n) { width: 58%; }
.pd-page em { margin-top: auto; align-self: flex-end; font: 500 .7rem/1 'IBM Plex Mono', ui-monospace, monospace; font-style: normal; color: #7d8db0; }
.pd-page--1 { transform: translate3d(16px, -16px, -16px) rotate(1.6deg); }
.pd-page--2 { transform: translate3d(30px, -30px, -32px) rotate(3.2deg); filter: brightness(.96); }
.pd-page--3 { transform: translate3d(44px, -44px, -48px) rotate(4.8deg); filter: brightness(.92); }

/* the wrapper takes the card's place in the hero grid */
@media (min-width: 761px) { .clarity-roadmap .pd-stage--report { grid-area: 1 / 2 / 3; align-self: center; } }

/* ── Audit: the questions still to come, stacked behind the question card ── */
.pd-stage--questions { max-width: 680px; margin: 0 auto; }
.pd-stage--questions > .audit-flow { max-width: none; }
.pd-q {
  border-radius: 12px; background: #fbfaf6; border: 1px solid #d3def3;
  box-shadow: 3px 8px 20px -10px rgba(var(--pd-ink), .3);
  transition: transform .5s cubic-bezier(.2, .8, .2, 1), opacity .4s ease;
}
.pd-q--1 { transform: translate3d(0, 10px, -14px) scale(.985); }
.pd-q--2 { transform: translate3d(0, 20px, -28px) scale(.97); filter: brightness(.97); }
.pd-q--3 { transform: translate3d(0, 30px, -42px) scale(.955); filter: brightness(.94); }
/* fewer questions left, fewer cards behind; a removed card slides down and away */
.pd-stage--questions[data-left="2"] .pd-q--3,
.pd-stage--questions[data-left="1"] :is(.pd-q--2, .pd-q--3),
.pd-stage--questions[data-left="0"] .pd-q { opacity: 0; transform: translate3d(0, 46px, -60px) scale(.94); }
.pd-stage--questions:has(> .audit-flow[hidden]) .pd-q { display: none; }

/* ── phones: smaller offsets so nothing reaches the screen edge ── */
@media (max-width: 767px) {
  .pd-notes--page { inset: 6% 4% 4% -3%; transform: translate3d(-4px, -10px, -30px) rotate(-3deg); }
  .pd-notes--sticky { display: none; }
  .pd-page--1 { transform: translate3d(6px, -12px, -12px) rotate(.8deg); }
  .pd-page--2 { transform: translate3d(12px, -24px, -24px) rotate(1.6deg); }
  .pd-page--3 { display: none; }
  .pd-stage--report { margin-top: 30px; }
  .clarity-method .pd-steps li:nth-child(n) a { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .pd-q, .clarity-inquiry .intent-card, .clarity-insights .topic-chip { transition: none; }
  .clarity-inquiry .intent-card:hover, .clarity-insights .topic-chip:hover { transform: none; }
}
