/* Promo pages (Rippling SOC 2 offer): fee table, headcount selector, callout and scoping form.
   Values come from tokens.css; the fee figures themselves are rendered from scripts/content/promos/. */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- "offer has ended" notice, added by promo-rippling.js after the end date ---------- */
.promo-ended {
  max-width: 800px;
  margin: 0 0 var(--space-5);
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--border);
  border-left: 4px solid var(--error);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--surface);
  font-weight: 600;
  line-height: 1.6;
  color: var(--text-primary);
}

.promo-ended a {
  color: var(--accent);
}

/* ---------- hero ---------- */
.promo-hero .tagline {
  max-width: 640px;
  color: var(--text-primary);
}

.promo-ends {
  margin: var(--space-3) 0 var(--space-5);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.promo-ends time {
  font-weight: 600;
  color: var(--text-primary);
}

/* ---------- fee table ---------- */

/* The hidden "Regular fee" / "Rippling fee" labels are absolutely positioned; anchoring them to their cell
   content keeps them inside the table's scroll area instead of widening the page on a phone. */
.promo-fees del,
.promo-fees ins {
  position: relative;
}

.promo-fees del {
  margin-right: var(--space-2);
  color: var(--text-muted);
  text-decoration: line-through;
  white-space: nowrap;
}

.promo-fees ins {
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
}

/* The highlighted row keeps an opaque background (through the variable tables.css reads), so the sticky
   first column still hides the cells that scroll underneath it on a phone. */
.promo-fees tbody tr.is-selected > :is(th, td) {
  --table-cell-bg: color-mix(in srgb, var(--gold) 14%, var(--surface));
}

.promo-fees tbody tr.is-selected > th:first-child {
  box-shadow: inset 4px 0 0 var(--accent), 1px 0 var(--border-light);
}

/* The row of the fee table that says what the fee includes beyond the audit. */
.promo-fees tbody tr.promo-fees__included > :is(th, td) {
  --table-cell-bg: color-mix(in srgb, var(--gold) 8%, var(--surface));
}

.promo-fees__included td {
  white-space: normal;
}

/* ---------- the included penetration test, set apart ---------- */
.promo-pentest-box {
  margin: var(--space-4) 0 var(--space-5);
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.promo-body .promo-pentest-box__lead {
  margin-bottom: var(--space-4);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text-primary);
}

.promo-body .promo-pentest-box .promo-pentest {
  margin-bottom: 0;
}

/* ---------- headcount selector ---------- */
.promo-headcount {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-4) 0;
}

.promo-headcount[hidden] {
  display: none;
}

/* The label is decoration for sighted visitors; the group's aria-label names it for assistive technology,
   and it stays out of the page's text version. */
