/* Revenue Opportunity Calculator */

.roc {
  background:
    radial-gradient(ellipse 46% 42% at 8% 18%, rgba(214, 196, 255, 0.45), transparent 70%),
    radial-gradient(ellipse 38% 36% at 92% 78%, rgba(206, 188, 255, 0.38), transparent 68%),
    linear-gradient(180deg, #f6f3fc 0%, #f3effa 100%);
}

.roc__card {
  padding: 22px 16px 16px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 30px 70px rgba(92, 64, 150, 0.08);
}

.roc__grid {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.roc__main,
.roc__calc,
.roc__result {
  min-width: 0;
}

.roc h2 {
  max-width: none;
  margin: 0;
  color: #16141c;
  font-size: clamp(2.05rem, 8vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.roc__accent {
  display: block;
  color: #6b46f5;
  -webkit-text-fill-color: #6b46f5;
}

.roc__support {
  max-width: 22em;
  margin: 14px 0 0;
  color: #8a8496;
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.45;
}

.roc__calc {
  display: grid;
  margin-top: 22px;
  padding: 2px 14px;
  border: 1px solid #ece7f5;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(80, 50, 140, 0.03);
}

.roc__q {
  min-width: 0;
  padding: 14px 0;
}

.roc__q + .roc__q {
  border-top: 1px solid #f0ecf6;
}

.roc__q-head {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.roc__q-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #f4f0ff;
  color: #8b6cf6;
}

.roc__q-icon svg {
  width: 18px;
  height: 18px;
}

.roc__q-label {
  margin: 0;
  color: #1c1824;
  font-family: var(--font-display, "Plus Jakarta Sans", system-ui, sans-serif);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.roc__note {
  margin: 8px 0 0;
  color: #7a7388;
  font-size: 0.86rem;
  line-height: 1.4;
}

.roc__input {
  width: 6.75rem;
  min-height: 46px;
  padding: 8px 14px;
  border: 1px solid #e6e1f0;
  border-radius: 14px;
  background: #fff;
  color: #1c1824;
  font-family: var(--font-display, "Plus Jakarta Sans", system-ui, sans-serif);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-align: right;
}

.roc__q--choice {
  display: grid;
  gap: 12px;
}

.roc__segments {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.roc__seg {
  position: relative;
  display: grid;
  min-height: 44px;
  place-items: center;
  border: 1px solid #e6e1f0;
  border-radius: 12px;
  background: #fff;
  color: #1c1824;
  font-family: var(--font-display, "Plus Jakarta Sans", system-ui, sans-serif);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.roc__seg input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.roc__seg:has(input:checked) {
  border-color: #6b46f5;
  background: #6b46f5;
  color: #fff;
}

.roc__seg:has(input:focus-visible) {
  box-shadow: var(--focus);
}

.roc__seg.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.roc__result {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  min-height: 0;
  overflow: hidden;
  padding: 22px 20px 16px;
  border: 0;
  border-radius: 12px;
  background:
    radial-gradient(70% 48% at 100% 0%, rgba(150, 90, 255, 0.42), transparent 62%),
    linear-gradient(160deg, #24143f 0%, #160d2c 55%, #10091f 100%);
  color: #fff;
  box-shadow: 0 18px 36px rgba(24, 10, 48, 0.16);
}

.roc__result::before,
.roc__result::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.roc__result::before {
  top: -28%;
  right: -18%;
  width: 68%;
  height: 62%;
  background: radial-gradient(circle, rgba(156, 100, 255, 0.38), transparent 68%);
}

.roc__result::after {
  right: -18%;
  bottom: -36%;
  width: 78%;
  height: 58%;
  background: radial-gradient(ellipse at 60% 40%, rgba(186, 150, 255, 0.2), transparent 62%);
}

.roc__wave {
  position: absolute;
  right: -6%;
  bottom: -6%;
  z-index: 0;
  width: 68%;
  height: auto;
  pointer-events: none;
}

.roc__result-main,
.roc__disclaimer {
  position: relative;
  z-index: 1;
}

.roc__result-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--font-display, "Plus Jakarta Sans", system-ui, sans-serif);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  line-height: 1.35;
  text-transform: uppercase;
}

.roc__result-mark {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(132, 96, 255, 0.46);
  color: #fff;
}

.roc__result-mark svg,
.roc__facts svg {
  width: 18px;
  height: 18px;
}

.roc__figure,
.roc__line,
.roc__lift {
  transition: opacity 160ms var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
}

.roc__figure {
  margin: 18px 0 0;
  color: #fff;
  font-family: var(--font-display, "Plus Jakarta Sans", system-ui, sans-serif);
  font-size: clamp(2.7rem, 8vw, 3.65rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.roc__facts {
  display: grid;
  gap: 12px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.roc__facts li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.98rem;
  line-height: 1.35;
}

.roc__disclaimer {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.82rem;
  line-height: 1.4;
}

.roc__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 58px;
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, #7b5cff 0%, #7a49f6 52%, #8d4dff 100%);
  color: #fff;
  font-family: var(--font-display, "Plus Jakarta Sans", system-ui, sans-serif);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(109, 64, 229, 0.22);
}

.roc__cta:hover {
  background: linear-gradient(90deg, #7d5cf6 0%, #6236ee 58%, #6e38f5 100%);
}

@media (min-width: 768px) {
  .roc__card {
    padding: 28px 22px 20px;
  }

  .roc__q--choice {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 12px;
  }

  .roc__q--choice .roc__q-head {
    min-width: 0;
  }

  .roc__q--choice .roc__q-label {
    max-width: 9.5em;
  }

  .roc__q--choice .roc__segments {
    width: auto;
    grid-template-columns: repeat(5, 44px);
    gap: 8px;
  }

  .roc__q--choice .roc__seg {
    width: 44px;
    min-height: 44px;
  }

  .roc__q--choice .roc__note {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1024px) {
  .roc__card {
    width: min(100%, 980px);
    margin-inline: auto;
    padding: 34px 28px 22px;
    border-radius: 16px;
  }

  .roc h2 {
    font-size: 3.2rem;
  }

  .roc__grid {
    grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
    gap: 22px;
    align-items: stretch;
  }

  .roc__calc {
    margin-top: 26px;
  }

  .roc__result {
    height: 100%;
    padding: 26px 24px 18px;
    border-radius: 12px;
  }

  .roc__figure {
    font-size: 4.15rem;
  }

  .roc__disclaimer {
    margin-top: auto;
    padding-top: 18px;
  }
}

[data-theme="dark"] .roc {
  background:
    radial-gradient(ellipse 52% 60% at 0% 0%, rgba(109, 70, 180, 0.28), transparent 62%),
    radial-gradient(ellipse 40% 48% at 100% 100%, rgba(150, 80, 170, 0.16), transparent 64%),
    #1a1424;
}

[data-theme="dark"] .roc__card {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(28, 22, 40, 0.72);
}

[data-theme="dark"] .roc h2 {
  color: #f4efff;
}

[data-theme="dark"] .roc__support,
[data-theme="dark"] .roc__note {
  color: #c5bdd4;
}

[data-theme="dark"] .roc__calc,
[data-theme="dark"] .roc__input,
[data-theme="dark"] .roc__seg {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(18, 14, 28, 0.72);
  color: #f4efff;
}

[data-theme="dark"] .roc__q-label {
  color: #f4efff;
}

[data-theme="dark"] .roc__q + .roc__q {
  border-top-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .roc__q-icon {
  background: rgba(122, 77, 255, 0.16);
  color: #d2c6ff;
}

[data-theme="dark"] .roc__seg:has(input:checked) {
  border-color: #8b5cf6;
  background: #7a4dff;
  color: #fff;
}

.roc-popup {
  position: fixed;
  inset: 0;
  z-index: 75;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.roc-popup[hidden] {
  display: none !important;
}

html.roc-popup-open,
html.roc-popup-open body {
  overflow: hidden;
}

.roc-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 8, 28, 0.72);
}

.roc-popup__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 1040px);
  max-height: min(92dvh, 920px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  background:
    radial-gradient(ellipse 46% 42% at 8% 18%, rgba(214, 196, 255, 0.45), transparent 70%),
    #f6f3fc;
  box-shadow: 0 30px 70px rgba(28, 12, 48, 0.28);
  overflow: hidden;
}

.roc-popup__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #241b33;
  cursor: pointer;
}

.roc-popup__close svg {
  width: 18px;
  height: 18px;
}

.roc-popup__close:focus-visible {
  outline: 2px solid #3b1d8f;
  outline-offset: 3px;
}

.roc-popup__body {
  overflow: auto;
  padding: 52px 16px 16px;
}

.roc.is-popped {
  margin: 0;
  padding: 0;
  background: transparent;
}

.roc.is-popped .shell {
  width: 100%;
  max-width: none;
  padding: 0;
}

.roc.is-popped .roc__card {
  width: 100%;
  margin: 0;
}

html.js .roc-popup .scene-intro > * {
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .roc-popup.is-open .roc-popup__panel {
    animation: roc-popup-in 280ms cubic-bezier(0.22, 1, 0.36, 1);
  }
}

@keyframes roc-popup-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

[data-theme="dark"] .roc-popup__panel {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(ellipse 52% 60% at 0% 0%, rgba(109, 70, 180, 0.28), transparent 62%),
    #1a1424;
}

[data-theme="dark"] .roc-popup__close {
  background: rgba(28, 22, 40, 0.9);
  color: #f4efff;
}

[data-theme="dark"] .roc-popup__close:focus-visible {
  outline-color: #d2c6ff;
}
