/* ─────────────────────────────────────────────────────────────────────
 * RidgeAI v4 — Comparison page-specific styles
 * Extends v4.css. Editorial Bone palette · 06-tv.mp4 framed hero ·
 * editorial comparison table · win/lose breakdown panels.
 * ─────────────────────────────────────────────────────────────── */

/* ── Hero override ─────────────────────────────────────────────── */
.cmp-hero {
  min-height: 0;
  padding: var(--s-18) 0 var(--s-20);
}
@media (min-width: 1024px) {
  .cmp-hero { padding: var(--s-20) 0 var(--s-24); }
}
.cmp-hero__grid { align-items: center; }

/* Featured TV video — magazine plate framing */
.cmp-feature {
  margin: 0;
  position: relative;
  width: 100%;
  max-width: 640px;
  margin-left: auto;
}
.cmp-feature__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--surface-2);
  border: 8px solid var(--surface);
  outline: 1px solid var(--line);
  box-shadow:
    0 30px 60px rgba(31, 27, 24, 0.18),
    0 12px 24px rgba(31, 27, 24, 0.10),
    0 2px 4px rgba(31, 27, 24, 0.06);
  transform: rotate(1deg);
}
.cmp-feature__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.96) contrast(1.04);
}
.cmp-feature__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(31, 27, 24, 0.0)  60%,
      rgba(31, 27, 24, 0.55) 100%);
  pointer-events: none;
}
/* On-screen status panel — reads like what the contractor would see
   on the TV when RidgeAI finishes the supplement. Positioned over
   the TV's screen area in the frame (top ~38%). Lines drop in at
   video-time triggers. */
.cmp-feature__story {
  position: absolute;
  top: 38%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  z-index: 4;
  padding: 0 var(--s-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
  pointer-events: none;
}
.cmp-feature__line {
  display: block;
  text-align: center;
  opacity: 0;
  transform: translateY(-16px);
  transition:
    opacity 700ms var(--ease-out),
    transform 700ms var(--ease-out);
  will-change: opacity, transform;
}
.cmp-feature__line.is-on {
  opacity: 1;
  transform: translateY(0);
}

/* Status label — top, small mono "system" text */
.cmp-feature__line--label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.32em;
  color: rgba(232, 163, 152, 0.92);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  margin-bottom: var(--s-1);
}

/* Centerpiece — the recovered amount. Hairline rule above + below,
   warm-rose dollar in display italic, mono caption underneath. */
.cmp-feature__line--accent {
  position: relative;
  padding: var(--s-4) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.cmp-feature__line--accent::before,
.cmp-feature__line--accent::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 1px;
  background: rgba(246, 242, 236, 0.45);
}
.cmp-feature__line--accent::before { top: 0; }
.cmp-feature__line--accent::after  { bottom: 0; }
.cmp-feature__amt {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.025em;
  color: #E8A398;
  font-variant-numeric: tabular-nums;
  text-shadow:
    0 2px 6px rgba(0, 0, 0, 0.55),
    0 0 22px rgba(0, 0, 0, 0.45);
}
.cmp-feature__amt-lbl {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(246, 242, 236, 0.65);
}

/* Meta line — bottom caption */
.cmp-feature__line--meta {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.10em;
  color: rgba(246, 242, 236, 0.7);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  margin-top: var(--s-1);
}

.cmp-feature__caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: var(--s-5) var(--s-6);
  color: var(--text-on-dark);
}
.cmp-feature__cap-eye {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 4px;
}
.cmp-feature__cap-text {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  font-style: italic;
  line-height: 1.25;
}

.cmp-link {
  color: var(--accent);
  border-bottom: 1px solid var(--accent-soft);
  transition: border-color var(--t-fast) var(--ease);
}
.cmp-link:hover { border-color: var(--accent); }

/* ── Comparison table — editorial research-chart aesthetic ──── */
.cmp-table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--el-1);
}
.cmp-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
}
.cmp-table thead th {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  padding: var(--s-5) var(--s-4);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  vertical-align: middle;
}
.cmp-table thead th:first-child {
  text-align: left;
}
.cmp-table thead th.is-us span {
  display: inline-block;
  padding: 4px 10px;
  background: var(--accent);
  color: var(--text-on-dark);
  font-weight: 700;
  letter-spacing: 0.10em;
}
.cmp-table tbody th[scope="row"] {
  text-align: left;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  font-style: italic;
  color: var(--text);
  padding: var(--s-4) var(--s-4) var(--s-4) var(--s-6);
  border-bottom: 1px solid var(--line);
  width: 38%;
}
.cmp-table tbody td {
  text-align: center;
  vertical-align: middle;
  padding: var(--s-4) var(--s-3);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-soft);
}
.cmp-table tbody td.is-us {
  background: rgba(139, 31, 26, 0.04);
  border-left: 1px solid rgba(139, 31, 26, 0.18);
  border-right: 1px solid rgba(139, 31, 26, 0.18);
  color: var(--text);
}
.cmp-table tbody tr:last-child th[scope="row"],
.cmp-table tbody tr:last-child td { border-bottom: 0; }
.cmp-table tbody tr:hover td:not(.is-us) { background: var(--surface-2); }

.cmp-mark {
  display: inline-block;
  font-size: 14px;
  line-height: 1;
  margin-right: 6px;
  vertical-align: middle;
}
.cmp-mark--y { color: var(--ok); }
.cmp-mark--n { color: var(--text-muted); font-size: 18px; line-height: 0.5; }
.cmp-mark--p { color: var(--warn); }
.cmp-note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.cmp-table tbody td.is-us .cmp-note { color: var(--text-soft); }
.cmp-price {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
}
.cmp-table tbody td:not(.is-us) .cmp-price { color: var(--text-soft); font-weight: 500; }

/* Sourcing note */
.cmp-disclaimer {
  margin-top: var(--s-8);
  padding: var(--s-5) var(--s-6);
  background: var(--surface-2);
  border-left: 2px solid var(--accent);
  max-width: 920px;
}
.cmp-disclaimer__eye {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s-2);
}
.cmp-disclaimer p {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-soft);
  margin: 0;
}

/* ── Win / Lose breakdown panels ─────────────────────────────── */
.cmp-gaps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
}
@media (min-width: 720px) {
  .cmp-gaps { grid-template-columns: 1fr 1fr; }
}
.cmp-gap {
  position: relative;
  padding: var(--s-8) var(--s-6) var(--s-6);
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 2px solid var(--text-muted);
  transition: transform var(--t-base) var(--ease-out),
              box-shadow var(--t-base) var(--ease-out);
}
.cmp-gap:hover {
  transform: translateY(-4px);
  box-shadow: var(--el-2);
}
.cmp-gap--win { border-top-color: var(--accent); }

.cmp-gap__tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--s-4);
  padding-bottom: var(--s-2);
  border-bottom: 1px solid var(--line);
}
.cmp-gap--win .cmp-gap__tag {
  color: var(--accent);
  border-bottom-color: var(--accent-soft);
}
.cmp-gap__head {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.6vw, 30px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0 0 var(--s-3);
}
.cmp-gap__body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-soft);
  margin: 0;
}

/* ── Final CTA ─────────────────────────────────────────────────── */
.cmp-endcta__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  justify-content: center;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .cmp-feature__video { animation-play-state: paused; }
}
