/* ============================================================
   Revenue Wizards — RevOps Salary Calculator
   Brand tokens + screens + transitions + responsive + a11y.
   Mirrors revops-assessment/styles.css design system.
   ============================================================ */

:root {
  --rw-navy:        #1D2335;
  --rw-teal:        #337B6E;
  --rw-yellow:      #F5C800;
  --rw-coral:       #E8664A;
  --rw-cyan:        #1DC5E8;
  --rw-purple:      #8B7BD8;
  --rw-white:       #FFFFFF;
  --rw-gray-light:  #F2F3F6;
  --rw-gray-mid:    #E0E2E8;
  --rw-text-dark:   #1D2335;
  --rw-text-muted:  #6B7280;

  --rw-radius-sm:   4px;
  --rw-radius-md:   8px;
  --rw-radius-lg:   16px;

  --rw-gap-xs:      12px;
  --rw-gap-sm:      24px;
  --rw-gap-md:      40px;
  --rw-gap-lg:      64px;

  --rw-max-width:   1140px;
  --rw-margin:      40px;

  --rw-font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

html, body {
  margin: 0; padding: 0;
  font-family: var(--rw-font);
  color: var(--rw-text-dark);
  background: var(--rw-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

select {
  font-family: inherit;
}

:focus-visible {
  outline: 3px solid var(--rw-yellow);
  outline-offset: 2px;
  border-radius: var(--rw-radius-sm);
}

/* ------------------ Layout ------------------- */

.container {
  max-width: var(--rw-max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.screen {
  position: relative;
  min-height: 100vh;
  padding: clamp(40px, 8vw, 96px) 0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 320ms var(--ease-spring), transform 320ms var(--ease-spring);
  overflow: hidden;
}

.rw-embedded .screen { min-height: 0; }
.screen.screen--enter { opacity: 1; transform: none; }

.screen[data-bg="navy"]   { background: var(--rw-navy); color: var(--rw-white); }
.screen[data-bg="light"]  { background: var(--rw-gray-light); color: var(--rw-text-dark); }
.screen[data-bg="white"]  { background: var(--rw-white); color: var(--rw-text-dark); }

/* ------------------ Typography ------------------- */

.eyebrow {
  display: inline-block;
  font-size: 12px; letter-spacing: 0.12em;
  font-weight: 700; text-transform: uppercase;
  margin-bottom: 16px;
}
.eyebrow--yellow  { color: var(--rw-yellow); }
.eyebrow--teal    { color: var(--rw-teal); }
.eyebrow--inverse { color: var(--rw-navy); background: rgba(255,255,255,0.85); padding: 6px 10px; border-radius: 999px; }

.h1 {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}

.h2 {
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.012em;
  margin: 0 0 16px;
}
.h2--invert { color: var(--rw-white); }

.lead {
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.55;
  font-weight: 500;
  margin: 0 0 24px;
  color: var(--rw-text-dark);
  max-width: 60ch;
}
.screen[data-bg="navy"] .lead { color: rgba(255,255,255,0.92); }
.lead--invert { color: rgba(255,255,255,0.92); }

.subhead {
  font-size: 16px; line-height: 1.55;
  color: var(--rw-text-muted);
  margin: 0 0 32px;
  max-width: 64ch;
}
.screen[data-bg="navy"] .subhead { color: rgba(255,255,255,0.78); }

/* ------------------ Buttons ------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: var(--rw-radius-md);
  font-weight: 700; font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  min-height: 48px;
  transition: transform 200ms var(--ease-spring), box-shadow 200ms var(--ease-spring), background 200ms;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn:disabled, .btn[disabled] {
  opacity: 0.45; cursor: not-allowed; transform: none;
}
.btn--yellow  { background: var(--rw-yellow); color: var(--rw-navy); }
.btn--yellow:hover { background: #ffd520; }
.btn--navy    { background: var(--rw-navy); color: var(--rw-white); }
.btn--navy:hover { background: #2a3147; }
.btn--ghost   { background: transparent; color: var(--rw-navy); border: 1px solid var(--rw-gray-mid); }
.btn--ghost:hover { background: var(--rw-gray-light); }
.btn--ghost-light { background: rgba(255,255,255,0.08); color: var(--rw-white); border: 1px solid rgba(255,255,255,0.25); }
.btn--ghost-light:hover { background: rgba(255,255,255,0.15); }
.btn--full    { width: 100%; }
.btn--lg      { padding: 18px 28px; font-size: 16px; min-height: 56px; }
.btn--sm      { padding: 10px 16px; font-size: 14px; min-height: 40px; }

.btn-link {
  color: var(--rw-yellow);
  font-weight: 600;
  text-decoration: none;
  font-size: 15px;
}
.btn-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ------------------ Brand bar ------------------- */

.brandbar {
  width: 100%;
  max-width: var(--rw-max-width);
  margin: 0 auto 24px;
  padding: 0 24px;
  display: flex;
  justify-content: flex-start;
  align-self: stretch;
}
.rw-brand-link {
  display: inline-block;
  line-height: 0;
  border-radius: 10px;
  overflow: hidden;
  transition: opacity 160ms ease, transform 160ms ease;
}
.rw-brand-link:focus-visible {
  outline: 2px solid var(--rw-yellow);
  outline-offset: 3px;
}
.rw-brand-link:hover { opacity: 0.88; transform: translateY(-1px); }
.rw-brand-link img {
  display: block;
  width: 56px; height: 56px;
  object-fit: cover;
}

/* ------------------ Screen footer ------------------- */

.screen-footer {
  margin-top: auto;
  padding: 48px 24px 0;
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.02em;
  display: flex;
  justify-content: center;
}
.screen-footer a {
  color: var(--rw-text-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 160ms ease, border-color 160ms ease;
}
.screen-footer a:hover,
.screen-footer a:focus-visible {
  color: var(--rw-navy);
  border-bottom-color: currentColor;
  outline: none;
}

/* ------------------ Hero ------------------- */

.hero-grid {
  display: grid; grid-template-columns: 1fr; gap: 40px;
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.4fr 1fr; gap: 64px; }
}
.hero-cta-row {
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
  margin-top: 8px;
}
.hero-art { display: flex; justify-content: center; align-items: center; }

.rw-bigcircles { width: 100%; max-width: 480px; height: auto; opacity: 0.95; }

/* "What you'll get" list under hero */

.explainer {
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: var(--rw-white);
}
.explainer-eyebrow {
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin: 0 0 24px;
}
.explainer-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 0; grid-template-columns: 1fr;
}
.explainer-list > li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px; align-items: baseline;
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.explainer-list > li:first-child { border-top: 0; }
@media (min-width: 880px) {
  .explainer-list > li { grid-template-columns: 80px 1fr; gap: 32px; }
}
.explainer-num {
  font-size: 13px; font-weight: 600;
  color: var(--rw-yellow);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}
.explainer-body h3 {
  font-size: 18px; margin: 0 0 6px;
  font-weight: 600; line-height: 1.3;
  color: var(--rw-white);
  letter-spacing: -0.005em;
}
.explainer-body p {
  font-size: 14px; color: rgba(255,255,255,0.7);
  line-height: 1.55; margin: 0; max-width: 60ch;
}

/* ------------------ Calculator screen ------------------- */

.screen--calculator {
  padding: clamp(32px, 5vw, 72px) 0;
  display: flex;
  flex-direction: column;
}

.calc-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
}
@media (min-width: 900px) {
  .calc-layout { grid-template-columns: 1fr 1fr; gap: 56px; }
}

/* Input panel */

.calc-inputs {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.calc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calc-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--rw-text-dark);
  letter-spacing: 0.02em;
}

.calc-field select {
  padding: 12px 14px;
  border: 1.5px solid var(--rw-gray-mid);
  border-radius: var(--rw-radius-md);
  font-size: 15px;
  font-weight: 500;
  background: var(--rw-white);
  color: var(--rw-text-dark);
  min-height: 48px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236B7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  transition: border-color 180ms, box-shadow 180ms;
}
.calc-field select:focus {
  border-color: var(--rw-navy);
  box-shadow: 0 0 0 3px rgba(29, 35, 53, 0.08);
  outline: none;
}
.calc-field select:hover {
  border-color: var(--rw-navy);
}

.calc-field select option[value=""] {
  color: var(--rw-text-muted);
}

/* Result panel (sticky on desktop) */

.calc-result-panel {
  position: sticky;
  top: 32px;
  background: var(--rw-white);
  border: 1px solid rgba(29, 35, 53, 0.06);
  border-radius: var(--rw-radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: 0 4px 24px rgba(29, 35, 53, 0.06);
}

.calc-salary-display {
  text-align: center;
  padding: 24px 0;
}

.calc-salary-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--rw-text-muted);
  margin: 0 0 12px;
}

.calc-salary-number {
  font-size: clamp(40px, 6vw, 56px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--rw-teal);
  font-variant-numeric: tabular-nums;
  transition: color 300ms;
}

.calc-salary-number--empty {
  color: var(--rw-gray-mid);
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: 0;
}

.calc-salary-period {
  margin-top: 6px;
  font-size: 14px;
  color: var(--rw-text-muted);
  font-weight: 500;
}

/* Multiplier breakdown mini-table */

.calc-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid rgba(29, 35, 53, 0.06);
}

