/*
  Destination: C:\Lensari\Lensari\claude-hq\drafts\gallery-site-v1\products\pd-tracker\styles.css
  Purpose: page-specific styles for the PD Tracker product page. Loads AFTER
           shared/tokens.css and shared/site.css; only page sections live here.
           All colors via var(--ls-*) tokens (constitution section 1). Hold for HQ review.
  Motion: scroll reveals + trace draw-in are permitted on product pages (constitution 6.1,
          pilot-validated), gated behind prefers-reduced-motion. No moving pulses.
*/

/* in-page anchors must clear the sticky toolbar */
#report, #how, #privacy, #free, #top { scroll-margin-top: 4.5rem; }

/* ------------------------------------------------ reveal on scroll */

.reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  }
  .js .reveal.is-in {
    opacity: 1;
    transform: none;
  }
}

/* trace draw-in setup applied by JS (motion-safe only) */
.trace-drawn .trace-path {
  transition: stroke-dashoffset 1.6s var(--ease-out);
}

/* ------------------------------------------------ 1. hero */

.hero {
  position: relative;
  padding: clamp(7.5rem, 16vh, 9.5rem) 0 clamp(4rem, 8vw, 7rem);
  overflow: hidden;
}

.trace-hero {
  position: absolute;
  top: 1.6rem;
  left: 0;
  right: 0;
}

.hero-inner {
  position: relative;
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  text-align: center;
}

.hero-title {
  font-size: clamp(2.05rem, 5.2vw, 3.9rem);
  letter-spacing: -0.03em;
  margin: 0 auto 1.6rem;
}

.hero-sub {
  max-width: var(--measure);
  margin: 0 auto 2.2rem;
  font-size: clamp(1.02rem, 1.5vw, 1.16rem);
  color: var(--ls-label);
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.hero-note {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--ls-label);
}

.hero::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -12%;
  height: 62%;
  background: radial-gradient(46% 52% at 50% 74%, var(--ls-glow), transparent 72%);
  pointer-events: none;
}

.hero-figure {
  position: relative;
  max-width: 880px;
  margin: clamp(3rem, 6vw, 4.5rem) auto 0;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

@media (prefers-reduced-motion: no-preference) {
  .js .hero-figure.reveal { transform: translateY(22px) scale(0.985); }
  .js .hero-figure.reveal.is-in { transform: none; }
}

.shot-frame {
  position: relative;
  border-radius: 10px;
  border: 1px solid var(--ls-surface);
  background: var(--ls-surface-raise);
  box-shadow:
    0 0 0 1px var(--ls-glow),
    0 30px 80px -20px var(--ls-shot-shadow),
    0 0 90px -10px var(--ls-glow);
  overflow: hidden;
}

/* document-style label bar: this is a report artifact, not a browser window */
.shot-bar {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.95rem;
  border-bottom: 1px solid var(--ls-line);
  background: var(--ls-surface-raise);
}

.shot-bar-label {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--ls-label);
}

.shot-bar-tag {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--ls-brand);
  border: 1px solid color-mix(in srgb, var(--ls-brand) 45%, var(--ls-line));
  border-radius: 999px;
  padding: 0.14rem 0.55rem;
}

.shot-frame img {
  width: 100%;
  aspect-ratio: 900 / 640;
  object-fit: cover;
  object-position: left top;
}

.shot-caption {
  margin-top: 1.1rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--ls-label);
}

/* ------------------------------------------------ 2. value props */

.values {
  padding: clamp(4.5rem, 9vw, 8rem) 0 clamp(3.5rem, 7vw, 6rem);
}

.values .section-title {
  text-align: center;
  margin-bottom: clamp(2.4rem, 5vw, 3.6rem);
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}

@media (max-width: 980px) { .value-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .value-grid { grid-template-columns: 1fr; } }

