/* CLIFF EVENT — popup lead form (single source for every page)
   Tokens come from cliff-design-tokens.css; this file only composes them. */

.cliff-lead-modal {
  --lead-ink: var(--ink-deep, #121110);
  --lead-paper: var(--page-bg, #fcfbf8);
  --lead-paper-warm: var(--paper-warm, #f5f2e9);
  --lead-line: var(--hairline, rgba(24, 23, 22, 0.11));
  --lead-line-strong: var(--hairline-strong, rgba(24, 23, 22, 0.22));
  --lead-text: var(--text-main, #181716);
  --lead-muted: var(--text-muted, #524e47);
  --lead-soft: var(--text-light, #68645c);
  --lead-red: var(--swatch--brand, #c02d2d);
  --lead-red-hover: var(--swatch--brand-hover, #a52424);
  --lead-on-dark: var(--on-dark, #f7f6f2);
  --lead-on-dark-muted: var(--on-dark-muted, #c2beb4);
  --lead-serif: var(--editorial-serif-on-light, #6d625d);
  --lead-display: var(--font-display, "Oswald", "Arial Narrow", Arial, sans-serif);
  --lead-body: var(--font-body, "Manrope", "Helvetica Neue", Arial, sans-serif);
  --lead-editorial: var(--font-editorial, "Prata", Georgia, serif);
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 3vw, 32px);
}

.cliff-lead-modal[hidden] {
  display: none;
}

.cliff-lead-modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(18, 17, 16, 0.66);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  animation: lead-fade 220ms ease both;
}

.cliff-lead-modal__panel {
  position: relative;
  display: flex;
  width: min(1010px, 100%);
  max-height: min(92vh, 880px);
  background: var(--lead-paper);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 42px 120px rgba(10, 9, 9, 0.42);
  overflow: hidden;
  animation: lead-rise 300ms cubic-bezier(0.22, 0.68, 0.24, 1) both;
}

.cliff-lead-modal__panel:focus {
  outline: none;
}

/* ---------- media rail ---------- */

.cliff-lead-modal__media {
  position: relative;
  flex: 0 0 336px;
  min-height: 100%;
  background: var(--lead-ink);
  overflow: hidden;
  isolation: isolate;
}

.cliff-lead-modal__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.02);
}

.cliff-lead-modal__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 9, 9, 0.34) 0%, rgba(10, 9, 9, 0.05) 38%, rgba(10, 9, 9, 0.78) 100%);
}

.cliff-lead-modal__media-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-height: 520px;
  padding: 30px 28px 32px;
  color: var(--lead-on-dark);
}

.cliff-lead-modal__media-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--lead-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lead-on-dark);
}

.cliff-lead-modal__media-brand span + span {
  color: var(--lead-on-dark-muted);
}

.cliff-lead-modal__media-rule {
  display: block;
  width: 34px;
  height: 1px;
  background: rgba(247, 246, 242, 0.5);
}

.cliff-lead-modal__media-caption {
  display: grid;
  gap: 10px;
  max-width: 24ch;
}

.cliff-lead-modal__media-kicker {
  font-family: var(--lead-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lead-on-dark-muted);
}

.cliff-lead-modal__media-line {
  font-family: var(--lead-editorial);
  font-size: 21px;
  font-weight: 400;
  line-height: 1.32;
  color: var(--lead-on-dark);
}

.cliff-lead-modal__media-note {
  font-family: var(--lead-body);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--lead-on-dark-muted);
}

/* ---------- form side ---------- */

.cliff-lead-modal__body {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: clamp(26px, 3.2vw, 42px) clamp(20px, 3.2vw, 44px) clamp(24px, 3vw, 36px);
  scrollbar-width: thin;
  scrollbar-color: var(--lead-line-strong) transparent;
}

.cliff-lead-modal__body::-webkit-scrollbar {
  width: 8px;
}

.cliff-lead-modal__body::-webkit-scrollbar-thumb {
  background: var(--lead-line-strong);
}

.cliff-lead-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--lead-text);
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.cliff-lead-modal__close:hover {
  background: var(--lead-paper-warm);
  border-color: var(--lead-line);
}

.cliff-lead-modal__close:focus-visible {
  outline: 2px solid var(--lead-red);
  outline-offset: 2px;
}

.cliff-lead-modal__close svg {
  width: 15px;
  height: 15px;
}

.cliff-lead-modal__eyebrow {
  margin-right: 52px;
  font-family: var(--lead-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lead-soft);
}

.cliff-lead-modal__eyebrow b {
  font-weight: 600;
  color: var(--lead-text);
}

.cliff-lead-modal__title {
  margin: 14px 0 0;
  font-family: var(--lead-display);
  font-size: clamp(30px, 3.4vw, 40px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--lead-text);
}

.cliff-lead-modal__title em {
  display: inline-block;
  margin-left: 0.18em;
  font-family: var(--lead-editorial);
  font-style: normal;
  font-weight: 400;
  font-size: 0.86em;
  letter-spacing: 0;
  text-transform: none;
  color: var(--lead-serif);
}

