/* =========================================================
   OYANGUREN ABOGADOS — Capa móvil
   Se carga la última en cada página. Diseño pensado para el
   teléfono (no la web de escritorio encogida): escala tipográfica
   propia, ritmo vertical más corto, lectura a todo el ancho y
   acciones a pulgar.
   ========================================================= */

/* Botón de adjuntar archivo con el estilo de la web (todas las anchuras) */
.field--file input::file-selector-button {
  font: inherit; font-size: .85rem; font-weight: 500;
  color: var(--ink); background: transparent;
  border: 1px solid var(--line-2); border-radius: 0;
  padding: .55rem 1rem; margin-right: .9rem; cursor: pointer;
  transition: border-color .25s, background .25s, color .25s;
}
.field--file input::file-selector-button:hover { border-color: var(--ink); background: var(--ink); color: var(--cream); }

@media (max-width: 640px) {

  /* ---------- Base ---------- */
  :root { --gut: 1.25rem; }
  body { font-size: 16px; line-height: 1.55; }
  p { line-height: 1.6; }

  .header { padding-block: 1rem; }
  .header.scrolled { padding-block: .7rem; }
  .brand__name { font-size: 1.28rem; }

  .section { padding-block: 3.1rem; }
  .section--tight { padding-block: 2.3rem; }

  /* ---------- Escala tipográfica móvil ---------- */
  h2.section-title { font-size: 1.72rem; line-height: 1.12; }
  h3 { font-size: 1.22rem; line-height: 1.2; }
  .lead { font-size: 1rem; }
  .sechead { margin-bottom: 1.6rem; }

  .pagehead { padding-top: 6.4rem; padding-bottom: 2rem; }
  .pagehead h1 { font-size: 2rem; line-height: 1.1; }
  .pagehead p { margin-top: 1rem; font-size: 1rem; }

  /* Botones a pulgar: anchos completos en bloques de contenido */
  .simband__grid .btn,
  .cta-band .btn,
  .section.dark .btn,
  .form .btn,
  .res-cta .btn,
  .center > .btn { width: 100%; justify-content: center; }
  .cta-band .actions, .cta-band .actions--right { align-items: stretch; }
  /* Zona táctil cómoda (≥44px) en enlaces subrayados sin mover el subrayado */
  .link { position: relative; }
  .link::before { content: ""; position: absolute; inset: -10px -4px; }

  /* ---------- HOME · Hero: foto a sangre, estática, texto abajo ---------- */
  .ohero__scroller { height: auto; }
  .ohero__sticky {
    position: relative; height: auto; min-height: 100svh;
    place-items: end stretch;
    padding: 7rem 0 2.4rem;
  }
  .ohero__media { opacity: 1 !important; transform: none !important; border-radius: 0 !important; }
  .ohero__media img { object-position: 74% 18%; }
  .ohero__media::after {
    background: linear-gradient(to top, rgba(14,12,11,.92) 0%, rgba(14,12,11,.72) 38%, rgba(14,12,11,.2) 70%, rgba(14,12,11,.45) 100%);
  }
  .ohero__content { color: var(--cream) !important; text-align: left; }
  .ohero__title { font-size: 2.35rem; line-height: 1.05; max-width: 13ch; margin: 0; }
  .ohero__sub { margin: 1rem 0 0; max-width: 34ch; font-size: .98rem; line-height: 1.55; opacity: .88; }
  .ohero__sub-line { display: inline; }
  .ohero__actions { flex-direction: column; align-items: stretch; gap: 1rem; margin-top: 1.7rem; }
  .ohero__content .btn { --bg: var(--cream) !important; --fg: var(--ink) !important; width: 100%; justify-content: center; }
  .ohero .link { align-self: center; }
  /* Cabecera clara mientras está sobre la foto */
  body.hero-dark:not(.nav-open) .header:not(.scrolled) .brand { color: var(--cream); }
  body.hero-dark:not(.nav-open) .header:not(.scrolled) .burger span { background: var(--cream); }

  /* ---------- HOME · Sobre Marta ---------- */
  .about__grid { gap: 2.2rem; }
  .about__photo { max-width: none; }
  .about__photo img { aspect-ratio: 1 / 1; object-position: 50% 30%; }
  .about__body .link { margin-top: 1.6rem; }
  .rlist { margin-top: 1.6rem; }
  .rlist li { font-size: .9rem; padding-block: .8rem; }

  /* ---------- HOME · Áreas de práctica: carrusel deslizable ---------- */
  .section--wine .svcx {
    display: flex; gap: .8rem;
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--gut);
    margin-inline: calc(var(--gut) * -1); padding: 0 var(--gut) .4rem;
    border-top: 0; scrollbar-width: none;
  }
  .section--wine .svcx::-webkit-scrollbar { display: none; }
  .section--wine .svcx__row {
    flex: 0 0 82%; scroll-snap-align: start;
    display: flex; flex-direction: column; gap: .7rem;
    min-height: 15.5rem; padding: 1.4rem 1.3rem 1.2rem;
    border: 1px solid rgba(243,243,241,.18); border-radius: var(--radius-img);
    background: rgba(243,243,241,.05);
  }
  .section--wine .svcx__row[data-reveal] { opacity: 1; transform: none; }
  .section--wine .svcx__row:last-child { margin-right: var(--gut); }
  .svcx__num { font-size: .72rem; }
  .svcx__row h3 { font-size: 1.3rem; }
  .svcx__row p { font-size: .9rem; max-width: none; }
  .svcx__arrow { margin-top: auto; align-self: flex-end; font-size: 1.2rem; }
  .svcx-foot { margin-top: 1.6rem; }

  /* ---------- HOME · Simulador / publicaciones / proceso / FAQ ---------- */
  .simband__grid { gap: 2.4rem; }
  .simband__grid h2 { margin-bottom: 1rem; }
  .simband__grid .btn { margin-top: 1.5rem; }
  .simcard__total { font-size: 2.3rem; }
  .split, .split--wideL { gap: 2rem; }
  .split [style*="margin-top:2.2rem"] { margin-top: 1.5rem !important; }
  .figbw { margin-top: 1.6rem; }
  .steps { gap: 1.6rem; }
  .step { padding-top: 1.2rem; }
  .step h3 { font-size: 1.25rem; margin-bottom: .5rem; }
  .faq__q { font-size: 1.1rem; padding-block: 1.2rem; gap: 1rem; }
  .features { gap: 1.6rem; }
  .feature { padding-top: 1.2rem; }
  .feature h3 { font-size: 1.25rem; }

  .cta-band__inner { gap: 1.6rem; }
  .cta-band h2 { font-size: 1.85rem; line-height: 1.1; }

  /* ---------- SERVICIOS: tarjetas deslizables ---------- */
  .svc-list {
    display: flex; gap: .8rem; align-items: stretch;
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--gut);
    margin-inline: calc(var(--gut) * -1); padding: .2rem var(--gut) .6rem;
    border-top: 0; scrollbar-width: none;
  }
  .svc-list::-webkit-scrollbar { display: none; }
  .svc-row {
    flex: 0 0 86%; scroll-snap-align: start;
    display: flex; flex-direction: column; gap: .6rem;
    padding: 1.5rem 1.3rem 1.4rem;
    background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius-img);
  }
  .svc-row[data-reveal] { opacity: 1; transform: none; }
  .svc-row:last-child { margin-right: var(--gut); }
  .svc-row__num { padding-top: 0; font-size: .85rem; color: var(--wine); }
  .svc-row h3 { font-size: 1.35rem; }
  .svc-row p { font-size: .93rem; line-height: 1.6; }
  .svc-swipe { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; font-size: .8rem; color: var(--faint); }
  .svc-swipe::after { content: "→"; }

  /* ---------- QUIÉNES SOMOS ---------- */
  .floatcard { padding: 1.1rem 1.2rem; }
  .floatcard__k { font-size: 1.5rem; }
  .split__body h2 { margin-bottom: 1rem; }
  .split__body .btn, .split__body .link { margin-top: 1.6rem; }

  /* ---------- PUBLICACIONES ---------- */
  .pub-group { margin-top: 2.6rem; }
  .pub-group__head { padding-bottom: .6rem; margin-bottom: 1rem; }
  .pub-group__head h2 { font-size: 1.3rem; }
  .pub { gap: .8rem; }
  .pub__item { padding: 1.15rem 1.1rem 1.05rem; }
  .pub__item:hover { transform: none; }
  .pub__title { font-size: 1.08rem; line-height: 1.25; }
  .pub__meta { font-size: .82rem; line-height: 1.5; }
  .pub__links { padding-top: .9rem; gap: .6rem 1rem; }
  .pub__doc img { width: 34px; height: 44px; }
  .center[style*="padding"] { padding: 1.8rem 1.25rem !important; }
  .center[style*="padding"] .section-title { font-size: 1.5rem; }

  /* ---------- SIMULADOR ---------- */
  .sim-grid { gap: 2.4rem; }
  .sim-panel h2 { font-size: 1.35rem; }
  .sim-panel .hint { margin-bottom: 1.5rem; }
  .sim-field { margin-bottom: 1.4rem; }
  .sim-input input[type=number] { font-size: 1.35rem; }
  .sim-select select { font-size: 1.05rem; }
  .res-total { font-size: 2rem; }
  .gate-card { padding: 1.4rem 1.2rem; }
  .gate-card h3 { font-size: 1.2rem; }

  /* ---------- CONTACTO ---------- */
  .contact-grid { gap: 2.6rem; }
  .form { gap: 1.5rem; }
  .grid-2 { grid-template-columns: 1fr; gap: 1.5rem; }
  .field input, .field textarea { font-size: 16px; } /* evita el zoom automático de iOS */
  .field--file input { font-size: .8rem; }
  .check { font-size: .8rem; }
  .info__block p, .info__block a { font-size: .95rem; }
  .map { margin-top: 1.8rem; aspect-ratio: 4 / 3; }
  .form-done { padding: 1.7rem 1.4rem; }
  .form-done h3 { font-size: 1.55rem; }
  .form-done__actions { flex-direction: column; align-items: stretch; }
  .form-done__actions .btn { justify-content: center; }
  .form-done__again { align-self: center; }

  /* ---------- FOOTER ---------- */
  .footer { padding-top: 2.4rem; }
  .footer__main { gap: 1.8rem; }
  .footer__about { font-size: .88rem; }
  .footer__meta { gap: .6rem; }
  .footer__bottom { flex-direction: column; align-items: flex-start; gap: .8rem; }
}