.value-card {
  position: relative;
  padding: 1.7rem 1.5rem 1.8rem;
  border: 1px solid var(--ls-line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--ls-surface) 26%, var(--ls-base));
  transition: border-color 0.35s var(--ease-soft), transform 0.35s var(--ease-out);
}

.value-card:hover {
  border-color: color-mix(in srgb, var(--ls-accent) 45%, var(--ls-line));
  transform: translateY(-3px);
}

.value-index {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--ls-accent);
  margin-bottom: 1.15rem;
  font-variant-numeric: tabular-nums;
}

.value-card h3 {
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.65rem;
}

.value-card p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ls-label);
}

/* ------------------------------------------------ 3. proof: the report */

.proof {
  position: relative;
  padding: clamp(4rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
}

.trace-proof {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

.proof-head {
  max-width: 760px;
  margin: 0 auto clamp(2.4rem, 5vw, 3.4rem);
  text-align: center;
}

.proof-lede {
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  color: var(--ls-label);
}

.report-demo {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(1.4rem, 3vw, 2.6rem);
  align-items: start;
  max-width: 1020px;
  margin: 0 auto;
}

@media (max-width: 880px) {
  .report-demo { grid-template-columns: 1fr; }
}

/* the real report, scrollable in place (a document you can actually read) */
.report-frame {
  border: 1px solid var(--ls-surface);
  border-radius: 10px;
  background: var(--ls-surface-raise);
  box-shadow:
    0 0 0 1px var(--ls-glow),
    0 24px 64px -22px var(--ls-shot-shadow);
  overflow: hidden;
}

.report-scroll {
  max-height: min(72vh, 620px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--ls-accent) 40%, var(--ls-surface)) transparent;
}

/* the frame clips outside outlines; draw the keyboard focus ring inside instead */
.report-scroll:focus-visible {
  outline: 2px solid var(--ls-accent);
  outline-offset: -3px;
  border-radius: 0;
}

/* crafted, always-visible scroll affordance (Chromium/WebKit; Firefox uses
   scrollbar-width/color above) */
.report-scroll::-webkit-scrollbar { width: 10px; }
.report-scroll::-webkit-scrollbar-track {
  background: var(--ls-surface-raise);
  border-left: 1px solid var(--ls-line);
}
.report-scroll::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--ls-accent) 38%, var(--ls-surface));
  border-radius: 5px;
  border: 2px solid var(--ls-surface-raise);
}
.report-scroll::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--ls-accent) 60%, var(--ls-surface));
}

.report-scroll img { width: 100%; }

.report-side {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.report-side-title {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ls-brand);
}

.report-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.report-list li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.94rem;
  color: var(--ls-text);
}

.report-list li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.52em;
  width: 6px;
  height: 6px;
  background: var(--ls-accent);
  transform: rotate(45deg);
  opacity: 0.85;
}

.report-usb {
  border: 1px solid var(--ls-line);
  border-radius: 10px;
  padding: 1.3rem 1.4rem 1.4rem;
  background:
    radial-gradient(130% 130% at 100% 0%, var(--ls-glow), transparent 60%),
    color-mix(in srgb, var(--ls-surface) 26%, var(--ls-base));
}

.report-usb-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.report-usb p:not(.report-usb-title) {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ls-label);
}

.report-note {
  margin-top: 1.4rem;
  text-align: center;
  font-size: 0.86rem;
  color: var(--ls-label);
}

/* ------------------------------------------------ 4. how it works */

.how {
  padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(3rem, 6vw, 5rem);
}

.how .section-title {
  text-align: center;
  margin-bottom: clamp(2.6rem, 5vw, 3.8rem);
}

.steps {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 640px;
  position: relative;
}

/* connecting spine */
.steps::before {
  content: "";
  position: absolute;
  left: 1.19rem;
  top: 1.4rem;
  bottom: 2.4rem;
  width: 1px;
  background: color-mix(in srgb, var(--ls-accent) 32%, var(--ls-line));
}

