/* ===========================================================
   Tests hub landing (/tests)
   Namespace: .th-*
   Dark cinematic index of the four clinical assessments.
   Palettes borrowed from .dr- / .pc- / .ss- / .pr- landings.
   =========================================================== */

html:has(.th-page),
body:has(.th-page) {
  overflow-x: clip;
  scroll-behavior: smooth;
}

.th-page {
  --th-bg: #08091a;
  --th-bg-2: #10122a;
  --th-ink: #f4f1ec;
  --th-muted: rgba(255, 255, 255, 0.62);
  --th-line: rgba(255, 255, 255, 0.08);
  --th-gold: #d4af6f;
  --th-gold-dark: #a88142;
  --th-accent: #2ba6fe;
  --th-cyan: #5ec8c5;
  --th-rose: #c45c8a;
  --th-violet: #7c4dff;
  --th-teal: #14b8a6;
  --th-radius: 20px;
  --th-radius-lg: 28px;
  color: var(--th-ink);
  background: #070812;
}

.th-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}
@media (max-width: 720px) {
  .th-container { padding: 0 18px; }
}

.th-section { padding: 88px 0; position: relative; }
@media (max-width: 720px) {
  .th-section { padding: 56px 0; }
}

.th-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.th-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.th-section-head {
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
}

.th-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--th-accent);
  margin: 0 0 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(43, 166, 254, 0.16);
}
.th-eyebrow--gold {
  color: var(--th-gold);
  background: rgba(212, 175, 111, 0.16);
}
.th-eyebrow--inline {
  align-self: flex-start;
  margin-bottom: 8px;
}

.th-section-title {
  font-size: clamp(1.55rem, 2.2vw + 1rem, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  line-height: 1.3;
  color: #fff;
}
.th-section-title--light { color: #fff; }

.th-section-sub {
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--th-muted);
  margin: 0 auto;
  max-width: 640px;
}
.th-section-sub--light { color: rgba(255, 255, 255, 0.72); }

/* ---------- Buttons ---------- */
.th-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  white-space: nowrap;
}
.th-btn:hover { transform: translateY(-2px); }
.th-btn--gold {
  background: linear-gradient(135deg, #e8c98a, var(--th-gold) 55%, var(--th-gold-dark));
  color: #1a1408;
  box-shadow: 0 18px 50px -16px rgba(212, 175, 111, 0.55);
}
.th-btn--gold:hover { box-shadow: 0 24px 60px -14px rgba(212, 175, 111, 0.78); }
.th-btn--lg { padding: 16px 32px; font-size: 1.02rem; }
.th-btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.16);
}
.th-btn-icon { width: 16px; height: 16px; transform: scaleX(-1); }

/* ===========================================================
   HERO
   =========================================================== */
.th-hero {
  position: relative;
  padding: 160px 0 100px;
  background: radial-gradient(120% 80% at 50% 0%, #1d1845 0%, var(--th-bg) 55%, #05060f 100%);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

.th-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.th-aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: thAurora 18s ease-in-out infinite;
}
.th-aurora--1 {
  top: -120px; right: -80px; width: 460px; height: 460px;
  background: radial-gradient(circle, #d4af6f 0%, transparent 70%);
}
.th-aurora--2 {
  bottom: -160px; left: -80px; width: 520px; height: 520px;
  background: radial-gradient(circle, #2ba6fe 0%, transparent 65%);
  animation-delay: -6s; opacity: 0.4;
}
.th-aurora--3 {
  top: 38%; left: 52%; width: 360px; height: 360px;
  background: radial-gradient(circle, #c45c8a 0%, transparent 70%);
  opacity: 0.28; animation-delay: -12s;
}

@keyframes thAurora {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(40px, -30px) scale(1.08); }
  66%      { transform: translate(-30px, 40px) scale(0.95); }
}

.th-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 0%, transparent 70%);
}

.th-particles { position: absolute; inset: 0; }
.th-particles span {
  position: absolute;
  width: 3px; height: 2px;
  border-radius: 50%;
  background: rgba(212, 175, 111, 0.75);
  box-shadow: 0 0 8px rgba(43, 166, 254, 0.45);
  animation: thFloat var(--th-d, 14s) ease-in-out infinite;
  animation-delay: var(--th-delay, 0s);
}
@keyframes thFloat {
  0%, 100% { transform: translate(0, 0); opacity: 0.55; }
  50%      { transform: translate(var(--th-x, 30px), var(--th-y, -40px)); opacity: 1; }
}

.th-hero-inner { max-width: 820px; text-align: center; }
.th-hero-text { display: flex; flex-direction: column; align-items: center; gap: 18px; }

.th-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.86);
}