.cliff-lead-modal__note {
  margin-top: 12px;
  max-width: 44ch;
  font-family: var(--lead-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--lead-muted);
}

.cliff-lead-modal__context {
  display: grid;
  gap: 4px;
  margin-top: 18px;
  padding: 11px 14px;
  background: var(--lead-paper-warm);
  border: 1px solid var(--lead-line);
}

.cliff-lead-modal__context[hidden] {
  display: none;
}

.cliff-lead-modal__context-label {
  font-family: var(--lead-body);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lead-soft);
}

.cliff-lead-modal__context-value {
  font-family: var(--lead-body);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--lead-text);
}

.cliff-lead-modal__form {
  margin-top: 20px;
}

.cliff-lead-modal__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.cliff-lead-modal__variant-fields {
  display: contents;
}

.lead-field {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
}

.lead-field--full {
  grid-column: 1 / -1;
}

.lead-field[hidden] {
  display: none;
}

.lead-field__label {
  font-family: var(--lead-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lead-muted);
}

.lead-field__label .lead-req {
  color: var(--lead-text);
}

.lead-field__label .lead-optional {
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--lead-soft);
}

.lead-field input,
.lead-field select,
.lead-field textarea {
  width: 100%;
  min-height: 50px;
  padding: 13px 14px;
  border: 1px solid var(--lead-line-strong);
  border-radius: 0;
  background: #ffffff;
  color: var(--lead-text);
  font-family: var(--lead-body);
  font-size: 16px;
  line-height: 1.4;
  box-shadow: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.lead-field textarea {
  min-height: 92px;
  resize: vertical;
}

.lead-field input:hover,
.lead-field select:hover,
.lead-field textarea:hover {
  border-color: var(--lead-soft);
}

.lead-field input::placeholder,
.lead-field textarea::placeholder {
  color: var(--lead-soft);
  opacity: 1;
}

.lead-field input:focus,
.lead-field select:focus,
.lead-field textarea:focus {
  outline: none;
  border-color: var(--lead-red);
  box-shadow: 0 0 0 3px var(--swatch--brand-subtle, rgba(192, 45, 45, 0.08));
}

.lead-field input:focus-visible,
.lead-field select:focus-visible,
.lead-field textarea:focus-visible {
  outline: 2px solid var(--lead-red);
  outline-offset: 1px;
}

.lead-field input[aria-invalid="true"],
.lead-field select[aria-invalid="true"],
.lead-field textarea[aria-invalid="true"] {
  border-color: var(--lead-red);
}

.lead-field__hint {
  font-family: var(--lead-body);
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--lead-soft);
}

.lead-field__error {
  font-family: var(--lead-body);
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--lead-red);
}

.lead-field__error:empty {
  display: none;
}

/* preferred contact method */

.lead-contact {
  grid-column: 1 / -1;
  min-width: 0;
}

.lead-contact > .lead-field__label {
  display: block;
  margin-bottom: 7px;
}

.lead-contact__options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.lead-contact__option {
  position: relative;
  display: flex;
  min-width: 0;
}

.lead-contact__option input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.lead-contact__text {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--lead-line-strong);
  background: #ffffff;
  color: var(--lead-text);
  font-family: var(--lead-body);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.lead-contact__option:hover .lead-contact__text {
  border-color: var(--lead-text);
}

.lead-contact__option input:checked + .lead-contact__text {
  border-color: var(--lead-text);
  background: var(--lead-text);
  color: var(--lead-on-dark);
}

.lead-contact__option input:focus-visible + .lead-contact__text {
  outline: 2px solid var(--lead-red);
  outline-offset: 2px;
}

.lead-contact__note {
  margin-top: 7px;
  font-family: var(--lead-body);
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--lead-soft);
}

.lead-select {
  position: relative;
}

.lead-select select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  cursor: pointer;
}

.lead-select::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--lead-muted);
  border-bottom: 1.5px solid var(--lead-muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

/* details toggle */

.lead-more {
  margin-top: 20px;
  border-top: 1px solid var(--lead-line);
}

.lead-more__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 12px 0;
  background: transparent;
  border: 0;
  color: var(--lead-text);
  font-family: var(--lead-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
}

.lead-more__toggle:hover {
  color: var(--lead-red);
}

.lead-more__toggle:focus-visible {
  outline: 2px solid var(--lead-red);
  outline-offset: 2px;
}

.lead-more__meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--lead-soft);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
  font-size: 12px;
}

.lead-more__count {
  color: var(--lead-text);
  font-weight: 600;
  letter-spacing: 0;
}

.lead-more__count::before {
  content: "(";
}

.lead-more__count::after {
  content: ")";
}

.lead-more__count + .lead-more__hint {
  margin-left: 6px;
}

.lead-more__count[hidden] {
  display: none;
}

.lead-more__chevron {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 200ms ease;
}

.lead-more__toggle[aria-expanded="true"] .lead-more__chevron {
  transform: rotate(-135deg) translateY(-2px);
}

.lead-more__panel {
  padding-bottom: 18px;
}

.lead-more__panel[hidden] {
  display: none;
}

/* consent + submit */

.lead-consent {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 18px;
}

