/* Product examples keep the app's actual paper palette. */
.phone-scene,.progress-preview { --paper:#f8f7f3; --canvas:#f1f0eb; --ink:#10100e; --muted:#65655f; --line:#d5d5cf; color:var(--ink); }
/* Static, proportionally scaled product preview; sample data only. */
.product-preview {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align: center;
  padding-block:var(--section-space);
  scroll-margin-top:24px;
}

.intent-emphasis {
  color: var(--ink);
  font-weight: 750;
}

.phone-scene {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width:100%;
  min-height: 490px;
  margin: 28px 0 0;
  padding: 16px 0;
}

.phone-shell {
  --phone-scale: .78;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  width: calc(270px * var(--phone-scale));
  height: calc(574px * var(--phone-scale));
  transform:none;
  -webkit-mask-image:none;
  mask-image:none;
  --drift-distance:14px;
  --drift-tilt:.65deg;
  --preview-rest-scale:.97;
  --preview-focus-scale:1.045;
}

.phone-device {
  position: relative;
  width: 270px;
  height: 574px;
  padding: 3px;
  border: 1px solid #bcbcb2;
  border-radius: 32px;
  background: #dddcd2;
  box-shadow: 5px 12px 24px -12px #10100e28;
  transform: scale(var(--phone-scale));
  transform-origin: top left;
}

.phone-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: 28px;
  background: var(--canvas);
}

.phone-status {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  padding: 6px 21px 0;
  font-size: 9px;
  font-weight: 850;
}

.phone-camera {
  position: absolute;
  width: 46px;
  height: 9px;
  top: 10px;
  left: calc(50% - 23px);
  border-radius: 12px;
  background: #252522;
}

.phone-signal {
  display: flex;
  align-items: center;
  gap: 4px;
}

.phone-signal svg {
  width: 29px;
  height: 9px;
}

.phone-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 42px;
  padding: 2px 19px 9px;
}

.phone-top > span {
  font-size: 15px;
  font-weight: 850;
  letter-spacing: -.3px;
}

.phone-top svg {
  width: 22px;
  height: 22px;
}

.phone-page {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 14px 16px 13px;
  background: var(--paper);
  border-radius: 23px 23px 28px 28px;
}

.phone-today {
  flex-shrink: 0;
  text-align: center;
  line-height: 1;
}

.phone-today > span {
  display: block;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
  font-weight: 750;
  line-height: 1.3;
}

.phone-today > strong {
  display: block;
  font-size: 23px;
  line-height: 1.2;
  margin-top: 3px;
  font-weight: 850;
  letter-spacing: -.5px;
}

.phone-radar {
  flex: 1;
  min-height: 0;
  width: 100%;
  margin: 9px auto 12px;
}

.phone-radar .grid {
  stroke: #d1d1c6;
  stroke-width: 1.3;
  stroke-dasharray: 3 5;
}

.phone-radar .outline {
  stroke: var(--ink);
  stroke-width: 2.4;
  stroke-linejoin: round;
}

.phone-radar .area {
  fill: #10100e15;
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linejoin: round;
}

.phone-radar .point {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 2.6;
}

.phone-radar text {
  font-family: Nunito, sans-serif;
  fill: var(--ink);
  text-anchor: middle;
}

.phone-radar .label {
  font-size: 17px;
  font-weight: 700;
  fill: #5f5f57;
}

.phone-scores {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  flex-shrink: 0;
  margin-bottom: 13px;
}

.phone-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  min-height: 68px;
  background: #f4f4f0;
}

.phone-score svg {
  width: 18px;
  height: 18px;
}

.phone-score > span {
  font-size: 9px;
  color: var(--muted);
}

.phone-score strong {
  font-size: 18px;
  line-height: 1.1;
  font-weight: 850;
}

.phone-score strong span {
  font-size: 11px;
  margin-left: 1px;
}

.phone-habits {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  flex-shrink: 0;
  padding: 9px 13px;
  border-radius: 16px;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  font-weight: 800;
}

.phone-habits svg {
  width: 16px;
  height: 16px;
}

.phone-habits small {
  margin-left: auto;
  font-size: 9px;
  border: 1px solid #77776d;
  border-radius: 12px;
  padding: 2px 6px;
}

.phone-chevron {
  font-size: 14px;
  line-height: 1;
  margin-left: 2px;
}

.phone-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  gap: 4px;
  align-self: center;
  width: 174px;
  padding: 4px;
  margin-top: 17px;
  border-radius: 30px;
  background: #fff;
}

.phone-nav > span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: center;
  justify-content: center;
  min-width: 79px;
  min-height: 37px;
  border-radius: 24px;
  font-size: 7px;
  color: var(--muted);
}

.phone-nav > span:first-child {
  background: #ededeb;
  color: var(--ink);
  font-weight: 800;
}

.phone-nav svg {
  width: 17px;
  height: 17px;
}

.preview-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Independent app windows, arranged as one composed product preview. */
.routine-copy {
  max-width: 54ch;
}