@media (prefers-reduced-motion: no-preference) {
  .js .steps::before {
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 1.6s var(--ease-out) 0.15s;
  }
  .js .steps:has(.step.is-in)::before { transform: scaleY(1); }
}

.step {
  position: relative;
  display: flex;
  gap: 1.6rem;
  padding: 0 0 2.4rem;
}

.step:last-child { padding-bottom: 0; }

.step-num {
  position: relative;
  z-index: 1;
  flex: none;
  width: 2.4rem;
  height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
  color: var(--ls-accent);
  background: var(--ls-base);
  border: 1px solid color-mix(in srgb, var(--ls-accent) 40%, var(--ls-line));
  border-radius: 8px;
}

.step-body h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
  padding-top: 0.42rem;
}

.step-body p {
  font-size: 0.94rem;
  color: var(--ls-label);
}

/* ------------------------------------------------ 5. privacy */

.privacy {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.privacy-panel {
  border: 1px solid var(--ls-line);
  border-radius: 14px;
  background:
    radial-gradient(120% 140% at 50% -20%, var(--ls-glow), transparent 55%),
    color-mix(in srgb, var(--ls-surface) 24%, var(--ls-base));
  padding: clamp(2.4rem, 5vw, 3.8rem) clamp(1.5rem, 5vw, 4rem);
  text-align: center;
}

.privacy-panel .section-title {
  font-size: clamp(1.45rem, 2.8vw, 2.05rem);
  max-width: 30ch;
  margin-left: auto;
  margin-right: auto;
}

.privacy-lede {
  max-width: 56ch;
  margin: 0 auto 2rem;
  color: var(--ls-label);
  font-size: clamp(1rem, 1.4vw, 1.1rem);
}

.privacy-facts {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 24rem));
  justify-content: center;
  gap: 0.9rem 2.4rem;
  text-align: left;
}

@media (max-width: 640px) {
  .privacy-facts { grid-template-columns: 1fr; }
}

.privacy-facts li {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  font-size: 0.94rem;
  font-weight: 500;
}

.fact-mark {
  flex: none;
  width: 14px;
  height: 8px;
  margin-top: 0.5em;
  border-left: 2px solid var(--ls-accent);
  border-bottom: 2px solid var(--ls-accent);
  transform: rotate(-45deg) translateY(-2px);
}

/* ------------------------------------------------ 6. built by a caregiver */

.story {
  padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(3rem, 6vw, 5rem);
}

.story .section-title {
  text-align: center;
  margin-bottom: clamp(2rem, 4vw, 2.8rem);
}

.story-panel {
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(1.8rem, 4vw, 2.6rem) clamp(1.5rem, 4vw, 2.8rem);
  border-left: 2px solid color-mix(in srgb, var(--ls-brand) 65%, var(--ls-line));
  border-radius: 0 10px 10px 0;
  background: color-mix(in srgb, var(--ls-surface) 22%, var(--ls-base));
  display: grid;
  gap: 1.1rem;
}

.story-panel p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ls-text);
}

.story-panel p:last-child {
  font-weight: 600;
}

.story-facts {
  list-style: none;
  max-width: 680px;
  margin: 1.4rem auto 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

@media (max-width: 700px) {
  .story-facts { grid-template-columns: 1fr; }
}

.story-facts li {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.05rem 1.15rem 1.15rem;
  border: 1px solid var(--ls-line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--ls-surface) 26%, var(--ls-base));
}

.story-fact-term {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ls-accent);
}

.story-fact-def {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--ls-label);
}

/* ------------------------------------------------ 7. closing */

.closing {
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(1rem, 2.5vw, 2rem);
  text-align: center;
}

.closing-title {
  font-size: clamp(1.9rem, 4.6vw, 3.3rem);
  letter-spacing: -0.03em;
  margin-bottom: 2.2rem;
}

.closing-cta { margin-bottom: 1.1rem; }

.closing-note {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--ls-label);
}
