/* Azulae Shifts · interfaz de móvil y tablet.
   Solo por debajo de 1024. El escritorio no entra en esta hoja.
   Se carga después de style.css y motion.css. */

.navigation .nav-demo {
  display: none;
}

@media (max-width: 1023px) {
  html {
    scroll-padding-top: calc(68px + env(safe-area-inset-top));
    scroll-padding-bottom: env(safe-area-inset-bottom);
  }

  ::selection {
    background: var(--ice);
    color: var(--ink);
  }

  .wrap {
    --gutter: 20px;
    width: min(720px, calc(100% - var(--gutter) * 2));
  }

  .section {
    padding-block: 64px;
  }

  h1, h2, h3 {
    text-wrap: balance;
  }

  .button:active {
    transform: scale(0.98);
  }

  /* Cabecera corta. La demostración queda en el héroe, en cada sección y en el menú. */
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding-top: env(safe-area-inset-top);
    background: color-mix(in srgb, var(--paper) 94%, white);
  }

  body {
    padding-top: calc(56px + env(safe-area-inset-top));
  }

  .header-inner {
    height: 56px;
    gap: 12px;
  }

  .brand img {
    width: auto;
    height: 28px;
  }

  .header-inner > .button {
    display: none;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-left: auto;
  }

  .navigation {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: fixed;
    z-index: 40;
    top: calc(56px + env(safe-area-inset-top));
    left: 0;
    right: 0;
    height: calc(100dvh - 56px - env(safe-area-inset-top));
    margin: 0;
    padding: 8px 24px calc(24px + env(safe-area-inset-bottom));
    background: var(--paper);
    border-radius: 0;
    box-shadow: none;
    overflow: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    translate: 0 8px;
    transition: opacity .22s var(--ease), translate .28s var(--ease), visibility .28s;
  }

  .navigation.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    translate: 0 0;
  }

  .navigation a {
    min-height: 56px;
    justify-content: flex-start;
    padding: 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    white-space: normal;
  }

  .navigation a[aria-current] {
    color: var(--blue);
    text-decoration: none;
  }

  .navigation .nav-demo {
    display: inline-flex;
    width: 100%;
    min-height: 52px;
    margin-top: auto;
    border-bottom: 0;
    justify-content: center;
    font-size: 0.94rem;
    font-weight: 550;
    letter-spacing: 0;
    color: #fff;
  }

  html.nav-open,
  html.nav-open body {
    overflow: hidden;
  }

  html.nav-open .consent-badge,
  html.nav-open .consent-banner {
    visibility: hidden;
  }

  /* Héroe: el texto respira y una sola card cierra la pantalla. */
  .hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100dvh - 56px - env(safe-area-inset-top));
    padding: 32px 0 36px;
    border-radius: 0 0 24px 24px;
  }

  .hero h1 {
    max-width: 14ch;
    margin-inline: auto;
    font-size: clamp(2.15rem, 6.2vw, 3.3rem);
    font-weight: 650;
    line-height: 1.14;
    letter-spacing: -0.035em;
  }

  .hero-copy > p {
    max-width: 34ch;
    margin: 18px auto 0;
    font-size: 1rem;
    line-height: 1.55;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: min(100%, 420px);
    margin: 24px auto 0;
    gap: 12px;
  }

  .hero-actions > .button {
    width: 100%;
    min-height: 48px;
  }

  .hero-stage {
    width: min(720px, calc(100% - 40px));
    margin: 32px auto 0;
  }

  .hero-stage .browser-wrap,
  .hero-stage .browser {
    width: 100%;
  }

  .hero-stage .browser {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }

  .hero-stage .browser-bar,
  .hero-stage .app-crumb,
  .hero-stage .app-title,
  .hero-stage .app-sub,
  .hero-stage .app-grid > .acard:nth-child(2),
  .hero-stage .app-minis,
  .hero-stage .sat,
  .hero-stage .stage-cards,
  .hero-stage .app-side {
    display: none;
  }

  .hero-stage .app,
  .hero-stage .app-main,
  .hero-stage .app-grid {
    display: block;
    min-height: 0;
    padding: 0;
    background: transparent;
  }

  .hero-stage .acard {
    box-shadow: 0 22px 40px -28px rgba(23, 48, 78, 0.55);
  }

  .trust,
  .kinetic,
  .kinetic-parallax {
    overflow: hidden;
  }

  .kinetic-parallax {
    transform: none !important;
  }

  /* Collage: una nota por vista. La siguiente solo asoma el borde, sin letras. */
  .collage {
    padding: 56px 0 40px;
  }

  .collage-scene {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    gap: 8px;
  }

  .collage-copy {
    position: relative;
    max-width: none;
    margin-bottom: 8px;
  }

  .collage-copy h2 {
    font-size: clamp(1.85rem, 5vw, 2.6rem);
    max-width: 16ch;
  }

  .collage-copy > .button {
    width: min(100%, 420px);
  }

  .collage-rail {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    margin-inline: calc(var(--gutter) * -1);
    padding: 4px var(--gutter) 16px;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }

  .collage-rail::-webkit-scrollbar {
    display: none;
  }

  .collage-note,
  .note-projects,
  .note-docs,
  .note-calendar,
  .note-hours {
    position: relative;
    inset: auto;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: auto;
    min-height: 0;
    transform: none !important;
    translate: none !important;
  }

  .collage-note {
    flex: 0 0 calc(100% - 28px + var(--gutter));
    scroll-snap-align: start;
    scroll-snap-stop: always;
    padding: 18px;
    border: 1px solid var(--line);
    box-shadow: 0 16px 32px -24px rgba(23, 48, 78, 0.45);
  }

  .collage-dots {
    display: flex;
    justify-content: center;
    gap: 2px;
    margin-top: 2px;
  }

  .collage-dots button {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .collage-dots button::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--line);
  }

  .collage-dots button[aria-current="true"]::before {
    width: 18px;
    background: var(--ink);
  }

  /* Producto: pestañas en una fila, teléfono derecho y centrado. */
  .features {
    padding-top: 28px;
    padding-bottom: 48px;
  }

  .feature-navigation {
    position: sticky;
    top: calc(56px + env(safe-area-inset-top));
    z-index: 4;
    gap: 8px;
    margin-bottom: 18px;
    padding-block: 8px;
    background: color-mix(in srgb, var(--paper) 94%, white);
  }

  .feature-navigation > div[role="tablist"] {
    flex: 1;
    min-width: 0;
    gap: 16px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .feature-navigation > div[role="tablist"]::-webkit-scrollbar {
    display: none;
  }

  .feature-navigation button[role="tab"] {
    flex: 0 0 auto;
    min-height: 44px;
    white-space: nowrap;
  }

  .feature-arrows button {
    width: 44px;
    height: 44px;
  }

  .feature-panel,
  .feature-visual {
    min-height: 0;
  }

  .feature-panel {
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
    gap: 22px;
  }

  .feature-copy h2,
  .section-heading h2,
  .questions-heading h2,
  .contact-grid h2,
  .closing h2,
  .registration-heading h2,
  .workplace h2,
  #funciones h2 {
    font-size: clamp(1.7rem, 5.2vw, 2.45rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
    max-width: 18ch;
  }

  .feature-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .phone {
    width: min(320px, 100%);
    max-width: 100%;
    min-height: 0;
    margin-inline: auto;
    transform: none !important;
    border-width: 6px;
  }

  .visual-tag {
    position: static;
    left: auto;
    bottom: auto;
    display: inline-flex;
    max-width: 100%;
    margin: 14px auto 0;
    transform: none;
    text-align: center;
  }

  .section-heading,
  .questions-grid,
  .contact-grid,
  #registro .registration-layout,
  .footer-main,
  .fx-spread {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .section-heading {
    margin-bottom: 20px;
  }

  .section-heading p,
  .questions-heading p {
    padding-bottom: 0;
    margin-top: 0;
  }

  /* Equipos: la foto acompaña al texto, las pestañas se desplazan enteras. */
  .workplace {
    min-height: 0;
    align-items: flex-end;
  }

  .workplace-content {
    padding-top: 56px;
    padding-bottom: 36px;
  }

  .workplace-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0 22px;
    margin-top: 22px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    padding-inline-end: 28px;
  }

  .workplace-tabs::-webkit-scrollbar {
    display: none;
  }

  .workplace-tabs button {
    flex: 0 0 auto;
    scroll-snap-align: start;
    min-height: 44px;
  }

  /* Historias: foto y texto en la misma fila, no tres carteles apilados. */
  .stories-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .story-blue {
    grid-column: auto;
    grid-row: auto;
  }

  .story-image {
    display: grid;
    grid-template-columns: 34% minmax(0, 1fr);
    align-items: stretch;
    min-height: 148px;
  }

  .story-image > img {
    width: 100%;
    height: 100%;
    min-height: 148px;
    object-fit: cover;
  }

  .story-image > div,
  .story-blue {
    padding: 14px 16px 16px;
  }

  .story h3,
  .story-blue h3 {
    font-size: 1.2rem;
    margin-top: 6px;
  }

  .story p {
    margin-top: 8px;
    font-size: 0.94rem;
    line-height: 1.55;
  }

  /* Funciones: las pastillas se quedan bajo la cabecera mientras se lee. */
  .fx-side,
  .questions-heading {
    position: static;
  }

  .fx-nav {
    position: sticky;
    top: calc(56px + env(safe-area-inset-top));
    z-index: 4;
    display: flex;
    width: 100%;
    max-width: 100%;
    gap: 6px;
    margin-top: 16px;
    padding: 8px 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    background: color-mix(in srgb, var(--paper) 94%, white);
    scrollbar-width: none;
  }

  .fx-nav.is-overflowing {
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 36px), transparent);
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 36px), transparent);
  }

  .fx-nav::-webkit-scrollbar {
    display: none;
  }

  .fx-nav button {
    width: auto;
    height: 44px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    background: #fff;
    box-shadow: inset 0 0 0 1px var(--line);
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .fx-nav button::before,
  .fx-nav button[aria-current="true"]::before {
    content: none;
    background: none;
    box-shadow: none;
  }

  .fx-nav button::after {
    content: attr(aria-label);
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ink);
    white-space: nowrap;
  }

  .fx-nav button[aria-current="true"] {
    background: var(--ink);
    box-shadow: none;
  }

  .fx-nav button[aria-current="true"]::after {
    color: #fff;
  }

  .fx-rail {
    --fx-space: 2.25rem;
    padding-left: 0;
  }

  .fx-track,
  .fx-nav-play {
    display: none;
  }

  #funciones h2 {
    padding-right: 0;
  }

  .fx-figures {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 16px;
  }

  /* Registro: la cifra cabe. Las preguntas se pulsan con el dedo. */
  #registro .registration-visual {
    margin-inline: 0;
    padding: 36px 4px 28px;
  }

  #registro .registration-folio {
    font-size: clamp(3.5rem, 16vw, 6.2rem);
  }

  .questions-list summary {
    min-height: 56px;
    gap: 14px;
    padding: 12px 0;
  }

  .questions-list summary h3 {
    font-size: 1.05rem;
  }

  .contact {
    padding-top: 64px;
  }

  #demo-form {
    grid-template-columns: 1fr;
    padding: 20px 16px;
  }

  #demo-form input,
  #demo-form textarea {
    font-size: 16px;
    min-height: 48px;
  }

  .contact-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .closing .button,
  .footer-contact .button {
    width: min(100%, 420px);
  }

  .footer-menu,
  .footer-contact {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .footer-index {
    justify-self: stretch;
  }

  .footer-menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: stretch;
    column-gap: 16px;
  }

  .footer-menu a,
  .footer-bottom nav a {
    min-height: 44px;
    justify-content: flex-start;
  }

  .footer-bottom nav a {
    display: inline-flex;
    align-items: center;
  }
}

