/* Iron Elite — final CTA: two-column cinematic composition */

.home-flow--compact > .cta--cinematic.cta--final {
  padding: 0 !important;
  margin: 0;
  max-width: none;
  overflow: hidden;
  border: none;
}

.home-flow--compact > .cta--cinematic.cta--final::before,
.home-flow--compact > .cta--cinematic.cta--final::after {
  display: none !important;
}

.cta--cinematic {
  --cta-space-1: 16px;
  --cta-space-2: 24px;
  --cta-space-3: 40px;
  --cta-space-4: 64px;
  --cta-space-5: 96px;
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-height: clamp(520px, 62vh, 72vh);
  text-align: left;
  isolation: isolate;
}

.cta--cinematic .cta-bg {
  display: none;
}

/* ── Atmospheric backdrop (section-wide) ── */
.cta-cinema {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 18% 40%, rgba(255, 132, 0, 0.06), transparent 55%),
    radial-gradient(ellipse 55% 50% at 85% 50%, rgba(0, 109, 255, 0.08), transparent 60%),
    linear-gradient(180deg, #050506 0%, #030304 48%, #020203 100%);
}

.cta-cinema__media {
  display: none;
}

.cta-cinema__silhouette {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(3, 4, 8, 0.88) 0%, rgba(3, 4, 8, 0.35) 42%, rgba(3, 4, 8, 0.55) 100%),
    linear-gradient(180deg, rgba(2, 2, 3, 0.5) 0%, transparent 28%, rgba(2, 2, 3, 0.65) 100%);
  pointer-events: none;
}

.cta-cinema__shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.cta-cinema__grid {
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: 0.1;
  background-image:
    linear-gradient(rgba(61, 96, 136, 0.32) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 96, 136, 0.32) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent);
  pointer-events: none;
}

.cta-cinema__scan {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.28;
}

.cta-cinema__scan::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 24%;
  top: -24%;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(61, 120, 200, 0.05) 45%,
    rgba(100, 160, 220, 0.1) 50%,
    rgba(61, 120, 200, 0.05) 55%,
    transparent
  );
  animation: ctaScan 10s ease-in-out infinite;
}

.cta-cinema__glow {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 40% at 12% 55%, rgba(255, 132, 0, 0.1), transparent 58%),
    radial-gradient(ellipse 45% 55% at 78% 45%, rgba(0, 109, 255, 0.12), transparent 62%);
  animation: ctaGlowPulse 7s ease-in-out infinite;
}

.cta-cinema__vignette {
  position: absolute;
  inset: 0;
  z-index: 6;
  box-shadow:
    inset 0 48px 80px rgba(0, 0, 0, 0.45),
    inset 0 -48px 80px rgba(0, 0, 0, 0.5),
    inset 48px 0 64px rgba(0, 0, 0, 0.35),
    inset -48px 0 64px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.cta-cinema__lines {
  position: absolute;
  inset: clamp(var(--cta-space-3), 5vw, var(--cta-space-4));
  z-index: 7;
  pointer-events: none;
}

.cta-cinema__line {
  position: absolute;
  overflow: hidden;
}

.cta-cinema__line--top,
.cta-cinema__line--bottom {
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(61, 96, 136, 0.22) 18%,
    rgba(61, 96, 136, 0.45) 50%,
    rgba(61, 96, 136, 0.22) 82%,
    transparent 100%
  );
}

.cta-cinema__line--top {
  top: 0;
}

.cta-cinema__line--bottom {
  bottom: 0;
}

.cta-cinema__line--left,
.cta-cinema__line--right {
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(61, 96, 136, 0.35) 50%,
    transparent 100%
  );
}

.cta-cinema__line--left {
  left: 0;
}

.cta-cinema__line--right {
  right: 0;
}

