/* css/pages/landing.css — section layout for index.html. Mobile-first;
   breakpoints at 640 / 768 / 1024 / 1280px. Tokens only, no magic numbers
   beyond the fixed mock percentages the copy itself calls out. */

html { scroll-behavior: smooth; }

::selection { background: var(--color-primary); color: var(--color-surface); }

/* Fixed-width digits everywhere a number changes or sits next to other
   numbers, so the count-up animation and price/percentage figures don't
   jitter horizontally as characters are added or swapped. */
.cs-stat__value,
.cs-report-ring__value,
.cs-preview__source-pct,
.cs-preview__ai-legend,
.cs-pricing-preview .cs-card__price,
.cs-preview__summary .cs-badge {
  font-variant-numeric: tabular-nums;
}

/* ===== Shared section rhythm ===== */
.cs-hero,
.cs-features,
.cs-how,
.cs-preview,
.cs-audience,
.cs-pricing-preview,
.cs-reviews,
.cs-faq {
  padding: var(--space-16) 0;
}

.cs-stats { background: var(--color-ink); color: var(--color-surface); padding: var(--space-12) 0; }
.cs-features { background: var(--color-surface); }
.cs-how { background: var(--color-bg); }
.cs-preview { background: var(--color-surface); }
.cs-audience { background: var(--color-bg); }
.cs-pricing-preview { background: var(--color-surface); }
.cs-reviews { background: var(--color-bg); }
.cs-faq { background: var(--color-surface); }

.cs-section-intro {
  max-width: 56ch;
  margin: 0 auto var(--space-12);
  text-align: center;
}
.cs-section-intro h2 { font-size: var(--font-size-3xl); margin-bottom: var(--space-3); text-wrap: balance; }
.cs-section-intro p { color: var(--color-text-muted); margin: 0; }

/* A small reusable document-silhouette icon used by the hero mock card and
   the report-preview mock. Self-contained (no image, no background-color
   matching trick), so it reads correctly on any section background. */
.cs-doc-icon {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  width: 18px;
  height: 20px;
  padding: 3px;
  background: var(--color-primary-light);
  border-radius: var(--radius-sm);
  vertical-align: -5px;
  margin-right: var(--space-2);
  flex-shrink: 0;
}
.cs-doc-icon::before,
.cs-doc-icon::after {
  content: '';
  display: block;
  height: 2px;
  border-radius: 1px;
  background: var(--color-primary);
}
.cs-doc-icon::after { width: 60%; }

/* ===== Hero ===== */
.cs-hero__grid {
  display: grid;
  gap: var(--space-8);
  align-items: center;
}

.cs-hero__title {
  font-size: var(--font-size-4xl);
  max-width: 16ch;
  margin-bottom: var(--space-4);
  text-wrap: balance;
}

.cs-hero__subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text);
  max-width: 46ch;
  margin-bottom: var(--space-6);
}

.cs-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.cs-hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}
.cs-hero__trust li { position: relative; padding-left: var(--space-4); }
.cs-hero__trust li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-secondary);
}

.cs-hero__visual { display: flex; justify-content: center; }

/* The one deliberately bold element on the page: a slightly tilted, elevated
   "device" card that reads as a real report rather than a flat decoration.
   Entrance animation is a single, orchestrated reveal — not repeated per
   section — and is silenced globally under prefers-reduced-motion by the
   rule already in base.css. */
@keyframes cs-report-mock-in {
  from { opacity: 0; transform: translateY(16px) rotate(0deg); }
  to { opacity: 1; transform: translateY(0) rotate(-2deg); }
}

.cs-report-mock {
  width: 100%;
  max-width: 360px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-6);
  transform: rotate(-2deg);
  animation: cs-report-mock-in 700ms ease-out both;
}

