/* Devon SEO mobile-first UX and conversion improvements — V9 */

/* Clearer desktop navigation states. */
.neo-nav-links a {
  position: relative;
  padding: 12px 2px;
}
.neo-nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff9d00, #ff6a1f, #e8148f);
  opacity: 0;
  transform: scaleX(.25);
  transition: opacity .2s ease, transform .2s ease;
}
.neo-nav-links a:hover::after,
.neo-nav-links a:focus-visible::after,
.neo-nav-links a[aria-current="page"]::after,
.neo-nav-links a[data-section-current="true"]::after {
  opacity: 1;
  transform: scaleX(1);
}
.neo-nav-links a[aria-current="page"],
.neo-nav-links a[data-section-current="true"] {
  color: #fff8de;
}
.neo-nav-cta .nav-cta-label { position: relative; z-index: 3; }
.neo-nav-cta[aria-current="page"] { box-shadow: 0 0 0 2px #ff9d0070, 4px 4px #8b1ed175; }

/* The mobile navigation is a purposeful route finder, not a desktop link list. */
.neo-nav-backdrop { display: none; }
.mobile-nav-head,
.mobile-nav-group,
.mobile-nav-services,
.mobile-nav-link-grid,
.mobile-nav-cta,
.mobile-nav-email { box-sizing: border-box; }

@media (max-width: 960px) {
  .neo-header {
    top: max(10px, env(safe-area-inset-top));
    padding-inline: 12px;
  }
  .neo-nav {
    justify-content: space-between;
    width: min(100%, 620px);
    max-width: 620px;
    padding: 8px 8px 8px 15px;
    position: relative;
    z-index: 7;
  }
  .neo-brand-logo { width: 146px; }
  .neo-nav-links,
  .neo-nav-cta { display: none !important; }
  .neo-menu-button {
    display: grid !important;
    width: 42px;
    height: 42px;
    position: relative;
    z-index: 6;
  }
  .neo-nav-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    z-index: 1;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(3, 5, 9, .66);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    cursor: default;
    pointer-events: auto;
  }
  .neo-mobile-navigation[hidden] { display: none !important; }
  .neo-mobile-navigation:not([hidden]) {
    display: block !important;
    position: fixed;
    z-index: 5;
    top: calc(max(10px, env(safe-area-inset-top)) + 62px);
    left: 12px;
    right: 12px;
    width: min(540px, calc(100% - 24px));
    max-height: calc(100dvh - max(90px, env(safe-area-inset-top) + 84px));
    margin: 0 auto;
    padding: 18px;
    overflow: auto;
    overscroll-behavior: contain;
    color: #fff8de;
    background:
      radial-gradient(circle at 95% 0%, rgba(232, 20, 143, .19), transparent 38%),
      radial-gradient(circle at 0% 100%, rgba(255, 157, 0, .14), transparent 42%),
      rgba(10, 12, 17, .97);
    border: 1px solid rgba(255, 248, 222, .18);
    border-radius: 24px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .58), inset 0 1px rgba(255,255,255,.06);
    pointer-events: auto;
    scrollbar-width: thin;
  }
  body.neo-nav-open { overflow: hidden; touch-action: none; }
  .mobile-nav-head {
    display: grid;
    gap: 6px;
    padding: 2px 2px 15px;
    border-bottom: 1px solid rgba(255, 248, 222, .12);
  }
  .mobile-nav-eyebrow,
  .mobile-nav-kicker {
    margin: 0;
    color: #ffb128;
    letter-spacing: .16em;
    text-transform: uppercase;
    font-size: .66rem;
    font-weight: 900;
  }
  .mobile-nav-head strong {
    letter-spacing: -.02em;
    font-size: 1.35rem;
    line-height: 1.1;
  }
  .mobile-nav-head p:last-child {
    margin: 0;
    color: rgba(255, 248, 222, .66);
    font-size: .82rem;
    line-height: 1.45;
  }
  .mobile-nav-group { margin-top: 17px; }
  .mobile-nav-services {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 9px;
  }
  .neo-mobile-navigation .mobile-nav-service {
    display: grid;
    align-content: center;
    min-width: 0;
    min-height: 82px;
    padding: 12px;
    color: #fff8de;
    text-decoration: none;
    background: rgba(255, 255, 255, .055);
    border: 1px solid rgba(255, 248, 222, .105);
    border-radius: 15px;
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
  }
  .neo-mobile-navigation .mobile-nav-service:first-child {
    background: linear-gradient(135deg, rgba(255,157,0,.22), rgba(232,20,143,.15));
    border-color: rgba(255, 177, 40, .32);
  }
  .neo-mobile-navigation .mobile-nav-service span {
    font-size: .82rem;
    font-weight: 850;
    line-height: 1.2;
  }
  .neo-mobile-navigation .mobile-nav-service small {
    margin-top: 5px;
    color: rgba(255, 248, 222, .57);
    font-size: .67rem;
    line-height: 1.3;
  }
  .neo-mobile-navigation .mobile-nav-service:hover,
  .neo-mobile-navigation .mobile-nav-service:focus-visible,
  .neo-mobile-navigation .mobile-nav-service[aria-current="page"] {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, .09);
    border-color: rgba(255, 177, 40, .55);
  }
  .mobile-nav-link-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 12px;
    margin-top: 5px;
  }
  .neo-mobile-navigation .mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 46px;
    padding: 8px 2px;
    color: rgba(255, 248, 222, .8);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 248, 222, .09);
    font-size: .8rem;
    font-weight: 700;
  }
  .neo-mobile-navigation .mobile-nav-link::after {
    content: "↗";
    color: #ff9d00;
    font-size: .8rem;
  }
  .neo-mobile-navigation .mobile-nav-link:hover,
  .neo-mobile-navigation .mobile-nav-link:focus-visible,
  .neo-mobile-navigation .mobile-nav-link[aria-current="page"] { color: #fff8de; }
  .neo-mobile-navigation .mobile-nav-cta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 72px;
    margin-top: 17px;
    padding: 14px 15px;
    color: #fff8de;
    text-decoration: none;
    background: linear-gradient(112deg, #ff8a00, #ff5c2a 35%, #e8148f 72%, #6d20c8);
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 17px;
    box-shadow: 0 14px 36px rgba(232, 20, 143, .22);
  }
  .mobile-nav-cta-copy { display: grid; gap: 3px; min-width: 0; }
  .mobile-nav-cta-copy strong { font-size: .95rem; line-height: 1.15; }
  .mobile-nav-cta-copy small { color: rgba(255,255,255,.76); font-size: .7rem; line-height: 1.35; }
  .mobile-nav-cta-arrow {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(8, 10, 14, .84);
    font-size: 1rem;
  }
  .neo-mobile-navigation .mobile-nav-email {
    display: block;
    margin-top: 9px;
    padding: 9px 4px 2px;
    color: rgba(255, 248, 222, .62);
    text-align: center;
    text-decoration: none;
    font-size: .7rem;
    font-weight: 650;
  }
}