.cta-cinema__line--top::after,
.cta-cinema__line--bottom::after {
  content: "";
  position: absolute;
  top: 0;
  width: 18%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(100, 160, 220, 0.45),
    rgba(180, 210, 240, 0.7),
    rgba(100, 160, 220, 0.45),
    transparent
  );
  box-shadow: 0 0 10px rgba(0, 109, 255, 0.3);
}

.cta-cinema__line--top::after {
  left: 100%;
  animation: ctaLineRTL 14s linear infinite;
}

.cta-cinema__line--bottom::after {
  left: -18%;
  animation: ctaLineLTR 16s linear infinite;
}

.cta-cinema__corners {
  position: absolute;
  inset: clamp(var(--cta-space-2), 3.5vw, var(--cta-space-3));
  z-index: 8;
  pointer-events: none;
}

.cta-cinema__corners span {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: rgba(61, 96, 136, 0.5);
  border-style: solid;
  opacity: 0.75;
}

.cta-cinema__corners span:nth-child(1) {
  top: 0;
  left: 0;
  border-width: 1px 0 0 1px;
}

.cta-cinema__corners span:nth-child(2) {
  top: 0;
  right: 0;
  border-width: 1px 1px 0 0;
}

.cta-cinema__corners span:nth-child(3) {
  bottom: 0;
  left: 0;
  border-width: 0 0 1px 1px;
}

.cta-cinema__corners span:nth-child(4) {
  bottom: 0;
  right: 0;
  border-width: 0 1px 1px 0;
}

@keyframes ctaGlowPulse {
  0%,
  100% {
    opacity: 0.8;
  }
  50% {
    opacity: 1;
  }
}

@keyframes ctaScan {
  0% {
    top: -24%;
  }
  100% {
    top: 100%;
  }
}

@keyframes ctaLineRTL {
  0% {
    transform: translateX(0);
    opacity: 0;
  }
  8% {
    opacity: 0.85;
  }
  92% {
    opacity: 0.6;
  }
  100% {
    transform: translateX(calc(-100vw - 18%));
    opacity: 0;
  }
}

@keyframes ctaLineLTR {
  0% {
    transform: translateX(0);
    opacity: 0;
  }
  8% {
    opacity: 0.8;
  }
  92% {
    opacity: 0.55;
  }
  100% {
    transform: translateX(calc(100vw + 18%));
    opacity: 0;
  }
}

/* ── Content stage ── */
.cta-stage {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding:
    clamp(var(--cta-space-4), 9vh, var(--cta-space-5))
    clamp(24px, 5vw, 80px);
  display: flex;
  flex-direction: column;
  gap: var(--cta-space-2);
  min-height: inherit;
  justify-content: center;
}

.cta--cinematic .tac-coord--cta {
  margin: 0;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(100, 150, 200, 0.6);
}

.cta-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 40%);
  gap: clamp(var(--cta-space-3), 5vw, var(--cta-space-4));
  align-items: center;
  width: 100%;
}

/* ── Left: copy anchor ── */
.cta-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  max-width: 56ch;
  padding-right: clamp(0px, 2vw, var(--cta-space-2));
}

.cta-tac-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 var(--cta-space-2);
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(0.68rem, 1.2vw, 0.76rem);
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 176, 88, 0.9);
}

.cta-tac-label__line {
  display: block;
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 140, 0, 0.85), transparent);
  box-shadow: 0 0 8px rgba(255, 132, 0, 0.35);
}

.cta--cinematic .cta-title {
  margin: 0 0 var(--cta-space-2);
  max-width: 14ch;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 900;
  font-style: italic;
  font-size: clamp(2.15rem, 4.8vw, 3.5rem);
  line-height: 0.96;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.98);
  text-shadow:
    0 4px 40px rgba(0, 0, 0, 0.55),
    0 0 32px rgba(0, 109, 255, 0.1);
}

.cta--cinematic .cta__tac-rule {
  display: block;
  width: min(180px, 38%);
  height: 2px;
  margin: 0 0 var(--cta-space-3);
  background: rgba(61, 96, 136, 0.28);
  position: relative;
  overflow: hidden;
}