.cs-report-mock__titlebar {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-ink);
}
.cs-report-mock__filename { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cs-report-mock__scores {
  display: flex;
  justify-content: space-around;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
}

.cs-report-ring {
  width: 88px;
  height: 88px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(var(--color-secondary) calc(var(--ring-value) * 1%), var(--color-border) 0);
}
.cs-report-ring--sim { --ring-value: 12; }
.cs-report-ring--ai { --ring-value: 6; }

.cs-report-ring__hole {
  width: 66px;
  height: 66px;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cs-report-ring__value {
  font-family: var(--font-family-heading);
  font-weight: 700;
  font-size: var(--font-size-lg);
  color: var(--color-ink);
}

.cs-report-mock__labels {
  display: flex;
  justify-content: space-around;
  gap: var(--space-4);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  text-align: center;
}
.cs-report-mock__labels span { width: 88px; }

.cs-report-mock__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
/* Decorative <span>s inside the role="img" hero mockup, not real buttons.
   pointer-events: none keeps them non-interactive, and the explicit hover
   override cancels .cs-btn--outline:hover's primary-light background so it
   never pairs with this muted text color below the 4.5:1 contrast ratio. */
.cs-report-mock__btn { width: 100%; color: var(--color-text-muted); border-color: var(--color-border); pointer-events: none; }
.cs-report-mock__btn:hover { background: transparent; }

.cs-report-mock__caption {
  margin: 0;
  text-align: center;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

@media (min-width: 1024px) {
  .cs-hero__grid { grid-template-columns: 1.1fr 1fr; gap: var(--space-16); }
  .cs-hero__title { font-size: var(--font-size-5xl); max-width: 14ch; }
  .cs-hero__visual { justify-content: flex-end; }
}

/* ===== Stats bar ===== */
.cs-stats__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8) var(--space-4);
  text-align: center;
}
.cs-stat { display: flex; flex-direction: column; gap: var(--space-1); }
.cs-stat__value {
  font-family: var(--font-family-heading);
  font-size: var(--font-size-4xl);
  font-weight: 700;
  color: var(--color-surface);
}
.cs-stat__label { font-size: var(--font-size-sm); color: var(--color-border); }

@media (min-width: 768px) {
  .cs-stats__grid { grid-template-columns: repeat(4, 1fr); }
}

/* ===== Features ===== */
.cs-features__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}
.cs-features__grid .cs-card--feature { max-width: none; }

@media (min-width: 640px) {
  .cs-features__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .cs-features__grid { grid-template-columns: repeat(3, 1fr); }
}

/* ===== How it works ===== */
.cs-how__steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.cs-how__step {
  position: relative;
  padding-left: calc(40px + var(--space-4));
}
.cs-how__step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 19px;
  top: 40px;
  width: 2px;
  height: calc(100% + var(--space-8) - 40px);
  background: var(--color-border);
}
.cs-how__number {
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: var(--color-surface);
  font-family: var(--font-family-heading);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cs-how__title { font-size: var(--font-size-xl); margin-bottom: var(--space-1); }
.cs-how__body { color: var(--color-text-muted); margin: 0; max-width: 48ch; }

@media (min-width: 768px) {
  .cs-how__steps { flex-direction: row; gap: var(--space-6); }
  .cs-how__step { flex: 1; padding-left: 0; padding-top: calc(40px + var(--space-4)); text-align: center; }
  .cs-how__number { left: 50%; transform: translateX(-50%); }
  .cs-how__step:not(:last-child)::after {
    left: calc(50% + 32px);
    top: 19px;
    width: calc(100% - 64px);
    height: 2px;
  }
  .cs-how__body { margin: 0 auto; }
}

/* ===== Report preview ===== */
.cs-preview__panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: var(--space-6);
}
.cs-preview__header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-border);
}
.cs-preview__doc { display: flex; align-items: center; font-weight: 600; color: var(--color-ink); }
.cs-preview__summary { display: flex; gap: var(--space-2); flex-wrap: wrap; }

.cs-preview__body { display: grid; gap: var(--space-8); }
.cs-preview__subtitle {
  font-size: var(--font-size-sm);
  text-transform: none;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}
