/*
 * Car accident landing — injury-only rules, layered over bk-landing.css.
 *
 * The page's root carries both .bk-landing (the shared base: tokens, hero,
 * form card, quiz cards, closing band, FAQ, footer) and .pi-landing (this
 * file). Everything here is scoped under .pi-landing, except the header and
 * footer matches, which use the body template class. Loaded only on the
 * Car Accident Landing template (lib/injury-landing.php), after the theme
 * stylesheet, so no other page is affected. No gradients, no emoji, no
 * all-caps labels.
 */

/* Site navy (header strip / footer) for the page's dark surfaces. */
.bk-landing.pi-landing {
  --bk-navy: #002241;
  --bk-navy-rule: #29496A;
}

/* Anchor jumps and sticky offsets clear the fixed header. --pi-header is
   measured by injury-landing.js (145px desktop / 66px phone fallback). */
.pi-landing #qualify,
.pi-landing #consult,
.pi-landing #faq,
.pi-landing #deadlines,
.pi-landing #process,
.pi-landing #offices {
  scroll-margin-top: calc(var(--pi-header, 145px) + 20px);
}

.pi-landing .bk-summary {
  scroll-margin-top: calc(var(--pi-header, 145px) + 16px);
}

/* --- Hero ------------------------------------------------------------- */
.pi-landing .pi-hero {
  padding-top: calc(var(--pi-header, 145px) - 66px + 32px);
}

.pi-landing .pi-hero .bk-hero__block {
  max-width: 1192px;
  margin-left: auto;
  margin-right: auto;
}

.pi-landing .pi-hero__top.has-photo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
  gap: 48px;
  align-items: center;
}

.pi-landing .pi-hero__photo {
  margin: 0;
}

.pi-landing .pi-hero__img,
.pi-landing .pi-process__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 18px;
}

.pi-landing .pi-process__img {
  aspect-ratio: 4 / 3;
}

/* The first hero export had a few dark pixels along its bottom edge. Trim
   1.5% off the bottom (keeping the rounded corners) so no line shows under
   the photo, whichever file is in the media library. Harmless on the
   corrected file. */
.pi-landing .pi-hero__img {
  clip-path: inset(0 0 1.5% 0 round 18px);
}

.pi-landing .pi-hero__fee {
  font-family: var(--bk-font-headings);
  font-size: 17px;
  font-weight: 600;
  color: var(--bk-green-text);
  margin: 0 0 16px;
}

/* Google rating line and the after-hours line, under the fee line / buttons. */
.pi-landing .pi-rating {
  align-items: center;
  color: var(--bk-ink);
  display: flex;
  flex-wrap: wrap;
  font-family: var(--bk-font-headings);
  font-size: 15px;
  gap: 4px 8px;
  line-height: 1.4;
  margin: 0 0 16px;
}

.pi-landing .pi-rating__star {
  fill: var(--bk-accent);
  flex: 0 0 18px;
  height: 18px;
  width: 18px;
}

.pi-landing .pi-rating__score {
  font-weight: 600;
}

.pi-landing .pi-rating__asof {
  color: var(--bk-muted);
  font-size: 13px;
}

.pi-landing .pi-hero__after {
  color: var(--bk-muted);
  font-size: 15px;
  line-height: 1.5;
  margin: 14px 0 0;
  max-width: 52ch;
}

.pi-landing .pi-hero__ctas {
  align-items: center;
}

.pi-landing .pi-btn {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 48px;
}

.pi-landing .pi-hero .bk-row {
  max-width: 1192px;
  margin-top: 32px;
}

/* --- Form card: who you'll reach ------------------------------------- */
.pi-landing .pi-who {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -4px 0 18px;
}

.pi-landing .pi-who__img {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 50%;
  object-fit: cover;
}

.pi-landing .pi-who__text {
  display: grid;
  gap: 2px;
}

.pi-landing .pi-who__name {
  font-family: var(--bk-font-headings);
  font-size: 15px;
  font-weight: 600;
  color: var(--bk-ink);
}

.pi-landing .pi-who__sub {
  font-size: 14px;
  color: var(--bk-muted);
}

/* --- Quick check progress --------------------------------------------- */
.pi-landing .pi-result__fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background-color: var(--bk-accent);
  transition: width 0.2s ease;
}

