/*
  peakops-page.css
  The PEAKOps page. Hero rules live in about.css so this page uses the same
  split, type, and photograph treatment as About. The closing call to action
  is the home-page module in closing.css and contact.css.
*/

.page-peakops main > section:not(.about-hero) {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: calc(var(--header-offset) + 1.5rem);
  padding-bottom: 3rem;
}

.page-peakops main > section:not(.about-hero) > .wrap {
  align-self: center;
}

.ops-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(2.5rem, 4vw, 3.5rem);
}

.ops-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  max-width: 46rem;
}

.ops-intro--center {
  align-items: center;
  margin-inline: auto;
  text-align: center;
}

.ops-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.85rem, 3.2vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.ops-title .accent,
.ops-title--accent {
  color: var(--accent-ink);
}

.ops-title--blue {
  color: var(--plus-700);
}

[data-theme="dark"] .ops-title--blue {
  color: var(--plus-300);
}

.ops-intro .lede,
.ops-copy p:not(.eyebrow) {
  color: var(--text-muted);
  font-size: 1.125rem;
  line-height: 1.6;
}

.ops-intro--center .lede {
  max-width: 40rem;
}

.ops-metrics,
.ops-cards,
.ops-offers,
.ops-proof {
  display: grid;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ops-metrics,
.ops-cards,
.ops-offers {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ops-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.ops-card__photo {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.ops-card__copy {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem 1.75rem 1.75rem;
}

[data-theme="dark"] .ops-card {
  background: var(--bg-elevated);
}

.ops-metric {
  gap: 1rem;
  padding: 1.75rem;
}

p.ops-metric__num,
p.ops-proof__num {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.ops-metric h3,
.ops-cards h3 {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
}

.ops-cards h3 {
  color: var(--accent-ink);
  font-size: 1.375rem;
}

.ops-metric p,
.ops-cards p,
.ops-offer p,
.ops-proof p {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

p.ops-metric__num {
  color: var(--accent-ink);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  line-height: 1;
}

p.ops-proof__num {
  color: var(--text);
  font-size: clamp(2.25rem, 4vw, 3rem);
  line-height: 1;
}

.ops-cards p,
.ops-offer p {
  font-size: 0.9375rem;
  line-height: 1.6;
}

.ops-method {
  display: grid;
  grid-template-columns: minmax(16rem, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.ops-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
}

.ops-copy .ops-title {
  font-size: clamp(2rem, 3.4vw, 2.75rem);
}

.ops-copy strong {
  color: var(--text);
  font-weight: 700;
}

.ops-steps {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ops-step {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: center;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

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

.ops-step__num {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 0.5rem;
  color: var(--plus-700);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1;
}

[data-theme="dark"] .ops-step__num {
  color: var(--plus-300);
}

.ops-step__num::after {
  content: "";
  width: 2px;
  height: 5rem;
  background: var(--gray-200);
}

[data-theme="dark"] .ops-step__num::after {
  background: var(--dark-400);
}

.ops-step__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
}

.ops-step__body h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.4vw, 1.75rem);
  line-height: 1.2;
}

.ops-step__body > p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.ops-step__body > p.ops-chip {
  color: var(--text);
  font-size: 0.875rem;
}

.ops-chip {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  max-width: 100%;
  margin: 0;
  padding: 0.5rem 1rem;
  border: 1px solid color-mix(in srgb, var(--plus-500) 35%, transparent);
  border-radius: 4px;
  background: color-mix(in srgb, var(--plus-500) 12%, var(--bg));
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
}

.ops-chip strong {
  color: var(--plus-700);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

[data-theme="dark"] .ops-chip strong {
  color: var(--plus-300);
}

.ops-proof {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem 2rem;
}

.ops-proof li {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}


.ops-offers {
  align-items: stretch;
}

.ops-offer {
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 100%;
  padding: 2rem;
}

.ops-offer h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.25;
}

.ops-offer--diagnostic h3,
.ops-offer--diagnostic .ops-fee {
  color: var(--plus-700);
}

[data-theme="dark"] .ops-offer--diagnostic h3,
[data-theme="dark"] .ops-offer--diagnostic .ops-fee {
  color: var(--plus-300);
}

.ops-offer--featured {
  border-color: var(--accent);
}

.ops-offer--featured h3,
.ops-offer--featured .ops-fee {
  color: var(--accent-ink);
}

.ops-offer__copy {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ops-fee {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  background: color-mix(in srgb, var(--plus-500) 12%, var(--bg));
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.4;
}

.ops-offer--featured .ops-fee {
  background: color-mix(in srgb, var(--accent) 14%, var(--bg));
}

.ops-offer--sustain .ops-fee {
  background: var(--bg-muted);
  color: var(--text);
}

[data-theme="dark"] .ops-offer--sustain .ops-fee {
  background: var(--dark-700);
}

/*
  Same pinned scroll as the home page. The steps fill first. The 12-week
  bar then draws from left to right. Narrow screens and reduced motion
  show the finished story without pinning.
*/
.page-peakops main > section.ops-scroll {
  justify-content: flex-start;
  padding: 0;
  scroll-snap-align: none;
}

.ops-scroll-story {
  height: 580vh;
}

.ops-scroll-sticky {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: var(--header-offset);
  box-sizing: border-box;
}

.ops-scroll-frame {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ops-scroll .ops-steps {
  gap: 1.35rem;
}

.ops-scroll .ops-step {
  --fill: 0;
  opacity: 0.42;
  padding-bottom: 1.35rem;
  transition: opacity 0.35s ease;
}

.ops-scroll .ops-step__body {
  gap: 0.4rem;
}

.ops-scroll .ops-step__body > p {
  font-size: 0.9375rem;
  line-height: 1.45;
}

.ops-scroll .ops-step__num::after {
  height: 2.25rem;
}

.ops-scroll .ops-step.is-active {
  opacity: 1;
}

.ops-scroll .ops-step__num::after {
  background: linear-gradient(
    to bottom,
    var(--text) calc(var(--fill) * 100%),
    color-mix(in srgb, var(--text) 18%, transparent) calc(var(--fill) * 100%)
  );
}

@media (max-width: 980px), (prefers-reduced-motion: reduce) {
  .ops-scroll-story {
    height: auto;
  }

  .ops-scroll-sticky {
    position: static;
    height: auto;
    min-height: 100dvh;
    align-items: center;
    padding-top: calc(var(--header-offset) + 1.5rem);
    padding-bottom: 3rem;
  }

  .ops-scroll .ops-step,
  .ops-scroll .ops-step.is-active {
    opacity: 1;
  }

  .ops-scroll .ops-step__num::after {
    background: var(--gray-200);
  }

  [data-theme="dark"] .ops-scroll .ops-step__num::after {
    background: var(--dark-400);
  }
}

@media (max-width: 980px) {
  .ops-method,
  .ops-metrics,
  .ops-cards,
  .ops-offers {
    grid-template-columns: 1fr;
  }

  .ops-proof {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .ops-intro--center:has(#diff-title) {
    align-items: flex-start;
    margin-inline: 0;
    text-align: left;
  }

  .ops-proof {
    grid-template-columns: 1fr;
  }

  .ops-step {
    grid-template-columns: 3.5rem minmax(0, 1fr);
  }
}
