/**
 * Homepage finale: CEI constellation + origin sequence (system-aligned motion).
 */

/* ——— CEI section ——— */
.home-cei {
  position: relative;
  overflow: hidden;
  padding: 36px 40px 32px;
  border: 1px solid transparent;
  border-top-color: rgba(244, 237, 224, 0.06);
  border-radius: 2px;
}

.home-cei::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: min(88px, 14vw);
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(
    180deg,
    rgba(3, 3, 3, 0) 0%,
    rgba(26, 36, 58, 0.08) 55%,
    rgba(38, 24, 22, 0.07) 100%
  );
}

.home-cei__ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

.home-cei__ambient span {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(244, 237, 224, 0.12);
  animation: shFinaleParticle 22s ease-in-out infinite;
}

.home-cei__ambient span:nth-child(1) {
  left: 18%;
  top: 22%;
  animation-delay: 0s;
}
.home-cei__ambient span:nth-child(2) {
  left: 72%;
  top: 18%;
  animation-delay: -5s;
}
.home-cei__ambient span:nth-child(3) {
  left: 44%;
  top: 62%;
  animation-delay: -9s;
}
.home-cei__ambient span:nth-child(4) {
  left: 88%;
  top: 48%;
  animation-delay: -3s;
}

@keyframes shFinaleParticle {
  0%,
  100% {
    opacity: 0.25;
    transform: translate(0, 0);
  }
  50% {
    opacity: 0.55;
    transform: translate(4px, -6px);
  }
}

.home-cei__layout {
  position: relative;
  z-index: 1;
  max-width: 32rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.home-cei__line--reveal {
  font-family: var(--font-serif, 'Playfair Display', Georgia, serif);
  font-size: clamp(13px, 1.15vw, 15px);
  font-weight: 300;
  color: var(--text-3);
  line-height: 1.55;
  margin: 0;
  opacity: 0;
  transform: translateY(12px);
  visibility: hidden;
}

.home-cei__line--reveal.is-visible {
  visibility: visible;
}

.home-cei__viz-wrap {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 28px auto 24px;
  aspect-ratio: 1;
  max-height: min(400px, 72vw);
}

.home-cei.home-os-discover--emphasize {
  border-color: rgba(58, 107, 255, 0.22);
  box-shadow: 0 0 0 1px rgba(43, 79, 212, 0.15);
}

.home-cei.home-os-discover--emphasize .home-cei__lead {
  color: var(--text-2);
}

.cei-constellation {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  isolation: isolate;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(59, 13, 13, 0.22) 0%,
    rgba(3, 3, 3, 0.15) 45%,
    transparent 70%
  );
}

.cei-system-canvas {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: auto;
  touch-action: pan-y;
}

.cei-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: min(78%, 220px);
  pointer-events: none;
  z-index: 4;
}

.cei-center__text {
  display: block;
  font-family: var(--font-serif, 'Playfair Display', Georgia, serif);
  font-size: clamp(12px, 2.8vw, 15px);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.04em;
  color: rgba(198, 161, 91, 0.88);
  text-shadow:
    0 0 32px rgba(3, 3, 3, 0.85),
    0 0 48px rgba(59, 13, 13, 0.55),
    0 0 22px rgba(198, 161, 91, 0.12);
}

.home-cei__lead {
  font-family: var(--font-serif, 'Playfair Display', Georgia, serif);
  font-size: clamp(13px, 1.15vw, 15px);
  font-weight: 300;
  color: var(--text-3);
  margin: 8px 0 0;
  opacity: 0;
  transform: translateY(10px);
  visibility: hidden;
}

.home-cei__cta-wrap {
  margin-top: 14px;
  opacity: 0;
  transform: translateY(8px);
  visibility: hidden;
}

.home-cei__cta {
  font-family: 'DM Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-4);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  display: inline-block;
  padding: 6px 4px;
  transition: color 0.3s ease, transform 0.35s ease, border-color 0.3s ease, filter 0.35s ease,
    box-shadow 0.35s ease;
  box-shadow: 0 0 0 rgba(58, 107, 255, 0);
}

.home-cei__cta.is-revealed:hover {
  color: var(--text-2);
  transform: translateY(-2px);
  border-bottom-color: rgba(244, 237, 224, 0.28);
  filter: brightness(1.08);
  box-shadow: 0 0 24px rgba(58, 107, 255, 0.12);
}

.home-cei__example {
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  font-weight: 300;
  line-height: 1.55;
  color: rgba(122, 114, 104, 0.85);
  margin: 18px 0 0;
  max-width: 38ch;
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  visibility: hidden;
}

