/* Revenue Opportunity Calculator — scoped to .roc */

.roc {
  --roc-ink: #241b38;
  --roc-violet: #2a2148;
  --roc-violet-soft: #6d5bd0;
  position: relative;
  isolation: isolate;
  z-index: 2;
  overflow: visible;
  padding: clamp(40px, 5.5vw, 76px) var(--gutter) clamp(76px, 8vw, 116px);
  background: var(--bg);
  color: var(--fg);
  scroll-margin-top: 96px;
}

.roc::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 46% 58% at 0% 18%, rgba(186, 168, 245, .34), transparent 62%),
    radial-gradient(ellipse 38% 48% at 100% 88%, rgba(210, 196, 255, .42), transparent 64%),
    radial-gradient(ellipse 28% 36% at 72% 0%, rgba(255, 255, 255, .7), transparent 70%);
}

html[data-theme="dark"] .roc::before {
  background:
    radial-gradient(ellipse 42% 50% at 0% 16%, rgba(109, 40, 217, .22), transparent 62%),
    radial-gradient(ellipse 36% 44% at 100% 86%, rgba(88, 28, 135, .2), transparent 64%);
}

.roc__grid {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.14fr) minmax(240px, 0.92fr);
  gap: clamp(18px, 2.2vw, 28px);
  align-items: stretch;
}

.roc__copy {
  align-self: center;
  min-width: 0;
  padding-right: clamp(0px, 1vw, 12px);
}

.roc__eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  color: var(--faint);
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: .68rem;
  font-weight: 700;
  line-height: 1.45;
}

.roc__eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--glow);
  flex: none;
}

.roc__title {
  margin: 0;
  max-width: 11em;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(2rem, 2.7vw, 3.05rem);
  line-height: 1.04;
  letter-spacing: -.04em;
  color: var(--fg);
}

.roc__support {
  max-width: 34ch;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
}

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

.roc__calc {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6px 22px;
  border-radius: 28px;
  background: color-mix(in srgb, var(--card) 86%, transparent);
  border: 1px solid color-mix(in srgb, #fff 72%, var(--line));
  box-shadow:
    0 22px 50px rgba(48, 32, 88, .07),
    inset 0 1px 0 rgba(255, 255, 255, .85);
  backdrop-filter: blur(16px);
}

html[data-theme="dark"] .roc__calc {
  background: color-mix(in srgb, var(--card) 92%, transparent);
  border-color: var(--line);
  box-shadow: none;
}

html[data-theme="dark"] .roc__result {
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: none;
}

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

.roc__q + .roc__q {
  border-top: 1px solid color-mix(in srgb, var(--fg) 8%, transparent);
}

.roc__q-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.roc__q-label {
  display: block;
  margin: 0;
  font-size: .98rem;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.35;
  color: var(--fg);
}

.roc__q-head .roc__q-label {
  padding-top: 12px;
}

.roc__help,
.roc__note {
  margin: 8px 0 0;
  max-width: 36ch;
  font-size: .82rem;
  line-height: 1.45;
  color: var(--muted);
}

.roc__input {
  width: 11rem;
  flex: none;
  height: 48px;
  margin: 0;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--fg) 12%, transparent);
  background: color-mix(in srgb, var(--fg) 3.5%, var(--card));
  color: var(--fg);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -.02em;
  text-align: right;
  font-variant-numeric: tabular-nums;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}

.roc__input:hover {
  border-color: color-mix(in srgb, var(--violet) 42%, var(--line));
}

.roc__input::placeholder {
  color: var(--faint);
  font-weight: 600;
}

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

.roc__seg {
  position: relative;
  min-width: 0;
}

.roc__seg input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.roc__seg span {
  display: grid;
  place-items: center;
  height: 48px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--fg) 12%, transparent);
  background: color-mix(in srgb, var(--fg) 3.5%, var(--card));
  color: var(--fg);
  font-weight: 700;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.roc__seg:hover input:not(:disabled) + span {
  border-color: color-mix(in srgb, var(--violet) 45%, var(--line));
}

.roc__seg input:checked + span {
  background: var(--roc-violet);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 22px rgba(42, 33, 72, .22);
}

