/* lead-form.css — "Book a Free Class" pop-up + /book/ inline form (Renzo Gracie East Los Angeles).
   Markup is rendered by /js/lead-form.js. Everything is scoped under .lf-* so page styles never collide. */

.lf-modal,
.lf-inline {
  --lf-black: #0a0a0a;
  --lf-shell: #121212;
  --lf-field: #1a1a1a;
  --lf-line: rgba(255, 255, 255, 0.14);
  --lf-line-soft: rgba(255, 255, 255, 0.08);
  --lf-text: #e8e6e0;
  --lf-muted: rgba(232, 230, 224, 0.64);
  --lf-quiet: rgba(232, 230, 224, 0.5);
  --lf-gold: #c9a83c;
  --lf-gold-light: #d9bc5a;
  --lf-gold-pale: rgba(201, 168, 60, 0.14);
  --lf-error: #ff8f7d;
  --lf-serif: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --lf-body: 'Barlow', system-ui, sans-serif;
  color: var(--lf-text);
  font-family: var(--lf-body);
  font-weight: 400;
  line-height: 1.5;
}

/* ---------- Dialog shell ---------- */
.lf-modal {
  border: 0;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  background: transparent;
  overflow: visible;
}
.lf-modal::backdrop { background: rgba(0, 0, 0, 0.78); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.lf-modal[open] { display: flex; }
.lf-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: var(--lf-shell);
}

.lf-close {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  right: 12px;
  z-index: 3;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(10, 10, 10, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 2px;
  color: var(--lf-text);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.lf-close svg { width: 16px; height: 16px; }
.lf-close:hover { background: rgba(10, 10, 10, 0.85); border-color: var(--lf-text); }

/* ---------- Photo panel ---------- */
.lf-media {
  position: relative;
  flex: 0 0 auto;
  height: 172px;
  overflow: hidden;
  background: #1b2a2e;
  isolation: isolate;
}
.lf-media picture { display: contents; }
.lf-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% 30%;
  opacity: 0;
  transition: opacity 0.45s ease;
  z-index: -2;
}
.lf-media img.is-loaded { opacity: 1; }
.lf-media::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.1) 0%, rgba(10, 10, 10, 0.45) 45%, rgba(18, 18, 18, 0.96) 100%);
}
.lf-stripe { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--lf-gold); }
.lf-media-content {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem 1.25rem 1rem 1.5rem;
}
.lf-loc {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 0.45rem;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lf-gold-light);
}
.lf-loc-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--lf-gold-light); box-shadow: 0 0 8px rgba(201, 168, 60, 0.45); }
.lf-headline {
  margin: 0;
  font-family: var(--lf-serif);
  font-size: 36px;
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #fff;
}
.lf-headline em { font-style: italic; font-weight: 300; color: rgba(255, 255, 255, 0.72); }
.lf-steps,
.lf-address { display: none; }

/* ---------- Form panel ---------- */
.lf-body { position: relative; flex: 1 0 auto; padding: 1.25rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom)); }
.lf-title {
  margin: 0 0 0.3rem;
  font-family: var(--lf-serif);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--lf-text);
}
.lf-sub { margin: 0 0 1.15rem; font-size: 14px; color: var(--lf-muted); }

.lf-form { margin: 0; }
.lf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.lf-field { margin: 0 0 0.85rem; min-width: 0; }
.lf-label { display: block; margin: 0 0 5px; font-size: 13px; font-weight: 500; letter-spacing: 0.02em; color: var(--lf-text); }
.lf-input,
.lf-select {
  display: block;
  width: 100%;
  min-height: 50px;
  margin: 0;
  padding: 12px 14px;
  font: 400 16px/1.3 var(--lf-body);
  color: var(--lf-text);
  background: var(--lf-field);
  border: 1px solid var(--lf-line);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.lf-input::placeholder { color: rgba(232, 230, 224, 0.38); opacity: 1; }
.lf-input:hover,
.lf-select:hover { border-color: rgba(255, 255, 255, 0.24); }
.lf-input:focus,
.lf-select:focus { border-color: var(--lf-gold); box-shadow: 0 0 0 3px var(--lf-gold-pale); background: #1d1d1d; }
.lf-input:-webkit-autofill,
.lf-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--lf-text);
  box-shadow: 0 0 0 1000px var(--lf-field) inset;
  caret-color: var(--lf-text);
}
.lf-select-wrap { position: relative; }
.lf-select-wrap::after {
  content: '';
  position: absolute;
  right: 17px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--lf-gold-light);
  border-bottom: 1.5px solid var(--lf-gold-light);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.lf-select { padding-right: 2.75rem; cursor: pointer; }
