/* =============================================================================
   DYSG — Lead Capture Components (PDF modal, Audit modal, Inline opt-in)
   Self-contained. Inherits your existing theme vars when present, with
   hard-coded fallbacks so it also works if pasted standalone.
   All classes namespaced .lc-  to avoid clashing with your site styles.
   ============================================================================= */

:root {
  --lc-bg: var(--bg, #0A0A0A);
  --lc-panel: #121212;
  --lc-input-bg: #1a1a1a;
  --lc-input-border: #333;
  --lc-text: var(--text, #ffffff);
  --lc-muted: #C4C4C4;
  --lc-accent: var(--accent, #FF5C00);
  --lc-accent-dark: #e04e00;
  --lc-radius: 8px;
  --lc-input-radius: 4px;
  --lc-display: var(--font-display, 'Bebas Neue', 'Oswald', 'Anton', sans-serif);
  --lc-body: var(--font-body, 'Barlow', 'Archivo', system-ui, -apple-system, sans-serif);
}

/* ---------- Backdrop / overlay ---------- */
.lc-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.75);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
@supports ((backdrop-filter: blur(6px)) or (-webkit-backdrop-filter: blur(6px))) {
  .lc-overlay {
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
  }
}
.lc-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* ---------- Modal panel ---------- */
.lc-modal {
  position: relative;
  width: 100%;
  max-width: 480px;                 /* PDF modal */
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--lc-panel);
  color: var(--lc-text);
  border: 1px solid var(--lc-input-border);
  border-radius: var(--lc-radius);
  padding: 40px 36px 32px;
  font-family: var(--lc-body);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9);
  transform: scale(.94) translateY(8px);
  opacity: 0;
  transition: transform .25s cubic-bezier(.2, .7, .3, 1), opacity .25s ease;
}
.lc-overlay.is-open .lc-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}
.lc-modal--audit {
  max-width: 560px;                 /* Audit modal (larger) */
}

/* ---------- Close button ---------- */
.lc-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--lc-muted);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
  transition: color .15s ease, background .15s ease;
}
.lc-close:hover { color: var(--lc-text); background: rgba(255, 255, 255, 0.06); }

/* ---------- Headings / copy ---------- */
.lc-eyebrow {
  display: inline-block;
  font-family: var(--lc-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--lc-accent);
  margin-bottom: 14px;
}
.lc-title {
  font-family: var(--lc-display);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: .5px;
  font-size: clamp(28px, 5vw, 40px);
  margin: 0 0 14px;
  color: var(--lc-text);
}
.lc-subtitle {
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--lc-muted);
  margin: 0 0 24px;
}

/* ---------- Form fields ---------- */
.lc-form { display: flex; flex-direction: column; gap: 14px; }