.promo-headcount::before {
  content: "Your company size";
  margin-right: var(--space-2);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.promo-headcount button {
  min-height: 44px;
  padding: 0 var(--space-4);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font: inherit;
  font-size: 0.9375rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

.promo-headcount button:hover {
  border-color: var(--accent);
}

.promo-headcount button[aria-pressed="true"] {
  border-color: var(--bg-navy);
  background: var(--bg-navy);
  color: var(--text-inverse);
}

/* ---------- lists ---------- */
.promo-body .promo-steps,
.promo-body .promo-conditions {
  margin: var(--space-4) 0 var(--space-5) var(--space-5);
  list-style: decimal;
}

.promo-steps li,
.promo-conditions li {
  margin-bottom: var(--space-3);
  padding-left: var(--space-1);
  line-height: 1.6;
  color: var(--text-secondary);
}

.promo-steps strong {
  color: var(--text-primary);
}

.promo-body h3 {
  margin: var(--space-5) 0 var(--space-3);
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--text-primary);
}

/* ---------- callout on the supporting pages ---------- */
.promo-callout {
  margin: var(--space-6) 0;
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.promo-callout p {
  margin: 0 0 var(--space-3);
}

.promo-callout p:last-child {
  margin-bottom: 0;
}

.promo-callout .promo-callout__title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
}

.promo-callout a {
  font-weight: 600;
  color: var(--accent);
}

/* The box carries the full fee table, so each supporting page states the fees on its own. */
.promo-callout h2.promo-callout__title {
  margin: 0 0 var(--space-3);
  padding: 0;
  border: 0;
}

.promo-callout .data-table {
  margin: var(--space-4) 0 var(--space-3);
}

.promo-callout .data-table a {
  font-weight: 400;
}

.promo-callout .fees-as-of,
.promo-body .fees-as-of {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ---------- scoping form ---------- */
.promo-scoping .container > * {
  max-width: 800px;
  margin-right: auto;
  margin-left: auto;
}

.promo-scoping__intro {
  margin-bottom: var(--space-5);
  line-height: 1.7;
  color: var(--text-secondary);
}

.promo-form .cta-primary,
.promo-result .cta-primary {
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

/* Disabled until promo-rippling.js has taken over the form. */
.promo-form .cta-primary[disabled] {
  opacity: 0.6;
  cursor: default;
}

.promo-form {
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.promo-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4) var(--space-5);
  margin-bottom: var(--space-5);
}

.promo-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.promo-field--wide {
  grid-column: 1 / -1;
}

.promo-field label,
.promo-field legend {
  display: block;
  margin-bottom: var(--space-2);
  padding: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.promo-optional {
  font-weight: 400;
  color: var(--text-secondary);
}

.promo-field input[type="email"],
.promo-field input[type="text"],
.promo-field input[type="url"],
.promo-field input[type="date"],
.promo-field select {
  width: 100%;
  min-height: 48px;
  padding: var(--space-3) 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  font: inherit;
  font-size: 1rem;
  color: var(--text-primary);
}

.promo-field input:hover,
.promo-field select:hover {
  border-color: var(--text-muted);
}

.promo-field [aria-invalid="true"] {
  border-color: var(--error);
  box-shadow: 0 0 0 1px var(--error);
}

.promo-checks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
}

.promo-checks label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  margin: 0;
  font-weight: 400;
  cursor: pointer;
}

.promo-checks input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.promo-form__error {
  margin: 0 0 var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-left: 4px solid var(--error);
  background: var(--bg-warm);
  color: var(--text-primary);
}

.promo-form__error[hidden] {
  display: none;
}

.promo-result {
  margin-top: var(--space-5);
  padding: var(--space-5);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  background: rgb(var(--gold-rgb) / 6%);
}

.promo-result[hidden] {
  display: none;
}

.promo-result h3 {
  margin-bottom: var(--space-3);
  font-family: var(--font-heading);
  font-size: 1.375rem;
  color: var(--text-primary);
}

.promo-result p,
.promo-result li {
  margin-bottom: var(--space-3);
  line-height: 1.7;
  color: var(--text-secondary);
}

.promo-result ul {
  margin: 0 0 var(--space-3);
  padding: 0;
  list-style: none;
}

.promo-result__fee {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
}

.promo-result__regular {
  margin-left: var(--space-2);
  color: var(--text-muted);
  text-decoration: line-through;
}

.promo-result .cta-primary {
  margin-top: var(--space-2);
}

.promo-form__alt {
  margin-top: var(--space-5);
  color: var(--text-secondary);
}

.promo-sources {
  padding-top: 0;
}

.promo-sources h2 {
  margin-bottom: var(--space-3);
  font-size: 1.25rem;
}

.promo-sources p {
  max-width: 800px;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* On wider screens the struck-through fee and the Rippling fee stay on one line. */
@media (min-width: 701px) {
  .promo-fees td {
    white-space: nowrap;
  }
}

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

  .promo-form {
    padding: var(--space-4);
  }

  .promo-fees del,
  .promo-fees ins {
    display: block;
    margin-right: 0;
  }
}