@media (min-width: 961px) {
  .neo-menu-button,
  .neo-mobile-navigation,
  .neo-nav-backdrop { display: none !important; }
}

/* The eight-image section becomes a fast, scannable two-column gallery. */
.opportunities-copy-toggle { display: none; }
@media (max-width: 640px) {
  .neo-opportunities-section {
    padding: 54px 10px 68px !important;
  }
  .opportunities-panel {
    padding: 24px 14px 18px !important;
    border-radius: 24px !important;
  }
  .opportunities-heading-row {
    gap: 14px !important;
  }
  .neo-opportunities-section .opportunities-display-title {
    display: grid !important;
    gap: 2px !important;
    white-space: normal !important;
    font-size: clamp(2.08rem, 10.6vw, 2.95rem) !important;
    line-height: .88 !important;
  }
  .opportunities-display-title > span { display: block; min-width: 0; }
  .opportunities-explore {
    width: 100%;
    min-width: 0 !important;
    min-height: 48px;
    padding: 12px 16px !important;
    font-size: .88rem !important;
  }
  .opportunities-intro {
    margin-top: 16px !important;
    font-size: .86rem !important;
    line-height: 1.58 !important;
  }
  .opportunities-copy-enhanced .opportunities-intro:not(.is-expanded) {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
  }
  .opportunities-copy-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    margin: 3px 0 0;
    padding: 0;
    color: #8a351d;
    background: transparent;
    border: 0;
    text-decoration: underline;
    text-underline-offset: 4px;
    font: inherit;
    font-size: .78rem;
    font-weight: 850;
    cursor: pointer;
  }
  .opportunities-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px 10px !important;
    margin-top: 24px !important;
  }
  .opportunity-card { border-radius: 15px !important; }
  .opportunity-image {
    aspect-ratio: 4 / 3 !important;
    border-radius: 15px 15px 0 0 !important;
  }
  .opportunity-footer {
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 6px !important;
    min-height: 48px !important;
    padding: 8px !important;
    border-radius: 0 0 15px 15px !important;
  }
  .opportunity-footer-group { min-width: 0; }
  .opportunity-footer-group--right {
    justify-content: flex-end;
    margin-left: auto !important;
  }
  .opportunity-avatar {
    width: 22px !important;
    height: 22px !important;
    font-size: .46rem !important;
  }
  .opportunity-footer-copy {
    display: block;
    overflow: visible !important;
    white-space: normal !important;
    text-align: right;
    font-size: clamp(.61rem, 2.65vw, .72rem) !important;
    line-height: 1.16;
  }
}