.progress-section {
  padding-block: var(--section-space);
  text-align: center;
}

.progress-copy {
  max-width: 60ch;
}

.progress-preview {
  position: relative;
  width: 100%;
  max-width: 680px;
  height: 464px;
  margin: 28px auto 0;
  isolation: isolate;
}

.progress-feature {
  position: absolute;
  width: 270px;
  text-align: left;
  -webkit-mask-image:none;
  mask-image:none;
  --drift-distance:14px;
  --drift-tilt:.65deg;
  --preview-rest-scale:.97;
  --preview-focus-scale:1.045;
}

.feature-map {
  top: 16px;
  left: 16px;
  transform:rotate(-2deg);
}

.feature-pillars {
  --drift-distance: 16px;
  --drift-tilt: -.6deg;
  top: 104px;
  right: 16px;
  transform:rotate(2deg);
}

.feature-habits {
  z-index: 1;
  top: 232px;
  left: 84px;
  width: 278px;
  transform:rotate(-1deg);
}

.feature-surface {
  padding: 16px 14px;
  background: var(--paper);
  border:1px solid var(--reset-light-line);
  border-radius:var(--reset-control-radius);
  box-shadow:0 8px 24px #20251f0a;
}

.progress-feature h3 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.4;
}

.feature-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.4;
}

.feature-meta span:last-child {
  font-size: 9px;
}

.progress-chart {
  width: 100%;
  height: auto;
  aspect-ratio: 2;
  overflow: visible;
}

.chart-label {
  fill: var(--muted);
  font-size: 8px;
  font-weight: 650;
}

.habit-chart-label {
  fill: var(--ink);
  font-size: 12px;
  font-weight: 650;
}

.habit-chart-value {
  fill: var(--muted);
  text-anchor: end;
  font-size: 12px;
  font-weight: 750;
}

.trend-grid {
  fill: none;
  stroke: var(--line);
  stroke-width: .7;
  stroke-dasharray: 2 4;
}

.trend-line {
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-body { stroke: #486b55; }
.trend-mind { stroke: #536d8b; }
.trend-soul { stroke: #a0783e; }
.individual-track { fill: #deded4; }

.progress-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}

.progress-action p {
  max-width: 34ch;
  color: var(--muted);
  font-size:17px;
  font-weight:650;
  line-height:1.45;
}

@media (max-width: 700px) {
  .product-preview {
    padding-block:48px;
  }
  .routine-copy {
    max-width: 39ch;
  }
  .phone-shell {
    --phone-scale: .66;
    transform: rotate(-2deg);
  }
  .phone-scene {
    min-height: 0;
    padding-block: 16px;
    margin-top: 24px;
  }
  .progress-section {
    padding-block: 48px;
  }
  .progress-copy {
    max-width: 39ch;
  }
  .progress-preview {
    max-width: 370px;
    height: 570px;
    margin-top: 24px;
  }
  .progress-feature {
    --drift-distance: 16px;
    width: 256px;
    max-width: calc(100% - 14px);
  }
  .feature-surface {
    padding: 14px 12px;
    border:1px solid var(--reset-light-line);
    border-radius:var(--reset-control-radius);
    box-shadow:0 8px 24px #20251f0a;
  }
  .feature-map {
    top: 16px;
    left: 8px;
    transform:rotate(-2deg);
  }
  .feature-pillars {
    top: 185px;
    right: 8px;
    transform:rotate(2deg);
  }
  .feature-habits {
    top: 354px;
    left: 16px;
    width: 262px;
    transform:rotate(-1deg);
  }
  .progress-feature h3 {
    font-size: 13px;
  }
  .feature-meta {
    margin-bottom: 8px;
  }
  .progress-action {
    gap: 14px;
    margin-top: 18px;
  }
  .progress-action p {
    max-width: 30ch;
    font-size:16.5px;
    font-weight:650;
    line-height:1.45;
  }
}

/* The scroll supplies the motion; unsupported browsers keep the static layout. */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: cover 0% cover 100%)) {
    .phone-shell,
    .progress-feature {
      animation: preview-drift 1ms linear both;
      animation-timeline: view();
      animation-range: cover 0% cover 100%;
    }
  }

  @keyframes preview-drift {
    from {
      opacity: .88;
      translate: 0 var(--drift-distance);
      rotate: var(--drift-tilt);
      scale: var(--preview-rest-scale, 1);
    }
    50% {
      opacity: 1;
      scale: var(--preview-focus-scale, 1);
    }
    to {
      opacity: .92;
      translate: 0 calc(-1 * var(--drift-distance));
      rotate: calc(-1 * var(--drift-tilt));
      scale: var(--preview-rest-scale, 1);
    }
  }
}

@media (max-width: 360px) {
  .phone-shell {
    --phone-scale: .62;
  }
  .progress-feature {
    width: 238px;
  }
  .feature-map { left: 3px; transform:rotate(-2deg); }
  .feature-pillars { right: 3px; transform:rotate(2deg); }
  .feature-habits { left: 8px; transform:rotate(-1deg); }
}