@media (max-width: 640px) {
  .home-cei {
    padding: 28px 20px 28px;
  }
  .home-cei__viz-wrap {
    margin: 22px auto 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-cei__ambient span {
    animation: none !important;
  }
}

/* ——— Origin finale ——— */
.home-origin--finale {
  position: relative;
  margin-top: 48px;
  margin-bottom: 0;
  padding: 52px 40px 48px;
  background:
    radial-gradient(ellipse 85% 70% at 50% 42%, rgba(59, 13, 13, 0.22) 0%, transparent 62%),
    radial-gradient(ellipse 60% 45% at 18% 88%, rgba(198, 161, 91, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse 70% 55% at 80% 20%, rgba(32, 44, 88, 0.08) 0%, transparent 58%),
    linear-gradient(
      180deg,
      rgba(3, 3, 3, 0) 0%,
      rgba(59, 13, 13, 0.14) 38%,
      rgba(43, 79, 212, 0.05) 100%
    );
}

.home-origin--finale::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: min(140px, 22vw);
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(
    180deg,
    rgba(28, 36, 58, 0.16) 0%,
    rgba(48, 26, 24, 0.1) 42%,
    rgba(3, 3, 3, 0) 100%
  );
}

.home-origin--finale::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    ellipse 95% 75% at 50% 45%,
    transparent 42%,
    rgba(0, 0, 0, 0.26) 100%
  );
  opacity: 0.55;
}

.home-origin__shell {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 28px;
  align-items: stretch;
  max-width: 800px;
  margin: 0 auto;
  padding: 8px 0 4px;
  background: linear-gradient(
    90deg,
    rgba(244, 237, 224, 0.02) 0%,
    rgba(43, 79, 212, 0.03) 48%,
    rgba(59, 22, 18, 0.04) 100%
  );
  background-size: 100% 100%;
  border-radius: 2px;
}

.home-origin__rail {
  position: relative;
  width: 1px;
  flex-shrink: 0;
  align-self: stretch;
  min-height: 120px;
  background: linear-gradient(
    180deg,
    rgba(198, 161, 91, 0.08) 0%,
    rgba(198, 161, 91, 0.2) 45%,
    rgba(198, 161, 91, 0.1) 100%
  );
  box-shadow: 0 0 20px rgba(198, 161, 91, 0.08);
}

.home-origin__rail-fill {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, rgba(198, 161, 91, 0.62) 0%, rgba(198, 161, 91, 0.28) 100%);
  box-shadow: 0 0 14px rgba(198, 161, 91, 0.22);
}

