/* =============================================================================
   ProSuitability marketing — component layer
   Loaded LAST. Buttons, links, cards, header/footer chrome and the hero
   surface, all wired to the semantic tokens in tokens.css. Class selectors
   only, so Tailwind's CDN preflight can't override them.
   ============================================================================= */

/* ---- Skip link (a11y) ---------------------------------------------------- */
.skip-link {
  position: absolute;
  left: 0; top: -3rem;
  z-index: 100;
  background: var(--color-primary);
  color: var(--color-text-on-brand);
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 0;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; outline: none; box-shadow: var(--focus-ring); }

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 8px;
  padding: 0.7rem 1.2rem;
  font-family: var(--font-sans);
  font-weight: var(--fw-medium);
  font-size: var(--text-base);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.btn-lg { padding: 0.9rem 1.6rem; font-size: var(--text-lg); }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.btn-accent  { background: var(--color-accent); color: var(--color-text-on-accent); }
.btn-accent:hover  { background: var(--color-accent-hover); }
.btn-accent:active { background: var(--color-accent-active); }

.btn-primary { background: var(--color-primary); color: var(--color-text-on-brand); }
.btn-primary:hover  { background: var(--color-primary-hover); }
.btn-primary:active { background: var(--color-primary-active); }

.btn-ghost {
  background: transparent;
  color: var(--color-text-primary);
  border-color: var(--color-border-strong);
}
.btn-ghost:hover  { background: var(--btn-ghost-bg-hover); }
.btn-ghost:active { background: var(--btn-ghost-bg-active); }

.btn:disabled, .btn.is-disabled {
  background: var(--btn-disabled-bg);
  color: var(--btn-disabled-text);
  border-color: transparent;
  cursor: not-allowed;
}

/* ---- Links --------------------------------------------------------------- */
.link {
  color: var(--link-text);
  text-decoration: none;
  font-weight: var(--fw-medium);
}
.link:hover { color: var(--link-text-hover); text-decoration: underline; }

/* ---- Surfaces / cards ---------------------------------------------------- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
}
.card-pad { padding: clamp(1.25rem, 2.5vw, 1.75rem); }

/* ---- Header -------------------------------------------------------------- */
.site-nav {
  background: color-mix(in srgb, var(--color-surface) 88%, transparent);
  border-bottom: 1px solid transparent;
  backdrop-filter: saturate(1.4) blur(8px);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.site-nav.is-scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: 0 1px 2px rgba(14, 31, 50, 0.06), 0 6px 24px rgba(14, 31, 50, 0.05);
}
.nav-link {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-weight: var(--fw-medium);
  font-size: var(--text-sm);
}
.nav-link:hover { color: var(--color-text-primary); }
.brand-wordmark {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--text-xl);
  color: var(--color-primary);
  text-decoration: none;
  letter-spacing: var(--tracking-snug);
}
.brand-lockup {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}
.staging-beta-label {
  font-size: 0.625rem;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-top: 0.15rem;
}

/* ---- Hero surface -------------------------------------------------------- */
.hero {
  background:
    radial-gradient(60% 80% at 85% -10%, rgba(31, 128, 115, 0.10), transparent 60%),
    radial-gradient(70% 90% at 0% 0%, rgba(27, 58, 92, 0.08), transparent 55%),
    var(--color-bg-app);
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--teal-50);
  color: var(--color-accent-hover);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

/* Placeholder media wells for [TODO: client] assets */
.media-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    repeating-linear-gradient(45deg, var(--color-surface-sunken), var(--color-surface-sunken) 12px, #E7ECF2 12px, #E7ECF2 24px);
  border: 1px dashed var(--color-border-strong);
  border-radius: 12px;
  color: var(--color-text-tertiary);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  padding: 1.5rem;
}

/* On-brand dark band (problem / final CTA) */
.band-navy {
  background: var(--navy-800);
  color: var(--color-text-on-brand);
}
.band-navy .lead,
.band-navy .text-muted { color: rgba(255, 255, 255, 0.72); }

/* Step number chip */
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: var(--navy-50);
  color: var(--color-primary);
  font-family: var(--font-mono);
  font-weight: var(--fw-semibold);
}

/* Pricing "recommended" accent */
.pricing-card--featured {
  border: 2px solid var(--color-primary);
  position: relative;
}
.pricing-badge {
  position: absolute;
  top: -0.8rem; left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: var(--color-text-on-brand);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}

.text-muted { color: var(--color-text-secondary); }

/* Pre-auth forms (login, signup, 2FA).
   Element-qualified + !important on border/background so Tailwind CDN
   preflight (injected after these linked styles) cannot strip them. */
input.auth-input,
textarea.auth-input,
select.auth-input {
  margin-top: 0.25rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  display: block;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  color: var(--color-text-primary);
  background-color: var(--color-surface) !important;
  border: 1px solid var(--navy-200) !important;
}
input.auth-input:focus,
textarea.auth-input:focus,
select.auth-input:focus {
  outline: none;
  border-color: var(--color-border-focus) !important;
  box-shadow: var(--focus-ring);
}
.auth-surface {
  border-radius: 8px;
  padding: 1rem;
  background: var(--color-surface-sunken);
  border: 1px solid var(--color-border);
}
.auth-error {
  color: var(--red-700);
  font-size: var(--text-sm);
}
.auth-section-title {
  font-family: var(--font-sans);
  font-weight: var(--fw-semibold);
  font-size: var(--text-lg);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
}
.auth-notice-error {
  border-radius: 8px;
  padding: 1rem;
  background: var(--red-50);
  border: 1px solid color-mix(in srgb, var(--red-500) 35%, var(--color-border));
  color: var(--red-700);
}
.btn-danger {
  background: var(--red-700);
  color: var(--color-text-on-brand);
}
.btn-danger:hover {
  background: var(--red-500);
  color: var(--color-text-on-brand);
}

/* ---- Motion preference --------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