.pi-landing .bk-summary__list li[hidden] {
  display: none;
}

/* --- Consultation form fields ----------------------------------------- */
.bk-landing.pi-landing .bk-form-card input[type="text"],
.bk-landing.pi-landing .bk-form-card input[type="tel"],
.bk-landing.pi-landing .bk-form-card textarea,
.bk-landing.pi-landing .bk-form-card select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--bk-input-border);
  border-radius: 10px;
}

.bk-landing.pi-landing .bk-form-card textarea {
  min-height: 92px;
  padding: 10px 14px;
  background-color: var(--bk-surface);
  color: var(--bk-ink);
  font-family: var(--bk-font-body);
  font-size: 16px;
  line-height: 1.4;
  resize: vertical;
}

.bk-landing.pi-landing .bk-form-card .gform_wrapper.gravity-theme .gfield_label,
.bk-landing.pi-landing .bk-form-card .gform_wrapper.gravity-theme .gform-field-label:not(.gform-field-label--type-sub) {
  position: static;
  display: block;
  transform: none;
  margin: 0 0 6px;
  padding: 0;
  font-family: var(--bk-font-headings);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--bk-ink);
}

.bk-landing.pi-landing .bk-form-card .gform_wrapper.gravity-theme .gfield_required {
  margin-left: 4px;
  font-weight: 400;
  color: var(--bk-muted);
}

.bk-landing.pi-landing .bk-form-card .gform_wrapper.gravity-theme .gfield {
  margin: 0 0 18px;
  padding: 0;
}

.bk-landing.pi-landing .bk-form-card .gform_wrapper.gravity-theme .ginput_container {
  margin: 0;
}

.bk-landing.pi-landing .bk-form-card .gform_wrapper.gravity-theme .ginput_container input {
  margin: 0;
}

.bk-landing.pi-landing .bk-form-card .gform_wrapper.gravity-theme .ginput_country-selector_container,
.bk-landing.pi-landing .bk-form-card .gform_wrapper.gravity-theme .gform-phone__dropdown,
.bk-landing.pi-landing .bk-form-card .gform_wrapper.gravity-theme .ginput_phone_container .gform-field-label--type-sub {
  display: none;
}

.bk-landing.pi-landing .bk-form-card .gform_wrapper.gravity-theme .gform-phone__input-wrapper,
.bk-landing.pi-landing .bk-form-card .gform_wrapper.gravity-theme .ginput_phone_container {
  display: block;
  width: 100%;
}

.bk-landing.pi-landing .bk-form-card .gform_footer {
  margin-top: 16px;
}

/* --- Deadlines band (white) ------------------------------------------- */
.pi-landing .pi-deadlines {
  background-color: var(--bk-surface);
  padding: 72px 0;
}

.pi-landing .pi-deadlines__grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
}

.pi-landing .pi-deadline {
  background-color: var(--bk-surface);
  border: 1px solid var(--bk-border);
  border-radius: 14px;
  border-top: 3px solid var(--bk-sage);
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.pi-landing .pi-deadline:first-child {
  border-top-color: var(--bk-accent);
}

.pi-landing .pi-deadline__eyebrow {
  color: var(--bk-green-text);
  display: block;
  font-family: var(--bk-font-headings);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.pi-landing .pi-deadline h3 {
  margin: 0 0 8px;
}

.pi-landing .pi-deadline p {
  font-size: 16px;
  margin: 0 0 16px;
}

.pi-landing .pi-deadline__cite {
  color: var(--bk-muted);
  font-family: var(--bk-font-headings);
  font-size: 13px;
  font-weight: 500;
  margin-top: auto;
}

.pi-landing .pi-deadlines__note {
  color: var(--bk-muted);
  font-size: 14px;
  margin: 28px 0 0;
}

/* --- Process band (tinted, with photo) --------------------------------- */
.pi-landing .pi-process {
  background-color: #E7EFE8;
  border-bottom: 1px solid #CFE0D2;
  border-top: 1px solid #CFE0D2;
  padding: 64px 0;
}

.pi-landing .pi-process__container {
  max-width: 820px;
}

.pi-landing .pi-process__container.has-photo {
  max-width: 1240px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  gap: 48px;
  align-items: center;
}

.pi-landing .pi-process__photo {
  margin: 0;
}

.pi-landing .pi-steps {
  list-style: none;
  margin: 24px 0 28px;
  padding: 0;
  display: grid;
  gap: 18px;
}

.pi-landing .pi-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.pi-landing .pi-step__num {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--bk-sage);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--bk-font-headings);
  font-size: 17px;
  font-weight: 600;
}

