/* Mobile presentation only. Desktop rules and the classic frame artwork stay intact. */
@media (max-width: 720px) {
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body {   background: var(--nk-canvas); }
  .site-shell { width: 100%; border: 0; box-shadow: none; }
  .site-shell > header { position: sticky; top: 0; z-index: 20; background: var(--nk-paper); border-top: 0; box-shadow: none; }
  .main-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0 8px;
    min-height: 54px;
    padding: 4px 12px;
    background: var(--nk-paper);
    border: 0;
    box-shadow: none;
    text-shadow: none;
    max-height: 100vh;
    max-height: 100dvh;
    overflow-y: auto;
  }
  .main-nav a { text-shadow: none; box-shadow: none; }
  .main-nav a.nav-brand {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    max-width: 104px;
    min-width: 0;
    min-height: 44px;
    justify-content: flex-start;
    padding: 4px 0;
    border: 0;
  }
  .main-nav a.nav-brand img { width: 100%; max-width: 100px; }
  .main-nav > a:not(.nav-brand):not(.nav-quote) {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 44px;
    justify-content: flex-start;
    padding: 4px 12px 4px 0;
    margin-bottom: 3px;
    border: 1px solid var(--nk-line);
    background: var(--nk-row);

  }
  .main-nav > a:not(.nav-brand):not(.nav-quote)::before {
    content: '';
    align-self: stretch;
    flex: 0 0 7px;
    width: 7px;
    margin-right: 10px;
    background: var(--nk-deep);
  }
  .main-nav > a:not(.nav-brand):not(.nav-quote)::after {
    content: '›';
    margin-left: auto;
    padding-left: 12px;
    color: var(--nk-muted);
  }
  .main-nav > a[href='#inicio']:not(.nav-brand) { margin-top: 5px; }
  .main-nav > a:not(.nav-brand):not(.nav-quote):hover {
    background: var(--nk-tint);
  }
  .main-nav > a:not(.nav-brand):not(.nav-quote)[aria-current='page'] {
    background: var(--nk-tint);
    border-color: var(--nk-active-line);
    color: var(--nk-navy);
  }
  .main-nav > a:not(.nav-brand):not(.nav-quote):hover::before,
  .main-nav > a:not(.nav-brand):not(.nav-quote)[aria-current='page']::before {
    background: var(--nk-teal);
  }
  .js .main-nav:not(.is-menu-open) > a:not(.nav-brand):not(.nav-quote) { display: none; }
  .main-nav > a.nav-quote,
  .main-nav > a.nav-quote:hover,
  .main-nav > a.nav-quote[aria-current='page'] {
    display: flex;
    grid-column: 2;
    grid-row: 1;
    min-height: 44px;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid var(--nk-active-line);
    border-radius: 2px;
    background: var(--nk-tint);

    color: var(--nk-accent);
  }
  .nav-quote span { display: none; }
  .js .mobile-nav-toggle {
    display: flex;
    grid-column: 3;
    grid-row: 1;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 44px;
    min-width: 65px;
    padding: 8px;
    color: var(--nk-navy);
    background: var(--nk-frame);
    border: 1px solid var(--nk-outline);
    border-radius: 2px;

  }
  .site-body { display: block; min-height: 0; }
  /* Specialties are reached through the unified directory in the main menu. */
  .sidebar { display: none; }
  .content-area { min-width: 0; padding: 14px 14px 24px; background-image: none; }
  .breadcrumb {  margin-bottom: 13px;  }
  .breadcrumb .breadcrumb-note { display: none; }
  .breadcrumb > span:first-child { min-width: 0; overflow-wrap: anywhere; }
  .panel { --frame-foot-height: 27px; margin-bottom: 21px; }
  .panel-title { min-height: 40px; padding: 10px 32% 10px 13px; }
  .panel-content { padding: 19px 17px; }
  .welcome-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 13px;
    padding: 21px 19px 20px;
    background: var(--nk-paper);
  }
  .welcome-copy { display: contents; }
  .welcome-copy > .eyebrow { order: 0;  margin: 0; }
  .welcome-copy > h1 { order: 1; margin: 0;    }
  .welcome-copy > .welcome-intro { order: 2;   margin: 0; }
  .three-viewer { order: 3; width: 100%; min-height: 158px; height: 158px; margin: -4px 0; }
  .welcome-description { order: 4; border-top: 1px solid var(--nk-line); }
  .welcome-description > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    padding: 9px 0;

    color: var(--nk-accent);
    cursor: pointer;
    list-style: none;
  }
  .welcome-description > summary::-webkit-details-marker { display: none; }
  .welcome-description > summary::after { content: '+';  }
  .welcome-description[open] > summary::after { content: '−'; }
  .welcome-copy .welcome-description p {   margin: 0 0 12px; }
  .welcome-actions { order: 5; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: stretch; margin: 0; }
  .welcome-actions .classic-button { white-space: nowrap; }
  .classic-button { min-height: 44px; padding: 10px 12px;  gap: 10px; }
  .welcome-actions .text-link { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px;  }
  .credential-strip { gap: 6px 14px; padding: 10px 17px;   }
  .specialty-table { padding: 11px; }
  .specialty-table a { grid-template-columns: 31px minmax(0, 1fr) 12px; gap: 10px; min-height: 76px; padding: 12px 9px; }
  .specialty-table small { margin-top: 4px;   }
  .section-more { margin: -9px 0 19px; }
  .section-more a, .service-back { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 8px; }
  .field-strip { display: flex; gap: 13px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; }
  .field-strip a { flex: 0 0 min(70vw, 280px); min-width: 0; padding: 2px;  scroll-snap-align: start; }
  .field-strip img { height: 148px; margin-bottom: 10px; }
  .field-strip small { margin-top: 3px;  }
  .intro-copy {   margin-bottom: 18px; }
  .service-directory { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .directory-item { gap: 13px; align-items: center; min-height: 78px; padding: 14px; }
  .directory-item img { width: 32px; height: 32px; flex-shrink: 0; }
  .service-heading { align-items: flex-start; gap: 12px; padding-bottom: 17px; }
  .service-heading img { width: 36px; height: 36px; flex-shrink: 0; }
  .service-heading > div { min-width: 0; }
  .service-heading h1 {   overflow-wrap: anywhere; }
  .service-heading .eyebrow {  margin-bottom: 5px; }
  .detail-groups { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .detail-group { padding: 15px; }
  .detail-group h2 {  margin-bottom: 12px; }
  .detail-group ul {   padding-left: 18px; }
  .detail-group li + li { margin-top: 8px; }
  .service-cta { flex-direction: column; align-items: stretch; gap: 15px; padding-top: 17px; }
  .service-back { display: flex; justify-content: flex-end; margin: 0 0 17px; }
  .capability { grid-template-columns: 46px minmax(0, 1fr); gap: 14px; padding: 15px; }
  .capability > span {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 12px;
  }
  .standards { gap: 7px; }
  .standards span { padding: 6px 9px;  }
  .gallery-stage img { height: clamp(225px, 72vw, 390px); }
  .gallery-caption { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 14px 0; }
  .gallery-caption small { margin-top: 4px;   }
  .gallery-controls { gap: 6px; }
  .gallery-controls button { width: 44px; min-height: 44px;  }
  .gallery-thumbnails { gap: 7px; }
  .gallery-thumbnails button { min-width: 0; min-height: 60px; padding: 3px; }
  .gallery-thumbnails img { height: 53px; }
  .contact-details { grid-template-columns: minmax(0, 1fr); gap: 21px;  }
  .contact-details .eyebrow {  margin-bottom: 7px; }
  .contact-details a { min-height: 36px; padding: 5px 0; overflow-wrap: anywhere; }
  .contact-links { gap: 0 20px; padding-top: 10px; }
  .contact-links a { display: inline-flex; align-items: center; min-height: 44px;  }
  .contact-form { grid-template-columns: minmax(0, 1fr); gap: 17px; }
  .person-type { gap: 4px 16px; padding: 9px 12px 12px; }
  .person-type label { min-height: 44px;  gap: 8px; }
  .person-type input { width: 17px; height: 17px; }
  .form-field > label {  margin-bottom: 7px; }
  .form-field input, .form-field select, .form-field textarea { min-height: 48px; padding: 11px 12px;  }
  .form-field select { min-width: 0; }
  .form-field textarea { min-height: 130px; }
  .contact-form button[type='submit'] { width: 100%; min-height: 48px;  }
  .site-footer { padding: 0; }
  .footer-inner { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 14px; padding: 20px 18px; }
  .footer-identity { grid-column: 1 / -1; gap: 5px; padding-bottom: 13px; border-bottom: 1px solid var(--nk-line); }
  .footer-right { grid-column: 1; grid-row: 2; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; width: auto; padding-left: 0; border: 0; }
  .footer-right > a { display: flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
  .footer-right > a:first-child { grid-column: 1; grid-row: 1; }
  .footer-right > a:nth-child(2) { grid-column: 1; grid-row: 2; }
}

@media (max-width: 389px) {
  .welcome-actions { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

@media (max-width: 359px) {
  .main-nav { gap: 0 6px; padding-right: 9px; padding-left: 9px; }
  .main-nav a.nav-brand { max-width: 76px; }
  .main-nav a.nav-brand img { max-width: 72px; }
  .main-nav .nav-quote { padding: 8px;  }
  .js .mobile-nav-toggle { min-width: 60px; padding: 7px;  }
  .welcome-layout { padding-right: 16px; padding-left: 16px; }
  .welcome-actions { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .gallery-caption { grid-template-columns: minmax(0, 1fr); }
  .gallery-controls { justify-content: flex-end; }
  .gallery-thumbnails { gap: 5px; }
}

@media (max-width: 720px) {
  .site-footer .theme-toggle { grid-column: 2; grid-row: 2; margin: 0; min-height: 44px; padding: 8px 10px; }
}

@media (max-width: 720px) {
  .contact-map-frame { height: 230px; }
  .contact-map figcaption a { display: inline-flex; align-items: center; min-height: 36px; }
}

@media (max-width: 720px) {
  .welcome-actions { order: 3; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .welcome-actions .classic-button { min-height: 44px; padding: 10px 8px; }
  .three-viewer { order: 4; min-height: 145px; height: 145px; }
  .welcome-description { order: 5; }
  .welcome-copy .welcome-note { order: 6; margin: 0; }
  .specialty-table.commercial-specialties { grid-template-columns: minmax(0, 1fr); gap: 9px; padding: 12px; }
  .specialty-table.commercial-specialties a { min-height: 0; padding: 14px 12px; }
  .field-intro { display: block; padding: 18px 17px 0; }
  .field-intro .text-link { display: inline-flex; align-items: center; min-height: 44px; }
  .project-path { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .project-path li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 4px 12px; }
  .project-path li+li { border: 0; padding: 0; }
  .path-number { grid-row: 1 / 3; margin: 0; }
  .project-path h3 { grid-column: 2; margin: 0; }
  .project-path p { grid-column: 2; }
  .commercial-cta>.classic-button { width: 100%; min-height: 44px; }
  .service-filters button { min-height: 44px; padding: 8px 11px; }
  .service-quick-actions { align-items: stretch; }
  .service-quick-actions>.classic-button { width: 100%; }
  .service-quick-actions>.text-link { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (max-width: 389px) {
  .welcome-actions { grid-template-columns: minmax(0, 1fr); }
}