.th-pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--th-gold);
  animation: thDotPulse 2s ease-out infinite;
}
@keyframes thDotPulse {
  0%   { box-shadow: 0 0 0 0 rgba(212, 175, 111, 0.7); }
  100% { box-shadow: 0 0 0 14px rgba(212, 175, 111, 0); }
}

.th-hero-title {
  font-size: clamp(2rem, 3.6vw + 1rem, 3.7rem);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.025em;
  margin: 0;
}
.th-hero-line-pre { display: block; }
.th-hero-accent {
  display: block;
  background: linear-gradient(120deg, #e8c98a 0%, #2ba6fe 50%, #c45c8a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-top: 0.12em;
}

.th-hero-sub {
  font-size: clamp(0.98rem, 0.6vw + 0.85rem, 1.15rem);
  line-height: 1.95;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  max-width: 640px;
}

.th-hero-actions { margin-top: 8px; }
.th-hero-trust {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
}

.th-hero-live {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(22, 163, 74, 0.12);
  border: 1px solid rgba(22, 163, 74, 0.28);
  border-radius: 999px;
  font-size: 0.82rem;
  color: rgba(220, 252, 231, 0.95);
}
.th-hero-live strong { color: #4ade80; font-weight: 800; }
.th-hero-live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e;
  animation: thDotPulse 2s ease-out infinite;
}

/* ===========================================================
   CHOOSER
   =========================================================== */
.th-section--chooser {
  background: linear-gradient(180deg, #0c0e20 0%, #101428 100%);
}

.th-chooser {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 960px) {
  .th-chooser { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .th-chooser { grid-template-columns: 1fr; }
}

.th-chooser-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 20px;
  border-radius: var(--th-radius);
  text-decoration: none;
  color: #fff;
  border: 1px solid var(--th-line);
  background: rgba(255, 255, 255, 0.04);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.th-chooser-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.07);
}
.th-chooser-card--divorce-risk { border-color: rgba(212, 175, 111, 0.28); }
.th-chooser-card--divorce-risk:hover { border-color: var(--th-gold); }
.th-chooser-card--premarital-compatibility { border-color: rgba(43, 166, 254, 0.28); }
.th-chooser-card--premarital-compatibility:hover { border-color: var(--th-accent); }
.th-chooser-card--sexual-satisfaction { border-color: rgba(196, 92, 138, 0.32); }
.th-chooser-card--sexual-satisfaction:hover { border-color: var(--th-rose); }
.th-chooser-card--parenting-readiness { border-color: rgba(94, 200, 197, 0.28); }
.th-chooser-card--parenting-readiness:hover { border-color: var(--th-cyan); }

.th-chooser-q {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.45;
}
.th-chooser-hint {
  font-size: 0.82rem;
  color: var(--th-muted);
  font-weight: 600;
}

/* ===========================================================
   CHAPTERS
   =========================================================== */
.th-chapter {
  padding: 88px 0;
  position: relative;
  overflow: hidden;
  scroll-margin-top: 6.5rem;
}
#tests { scroll-margin-top: 5.5rem; }
@media (max-width: 720px) {
  .th-chapter { padding: 56px 0; }
}

.th-chapter--divorce-risk {
  background: radial-gradient(90% 80% at 80% 20%, #1d1845 0%, #0a0b1e 55%, #070812 100%);
}
.th-chapter--premarital-compatibility {
  background: radial-gradient(90% 80% at 20% 20%, #0a3a32 0%, #06241f 55%, #041714 100%);
}
.th-chapter--sexual-satisfaction {
  background: radial-gradient(90% 80% at 80% 20%, #3d1833 0%, #1a0b16 55%, #12080f 100%);
}
.th-chapter--parenting-readiness {
  background: radial-gradient(90% 80% at 20% 20%, #1a2a2e 0%, #0c1216 55%, #070b0d 100%);
}

.th-chapter-inner {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 48px;
  align-items: center;
}
.th-chapter--flip .th-chapter-inner { grid-template-columns: 1.08fr 0.92fr; }
.th-chapter--flip .th-chapter-visual { order: 2; }
.th-chapter--flip .th-chapter-body { order: 1; }

@media (max-width: 860px) {
  .th-chapter-inner,
  .th-chapter--flip .th-chapter-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .th-chapter--flip .th-chapter-visual,
  .th-chapter--flip .th-chapter-body { order: unset; }
}

.th-chapter-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.th-chapter--divorce-risk .th-eyebrow--inline {
  color: var(--th-gold);
  background: rgba(212, 175, 111, 0.16);
}
.th-chapter--premarital-compatibility .th-eyebrow--inline {
  color: #7dd3fc;
  background: rgba(43, 166, 254, 0.16);
}
.th-chapter--sexual-satisfaction .th-eyebrow--inline {
  color: #e08ab0;
  background: rgba(196, 92, 138, 0.18);
}
.th-chapter--parenting-readiness .th-eyebrow--inline {
  color: var(--th-cyan);
  background: rgba(94, 200, 197, 0.16);
}

.th-chapter-title {
  font-size: clamp(1.45rem, 1.8vw + 1rem, 2.15rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0;
  color: #fff;
  line-height: 1.3;
}
.th-chapter-desc {
  font-size: 1.02rem;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
}
.th-chapter-meta {
  font-size: 0.84rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 6px;
}
.th-chapter-body .th-btn { margin-top: 6px; }

.th-chapter--premarital-compatibility .th-btn--gold {
  background: linear-gradient(135deg, #7dd3fc, #2ba6fe 55%, #0e7490);
  color: #fff;
  box-shadow: 0 18px 50px -16px rgba(43, 166, 254, 0.55);
}
.th-chapter--sexual-satisfaction .th-btn--gold {
  background: linear-gradient(135deg, #e08ab0, #c45c8a 55%, #6b2158);
  color: #fff;
  box-shadow: 0 18px 50px -16px rgba(196, 92, 138, 0.55);
}
.th-chapter--parenting-readiness .th-btn--gold {
  background: linear-gradient(135deg, #8ed9d6, #5ec8c5 55%, #2a7a77);
  color: #fff;
  box-shadow: 0 18px 50px -16px rgba(94, 200, 197, 0.55);
}

/* ---------- Visuals ---------- */
.th-viz {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  padding: 22px 18px 20px;
  border-radius: var(--th-radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.22);
}
.th-viz-svg { width: 100%; max-width: 22rem; }
.th-viz-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.08);
}
.th-viz-tag svg { animation: thPulse 1.4s infinite; }
@keyframes thPulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}

.th-viz-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12rem;
}
.th-viz-num {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--th-gold);
}
.th-viz-label {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
  text-align: center;
}
.th-viz-side {
  font-size: 11px;
  font-weight: 700;
  fill: rgba(255, 255, 255, 0.55);
}
.th-viz-score {
  font-size: 18px;
  font-weight: 900;
  fill: var(--th-gold);
}

.th-chapter--divorce-risk .th-viz-num { color: var(--th-gold); }
.th-chapter--premarital-compatibility .th-viz-num { color: #7dd3fc; }
.th-chapter--sexual-satisfaction .th-viz-num { color: #e08ab0; }
.th-chapter--parenting-readiness .th-viz-num { color: var(--th-cyan); }

.th-heart-bg {
  stroke: rgba(212, 175, 111, 0.22);
  stroke-width: 1.5;
  fill: none;
  stroke-dasharray: 4 4;
}
.th-heart-path {
  stroke: url(#thHeartGrad);
  stroke-width: 2.5;
  fill: none;
  stroke-dasharray: 320;
  stroke-dashoffset: 320;
  animation: thHeartDraw 3.4s ease-in-out infinite;
}
.th-heart-pulse {
  fill: #2ba6fe;
  filter: drop-shadow(0 0 6px rgba(43, 166, 254, 0.6));
  animation: thHeartDot 3.4s ease-in-out infinite;
}
@keyframes thHeartDraw {
  0%   { stroke-dashoffset: 320; }
  50%  { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -320; }
}
@keyframes thHeartDot {
  0%, 100% { opacity: 0; transform: scale(0.6); }
  50%      { opacity: 1; transform: scale(1.2); }
}

.th-ring {
  fill: rgba(43, 166, 254, 0.08);
  stroke: #2ba6fe;
  stroke-width: 2.2;
  filter: drop-shadow(0 0 6px rgba(43, 166, 254, 0.35));
  animation: thRingBreathe 3.4s ease-in-out infinite;
}
.th-ring--partner { animation-delay: -1.7s; stroke: var(--th-teal); }
@keyframes thRingBreathe {
  0%, 100% { opacity: 0.85; }
  50%      { opacity: 1; }
}
.th-ring-link {
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: thRingLink 3.4s ease-in-out infinite;
}
@keyframes thRingLink {
  0%   { stroke-dashoffset: 40; opacity: 0; }
  35%  { stroke-dashoffset: 0; opacity: 1; }
  85%  { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: -40; opacity: 0; }
}

.th-lock-a {
  transform-origin: 138px 70px;
  transform-box: view-box;
  animation: thLockA 6s ease-in-out infinite;
}
.th-lock-b {
  transform-origin: 182px 70px;
  transform-box: view-box;
  animation: thLockB 6s ease-in-out infinite;
}
@keyframes thLockA {
  0%, 20%  { transform: translateX(-16px) rotate(0deg); }
  50%, 70% { transform: translateX(7px) rotate(25deg); }
  100%     { transform: translateX(-16px) rotate(0deg); }
}
@keyframes thLockB {
  0%, 20%  { transform: translateX(16px) rotate(0deg); }
  50%, 70% { transform: translateX(-7px) rotate(-25deg); }
  100%     { transform: translateX(16px) rotate(0deg); }
}

.th-us-monitor {
  position: relative;
  width: 100%;
  max-width: 22rem;
  background: #10181c;
  border: 1.2px solid rgba(94, 200, 197, 0.35);
  border-radius: 14px;
  padding: 10px;
  overflow: hidden;
}
.th-us-video {
  display: block;
  width: 100%;
  aspect-ratio: 426 / 240;
  object-fit: cover;
  border-radius: 8px;
  background: #071012;
}
.th-us-overlay {
  position: absolute;
  inset: 10px;
  border-radius: 8px;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(94, 200, 197, 0.14) 0%,
    rgba(94, 200, 197, 0.05) 50%,
    rgba(94, 200, 197, 0.1) 100%
  );
}

/* ===========================================================
   FALLBACK + TRUST
   =========================================================== */
.th-section--more { background: #0c0e20; }
.th-fallback-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 720px) {
  .th-fallback-grid { grid-template-columns: 1fr; }
}
.th-fallback {
  padding: 24px;
  border-radius: var(--th-radius);
  border: 1px solid var(--th-line);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.th-fallback-title { margin: 0; font-size: 1.15rem; font-weight: 800; color: #fff; }
.th-fallback-desc { margin: 0; color: var(--th-muted); line-height: 1.75; font-size: 0.95rem; }

.th-section--trust {
  background: radial-gradient(80% 80% at 50% 100%, #1d1845 0%, #08091a 70%);
  padding-bottom: 110px;
}

@media (prefers-reduced-motion: reduce) {
  .th-aurora,
  .th-particles span,
  .th-pulse-dot,
  .th-hero-live-dot,
  .th-viz-tag svg,
  .th-heart-path,
  .th-heart-pulse,
  .th-ring,
  .th-ring-link,
  .th-lock-a,
  .th-lock-b,
  .th-btn--gold {
    animation: none !important;
  }
  .th-reveal { opacity: 1; transform: none; transition: none; }
  .th-heart-path { stroke-dashoffset: 0; }
  .th-ring-link { stroke-dashoffset: 0; opacity: 1; }
  .th-lock-a { transform: translateX(7px) rotate(25deg); }
  .th-lock-b { transform: translateX(-7px) rotate(-25deg); }
}