.lead-consent input {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  margin-top: 1px;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--lead-line-strong);
  background: transparent;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.lead-consent input:checked {
  background: var(--lead-red);
  border-color: var(--lead-red);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5.2 4.3 8.5 11 1.4' fill='none' stroke='%23ffffff' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 11px 9px;
}

.lead-consent input:focus-visible {
  outline: 2px solid var(--lead-red);
  outline-offset: 2px;
}

.lead-consent input[aria-invalid="true"] {
  border-color: var(--lead-red);
}

.lead-consent label {
  font-family: var(--lead-body);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--lead-soft);
  cursor: pointer;
}

.lead-consent a {
  color: var(--lead-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.lead-consent a:hover {
  color: var(--lead-red);
}

.lead-consent__error {
  margin: 6px 0 0 30px;
  font-family: var(--lead-body);
  font-size: 11.5px;
  color: var(--lead-red);
}

.lead-consent__error:empty {
  display: none;
}

.lead-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  margin-top: 18px;
  padding: 0 22px;
  background: var(--lead-red);
  border: 1px solid var(--lead-red);
  color: #ffffff;
  font-family: var(--lead-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.lead-submit:hover {
  background: var(--lead-red-hover);
  border-color: var(--lead-red-hover);
  color: #ffffff;
}

.lead-submit:active {
  background: var(--swatch--brand-active, #8f1f1f);
  border-color: var(--swatch--brand-active, #8f1f1f);
}

.lead-submit:focus-visible {
  outline: 2px solid var(--lead-text);
  outline-offset: 2px;
}

.lead-submit svg {
  width: 12px;
  height: 12px;
}

.lead-submit-note {
  margin-top: 11px;
  font-family: var(--lead-body);
  font-size: 11px;
  line-height: 1.5;
  color: var(--lead-soft);
  text-align: center;
}

/* ---------- success ---------- */

.cliff-lead-modal__success {
  display: grid;
  gap: 14px;
  padding-top: 26px;
}

.cliff-lead-modal__success[hidden] {
  display: none;
}

.lead-success__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--lead-red);
  color: var(--lead-red);
}

.lead-success__mark svg {
  width: 20px;
  height: 20px;
}

.lead-success__title {
  font-family: var(--lead-display);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.lead-success__title em {
  font-family: var(--lead-editorial);
  font-style: normal;
  font-weight: 400;
  font-size: 0.88em;
  margin-left: 0.18em;
  text-transform: none;
  color: var(--lead-serif);
}

.lead-success__text {
  font-family: var(--lead-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--lead-muted);
  max-width: 46ch;
}

.lead-success__text a {
  color: var(--lead-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lead-success__summary {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 8px 16px;
  margin: 4px 0;
  padding: 14px 0;
  border-top: 1px solid var(--lead-line);
  border-bottom: 1px solid var(--lead-line);
  font-family: var(--lead-body);
  font-size: 12.5px;
}

.lead-success__summary dt {
  color: var(--lead-soft);
}

.lead-success__summary dd {
  color: var(--lead-text);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.lead-success__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.lead-success__close,
.lead-success__call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  font-family: var(--lead-body);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--lead-line-strong);
  background: transparent;
  color: var(--lead-text);
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.lead-success__close:hover,
.lead-success__call:hover {
  background: var(--lead-paper-warm);
  border-color: var(--lead-text);
  color: var(--lead-text);
}

.lead-success__close:focus-visible,
.lead-success__call:focus-visible {
  outline: 2px solid var(--lead-red);
  outline-offset: 2px;
}

.lead-success__note {
  font-family: var(--lead-body);
  font-size: 11px;
  line-height: 1.5;
  color: var(--lead-soft);
}

/* ---------- page scroll lock ---------- */

html.cliff-lead-modal-lock,
html.cliff-lead-modal-lock body {
  overflow: hidden;
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .cliff-lead-modal__panel {
    flex-direction: column;
    max-height: min(94vh, 900px);
  }

  .cliff-lead-modal__media {
    display: none;
  }

  .cliff-lead-modal__body {
    padding: 28px 22px 26px;
  }
}

@media (max-width: 560px) {
  .cliff-lead-modal {
    padding: 0;
    align-items: flex-end;
  }

  .cliff-lead-modal__panel {
    width: 100%;
    max-height: 94vh;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }

  .cliff-lead-modal__grid {
    grid-template-columns: 1fr;
  }

  .lead-contact__options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cliff-lead-modal__title em {
    display: block;
    margin-left: 0;
    margin-top: 2px;
  }

  .lead-more__hint {
    display: none;
  }

  .lead-success__summary {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .lead-success__summary dd {
    margin-bottom: 8px;
  }
}

@media (max-height: 720px) and (min-width: 901px) {
  .cliff-lead-modal__media-inner {
    min-height: 440px;
    padding: 24px 24px 26px;
  }

  .cliff-lead-modal__body {
    padding-top: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cliff-lead-modal__scrim,
  .cliff-lead-modal__panel {
    animation: none;
  }

  .cliff-lead-modal__body {
    scroll-behavior: auto;
  }
}

@keyframes lead-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes lead-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