.calc-breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(29, 35, 53, 0.06);
  font-size: 14px;
}

.calc-breakdown-label {
  color: var(--rw-text-muted);
  font-weight: 500;
}

.calc-breakdown-value {
  font-weight: 600;
  color: var(--rw-text-dark);
  font-variant-numeric: tabular-nums;
}

.calc-breakdown-value--positive { color: var(--rw-teal); }
.calc-breakdown-value--negative { color: var(--rw-coral); }
.calc-breakdown-value--neutral  { color: var(--rw-text-muted); }

.calc-cta-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.calc-reset {
  font-size: 13px;
  font-weight: 600;
  color: var(--rw-text-muted);
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  transition: color 160ms;
  text-align: center;
}
.calc-reset:hover { color: var(--rw-coral); }

/* Inputs-complete indicator */
.calc-incomplete-hint {
  text-align: center;
  font-size: 13px;
  color: var(--rw-text-muted);
  padding: 8px 0;
}

/* ------------------ Gate (lead capture) ------------------- */

.screen--gate {
  padding: clamp(24px, 4vw, 56px) 0;
  display: flex;
  flex-direction: column;
}
.screen--gate .h2 {
  font-size: clamp(22px, 2.4vw, 30px);
  margin: 0 0 8px;
}
.screen--gate .subhead {
  font-size: 14px;
  margin: 0 0 16px;
}
.gate-wrap { display: flex; justify-content: center; }
.gate-card {
  background: var(--rw-white);
  border: 1px solid rgba(29,35,53,0.08);
  border-radius: var(--rw-radius-md);
  padding: 32px 36px;
  max-width: 540px; width: 100%;
}
.gate-form { display: grid; gap: 12px; margin-top: 16px; }
.form-row { display: flex; flex-direction: column; gap: 4px; }
.form-row label {
  font-size: 13px; font-weight: 600;
  color: var(--rw-text-dark);
}
.form-row input,
.form-row select {
  padding: 10px 12px;
  border: 1.5px solid var(--rw-gray-mid);
  border-radius: var(--rw-radius-sm);
  font-family: var(--rw-font);
  font-size: 15px;
  background: var(--rw-white);
  color: var(--rw-text-dark);
  min-height: 40px;
  transition: border-color 180ms;
}
.form-row input:focus,
.form-row select:focus { border-color: var(--rw-navy); }
.form-error {
  font-size: 13px; color: var(--rw-coral); margin: 4px 0 0;
}
.form-consent {
  font-size: 12px; color: var(--rw-text-muted);
  line-height: 1.5; margin: 4px 0 0;
}