.home-origin__content {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.home-origin--finale .home-origin__inner {
  width: 100%;
  max-width: 640px;
}

.home-origin__group {
  margin: 0 0 1.35em;
  opacity: 0;
  transform: translateY(14px);
  visibility: hidden;
}

.home-origin__group:last-child {
  margin-bottom: 0;
}

.home-origin__group--closing {
  margin-top: 0.15em;
  padding-top: 1.1em;
  border-top: 1px solid rgba(198, 161, 91, 0.1);
}

.home-origin__line {
  font-family: 'Lato', sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.68;
  color: rgba(228, 220, 208, 0.94);
  margin: 0 0 0.85em;
  opacity: 1;
  transform: none;
  visibility: visible;
  transition: color 0.5s ease, opacity 0.5s ease;
}

.home-origin__group--closing .home-origin__line:last-child {
  margin-bottom: 0;
}

.home-origin__line--gold {
  color: rgba(212, 182, 130, 0.96);
  font-weight: 400;
}

.home-origin__line--resolve {
  font-size: calc(15px * 1.06);
  font-weight: 500;
  line-height: 1.62;
  color: rgba(236, 228, 214, 0.97);
  text-shadow: 0 0 28px rgba(198, 161, 91, 0.06);
}

.home-origin__line.is-dimmed {
  opacity: 0.48 !important;
  color: rgba(165, 156, 142, 0.72);
}

.home-origin__line.is-dimmed.home-origin__line--gold {
  color: rgba(175, 148, 102, 0.62);
}

.home-origin--finale.is-origin-quiet .home-origin__group:not(.home-origin__group--closing) .home-origin__line {
  opacity: 0.52;
}

.home-origin--finale.is-origin-quiet .home-origin__group:not(.home-origin__group--closing) .home-origin__line--gold {
  opacity: 0.62;
  color: rgba(188, 160, 112, 0.78);
}

.home-origin__ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

.home-origin__ambient span {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(244, 237, 224, 0.12);
  animation: shFinaleParticle 22s ease-in-out infinite;
}

.home-origin__ambient span:nth-child(1) {
  left: 8%;
  top: 30%;
}
.home-origin__ambient span:nth-child(2) {
  left: 92%;
  top: 55%;
  animation-delay: -7s;
}
.home-origin__ambient span:nth-child(3) {
  left: 40%;
  top: 12%;
  animation-delay: -12s;
}
.home-origin__ambient span:nth-child(4) {
  left: 62%;
  top: 78%;
  animation-delay: -4s;
}
.home-origin__ambient span:nth-child(5) {
  left: 22%;
  top: 62%;
  animation-delay: -9s;
}
.home-origin__ambient span:nth-child(6) {
  left: 78%;
  top: 24%;
  animation-delay: -14s;
}

.home-origin__ambient span:nth-child(7) {
  left: 52%;
  top: 44%;
  animation-delay: -18s;
}

.home-origin__ambient span:nth-child(8) {
  left: 14%;
  top: 48%;
  animation-delay: -6s;
}

.home-origin__pause {
  position: relative;
  z-index: 2;
  text-align: center;
  font-family: 'DM Mono', monospace;
  font-size: 7px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(110, 104, 94, 0.45);
  margin: 28px auto 0;
  max-width: 36ch;
  opacity: 0;
  pointer-events: none;
}

.home-origin__pause.is-visible {
  animation: shPauseHint 4s ease-in-out forwards;
}

@keyframes shPauseHint {
  0% {
    opacity: 0;
  }
  20% {
    opacity: 0.65;
  }
  80% {
    opacity: 0.65;
  }
  100% {
    opacity: 0;
  }
}

@media (max-width: 640px) {
  .home-origin--finale {
    padding: 44px 20px 40px;
    margin-top: 44px;
  }
  .home-origin__shell {
    gap: 18px;
  }
  .home-origin__group {
    margin-bottom: 1.25em;
  }
  .home-origin__group--closing {
    padding-top: 1em;
  }
  .home-origin__line--resolve {
    font-size: clamp(15px, 4.1vw, 16px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-origin__group {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
  }
  .home-origin__line {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
  }
  .home-origin__rail-fill {
    height: 100% !important;
  }
  .home-origin__pause {
    display: none;
  }
  .home-foot-note--finale {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ——— View Results CTA (homepage) ——— */
.sh-home-results-cta {
  position: relative;
  transition: transform 0.3s ease, filter 0.3s ease, box-shadow 0.35s ease !important;
}

.sh-home-results-cta:hover {
  transform: scale(1.02);
  filter: brightness(1.06);
  box-shadow: 0 0 28px rgba(58, 107, 255, 0.22);
}

.sh-home-results-cta::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(244, 237, 224, 0.35), transparent);
  transform: scaleX(0);
  transition: transform 0.35s ease;
}

.sh-home-results-cta:hover::after {
  transform: scaleX(1);
}

/* ——— CEI → origin bridge + finale foot note ——— */
.home-end-bridge {
  padding-top: 8px;
  padding-bottom: 20px;
}

.home-end-bridge__fade {
  background: linear-gradient(
    180deg,
    rgba(3, 3, 3, 0) 0%,
    rgba(24, 34, 58, 0.12) 22%,
    rgba(44, 26, 24, 0.11) 52%,
    rgba(2, 2, 2, 0.8) 100%
  );
}

.home-foot-note--finale {
  opacity: 0;
}

/* Homepage footer: prevent link / label overlap when the row wraps */
footer.home-footer .foot-row {
  align-items: flex-start;
}

footer.home-footer .foot-links {
  flex: 1 1 280px;
  min-width: 0;
  row-gap: 6px;
  column-gap: 9px;
}

footer.home-footer .foot-links > li {
  min-width: 0;
}

footer.home-footer .foot-links a {
  white-space: normal;
  line-height: 1.45;
  display: inline-block;
  max-width: 100%;
}

@media (max-width: 720px) {
  footer.home-footer .foot-row {
    flex-direction: column;
    gap: 7px;
  }

  footer.home-footer .foot-links {
    flex-direction: column;
    width: 100%;
    gap: 6px;
  }

  footer.home-footer .foot-links__stack {
    max-width: 100%;
  }
}

/* Cost of inaction + FAQ (homepage) */
.home-cost {
  padding: 56px 0 24px;
}
.home-cost .home-section-title {
  margin-bottom: 16px;
}
.home-cost__lede {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  color: var(--text-muted, rgba(160, 160, 192, 0.88));
  line-height: 1.65;
  font-size: 15px;
}

.home-faq {
  padding: 48px 0 80px;
}

/* Archetypes — outcome line + mobile teaser row */
.home-archetypes__outcome {
  text-align: center;
  max-width: 520px;
  margin: 28px auto 0;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(244, 244, 252, 0.9);
}
.home-archetypes__outcome strong {
  color: rgba(250, 248, 255, 0.98);
}
/* Archetype card count (3 default / 7 expanded) is controlled on the homepage
   via .home-archetypes-grid--preview in index.html — do not hide cards here. */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}
.faq-item {
  padding: 0;
  border-bottom: 1px solid var(--sh-border, rgba(255, 255, 255, 0.12));
}
.home-faq__details {
  border: 0;
  padding: 0;
}
.home-faq__summary {
  font-weight: 600;
  margin: 0;
  padding: 20px 0 18px;
  cursor: pointer;
  list-style: none;
  color: var(--text-primary, #f4ede0);
}
.home-faq__summary::-webkit-details-marker {
  display: none;
}
.home-faq__body {
  margin: 0;
  padding: 0 0 20px;
  color: var(--sh-muted, rgba(255, 255, 255, 0.72));
  line-height: 1.5;
  font-size: 15px;
}

body[data-sh-env="home"] .section-how .step-panel__cta {
  margin-top: 14px;
}
body[data-sh-env="home"] .section-how .step-panel__cta .btn {
  font-size: 10px;
  letter-spacing: 0.12em;
}