.lc-field { display: flex; flex-direction: column; }
.lc-field label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .3px;
  color: var(--lc-muted);
  margin-bottom: 6px;
}
.lc-input,
.lc-select {
  width: 100%;
  font-family: var(--lc-body);
  font-size: 16px;                  /* 16px+ prevents iOS zoom */
  color: var(--lc-text);
  background: var(--lc-input-bg);
  border: 1px solid var(--lc-input-border);
  border-radius: var(--lc-input-radius);
  padding: 14px 16px;
  transition: border-color .15s ease, box-shadow .15s ease;
  appearance: none;
  -webkit-appearance: none;
}
.lc-input::placeholder { color: #7a7a7a; }
.lc-input:focus,
.lc-select:focus {
  outline: none;
  border-color: var(--lc-accent);
  box-shadow: 0 0 0 3px rgba(255, 92, 0, 0.15);
}
.lc-select { cursor: pointer; }
.lc-select:invalid { color: #7a7a7a; }   /* placeholder-style until chosen */

/* Custom select chevron */
.lc-select-wrap { position: relative; }
.lc-select-wrap::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--lc-muted);
  border-bottom: 2px solid var(--lc-muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

/* ---------- Submit button ---------- */
.lc-submit {
  width: 100%;
  margin-top: 6px;
  font-family: var(--lc-body);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #0A0A0A;
  background: var(--lc-accent);
  border: none;
  border-radius: var(--lc-input-radius);
  padding: 16px 18px;
  cursor: pointer;
  transition: background .15s ease, transform .05s ease;
}
.lc-submit:hover { background: var(--lc-accent-dark); }
.lc-submit:active { transform: translateY(1px); }
.lc-submit:disabled { opacity: .7; cursor: default; background: var(--lc-accent-dark); }

.lc-microcopy {
  font-size: 12.5px;
  color: #8f8f8f;
  text-align: center;
  margin-top: 12px;
}

/* ---------- Form message (errors) ---------- */
.lc-form-msg {
  display: none;
  font-size: 14px;
  line-height: 1.4;
  padding: 12px 14px;
  border-radius: var(--lc-input-radius);
  border: 1px solid rgba(255, 80, 80, .4);
  background: rgba(255, 60, 60, .1);
  color: #ff9b9b;
}
.lc-form-msg.is-visible { display: block; }

/* ---------- Success message + "sent" state (inline confirmation) ---------- */
.lc-form-msg--success {
  border-color: rgba(70, 200, 130, .45);
  background: rgba(60, 200, 120, .12);
  color: #8ff0b5;
}
.lc-form--sent .lc-field,
.lc-form--sent .lc-row-2,
.lc-form--sent .lc-submit,
.lc-form--sent .lc-microcopy,
.lc-form--sent .lc-trust { display: none !important; }
.lc-form--sent .lc-form-msg { margin: 0; }

/* ---------- Two-column field grid (audit modal, wide screens) ---------- */
@media (min-width: 480px) {
  .lc-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
}

/* =============================================================================
   INLINE OPT-IN SECTION (Component 3)
   ============================================================================= */
.lc-inline {
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(255, 92, 0, 0.14) 0%, rgba(255, 92, 0, 0) 55%),
    linear-gradient(180deg, #101010 0%, #0b0b0b 100%);
  border-top: 1px solid var(--lc-input-border);
  border-bottom: 1px solid var(--lc-input-border);
  padding: clamp(56px, 8vw, 96px) 20px;
  font-family: var(--lc-body);
  color: var(--lc-text);
  position: relative;
  overflow: hidden;
}
.lc-inline::before {   /* accent hairline top */
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--lc-accent), transparent 70%);
}
.lc-inline__inner {
  max-width: 1040px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.lc-inline__title {
  font-family: var(--lc-display);
  font-weight: 400;
  line-height: .98;
  letter-spacing: .5px;
  font-size: clamp(34px, 6vw, 58px);
  margin: 0 0 18px;
}
.lc-inline__title .lc-accent { color: var(--lc-accent); }
.lc-inline__sub {
  font-size: 16px;
  line-height: 1.6;
  color: var(--lc-muted);
  max-width: 46ch;
  margin: 0;
}
.lc-inline__form {
  background: var(--lc-panel);
  border: 1px solid var(--lc-input-border);
  border-radius: var(--lc-radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-deep, 0 25px 60px -20px rgba(0,0,0,.8));
}
.lc-inline__form .lc-form { gap: 12px; }
.lc-trust {
  font-size: 12.5px;
  color: #8f8f8f;
  text-align: center;
  margin-top: 14px;
}
.lc-trust strong { color: var(--lc-muted); font-weight: 600; }

@media (max-width: 820px) {
  .lc-inline__inner { grid-template-columns: 1fr; }
}

/* ---------- Honeypot (belt & suspenders; inline styles also applied) ---------- */
.lc-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ---------- Respect reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .lc-overlay,
  .lc-modal { transition: opacity .01s linear; }
  .lc-modal { transform: none; }
}