/* Gate salary preview */
.gate-salary-preview {
  text-align: center;
  margin-bottom: 16px;
  padding: 20px;
  background: var(--rw-gray-light);
  border-radius: var(--rw-radius-md);
}
.gate-salary-preview .calc-salary-number {
  font-size: clamp(32px, 5vw, 44px);
}
.gate-salary-preview p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--rw-text-muted);
}

/* ------------------ Result ------------------- */

.screen--result-hero {
  position: relative;
  padding: clamp(56px, 9vw, 110px) 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--rw-teal);
  color: var(--rw-white);
}

.result-hero-grid {
  display: grid; grid-template-columns: 1fr; gap: 32px; align-items: start;
}
@media (min-width: 900px) {
  .result-hero-grid { grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: center; }
}

.result-salary-wrap {
  margin-top: 24px;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  padding: 20px 28px;
  border-radius: var(--rw-radius-md);
}

.result-salary-big {
  font-size: clamp(48px, 7vw, 72px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}

.result-salary-period {
  font-size: 18px;
  font-weight: 600;
  opacity: 0.7;
}

.result-hero-art { display: flex; justify-content: center; }

/* Breakdown section */

.screen--breakdown {
  padding: clamp(48px, 6vw, 80px) 0;
}

.breakdown-grid {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(29,35,53,0.08);
}

.breakdown-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(29,35,53,0.08);
}
@media (min-width: 640px) {
  .breakdown-row {
    grid-template-columns: 1.2fr 1fr auto;
    gap: 24px;
    align-items: center;
  }
}

