/* Approved desktop stays in site.css. Compact view only simplifies that page.
 * Touch phones in landscape use the same compact layout, without affecting
 * the desktop composition already approved at widths around 900 px.
 */
@media (max-width: 768px), (max-width: 1023px) and (hover: none) and (pointer: coarse) {
  html { scroll-behavior: auto; scroll-padding-top: 24px; }
  body { overflow-wrap: break-word; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .motion-enabled .reveal { opacity: 1; transform: none; }
  .rails { width: calc(100% - 32px); }
  .section { padding: 56px 22px; }
  .section-heading { margin-bottom: 28px; }
  .section-heading h2, h2 { font-size: 29px; line-height: 1.2; letter-spacing: -.75px; }
  .section-heading .eyebrow { margin-bottom: 15px; }
  .section-heading > p:last-child:not(.eyebrow) { font-size: 16px; line-height: 1.6; margin-top: 20px; }

  .header-inner { height: 76px; padding-inline: 16px; gap: 10px; background: #fff; }
  .brand { width: 122px; height: 48px; }
  .brand img { width: 145px; height: auto; top: -15px; left: -1px; }
  .header-cta { min-height: 44px; font-size: 13px; gap: 6px; }
  .header-cta svg { width: 14px; }
  .menu-toggle { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; flex-shrink: 0; width: 44px; height: 44px; padding: 10px; margin: 0; background: transparent; }
  .menu-toggle span { display: block; width: 20px; height: 1.5px; background: var(--blue); }
  .menu-toggle[aria-expanded=true] span:first-child { transform: translateY(3.25px) rotate(45deg); }
  .menu-toggle[aria-expanded=true] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }
  .main-nav { display: none; position: absolute; top: 72px; left: 24px; right: 24px; margin: 0; padding: 12px 20px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 12px 28px -10px #19396135; }
  .main-nav.is-open { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav a, .main-nav a:nth-child(3) { display: flex; justify-content: space-between; min-height: 48px; padding: 13px 0; font-size: 15px; }

  .hero-ribbons, .hero-note, .work-strip, .portfolio-carousel,
  .card-aurora, .card-web-mesh, .web-visual, .shop-visual,
  .seo-network, .search-visual, .social-visual, .brand-visual,
  .contact-ribbon, .contact-orbit { display: none !important; }
  .hero-inner { min-height: 0; padding: 112px 24px 44px; }
  .hero-content { width: 100%; max-width: 600px; }
  .hero-eyebrow { font-size: 11px; line-height: 1.5; gap: 7px; margin-bottom: 23px; }
  .hero-eyebrow .status-dot { flex-shrink: 0; }
  .hero h1 { font-size: clamp(34px, 9.75vw, 43px); line-height: 1.1; letter-spacing: -1.2px; }
  .hero h1 > span.hero-title-main { display: block; margin: 0; color: var(--ink); background: none; -webkit-text-fill-color: var(--ink); }
  .hero h1 > br, .hero h1 > span:not(.hero-title-main), .desktop-break { display: none; }
  .hero-description { max-width: 40ch; font-size: 16px; line-height: 1.6; margin-top: 23px; }
  .hero .actions { display: flex; flex-direction: column; align-items: stretch; gap: 12px; margin-top: 26px; }
  .hero .button { width: 100%; min-height: 46px; padding: 12px 16px; font-size: 14px; border-radius: 8px; box-shadow: none; transform: none; }
  .button-soft { backdrop-filter: none; }

  .bento { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .bento > .service-card, .bento > .service-card:nth-child(n+3) { grid-column: 1 / -1; min-height: 0; box-shadow: none; }
  .bento .service-card::after { display: none; }
  .bento .service-card::before { opacity: .13; }
  .bento .card-copy, .bento > .service-card:nth-child(n+3) .card-copy { padding: 24px 22px; max-width: none; }
  .bento .service-label, .bento > .service-card:nth-child(n+3) .service-label { font-size: 12px; gap: 7px; }
  .bento .card-copy h3, .bento > .service-card:nth-child(n+3) h3 { font-size: 25px; line-height: 1.17; margin: 17px 0 11px; letter-spacing: -.6px; }
  .bento .card-copy p, .bento > .service-card:nth-child(n+3) .card-copy p { max-width: 40ch; font-size: 16px; line-height: 1.55; color: #52647a; }
  .card-link { min-height: 32px; margin-top: 12px; font-size: 13px; }
  .card-arrow { right: 18px; bottom: 18px; font-size: 20px; }

  .work-showcase { display: flex; flex-direction: column; align-items: stretch; gap: 24px; }
  .work-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
  .work-tab { min-height: 74px; gap: 8px; padding: 14px 5px; color: #52647a; }
  .work-tab.is-active { color: var(--blue); }
  .work-tab b { font-size: 15px; line-height: 1.35; }
  .work-tab small, .tab-number, .work-tab svg { display: none; }
  .work-tab::before { left: -8px; top: 17px; bottom: 17px; }
  .work-selector .text-link { min-height: 44px; margin-top: 12px; font-size: 14px; }
  .work-panel { width: 100%; }
  .work-preview { padding: 12px 12px 0; }
  .work-preview > img { width: 100%; height: auto; aspect-ratio: 950 / 633; object-fit: contain; transform: none; filter: none; }
  .work-caption { padding: 16px; font-size: 14px; }

  .approach-grid { grid-template-columns: 1fr; gap: 28px; margin-top: 30px; }
  .approach-card { padding-left: 19px; }
  .approach-icon { margin-bottom: 12px; }
  .approach-card h3 { font-size: 19px; margin-bottom: 10px; }
  .approach-card p { font-size: 16px; line-height: 1.6; }
  .testimonials-heading { display: block; margin-bottom: 26px; }
  /* Testimonios en móvil: una tarjeta visible y el resto con scroll horizontal (se asoma la siguiente). */
  .quotes-grid {
    display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 86%;
    gap: 14px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
    scrollbar-width: none; padding-bottom: 4px;
  }
  .quotes-grid::-webkit-scrollbar { display: none; }
  .quote-card { scroll-snap-align: start; min-width: 0; }
  .quotes-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
  .quotes-dots { display: flex; gap: 8px; }
  .quotes-dots i { width: 8px; height: 8px; border-radius: 50%; background: #c4d4e1; transition: background .25s, width .25s; }
  .quotes-dots i.is-active { width: 22px; border-radius: 4px; background: var(--blue); }
  .quotes-hint { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: #53677d; transition: opacity .4s; }
  .quotes-hint svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; animation: quotes-nudge 1.6s ease-in-out infinite; }
  .quotes-nav.is-used .quotes-hint { opacity: 0; }
  .quotes-nav.is-used .quotes-hint svg { animation: none; }
  @keyframes quotes-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(6px); } }
  @media (prefers-reduced-motion: reduce) { .quotes-hint svg { animation: none; } }
  .quote-card { padding: 24px; box-shadow: none; }
  .quote-card blockquote { font-size: 18px; line-height: 1.5; margin: 14px 0 24px; }
  .quote-card figcaption small { color: #53677d; }

  .contact-section { background: #101b38; color: #fff; border-color: #263456; }
  .contact-section::before { display: none; }
  .contact-section .contact-inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 25px; padding: 48px 24px; border-color: #ffffff12; }
  .contact-section .contact-copy { display: block; }
  .contact-section .contact-copy .eyebrow { max-width: none; color: #a6d7cb; font-size: 12px; margin-bottom: 20px; }
  .contact-section .contact-copy h2 { font-size: clamp(32px, 8.5vw, 40px); line-height: 1.13; letter-spacing: -1px; color: #fff; }
  .contact-section .contact-copy > p:not(.eyebrow) { max-width: 35ch; color: #b7c7df; font-size: 16px; line-height: 1.6; margin: 20px 0 23px; }
  .contact-section .contact-copy .button { background: #fff; color: var(--blue); min-height: 46px; font-size: 14px; box-shadow: none; }
  .contact-section .contact-details { display: block; }
  .contact-section .contact-details > a { min-height: 78px; padding: 20px 0; border-color: #ffffff26; }
  .contact-section .contact-details > a > span { color: #b7c7df; font-size: 13px; margin-bottom: 9px; }
  .contact-section .contact-details > a > strong { color: #fff; font-size: clamp(18px, 5.7vw, 24px); letter-spacing: -.3px; }
  .contact-section .contact-details > a > svg { color: #a6d7cb; width: 18px; }
  .contact-section :is(a, button):focus-visible { outline-color: #a6d7cb; }

  .footer-inner { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 40px 24px 0; }
  .footer-brand { display: block; }
  .footer-brand > p { margin-top: 10px; font-size: 14px; line-height: 1.6; }
  .footer-location { margin-top: 12px; font-size: 12px; }
  .footer-column:nth-child(2), .footer-column:nth-child(3) { display: none; }
  .footer-column { padding: 0; gap: 0; font-size: 15px; }
  .footer-column > h3 { font-size: 14px; margin: 0 0 4px; }
  .footer-column > a { display: flex; align-items: center; min-height: 44px; padding-block: 10px; gap: 4px; }
  .footer-column > .footer-legal-title { margin: 22px 0 4px; }
  .footer-bottom { flex-direction: row; align-items: center; margin: 0; padding: 12px 0; font-size: 12px; }
  .footer-bottom > a { display: flex; align-items: center; min-height: 44px; }
}

@media (max-width: 359px) {
  .rails { width: calc(100% - 24px); }
  .header-inner { padding-inline: 10px; gap: 4px; }
  .header-inner .brand { width: 108px; }
  .header-cta { font-size: 12px; }
  .hero-inner { padding-inline: 20px; }
  .hero-eyebrow { font-size: 11px; gap: 5px; }
  .section { padding-inline: 18px; }
  .bento .card-copy, .bento > .service-card:nth-child(n+3) .card-copy { padding-inline: 20px; }
  .footer-inner { padding-inline: 20px; }
}