.cta--cinematic .cta__tac-rule::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 109, 255, 0.6),
    rgba(255, 140, 0, 0.5),
    transparent
  );
  animation: ctaRuleSweep 4.8s ease-in-out infinite;
}

@keyframes ctaRuleSweep {
  0%,
  100% {
    transform: translateX(-120%);
    opacity: 0.35;
  }
  50% {
    transform: translateX(120%);
    opacity: 1;
  }
}

.cta--cinematic .cta-desc {
  margin: 0 0 var(--cta-space-3);
  max-width: 48ch;
  font-size: clamp(0.98rem, 1.65vw, 1.1rem);
  line-height: 1.65;
  color: rgba(242, 242, 242, 0.66);
  letter-spacing: 0.015em;
}

.cta--cinematic .cta-acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: var(--cta-space-1);
  margin-top: var(--cta-space-1);
}

.cta--cinematic .cta-acts .btn {
  min-width: 188px;
  justify-content: center;
}

.cta--cinematic .cta-acts .btn--elevate:hover {
  transform: translateY(-2px);
}

.cta--cinematic .cta-acts .btn--elevate.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 12px 40px rgba(255, 132, 0, 0.4),
    0 0 24px rgba(0, 109, 255, 0.1);
}

.cta--cinematic .cta-acts .btn span:first-child {
  letter-spacing: 0.16em;
}

.cta--cinematic .cta-acts .btn--primary {
  animation: ctaBtnGlow 5.5s ease-in-out infinite;
}

