/* ==========================================================================
   Phone and pointer behavior.
   Hover lifts only exist for a fine pointer. Touch gets a press state.
   Card rows scroll sideways with CSS; the cards stay in the document.
   ========================================================================== */

/* ---- Fine pointer: lift, tilt variables, magnetic offset ---- */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .as-card,
  .home .as-section:has(.as-card .as-more) .as-card {
    transform: perspective(800px) rotateX(var(--ty, 0deg)) rotateY(var(--tx, 0deg));
    transition: transform 180ms var(--ease, ease), box-shadow 180ms var(--ease, ease), border-color 160ms var(--ease, ease);
  }
  .as-card:hover,
  .home .as-section:has(.as-card .as-more) .as-card:hover {
    transform: perspective(800px) rotateX(var(--ty, 0deg)) rotateY(var(--tx, 0deg)) translateY(-3px);
    box-shadow: 0 14px 30px -20px rgba(15, 23, 42, 0.3);
  }
  .as-section--hero .ahx-hero-cols > .wp-block-column:last-child,
  .as-section--hero .as-orbit {
    transform: perspective(900px) rotateX(var(--ty, 0deg)) rotateY(var(--tx, 0deg));
    transition: transform 180ms var(--ease, ease);
    transform-style: preserve-3d;
  }
  .ast-custom-button,
  .wp-block-button:not(.is-style-outline) .wp-block-button__link,
  .srfm-submit-button,
  input[type="submit"] {
    transform: translate3d(var(--mx, 0px), var(--my, 0px), 0);
    transition: transform 160ms var(--ease, ease), background-color 160ms var(--ease, ease), box-shadow 160ms var(--ease, ease);
  }
}

/* ---- Touch: no stuck hover, a clear press ---- */
@media (hover: none), (pointer: coarse) {
  .as-card:hover,
  .home .as-section:has(.as-card .as-more) .as-card:hover,
  .as-card:hover .as-more a,
  .as-more a:hover,
  .as-checks li:hover,
  .wp-block-button__link:hover,
  .ast-custom-button:hover,
  .srfm-submit-button:hover,
  .home .as-section:has(.as-card .as-more) .as-card:hover::after,
  .as-card:hover .as-more::after {
    transform: none !important;
    box-shadow: none !important;
  }
  .as-card:active,
  .wp-block-button__link:active,
  .ast-custom-button:active,
  .srfm-submit-button:active,
  .asx-chip:active,
  .as-footer-links a:active,
  .footer-social a:active,
  .main-header-menu .menu-link:active {
    transform: scale(0.98);
    opacity: 0.92;
  }
}

@media (prefers-reduced-motion: reduce) {
  .as-card,
  .as-section--hero .as-orbit,
  .as-section--hero .ahx-hero-cols > .wp-block-column:last-child,
  .ast-custom-button,
  .wp-block-button__link {
    transform: none !important;
    transition: none !important;
  }
}

/* ---- 44px targets and compact chrome on phones ---- */
@media (max-width: 700px) {
  .main-header-menu .menu-link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .menu-toggle {
    width: 44px;
    height: 44px;
  }
  .ast-header-button-1 .ast-custom-button,
  .wp-block-button__link,
  .srfm-submit-button,
  button,
  input[type="submit"],
  input[type="button"] {
    min-height: 44px;
  }
  .footer-social a {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }
  .as-footer-links a,
  .site-footer .as-cookie-settings {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .asx-chip {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .asx-copy {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    min-width: 44px;
    padding: 10px 12px;
  }
  .srfm-input-common,
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="url"],
  input[type="search"],
  input[type="number"],
  select {
    min-height: 44px;
  }
  textarea,
  .srfm-form textarea {
    min-height: 96px;
  }

  .entry-content > .as-section {
    padding-top: 32px !important;
    padding-bottom: 24px !important;
  }
  .entry-content > .as-section.as-section--hero {
    padding-top: 24px !important;
    padding-bottom: 28px !important;
  }

  .as-consent {
    left: 8px;
    right: 8px;
    bottom: 8px;
    max-height: 12vh;
    padding: 8px 10px;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: center;
  }
  .as-consent__full { display: none; }
  .as-consent__short { display: inline; }
  .as-consent__text {
    flex: 1 1 auto;
    font-size: 12px;
    line-height: 1.25;
  }
  .as-consent__actions {
    width: auto;
    gap: 6px;
  }
  .as-consent__btn {
    min-height: 44px;
    min-width: 44px;
    padding: 8px 12px !important;
    font-size: 13px !important;
  }

  /* Card rows: native horizontal scroll, next card peeks. */
  .as-grid:not(.as-split) {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 4px;
    gap: 12px;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .as-grid:not(.as-split)::-webkit-scrollbar { display: none; }
  .as-grid:not(.as-split) > .wp-block-column {
    flex: 0 0 82% !important;
    max-width: 82%;
    scroll-snap-align: start;
    min-width: 0;
  }
}

.as-consent__short { display: none; }

.as-snap-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 16px;
  padding: 8px 16px 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.as-snap-row::-webkit-scrollbar { display: none; }
.as-snap-row > .as-section {
  flex: 0 0 88%;
  scroll-snap-align: start;
  margin: 0 !important;
  min-width: 0;
  padding-top: 28px !important;
  padding-bottom: 20px !important;
}
.as-snap-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px 0;
}
.as-snap-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: var(--slate-300, #cbd5e1);
  min-height: 0;
  position: relative;
}
.as-snap-dots button::before {
  content: "";
  position: absolute;
  inset: -18px;
}
.as-snap-dots button[aria-current="true"] {
  background: var(--accent, #0ba37f);
  width: 18px;
}
