/* ─────────────────────────────────────────────────────────────────────
 * RidgeAI v4 — Transparency page-specific styles
 * Extends v4.css. Editorial Bone palette · framed cinematic plates ·
 * salvaged Higgsfield videos used as magazine-quality features.
 * ─────────────────────────────────────────────────────────────── */

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

/* ── Featured cinematic plate (the sunrise hero video) ───────── */
.tx-feature {
  margin: 0;
  position: relative;
  width: 100%;
  max-width: 640px;
  margin-left: auto;
}
.tx-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(-1.2deg);
}
.tx-feature__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.96) contrast(1.04);
}
.tx-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;
}
.tx-feature__caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: var(--s-5) var(--s-6);
  color: var(--text-on-dark);
}
.tx-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;
}
.tx-feature__cap-text {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  font-style: italic;
  line-height: 1.25;
}

/* ── Live stats grid ──────────────────────────────────────────── */
.tx-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--s-5);
}
.tx-stat {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: var(--s-8) var(--s-6) var(--s-6);
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  transition: transform var(--t-base) var(--ease-out),
              box-shadow var(--t-base) var(--ease-out);
}
.tx-stat:hover {
  transform: translateY(-3px);
  box-shadow: var(--el-2);
}
.tx-stat__num {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(48px, 5.4vw, 72px);
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin-bottom: var(--s-4);
}
.tx-stat__num--short {
  font-size: clamp(24px, 2.4vw, 32px);
  color: var(--text);
}
.tx-stat__lbl {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
}
.tx-stat__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: var(--s-2);
}
.tx-live {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-left: var(--s-3);
}
.tx-live::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 999px;
  background: var(--ok);
  margin-right: 6px;
  vertical-align: 1px;
  animation: tx-live-pulse 1.6s ease-in-out infinite;
}
@keyframes tx-live-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

/* ── Cinematic essay plates — single-column editorial spread ────
   Each plate gets its own moment as you scroll. Videos play once
   on view (no auto-loop) and restart when you scroll away/back. */
.tx-essay__column {
  display: flex;
  flex-direction: column;
  gap: var(--s-24);
  max-width: 920px;
  margin: 0 auto;
}
@media (max-width: 768px) {
  .tx-essay__column { gap: var(--s-18); }
}
.tx-plate {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-6);
}
@media (min-width: 720px) {
  .tx-plate { grid-template-columns: 1fr 280px; align-items: center; }
  .tx-plate:nth-child(even) {
    grid-template-columns: 280px 1fr;
  }
  .tx-plate:nth-child(even) .tx-plate__frame { order: 2; }
  .tx-plate:nth-child(even) .tx-plate__cap   { order: 1; text-align: right; }
}
.tx-plate__frame {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-2);
  border: 6px solid var(--surface);
  outline: 1px solid var(--line);
  box-shadow:
    0 24px 56px rgba(31, 27, 24, 0.18),
    0 8px 16px rgba(31, 27, 24, 0.10);
}
.tx-plate:nth-child(odd) .tx-plate__frame  { transform: rotate(-0.8deg); }
.tx-plate:nth-child(even) .tx-plate__frame { transform: rotate(0.6deg); }
.tx-plate__cap {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
@media (min-width: 720px) {
  .tx-plate:nth-child(even) .tx-plate__cap { align-items: flex-end; }
}
.tx-plate__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.96) contrast(1.04);
}
.tx-plate__cap {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: var(--s-4);
  row-gap: 2px;
  padding: 0 var(--s-2);
  align-items: baseline;
}
.tx-plate__num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.20em;
  color: var(--accent);
  text-transform: uppercase;
}
.tx-plate__name {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 500;
  font-style: italic;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.tx-plate__sub {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-soft);
  max-width: 280px;
}

/* ── Honesty rules (numbered editorial list) ─────────────────── */
.tx-rules {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
}
.tx-rule {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: var(--s-6);
  row-gap: var(--s-3);
  padding-bottom: var(--s-8);
  border-bottom: 1px solid var(--line);
}
.tx-rule:last-child { border-bottom: 0; padding-bottom: 0; }
.tx-rule__num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--accent);
  padding-top: 8px;
  /* Span both rows so the body text doesn't wrap under it. */
  grid-row: 1 / span 2;
  grid-column: 1;
}
.tx-rule__head { grid-column: 2; grid-row: 1; margin: 0 0 var(--s-2); }
.tx-rule__body { grid-column: 2; grid-row: 2; }
.tx-rule__head {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0 0 var(--s-3);
}
.tx-rule__body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-soft);
  margin: 0;
  max-width: 720px;
}
@media (max-width: 640px) {
  .tx-rule { grid-template-columns: 1fr; gap: var(--s-2); }
  .tx-rule__num { padding-top: 0; }
}

/* ── Long-form editorial prose ───────────────────────────────── */
.tx-prose__body {
  max-width: 720px;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-soft);
}
.tx-prose__body p { margin: 0 0 var(--s-5); }
.tx-prose__body p:last-child { margin-bottom: 0; }
.tx-prose__body strong { color: var(--text); font-weight: 600; }
.tx-link {
  color: var(--accent);
  border-bottom: 1px solid var(--accent-soft);
  transition: border-color var(--t-fast) var(--ease);
}
.tx-link:hover { border-color: var(--accent); }

/* ── Final CTA — handoff video framed as background ───────────── */
.tx-endcta {
  position: relative;
  overflow: hidden;
}
.tx-endcta__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.32;
}
.tx-endcta__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tx-endcta__shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center,
      rgba(47, 42, 38, 0.4)  20%,
      rgba(47, 42, 38, 0.92) 90%);
}
.tx-endcta .endcta__shader { z-index: 0; opacity: 0.5; }
.tx-endcta .endcta__content { z-index: 2; }
.tx-endcta__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  justify-content: center;
}
.btn--on-dark {
  color: var(--text-on-dark);
  border-color: rgba(246, 242, 236, 0.4);
}
.btn--on-dark:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Reduced motion: pause looping cinema ─────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .tx-feature__video,
  .tx-plate__video,
  .tx-endcta__video {
    animation-play-state: paused;
  }
}