.lf-select:invalid,
.lf-select.is-empty { color: rgba(232, 230, 224, 0.5); }
.lf-select option { color: #111; background: #fff; }
.lf-hint { margin: 5px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--lf-quiet); }
.lf-kids-hint { color: var(--lf-gold-light); }
.lf-kids-hint[hidden] { display: none; }
/* Kids landing page: child's age as two big tap targets */
.lf-fieldset { border: 0; padding: 0; min-width: 0; }
.lf-fieldset legend { padding: 0; }
.lf-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.lf-choice {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-height: 64px;
  padding: 10px 12px 10px 40px;
  background: var(--lf-field);
  border: 1px solid var(--lf-line);
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
.lf-choice[hidden] { display: none; }
.lf-choice:hover { border-color: rgba(255, 255, 255, 0.28); }
.lf-choice input {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0;
  accent-color: var(--lf-gold);
  cursor: pointer;
}
.lf-choice-main { font-size: 16px; font-weight: 500; line-height: 1.2; color: var(--lf-text); }
.lf-choice-sub { font-size: 12.5px; line-height: 1.2; color: var(--lf-quiet); }
.lf-choice:has(input:checked) { border-color: var(--lf-gold); background: #1f1c12; box-shadow: 0 0 0 3px var(--lf-gold-pale); }
.lf-choice:has(input:focus-visible) { outline: 2px solid var(--lf-gold-light); outline-offset: 2px; }
.lf-field.has-error .lf-choice { border-color: var(--lf-error); }
.lf-error { margin: 6px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--lf-error); }
.lf-error[hidden] { display: none; }
.lf-field.has-error .lf-input,
.lf-field.has-error .lf-select { border-color: var(--lf-error); }

.lf-legal { margin: 0.9rem 0 0; font-size: 11.5px; line-height: 1.5; text-align: center; color: var(--lf-quiet); }
.lf-legal a { color: var(--lf-muted); text-decoration: underline; text-underline-offset: 2px; }

.lf-hp { position: absolute !important; left: -9999px !important; top: auto; width: 1px; height: 1px; overflow: hidden; }

.lf-alert {
  margin: 0 0 1rem;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--lf-text);
  background: rgba(255, 143, 125, 0.08);
  border: 1px solid rgba(255, 143, 125, 0.45);
  border-radius: 3px;
}
.lf-alert[hidden] { display: none; }
.lf-alert p { margin: 0; }
.lf-alert a { color: var(--lf-gold-light); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }

.lf-submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  margin: 0;
  padding: 0 1.5rem;
  font: 600 15px/1 var(--lf-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lf-black);
  background: var(--lf-gold);
  border: 0;
  border-radius: 2px;
  cursor: pointer;
  box-shadow: 0 10px 30px -12px rgba(201, 168, 60, 0.6);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.lf-submit:hover { background: var(--lf-gold-light); transform: translateY(-1px); box-shadow: 0 14px 34px -12px rgba(201, 168, 60, 0.7); }
.lf-submit:active { transform: none; }
.lf-submit[disabled] { cursor: wait; opacity: 0.85; transform: none; }
.lf-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(10, 10, 10, 0.25);
  border-top-color: var(--lf-black);
  border-radius: 50%;
}
.lf-submit[aria-busy='true'] .lf-spinner { display: inline-block; animation: lf-spin 0.8s linear infinite; }
.lf-form .lf-submit { margin-top: 0.4rem; }
.lf-alt { margin: 0.9rem 0 0; font-size: 13px; text-align: center; color: var(--lf-quiet); }
.lf-alt a { color: var(--lf-text); font-weight: 500; border-bottom: 1px solid rgba(201, 168, 60, 0.6); text-decoration: none; }
.lf-alt a:hover { color: var(--lf-gold-light); }

