/* Cross-document View Transitions: opts the site into the browser's native
   page-to-page crossfade so the swap between Home and Pilot doesn't flash
   white. Loaded on every page (footer-override.css is shared). Browsers
   without support silently ignore the at-rule. */
@view-transition {
    navigation: auto;
}

/* Row 1: Icons – ROI Calculator – Privacy – Cookies – Phone – Email (one row, equal space between).
   Row 2: Address + Company name centered, side-by-side with a generous gap. */

.footer-bottom-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  width: 100%;
}

.footer-row1-item {
  display: flex;
  align-items: center;
}

.footer-row1-item .socials {
  margin: 0;
}

/* Let .footer-link control typography; only tweak email decoration. */
.footer .footer-email {
  text-decoration: none;
}

/* Underline hover animation only for email (phone has default, address doesn't need one) */
.footer .footer-email span {
  position: relative;
  z-index: 3;
}

.footer .footer-email span::before {
  content: "";
  -webkit-transform-origin: 100% 50%;
  transform-origin: 100% 50%;
  -webkit-transform: scale3d(0, 1, 1);
  transform: scale3d(0, 1, 1);
  -webkit-transition: -webkit-transform var(--transition-default);
  transition: -webkit-transform var(--transition-default);
  transition: transform var(--transition-default);
  transition: transform var(--transition-default), -webkit-transform var(--transition-default);
  background: var(--grey);
  width: 100%;
  height: 1px;
  position: absolute;
  top: 115%;
  left: 0;
  pointer-events: none;
  z-index: -1;
}

.footer .footer-email:hover span::before {
  -webkit-transform-origin: 0 50%;
  transform-origin: 0 50%;
  -webkit-transform: scale3d(1, 1, 1);
  transform: scale3d(1, 1, 1);
}

/* Address + "LongRun Agency, LLC ©" sit horizontally centered as a single
   row with a generous gap between them. main.min.css forces
   flex-direction:column at <=650px and caps the address at max-width:220px
   at <=900px, so we override both with !important to defeat the brand
   media queries at all viewport widths. flex-wrap lets the pair stack each
   centered on its own line if the viewport is too narrow to hold both. */
.footer-bottom-bar {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  gap: 0.75rem 4rem !important;
  width: 100%;
  text-align: center;
  margin-top: 1.25rem;
}

.footer-bottom-bar .copyright,
.footer-bottom-bar .footer-address {
  margin: 0 !important;
  flex: 0 0 auto !important;
  max-width: none !important;
  text-align: center;
  align-self: center !important;
}