@media (min-width: 700px) and (max-width: 1023px) {
  .collage-note {
    flex-basis: calc(50% - 8px);
    scroll-snap-stop: normal;
  }

  .story-image {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

@media (max-width: 512px) {
  .wrap {
    --gutter: 16px;
    width: calc(100% - var(--gutter) * 2);
  }

  .section {
    padding-block: 48px;
  }

  .collage-rail {
    scroll-padding-inline: var(--gutter);
  }

  .hero-stage {
    width: calc(100% - 32px);
  }

  .phone {
    width: min(300px, 100%);
    padding: 22px 14px 16px;
  }

  .pr-head,
  .pr-row {
    gap: 4px;
  }

  .pr-row b {
    min-height: 26px;
    font-size: 10px;
  }

  .story-image {
    grid-template-columns: 108px minmax(0, 1fr);
    min-height: 132px;
  }

  .story-image > img {
    min-height: 132px;
  }

  .workplace-content {
    padding-top: 40px;
  }
}

@media (max-width: 480px) {
  .brand img {
    height: 26px;
  }

  .hero-stage {
    width: calc(100% - 32px);
  }

  .hero-copy > p {
    font-size: 0.98rem;
  }

  .hero-stage .big-time {
    font-size: 1.7rem;
  }

  .footer-menu {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 368px) {
  .wrap {
    --gutter: 14px;
    width: calc(100% - var(--gutter) * 2);
  }

  .section {
    padding-block: 40px;
  }

  .hero h1 {
    font-size: clamp(2rem, 8.6vw, 2.3rem);
  }

  .hero-actions > .button {
    min-height: 48px;
    padding-inline: 14px;
    font-size: 0.88rem;
  }

  .feature-copy h2,
  .section-heading h2,
  .questions-heading h2,
  .contact-grid h2,
  .closing h2,
  .registration-heading h2,
  .workplace h2,
  #funciones h2,
  .collage-copy h2 {
    font-size: 1.55rem;
  }

  .navigation a {
    font-size: 1.2rem;
    min-height: 52px;
  }

  .hero-stage {
    width: calc(100% - 28px);
  }

  .phone {
    border-width: 5px;
    border-radius: 26px;
  }

  .phone-legend {
    font-size: 10px;
    line-height: 1.4;
  }

  #registro .registration-folio {
    font-size: 3.4rem;
  }

  .fx-figures {
    gap: 12px 10px;
  }
}

@media (max-width: 1023px) and (max-height: 740px) {
  .hero {
    justify-content: flex-start;
    padding: 16px 0 20px;
  }

  .hero-copy > p {
    margin-top: 12px;
  }

  .hero-actions {
    margin-top: 16px;
    gap: 8px;
  }

  .hero-stage {
    margin-top: 16px;
  }

  .hero-stage .acard {
    padding: 12px;
  }

  .hero-stage .ring {
    width: 64px;
    height: 64px;
  }
}

@media (max-width: 1023px) and (max-height: 500px) {
  .hero {
    min-height: 0;
    padding-top: 12px;
    padding-bottom: 16px;
  }

  .hero h1 {
    font-size: 1.7rem;
  }

  .hero-stage {
    margin-top: 12px;
  }
}

@media (max-width: 1023px) and (hover: none) {
  .button:hover img,
  .text-link:hover img {
    transform: none;
  }
}

@media (max-width: 1023px) and (prefers-reduced-motion: reduce) {
  .navigation {
    transition: none;
  }

  .button:active {
    transform: none;
  }
}