html[data-theme="dark"] .roc__seg input:checked + span {
  background: #7c5cff;
  box-shadow: none;
}

.roc__seg input:focus-visible + span {
  outline: 2px solid var(--glow);
  outline-offset: 3px;
}

.roc__seg input:focus-visible {
  outline: none;
}

.roc__seg.is-disabled span,
.roc__seg input:disabled + span {
  opacity: .38;
  cursor: not-allowed;
  box-shadow: none;
}

.roc__result {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 28px 24px 22px;
  border-radius: 28px;
  color: #f4f0ff;
  background:
    radial-gradient(120% 80% at 88% -10%, rgba(176, 148, 255, .42), transparent 52%),
    radial-gradient(90% 70% at 0% 110%, rgba(88, 28, 135, .45), transparent 58%),
    linear-gradient(165deg, #32265c 0%, #1c1538 46%, #120e22 100%);
  box-shadow:
    0 24px 50px rgba(28, 16, 58, .16),
    inset 0 1px 0 rgba(255, 255, 255, .14);
}

.roc__result-wave {
  position: absolute;
  left: -18%;
  right: -18%;
  bottom: -28px;
  height: 46%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(58% 80% at 30% 100%, rgba(255, 255, 255, .06), transparent 70%),
    radial-gradient(70% 90% at 78% 120%, rgba(157, 124, 255, .28), transparent 68%);
  border-radius: 50% 50% 0 0;
}

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

.roc__result-foot {
  margin-top: auto;
  padding-top: 26px;
}

.roc__result-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  max-width: 22em;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1.45;
  color: rgba(223, 212, 255, .74);
}

.roc__result-label svg {
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 1px;
}

.roc__figure {
  margin: 16px 0 0;
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: .92;
  font-variant-numeric: tabular-nums;
  color: #f7f4ff;
  font-size: clamp(2.35rem, 14.5cqi, 3.85rem);
  white-space: nowrap;
}

.roc__figure[data-len="10"],
.roc__figure[data-len="11"] {
  font-size: clamp(1.9rem, 13cqi, 3.15rem);
}

.roc__figure[data-len="12"],
.roc__figure[data-len="13"],
.roc__figure[data-len="14"],
.roc__figure[data-len="15"] {
  font-size: clamp(1.55rem, 10.5cqi, 2.45rem);
}

.roc__line {
  margin: 12px 0 0;
  color: rgba(236, 230, 255, .82);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -.015em;
  line-height: 1.4;
}

.roc__disclaimer {
  margin: 14px 0 0;
  max-width: 28em;
  color: rgba(226, 216, 255, .52);
  font-size: .75rem;
  line-height: 1.45;
}

.roc__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff;
  color: var(--roc-ink);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: -.015em;
  line-height: 1.3;
  text-align: center;
  text-wrap: balance;
  box-shadow: 0 10px 24px rgba(8, 4, 20, .16);
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}

.roc__cta:hover {
  background: #f3eeff;
  color: var(--roc-ink);
  transform: translateY(-1px);
}

.roc__cta-arrow {
  display: inline-block;
  transition: transform .2s var(--ease);
}

.roc__cta:hover .roc__cta-arrow {
  transform: translateX(3px);
}

.roc__live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1080px) {
  .roc__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .roc__copy {
    grid-column: 1 / -1;
    align-self: start;
    max-width: 40rem;
    padding-right: 0;
  }

  .roc__title {
    max-width: 16em;
  }
}

@media (max-width: 760px) {
  .roc__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .roc__calc {
    padding-inline: 16px;
  }

  .roc__q-head {
    flex-direction: column;
    gap: 10px;
  }

  .roc__q-head .roc__q-label {
    padding-top: 0;
  }

  .roc__input {
    width: 100%;
    text-align: left;
  }

  .roc__segments {
    gap: 6px;
  }

  .roc__result {
    padding: 24px 18px 18px;
  }

  .roc__cta {
    font-size: .92rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .roc__seg span,
  .roc__input,
  .roc__cta,
  .roc__cta-arrow {
    transition: none;
  }

  .roc__cta:hover,
  .roc__cta:hover .roc__cta-arrow {
    transform: none;
  }
}