@media (max-width: 991px) {
  .footer-bottom-wrapper {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .footer-row1-item {
    width: 100%;
    justify-content: center;
  }
  .footer-row1-item .socials {
    width: auto;
    justify-content: center;
  }
}

/* ============================================================
   FOOTER COLUMNS (sitemap-aligned, June 2026)
   ============================================================ */
.footer-inner {
    max-width: 144rem;
    margin: 0 auto;
    padding: 5.6rem var(--container-spacer) 0;
    box-sizing: border-box;
}
.footer-main {
    display: flex;
    gap: 6rem;
    align-items: flex-start;
}
.footer-identity {
    flex: 0 0 26rem;
    max-width: 30rem;
    display: flex;
    flex-direction: column;
    gap: 2.2rem;
}
.footer-logo { display: inline-block; }
.footer-logo svg { height: 3rem; width: auto; display: block; }
.footer-logo svg path { fill: var(--black); }
.footer-logo svg path:first-of-type { fill: url(#lrLogoGrad); }
.footer-slogan {
    margin: 0;
    font-size: 1.7rem;
    line-height: 1.45;
    color: var(--black);
    max-width: 24rem;
}
.footer-contact { display: flex; flex-direction: column; gap: 0.9rem; }
.footer-contact-link {
    font-size: 1.5rem;
    color: rgba(0, 0, 0, 0.7);
    text-decoration: none;
    width: -moz-fit-content;
    width: fit-content;
    transition: color var(--transition-fast);
}
.footer-contact-link:hover { color: var(--black); }
.footer-address { display: block; white-space: normal; font-size: 1.4rem; line-height: 1.5; color: #8A8A8A; max-width: 22rem; }
.footer-identity .socials { display: flex; gap: 1rem; margin: 0.4rem 0 0; }

/* Option A: six equal link columns in ONE row, headings aligned to one top
   line (flex-wrap so they collapse gracefully when space runs out). NOT a
   masonry/column flow where groups stack underneath each other. */
.footer-links {
    flex: 1 1 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 3.4rem 3.8rem;
}
.footer-col { flex: 1 1 13rem; min-width: 12rem; display: flex; flex-direction: column; gap: 0.2rem; }

.footer-col-title {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #A0A0A5;
    font-weight: 500;
    margin-bottom: 1.4rem;
}
.footer-col-link {
    display: block;
    padding: 0.45rem 0;
    font-size: 1.45rem;
    line-height: 1.3;
    color: #2A2A2A;
    text-decoration: none;
    transition: color var(--transition-fast);
}
.footer-col-link:hover { color: #FF6E30; }

/* Social icons: 40px light-grey circles (Option A brand rail) */
.footer-identity .socials { display: flex; gap: 1.1rem; margin: 0.6rem 0 0; }
.footer-identity .social-item {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: #F2F2F4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    transition: background var(--transition-fast);
}
.footer-identity .social-item:hover { background: #E6E6EA; }
.footer-identity .social-item svg { width: 1.9rem; height: 1.9rem; }

.footer-baseline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-top: 4.8rem;
    padding: 2.4rem 0;
    border-top: 1px solid #ECECEE;
    font-size: 1.4rem;
    color: #999;
}
.footer-baseline .copyright { color: #999; }
.footer-legal { display: flex; gap: 2.6rem; }
.footer-legal a { color: #999; text-decoration: none; transition: color var(--transition-fast); }
.footer-legal a:hover { color: var(--black); }

@media screen and (max-width: 980px) {
    .footer-main { flex-direction: column; gap: 4rem; }
    .footer-identity { flex-basis: auto; max-width: none; }
    .footer-links { width: 100%; }
}
@media screen and (max-width: 620px) {
    .footer-inner { padding-top: 4rem; }
    .footer-col { flex-basis: 40%; min-width: 13rem; }
    .footer-baseline { flex-direction: column; align-items: flex-start; gap: 1rem; margin-top: 4rem; }
}

.nav-link-audit span { color: #FF6E30; }

/* ============================================================
   RESPONSIVE HARDENING (June 2026)
   Prevent stray horizontal scroll without breaking smooth scroll
   (clip, not hidden, so it never creates a nested scroll context).
   ============================================================ */
.wrapper { overflow-x: clip; }

@media screen and (max-width: 650px) {
    .footer-cols { grid-template-columns: repeat(2, 1fr); }
    .footer-bottom-bar .footer-address {
        flex: 1 1 100% !important;
        max-width: 100% !important;
        font-size: 1.2rem;
        line-height: 1.5;
    }
}

/* ============================================================
   FREE AUDIT POPUP (Anfloy-style lead-capture modal)
   ============================================================ */
.audit-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.audit-modal.open { display: flex; }

.audit-modal .audit-bg {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.audit-modal-wrapper {
    position: relative;
    width: 100%;
    max-width: 52rem;
    background: var(--white);
    border-radius: 1.8rem;
    padding: 4rem 4rem 3.6rem;
    box-shadow: 0 3.2rem 8rem rgba(0, 0, 0, 0.35);
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.audit-close {
    position: absolute;
    top: 1.6rem;
    right: 1.6rem;
    width: 3.4rem;
    height: 3.4rem;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.6);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: background var(--transition-fast);
}
.audit-close:hover { background: rgba(0, 0, 0, 0.1); }

.audit-modal .section-desc {
    color: var(--orange);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 1.2rem;
}

.audit-modal-title {
    font-size: 2.8rem;
    line-height: 120%;
    letter-spacing: -0.01em;
    color: var(--black);
    margin: 0 0 1rem;
    font-weight: 500;
}

.audit-modal-sub {
    font-size: 1.5rem;
    line-height: 155%;
    color: rgba(0, 0, 0, 0.6);
    margin: 0 0 2.8rem;
}

.audit-modal .audit-form { display: flex; flex-direction: column; gap: 1.6rem; align-items: stretch; }

.audit-modal .audit-form label {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    font-size: 1.3rem;
    color: rgba(0, 0, 0, 0.6);
}

.audit-modal .audit-form input,
.audit-modal .audit-modal .audit-form textarea {
    width: 100%;
    padding: 1.3rem 1.6rem;
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 1rem;
    font-size: 1.5rem;
    font-family: var(--font-default);
    color: var(--black);
    background: var(--white);
    box-sizing: border-box;
    transition: border-color var(--transition-fast);
}
.audit-modal .audit-form input:focus,
.audit-modal .audit-form textarea:focus { outline: none; border-color: var(--orange); }
.audit-modal .audit-form textarea { resize: vertical; min-height: 8rem; }

.audit-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.audit-modal .audit-form button[type=submit] {
    margin-top: 0.8rem;
    padding: 1.5rem 2rem;
    border: 0;
    border-radius: 10rem;
    background: var(--gradient-orange);
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 500;
    font-family: var(--font-default);
    cursor: pointer;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}
.audit-modal .audit-form button[type=submit]:hover { transform: scale(1.02); }
.audit-modal .audit-form button[type=submit].is-loading { opacity: 0.6; cursor: default; }

.audit-msg {
    padding: 2rem 0 0.4rem;
    font-size: 1.6rem;
    line-height: 155%;
    color: var(--black);
}

.nav-link-audit { cursor: pointer; }

@media screen and (max-width: 650px) {
    .audit-modal-wrapper { padding: 3.2rem 2.4rem 2.8rem; }
    .audit-modal-title { font-size: 2.4rem; }
}

/* Industries hub: center a lone last card when the count is odd */
.case-preview-grid > *:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: calc(50% - 1.2rem);
    margin-inline: auto;
}
@media screen and (max-width: 850px) {
    .case-preview-grid > *:last-child:nth-child(odd) { max-width: 100%; }
}

/* Defeat any global input/textarea styling leaking into the audit form */
.audit-modal .audit-form input,
.audit-modal .audit-form textarea {
    background: var(--white) !important;
    color: var(--black) !important;
    font-family: var(--font-default) !important;
    -webkit-text-fill-color: var(--black);
}
.audit-modal .audit-form textarea::placeholder,
.audit-modal .audit-form input::placeholder { color: rgba(0,0,0,0.4); }

/* ============================================================
   FREE AUDIT POPUP - two-panel roadmap layout
   ============================================================ */
.audit-modal-wrapper.audit-split {
    max-width: 92rem;
    padding: 0;
    display: grid;
    grid-template-columns: 0.82fr 1fr;
    overflow: hidden;
}

.audit-roadmap {
    background: #F7F1EC;
    background-image: radial-gradient(circle, rgba(0, 0, 0, 0.07) 1px, transparent 1.4px);
    background-size: 18px 18px;
    padding: 4.4rem 3.6rem;
    display: flex;
    flex-direction: column;
    gap: 2.8rem;
}

.audit-roadmap-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.2rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(0, 0, 0, 0.5);
}
.audit-roadmap-eyebrow::before {
    content: "";
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
    background: var(--gradient-orange);
}

.audit-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2.6rem;
}
.audit-steps::before {
    content: "";
    position: absolute;
    left: 0.7rem;
    top: 1rem;
    bottom: 1.4rem;
    width: 2px;
    background-image: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.22) 0 3px, transparent 3px 8px);
}
.audit-steps li { position: relative; padding-left: 3.4rem; }
.audit-steps li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.2rem;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: var(--gradient-orange);
    box-shadow: 0 0 0 0.5rem rgba(255, 110, 48, 0.12);
}
.audit-steps li.is-last::before {
    background: var(--white);
    border: 2px solid rgba(0, 0, 0, 0.28);
    box-shadow: 0 0 0 0.5rem rgba(0, 0, 0, 0.04);
}
.audit-step-num {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #E9402B;
}
.audit-step-label {
    display: block;
    margin-top: 0.4rem;
    font-size: 1.6rem;
    line-height: 135%;
    color: var(--black);
}

.audit-offer {
    padding: 4.4rem 4rem 3.6rem;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    justify-content: center;
}
.audit-modal .audit-modal-title em {
    font-style: italic;
    color: #E9402B;
}

.audit-modal .audit-form button[type=submit] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}
.audit-modal .audit-form button[type=submit] .arrow { width: 1.5rem; height: 1.5rem; }

.audit-later {
    align-self: center;
    margin-top: 0.4rem;
    background: none;
    border: 0;
    padding: 0.6rem;
    font-size: 1.2rem;
    font-family: var(--font-default);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: color var(--transition-fast);
}
.audit-later:hover { color: var(--black); }

@media screen and (max-width: 767px) {
    .audit-modal-wrapper.audit-split { grid-template-columns: 1fr; max-width: 46rem; }
    .audit-roadmap { display: none; }
    .audit-offer { padding: 3.6rem 2.4rem 2.8rem; }
}