.breakdown-factor {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rw-navy);
}

.breakdown-selection {
  font-size: 14px;
  color: var(--rw-text-muted);
}

.breakdown-multiplier {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.breakdown-multiplier--positive { color: var(--rw-teal); }
.breakdown-multiplier--negative { color: var(--rw-coral); }
.breakdown-multiplier--neutral  { color: var(--rw-text-muted); }

/* Formula bar */
.formula-bar {
  margin-top: 32px;
  padding: 20px 24px;
  background: var(--rw-gray-light);
  border-radius: var(--rw-radius-md);
  font-size: 14px;
  color: var(--rw-text-muted);
  line-height: 1.7;
}
.formula-bar strong {
  color: var(--rw-text-dark);
}
.formula-bar code {
  font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', monospace;
  font-size: 13px;
  background: rgba(29, 35, 53, 0.06);
  padding: 2px 6px;
  border-radius: 3px;
}

/* Sources */
.sources {
  margin-top: 24px;
  font-size: 12px;
  color: var(--rw-text-muted);
  font-weight: 500;
  line-height: 1.5;
}

/* CTA section */

.screen--cta {
  padding: clamp(48px, 6vw, 80px) 0;
}

.cta-grid {
  display: grid; gap: 32px;
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 900px) {
  .screen--cta[data-layout="split"] .cta-grid {
    grid-template-columns: 1fr 1.05fr;
    gap: 56px;
    align-items: stretch;
  }
}
.cta-copy { max-width: 64ch; }
.cta-copy .lead { margin-bottom: 28px; }

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.cta-booking {
  width: 100%;
  display: flex;
  align-items: stretch;
}
.cta-booking-frame {
  width: 100%;
  min-height: 560px;
  border-radius: var(--rw-radius-md);
  background: var(--rw-white);
  overflow: hidden;
}
@media (max-width: 900px) {
  .cta-booking-frame { min-height: 720px; }
}

/* About Revenue Wizards section */

.about-rw {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.about-rw p {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.7);
  max-width: 60ch;
  margin: 0 0 12px;
}
.about-rw a {
  color: var(--rw-yellow);
  text-decoration: none;
}
.about-rw a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ------------------ Count-up animation ------------------- */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.fade-in-up {
  animation: fadeInUp 320ms var(--ease-spring);
}

/* ------------------ Reduced motion ------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ------------------ Mobile fine-tune ------------------- */

@media (max-width: 540px) {
  .container { padding: 0 16px; }
  .gate-card { padding: 24px 20px; }
  .calc-result-panel { padding: 24px 20px; }
  .screen-footer { padding-top: 32px; font-size: 12px; }
}