.pi-landing .pi-step h3 {
  margin: 6px 0 4px;
}

.pi-landing .pi-step p {
  margin: 0;
  font-size: 16px;
}

/* --- Why a Kansas firm: offices --------------------------------------- */
.pi-landing .pi-why {
  padding: 72px 0;
}

.pi-landing .pi-why__intro.has-photo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: 48px;
  align-items: center;
}

.pi-landing .pi-why__photo {
  margin: 0;
}

.pi-landing .pi-why__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
}

.pi-landing .pi-why__caption {
  font-family: var(--bk-font-headings);
  font-size: 14px;
  color: var(--bk-muted);
  margin-top: 8px;
}

.pi-landing .pi-offices {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.pi-landing .pi-office {
  background-color: var(--bk-surface);
  border: 1px solid var(--bk-border);
  border-radius: 14px;
  overflow: hidden;
}

.pi-landing .pi-office.is-current {
  border-color: var(--bk-sage);
  box-shadow: 0 0 0 2px var(--bk-sage-tint);
}

.pi-landing .pi-office__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.pi-landing .pi-office__body {
  padding: 18px 20px 20px;
}

.pi-landing .pi-office__body h3 {
  margin: 0 0 6px;
}

.pi-landing .pi-office__addr {
  font-size: 15px;
  color: var(--bk-muted);
  margin: 0 0 10px;
}

.pi-landing .pi-office__call {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--bk-font-headings);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--bk-sage);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pi-landing .pi-office__call:hover {
  color: var(--bk-ink);
}

/* Each office card: phone number plus a link to that office's Google reviews. */
.pi-landing .pi-office__links {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0 18px;
}

.pi-landing .pi-office__reviews {
  align-items: center;
  color: var(--bk-muted);
  display: inline-flex;
  font-size: 15px;
  min-height: 44px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pi-landing .pi-office__reviews:hover {
  color: var(--bk-ink);
}

.pi-landing .pi-faq__heading {
  margin-bottom: 24px;
}

/* --- Closing band: five buttons --------------------------------------- */
.pi-landing .bk-closing__buttons {
  max-width: 460px;
}

/* --- Consultation form as a pop-up -------------------------------------
   injury-landing.js adds .pi-modal-open to the page root while the form card
   is shown as a dialog. It is the same card (one Gravity Forms instance),
   only restyled; the backdrop and close button are created by the script.
   Without JS none of this applies and the links scroll to the form. */
html.pi-modal-lock {
  overflow: hidden;
  scrollbar-gutter: stable;
}

.pi-landing .pi-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background-color: rgba(0, 34, 65, 0.62);
}

.pi-landing .pi-modal-backdrop[hidden] {
  display: none;
}

.pi-landing .pi-modal-close {
  display: none;
}

/* The sticky column (desktop) would trap the card under the backdrop. */
.pi-landing.pi-modal-open .bk-left {
  position: static;
}

.pi-landing.pi-modal-open .bk-form-card {
  position: fixed;
  z-index: 100001;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

.pi-landing.pi-modal-open .bk-form-card__title {
  padding-right: 44px;
}

.pi-landing.pi-modal-open .pi-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: var(--bk-ground);
  color: var(--bk-ink);
  cursor: pointer;
}

.pi-landing.pi-modal-open .pi-modal-close:hover {
  background-color: var(--bk-border);
}

.pi-landing.pi-modal-open .pi-modal-close:focus-visible {
  outline: 3px solid var(--bk-accent);
  outline-offset: 2px;
}

/* Tighter fields inside the pop-up so it fits shorter screens. */
.bk-landing.pi-landing.pi-modal-open .bk-form-card .gform_wrapper.gravity-theme .gfield {
  margin-bottom: 12px;
}

.bk-landing.pi-landing.pi-modal-open .bk-form-card textarea {
  min-height: 72px;
}

/* The phone call bar steps aside while the pop-up is open. */
.pi-landing.pi-modal-open .pi-callbar {
  display: none;
}