/* Fallback when the form cannot deliver (endpoint missing / not configured) */
.lf-fallback { display: flex; flex-direction: column; gap: 0.85rem; }
.lf-fallback p { margin: 0; font-size: 15px; color: var(--lf-muted); }
.lf-fallback .lf-submit { text-decoration: none; }
.lf-fallback-alt { font-size: 14px; color: var(--lf-quiet); }
.lf-fallback-alt a { color: var(--lf-text); text-decoration: underline; text-underline-offset: 2px; }

/* Keyboard focus */
.lf-close:focus-visible,
.lf-submit:focus-visible,
.lf-alt a:focus-visible,
.lf-legal a:focus-visible,
.lf-alert a:focus-visible,
.lf-fallback a:focus-visible { outline: 2px solid var(--lf-gold-light); outline-offset: 3px; }

/* ---------- Desktop: split panel ---------- */
@media (min-width: 880px) {
  .lf-modal { width: min(940px, calc(100vw - 48px)); height: auto; max-height: calc(100vh - 48px); margin: auto; }
  .lf-shell {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    height: auto;
    max-height: calc(100vh - 48px);
    overflow: hidden;
    border: 1px solid var(--lf-line-soft);
    box-shadow: 0 60px 120px -40px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(0, 0, 0, 0.6);
  }
  .lf-media { height: auto; min-height: 100%; }
  .lf-media img { object-position: 50% 22%; }
  .lf-media::before {
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.05) 0%, rgba(10, 10, 10, 0.25) 35%, rgba(10, 10, 10, 0.88) 68%, rgba(10, 10, 10, 0.97) 100%);
  }
  .lf-media-content { padding: 2.25rem 2rem 2rem 2.35rem; }
  .lf-headline { font-size: 54px; }
  .lf-steps {
    display: grid;
    gap: 0.8rem;
    margin: 1.5rem 0 0;
    padding: 1.35rem 0 0;
    list-style: none;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
  }
  .lf-steps li { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: baseline; font-size: 14px; line-height: 1.45; color: rgba(255, 255, 255, 0.82); }
  .lf-step-num { font-family: var(--lf-serif); font-size: 20px; font-weight: 700; line-height: 1; color: var(--lf-gold-light); }
  .lf-address { display: block; margin: 1.35rem 0 0; font-size: 12.5px; color: rgba(255, 255, 255, 0.55); }
  .lf-body { max-height: calc(100vh - 50px); overflow-y: auto; overscroll-behavior: contain; padding: 2.35rem 2.35rem 2rem; }
  .lf-close { top: 14px; right: 14px; background: transparent; border-color: var(--lf-line); color: var(--lf-muted); }
  .lf-close:hover { color: var(--lf-text); background: transparent; }
  .lf-title { font-size: 32px; padding-right: 3rem; }
}

/* Phones: the photo headline already says it, so the form starts right under the promise line. */
@media (max-width: 879px) {
  .lf-modal .lf-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .lf-modal .lf-sub { margin-top: 0.1rem; }
}

@media (max-width: 359px) {
  .lf-row { grid-template-columns: 1fr; gap: 0; }
  .lf-headline { font-size: 31px; }
}

/* ---------- Motion (only when the visitor has not asked for less) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .lf-modal[open] .lf-shell { animation: lf-sheet-in 0.34s cubic-bezier(0.22, 0.61, 0.36, 1); }
  .lf-modal[open]::backdrop { animation: lf-fade-in 0.3s ease; }
}
@media (prefers-reduced-motion: no-preference) and (min-width: 880px) {
  .lf-modal[open] .lf-shell { animation-name: lf-pop-in; }
}
@keyframes lf-sheet-in { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes lf-pop-in { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes lf-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes lf-spin { to { transform: rotate(360deg); } }

html[data-lf-open] { overflow: hidden; }

/* ---------- /book/ inline card ---------- */
.lf-inline {
  scroll-margin-top: 16px;
  max-width: 600px;
  margin: 0 auto;
  background: var(--lf-shell);
  border: 1px solid var(--lf-line-soft);
  border-top: 3px solid var(--lf-gold);
  padding: 1.75rem 1.25rem 1.5rem;
}
@media (min-width: 640px) { .lf-inline { padding: 2.25rem 2.5rem 2rem; } }