/* Reduce avoidable mobile scrolling while preserving the visual character. */
@media (max-width: 560px) {
  html { scroll-padding-top: 86px; }
  body { -webkit-text-size-adjust: 100%; }
  .neo-collection {
    min-height: 0 !important;
    padding: 60px 18px 40px !important;
  }
  .neo-collection .neo-section-grid { gap: 16px !important; }
  .neo-collection .neo-pill-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px !important;
    margin-top: 24px !important;
  }
  .neo-collection .neo-pill-grid span {
    min-height: 44px !important;
    padding: 8px 10px !important;
    font-size: .7rem !important;
    line-height: 1.25;
  }
  .collection-statue-visual {
    min-height: 430px !important;
    margin-top: 22px !important;
    margin-bottom: 14px !important;
  }
  .neo-lower-flow { padding-top: 58px !important; }
  .neo-lower-flow > section { margin-bottom: 52px !important; }
  .neo-lower-flow .feature-statue { min-height: 390px !important; }
  .neo-lower-flow .feature-statue img { max-height: 430px !important; }
  .neo-lower-flow .neo-process { padding-top: 24px !important; }
  .neo-lower-flow .process-grid { gap: 10px !important; }
  .neo-lower-flow .process-card {
    min-height: 0 !important;
    padding: 16px 12px 18px !important;
    border: 1px solid rgba(255, 248, 222, .12);
    border-radius: 16px;
    background: rgba(255, 255, 255, .035);
  }
  .neo-lower-flow .process-icon { width: 46px; height: 46px; }
  .neo-lower-flow .process-icon svg { width: 20px; height: 20px; }
  .neo-lower-flow .process-number { top: 14px; right: 11px; font-size: 1.65rem; }
  .neo-lower-flow .process-card h3 { margin-top: 14px; font-size: 1.15rem; }
  .neo-lower-flow .process-card p {
    margin-top: 8px;
    font-size: .75rem !important;
    line-height: 1.55 !important;
  }
  .neo-lower-flow .neo-devon-section .devon-copy-block { padding: 42px 20px !important; }
  .neo-lower-flow .devon-image-stack { min-height: 430px !important; }
  .neo-lower-flow .neo-proof-section,
  .neo-lower-flow .neo-faq-section { padding: 26px 18px !important; }
  .faq-item button { min-height: 58px; }
  .neo-lower-flow .neo-contact-section { padding: 24px 10px !important; }
  .neo-lower-flow .contact-core { padding: 30px 15px !important; }
  .neo-form { gap: 13px; margin-top: 28px !important; }
  .neo-form-grid { grid-template-columns: 1fr !important; gap: 13px !important; }
  .neo-form input,
  .neo-form textarea {
    font-size: 16px !important;
    border-radius: 12px !important;
  }
  .neo-form input { min-height: 52px; }
  .neo-form textarea { min-height: 150px; }
  .neo-form button {
    width: 100%;
    min-height: 54px;
    justify-content: center;
  }
  .neo-form-privacy { font-size: .71rem !important; line-height: 1.55 !important; }
  .footer-grid { gap: 28px 18px !important; }
}