/* --- Sticky phone call bar (phones only) ------------------------------ */
.pi-landing .pi-callbar {
  background-color: var(--bk-surface);
  border-top: 1px solid var(--bk-border);
  bottom: 0;
  box-shadow: 0 -4px 16px rgba(28, 42, 57, 0.12);
  display: flex;
  gap: 10px;
  left: 0;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  position: fixed;
  right: 0;
  transform: translateY(100%);
  transition: transform 0.25s ease;
  z-index: 60;
}

.pi-landing .pi-callbar[hidden] {
  display: none;
}

.pi-landing .pi-callbar.is-visible {
  transform: translateY(0);
}

.pi-landing .pi-callbar .pi-btn {
  flex: 1 1 0;
  font-size: 16px;
  min-height: 48px;
  padding: 0 12px;
}

@media (prefers-reduced-motion: reduce) {
  .pi-landing .pi-callbar,
  .pi-landing .pi-result__fill {
    transition: none;
  }
}

@media (min-width: 641px) {
  .pi-landing .pi-callbar {
    display: none;
  }
}

/* --- Header and footer match (same as the probate page) --------------- */
.page-template-template-injury-landing .footer,
.page-template-template-injury-landing .footer p,
.page-template-template-injury-landing .footer a,
.page-template-template-injury-landing .footer li,
.page-template-template-injury-landing .footer h2,
.page-template-template-injury-landing .footer h3,
.page-template-template-injury-landing .footer h4,
.page-template-template-injury-landing .footer h5,
.page-template-template-injury-landing .footer input,
.page-template-template-injury-landing .footer label,
.page-template-template-injury-landing .footer .gfield_label,
.page-template-template-injury-landing .navbar .aux-nav {
  font-family: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
}

.page-template-template-injury-landing .navbar .nav-logo:not(.is-open),
.page-template-template-injury-landing .navbar .mobile-nav-logo:not(.is-open) {
  background-color: #1C2A39;
  -webkit-mask: url("/wp-content/uploads/2021/11/mack-footer.png") center / contain no-repeat;
  mask: url("/wp-content/uploads/2021/11/mack-footer.png") center / contain no-repeat;
}

.page-template-template-injury-landing .navbar .nav-logo:not(.is-open) img,
.page-template-template-injury-landing .navbar .mobile-nav-logo:not(.is-open) img {
  opacity: 0;
}

/* --- Tablets ------------------------------------------------------------ */
@media (max-width: 960px) {
  .pi-landing .pi-hero__top.has-photo {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 860px) {
  .pi-landing .pi-deadlines,
  .pi-landing .pi-why {
    padding: 56px 0;
  }

  .pi-landing .pi-process {
    padding: 48px 0;
  }

  .pi-landing .pi-process__container.has-photo,
  .pi-landing .pi-why__intro.has-photo {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .pi-landing .pi-process__photo {
    order: -1;
  }
}

/* --- Phones ------------------------------------------------------------- */
@media (max-width: 640px) {
  .pi-landing {
    padding-bottom: 72px;
  }

  .pi-landing .pi-hero {
    padding-top: calc(var(--pi-header, 66px) - 66px + 20px);
  }

  .pi-landing .bk-h1 {
    font-size: 30px;
    line-height: 1.1;
    text-wrap: balance;
  }

  /* On a phone the number and the form come first; the photo follows
     the text so the first screen is headline, fee line and buttons. */
  .pi-landing .pi-hero__top.has-photo {
    gap: 16px;
  }

  .pi-landing .pi-hero__img {
    border-radius: 14px;
    aspect-ratio: 3 / 2;
    clip-path: inset(0 0 1.5% 0 round 14px);
  }

  .pi-landing .pi-hero__ctas {
    flex-direction: column;
    gap: 10px;
  }

  .pi-landing .pi-hero__ctas .pi-btn {
    width: 100%;
  }

  .pi-landing .pi-deadline {
    padding: 20px;
  }

  .pi-landing .pi-process__img {
    border-radius: 14px;
  }

  .pi-landing .pi-office__body {
    padding: 14px 16px 16px;
  }

  .pi-landing .bk-footer-disc__text a {
    display: inline-block;
    padding: 12px 0;
  }
}