.cs-preview__excerpt { color: var(--color-text); margin-bottom: var(--space-4); }
.cs-preview__highlight { padding: 0.05em 0.2em; border-radius: 3px; }
.cs-preview__highlight--exact { background: var(--color-danger-light); color: var(--color-danger-dark); }
.cs-preview__highlight--paraphrase { background: var(--color-warning-light); color: var(--color-warning-dark); }

.cs-preview__legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}
.cs-preview__legend li { display: flex; align-items: center; }
.cs-preview__swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: var(--space-1);
}
.cs-preview__swatch--exact { background: var(--color-danger-light); border: 1px solid var(--color-danger); }
.cs-preview__swatch--paraphrase { background: var(--color-warning-light); border: 1px solid var(--color-warning); }

.cs-preview__sources { list-style: none; padding: 0; margin: 0 0 var(--space-6); }
.cs-preview__sources li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px 32px;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--font-size-sm);
}
.cs-preview__sources li:last-child { border-bottom: none; }
.cs-preview__source-name { color: var(--color-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-preview__source-bar {
  display: block;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
}
.cs-preview__source-bar--1 { width: 80%; }
.cs-preview__source-bar--2 { width: 55%; }
.cs-preview__source-bar--3 { width: 30%; }
.cs-preview__source-pct { text-align: right; color: var(--color-text-muted); font-size: var(--font-size-xs); }

.cs-preview__ai-bar {
  display: flex;
  height: 10px;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-2);
}
.cs-preview__ai-seg--human { width: 91%; background: var(--color-secondary); }
.cs-preview__ai-seg--ai { width: 9%; background: var(--color-warning); }
.cs-preview__ai-legend {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

@media (min-width: 1024px) {
  .cs-preview__body { grid-template-columns: 1.4fr 1fr; gap: var(--space-12); }
}

/* ===== Who it's for ===== */
.cs-audience__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}
.cs-audience__item h3 { font-size: var(--font-size-lg); margin-bottom: var(--space-2); }
.cs-audience__item p { color: var(--color-text-muted); margin: 0; max-width: 42ch; }

@media (min-width: 640px) {
  .cs-audience__grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-8); }
}

/* ===== Pricing preview ===== */
.cs-pricing-preview__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  align-items: stretch;
  justify-items: center;
}
.cs-pricing-preview__grid .cs-card--pricing { width: 100%; max-width: 320px; }
.cs-pricing-preview__skeleton {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  width: 100%;
  max-width: none;
}
.cs-pricing-preview__skeleton .cs-skeleton--block { height: 340px; }

@media (min-width: 640px) {
  .cs-pricing-preview__grid,
  .cs-pricing-preview__skeleton { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1280px) {
  .cs-pricing-preview__grid,
  .cs-pricing-preview__skeleton { grid-template-columns: repeat(4, 1fr); }
}

/* ===== Reviews ===== */
.cs-reviews__aggregate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-3);
}
.cs-reviews__aggregate-text { color: var(--color-text-muted); font-size: var(--font-size-sm); }

.cs-reviews__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
.cs-reviews__grid .cs-card--review { max-width: none; }

@media (min-width: 640px) {
  .cs-reviews__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .cs-reviews__grid { grid-template-columns: repeat(3, 1fr); }
}

/* ===== FAQ ===== */
.cs-faq__wrap { max-width: 760px; }

/* ===== Final CTA ===== */
.cs-final-cta {
  background: var(--color-primary);
  padding: var(--space-16) 0;
  text-align: center;
}
.cs-final-cta__inner { max-width: 52ch; margin: 0 auto; }
.cs-final-cta__title { color: var(--color-surface); margin-bottom: var(--space-3); text-wrap: balance; }
.cs-final-cta__subtitle { color: var(--color-primary-light); margin-bottom: var(--space-6); }
.cs-final-cta__btn {
  background: var(--color-surface);
  color: var(--color-primary);
  border-color: var(--color-surface);
}
.cs-final-cta__btn:hover { background: var(--color-primary-light); }