@media (max-width: 360px) {
  .neo-lower-flow .process-grid { grid-template-columns: 1fr !important; }
  .mobile-nav-services { gap: 7px; }
  .neo-mobile-navigation .mobile-nav-service { min-height: 78px; padding: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .neo-nav-links a::after,
  .neo-mobile-navigation a { transition: none !important; }
}

/* Small refinements after device-width visual review. */
@media (max-width: 960px) {
  .mobile-nav-services .mobile-nav-service:last-child {
    grid-column: 1 / -1;
    min-height: 68px;
  }
  .neo-mobile-navigation .mobile-nav-email {
    margin-top: 9px !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  .neo-mobile-navigation .mobile-nav-link[data-section-current="true"],
  .neo-mobile-navigation .mobile-nav-service[data-section-current="true"] {
    color: #fff8de;
    border-color: rgba(255, 177, 40, .55);
  }
}


/* V7 — keep opportunity artwork and footers as one seamless, edge-to-edge card. */
.opportunities-grid .opportunity-card {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-width: 0;
  overflow: hidden;
  border-radius: 22px;
}
.opportunities-grid .opportunity-image {
  width: 100%;
  min-width: 0;
  flex: 0 0 auto;
  line-height: 0;
  isolation: isolate;
}
.opportunities-grid .opportunity-image img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  transform: scale(1.008);
  transform-origin: 50% 50%;
}
.opportunities-grid .opportunity-card:hover .opportunity-image img {
  transform: scale(1.045);
}
@media (min-width: 641px) {
  .opportunities-grid .opportunity-image img[src*="/opportunities/areas-we-serve/"] {
    transform: scale(1.08);
  }
  .opportunities-grid .opportunity-card:hover .opportunity-image img[src*="/opportunities/areas-we-serve/"] {
    transform: scale(1.12);
  }
}
.opportunities-grid .opportunity-footer {
  width: 100%;
  min-width: 0;
  flex: 1 0 auto;
  box-sizing: border-box;
  margin-top: -1px;
}

/* V7 — the service pills remain beside the statue on wide screens. */
.seo-showcase-flow .neo-collection .neo-section-grid {
  grid-template-areas:
    "collection-copy collection-visual"
    "collection-pills collection-visual";
  column-gap: 74px;
  row-gap: 0;
  align-items: start;
}
.seo-showcase-flow .neo-collection .neo-section-grid > :first-child {
  grid-area: collection-copy;
  min-width: 0;
}
.seo-showcase-flow .neo-collection .neo-section-grid > .collection-visual {
  grid-area: collection-visual;
  min-width: 0;
}
.seo-showcase-flow .neo-collection .neo-section-grid > .neo-pill-grid {
  grid-area: collection-pills;
  align-self: start;
}

/* Below 1180px, let the copy and artwork breathe, then give the pills a full-width row. */
@media (min-width: 1121px) and (max-width: 1179px) {
  .seo-showcase-flow .neo-collection .neo-section-grid {
    grid-template-areas:
      "collection-copy collection-visual"
      "collection-pills collection-pills";
    column-gap: clamp(42px, 5vw, 64px) !important;
    row-gap: 38px !important;
    align-items: center;
  }
}

/* Keep the established stacked layout at narrower widths, with pills last. */
@media (max-width: 1120px) {
  .seo-showcase-flow .neo-collection .neo-section-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
      "collection-copy"
      "collection-visual"
      "collection-pills";
    column-gap: 0 !important;
    row-gap: 24px !important;
  }
}

@media (max-width: 1179px) {
  .seo-showcase-flow .neo-collection .neo-section-grid > .neo-pill-grid {
    width: 100%;
    max-width: none !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px !important;
    margin-top: 4px !important;
  }
  .seo-showcase-flow .neo-collection .neo-section-grid > .neo-pill-grid span {
    justify-content: center;
    min-width: 0;
    padding-inline: 14px;
    text-align: center;
  }
}

@media (max-width: 767px) {
  .seo-showcase-flow .neo-collection .neo-section-grid > .neo-pill-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  .opportunities-grid .opportunity-card {
    border-radius: 15px;
  }
}

/* V9 — repair and rebalance the long proof sections.
   The statue now behaves like an editorial lead image: text sits alongside it
   only while the image is present, then continues across the full panel. */
@media (min-width: 981px) {
  .neo-lower-flow .neo-proof-section {
    display: flow-root !important;
    padding: clamp(48px, 4.5vw, 72px) !important;
  }

  .neo-lower-flow .proof-statue {
    float: left;
    display: block;
    width: clamp(340px, 44%, 570px);
    min-height: 0 !important;
    margin: 0 clamp(34px, 4vw, 70px) 28px 0;
    transform: none;
  }

  .reveal-enabled .neo-lower-flow .proof-statue[data-reveal="left"] {
    transform: translate(-44px, 20px);
  }

  .reveal-enabled .neo-lower-flow .proof-statue[data-reveal="left"].is-visible {
    transform: none;
  }

  .neo-lower-flow .proof-statue-glow {
    inset: 8% -2% 4% -4%;
  }

  .neo-lower-flow .proof-statue img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain;
    object-position: center top;
  }

  .neo-lower-flow .proof-copy {
    display: block;
    min-width: 0;
  }

  .neo-lower-flow .proof-copy > .neo-label {
    padding-top: 12px;
  }

  .neo-lower-flow .proof-copy h2 {
    margin-bottom: 28px;
    text-wrap: balance;
  }

  .neo-lower-flow .proof-copy p {
    text-wrap: pretty;
    orphans: 3;
    widows: 3;
  }

  .neo-lower-flow .internal-proof-section,
  .neo-lower-flow .internal-related-links {
    max-width: none;
  }

  /* Related routes finish the panel as a balanced full-width row. */
  .neo-lower-flow .internal-related-links {
    clear: both;
    margin-top: 2.4rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(16, 17, 19, .16);
  }

  .neo-lower-flow .internal-related-links ul {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .neo-lower-flow .internal-related-links li {
    min-height: 94px;
    align-content: start;
    padding: 16px 17px;
    border: 1px solid rgba(16, 17, 19, .12);
    border-radius: 14px;
    background: rgba(255, 255, 255, .22);
  }
}

/* V9 — keep the opportunity artwork completely edge-to-edge even during
   high-density responsive image selection and card hover transforms. */
.opportunities-grid .opportunity-image {
  background: transparent;
}

.opportunities-grid .opportunity-image img {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