.cta--cinematic .cta-acts .btn--ghost {
  border-color: rgba(61, 96, 136, 0.48);
  background: rgba(8, 10, 14, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

@keyframes ctaBtnGlow {
  0%,
  100% {
    box-shadow:
      0 8px 32px rgba(255, 132, 0, 0.3),
      inset 0 1px 0 rgba(255, 220, 160, 0.25);
  }
  50% {
    box-shadow:
      0 12px 40px rgba(255, 132, 0, 0.42),
      0 0 28px rgba(0, 109, 255, 0.1),
      inset 0 1px 0 rgba(255, 220, 160, 0.35);
  }
}

/* ── Right: visual + stat cards ── */
.cta-panel {
  display: flex;
  flex-direction: column;
  gap: clamp(var(--cta-space-2), 3vw, 28px);
  width: 100%;
  min-width: 0;
}

.cta-visual {
  position: relative;
  width: 100%;
  min-height: clamp(220px, 28vh, 320px);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(61, 96, 136, 0.32);
  box-shadow:
    0 20px 56px rgba(0, 0, 0, 0.5),
    0 0 36px rgba(0, 109, 255, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.cta-visual__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  filter: grayscale(1) brightness(0.32) contrast(1.2);
  transform: scale(1.04);
  animation: ctaVisualDrift 26s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
  will-change: transform;
}

@keyframes ctaVisualDrift {
  0% {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  100% {
    transform: scale(1.09) translate3d(-1%, -1.5%, 0);
  }
}

.cta-visual__fade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(3, 4, 8, 0.92) 0%, rgba(3, 4, 8, 0.25) 38%, transparent 62%),
    linear-gradient(180deg, rgba(3, 4, 8, 0.35) 0%, transparent 35%, rgba(3, 4, 8, 0.75) 100%);
  pointer-events: none;
}

.cta-visual__vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  box-shadow: inset 0 0 48px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.cta-visual__grid {
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(61, 96, 136, 0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 96, 136, 0.4) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, transparent, #000 20%, #000 80%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 20%, #000 80%, transparent);
  pointer-events: none;
}

.cta-stats {
  display: flex;
  flex-direction: column;
  gap: clamp(var(--cta-space-2), 2.5vw, 28px);
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cta-stat {
  margin: 0;
  padding: 20px 22px 20px 56px;
  min-height: 88px;
}

.cta-stat .command-stat__num {
  left: 18px;
  font-size: 1.35rem;
}

.cta-stat .command-stat__name {
  font-size: clamp(0.82rem, 1.2vw, 0.95rem);
}

.cta-stat__meta {
  display: block;
  margin: 6px 0 0;
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.06em;
  color: rgba(242, 242, 242, 0.48);
  text-transform: none;
  font-family: "Barlow", sans-serif;
  font-weight: 400;
}

/* Reveal choreography */
@media (prefers-reduced-motion: no-preference) {
  .cta--cinematic.reveal.is-in .cta-copy > * {
    animation: ctaContentIn 0.88s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .cta--cinematic.reveal.is-in .cta-copy > *:nth-child(1) { animation-delay: 0.06s; }
  .cta--cinematic.reveal.is-in .cta-copy > *:nth-child(2) { animation-delay: 0.12s; }
  .cta--cinematic.reveal.is-in .cta-copy > *:nth-child(3) { animation-delay: 0.18s; }
  .cta--cinematic.reveal.is-in .cta-copy > *:nth-child(4) { animation-delay: 0.24s; }
  .cta--cinematic.reveal.is-in .cta-copy > *:nth-child(5) { animation-delay: 0.32s; }
  .cta--cinematic.reveal.is-in .cta-copy > *:nth-child(6) { animation-delay: 0.4s; }

  .cta--cinematic.reveal.is-in .cta-panel {
    animation: ctaContentIn 0.92s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
  }
}

@keyframes ctaContentIn {
  from {
    opacity: 0;
    transform: translate3d(0, 16px, 0);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
}

/* ── Tablet ── */
@media (max-width: 1024px) {
  .cta-layout {
    grid-template-columns: 1fr;
    gap: var(--cta-space-4);
  }

  .cta-copy {
    max-width: none;
    padding-right: 0;
    text-align: center;
    align-items: center;
  }

  .cta--cinematic .cta-title {
    max-width: 20ch;
  }

  .cta--cinematic .cta__tac-rule {
    margin-left: auto;
    margin-right: auto;
  }

  .cta--cinematic .cta-desc {
    text-align: center;
  }

  .cta--cinematic .cta-acts {
    justify-content: center;
  }

  .cta-panel {
    max-width: min(520px, 100%);
    margin: 0 auto;
  }

  .cta-visual {
    min-height: clamp(200px, 32vh, 280px);
  }
}

/* ── Mobile ── */
@media (max-width: 640px) {
  .cta--cinematic {
    min-height: clamp(560px, 70vh, 780px);
  }

  .cta-stage {
    padding:
      clamp(var(--cta-space-4), 10vh, var(--cta-space-5))
      clamp(24px, 6vw, 32px);
    gap: var(--cta-space-3);
  }

  .cta-cinema__lines {
    inset: var(--cta-space-3);
  }

  .cta-cinema__line--left,
  .cta-cinema__line--right {
    display: none;
  }

  .cta--cinematic .cta-title {
    font-size: clamp(1.85rem, 8vw, 2.4rem);
    max-width: none;
  }

  .cta-visual {
    min-height: 200px;
  }

  .cta-stats {
    gap: var(--cta-space-2);
  }

  .cta--cinematic .cta-acts {
    flex-direction: column;
    width: 100%;
    gap: var(--cta-space-1);
  }

  .cta--cinematic .cta-acts .btn {
    width: 100%;
    max-width: 300px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cta-cinema__glow,
  .cta-cinema__scan::before,
  .cta-cinema__line--top::after,
  .cta-cinema__line--bottom::after,
  .cta--cinematic .cta__tac-rule::after,
  .cta--cinematic .cta-acts .btn--primary,
  .cta-visual__img {
    animation: none !important;
  }

  .cta-visual__img {
    transform: scale(1.05);
  }
}
