/* RideXpress public V2 final polish.
 * Every selector is rooted at .rx-marketing so portal/auth surfaces retain
 * their independently reviewed layout. This layer changes presentation only:
 * no route, form name, analytics hook or booking state is introduced here. */

.rx-marketing {
  --rx-public-gutter: clamp(1rem, 3.5vw, 2.5rem);
  --rx-public-section: clamp(3.5rem, 8vw, 7rem);
  --rx-public-measure: 68ch;
  background: var(--rx-color-surface);
  background:
    radial-gradient(circle at 8% 10%, color-mix(in srgb, var(--rx-color-brand) 10%, transparent) 0, transparent 24rem),
    var(--rx-color-surface);
  overflow-x: clip;
  text-rendering: optimizeLegibility;
}

.rx-marketing main { min-width: 0; }
.rx-marketing main :is(h1, h2, h3) {
  text-wrap: balance;
  letter-spacing: -.025em;
}
.rx-marketing main p { text-wrap: pretty; }
.rx-marketing main :is(section, form, article, div) { min-width: 0; }
.rx-marketing main :is(img, svg, video) { max-width: 100%; }
.rx-marketing main [id] { scroll-margin-top: 6rem; }

.rx-marketing .rx-marketing__header {
  background: var(--rx-color-surface);
  background: color-mix(in srgb, var(--rx-color-surface) 90%, transparent);
  border-bottom-color: color-mix(in srgb, var(--rx-color-border) 75%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.rx-marketing .rx-marketing__header-inner,
.rx-marketing .rx-marketing__hero-inner,
.rx-marketing .rx-marketing__section,
.rx-marketing .rx-marketing__pricing-strip-inner,
.rx-marketing .rx-marketing__footer-inner,
.rx-marketing .rx-marketing__spotlight,
.rx-marketing .rx-marketing__faq {
  box-sizing: border-box;
  padding-left: var(--rx-public-gutter);
  padding-right: var(--rx-public-gutter);
  width: min(100%, 80rem);
}
.rx-marketing .rx-marketing__section,
.rx-marketing .rx-marketing__faq { padding-bottom: var(--rx-public-section); padding-top: var(--rx-public-section); }
.rx-marketing .rx-marketing__section-head { max-width: var(--rx-public-measure); }

.rx-marketing .rx-marketing__page-header {
  background:
    radial-gradient(circle at 82% 14%, color-mix(in srgb, var(--rx-color-brand) 19%, transparent), transparent 17rem),
    linear-gradient(180deg, var(--rx-color-surface-alt), var(--rx-color-surface));
  border-bottom: 1px solid var(--rx-color-border);
  padding: clamp(3rem, 7vw, 6.5rem) var(--rx-public-gutter);
}
.rx-marketing .rx-marketing__page-header > h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.05;
  margin-inline: auto;
  max-width: 19ch;
}
.rx-marketing .rx-marketing__page-header > p { margin-inline: auto; max-width: var(--rx-public-measure); }
.rx-marketing .rx-marketing__booking-note {
  align-items: flex-start;
  display: flex;
  gap: .625rem;
  justify-content: center;
}
.rx-marketing .rx-marketing__booking-note::before {
  color: var(--rx-color-on-success-bg);
  content: "\2713";
  flex: 0 0 auto;
  font-weight: 800;
}

.rx-marketing :is(.rx-marketing__media-card, .rx-marketing__vehicle-card, .rx-marketing__destination-card, .rx-trust-card, .rx-pricing-card, .rx-route-card) {
  border-color: color-mix(in srgb, var(--rx-color-border) 82%, var(--rx-color-text));
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .rx-marketing :is(.rx-marketing__media-card, .rx-marketing__vehicle-card, .rx-marketing__destination-card, .rx-route-card):hover {
    border-color: color-mix(in srgb, var(--rx-color-brand) 65%, var(--rx-color-border));
    box-shadow: var(--rx-shadow-lg);
    transform: translateY(-3px);
  }
}
.rx-marketing :is(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--rx-color-focus-ring);
  outline-offset: 3px;
}
.rx-marketing :is(button, input, select, textarea) { font: inherit; }
.rx-marketing :is(input, select, textarea):disabled,
.rx-marketing button:disabled { cursor: not-allowed; opacity: .68; }
.rx-marketing :is(input, select, textarea)[aria-invalid="true"] {
  border-color: var(--rx-color-danger);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--rx-color-danger) 18%, transparent);
}
.rx-marketing .rx-field__error:not(:empty),
.rx-marketing .invalid-feedback:not(:empty) { margin-top: .375rem; }

.rx-marketing .rx-marketing__faq-item {
  border: 1px solid var(--rx-color-border);
  border-radius: var(--rx-radius-lg);
  box-shadow: var(--rx-shadow-sm);
  margin-bottom: .75rem;
  overflow: clip;
}
.rx-marketing .rx-marketing__faq-item summary { cursor: pointer; min-height: 48px; }
.rx-marketing .rx-marketing__faq-item[open] { border-color: color-mix(in srgb, var(--rx-color-brand) 55%, var(--rx-color-border)); }

/* Reusable public empty/loading/error treatments for result and form states. */
.rx-marketing .rx-public-state {
  align-items: center;
  background: var(--rx-color-surface-alt);
  border: 1px solid var(--rx-color-border);
  border-radius: var(--rx-radius-lg);
  display: grid;
  gap: var(--rx-space-3);
  justify-items: center;
  min-height: 12rem;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  text-align: center;
}
.rx-marketing .rx-public-state--error { background: var(--rx-color-danger-bg); color: var(--rx-color-on-danger-bg); }
.rx-marketing [aria-busy="true"] { cursor: progress; }

@media (max-width: 1023px) {
  .rx-marketing .rx-marketing__hero-inner { gap: clamp(1.5rem, 5vw, 3rem); }
  .rx-marketing .rx-marketing__spotlight { gap: clamp(1.5rem, 4vw, 3rem); }
}
@media (max-width: 767px) {
  .rx-marketing { --rx-public-section: clamp(2.75rem, 10vw, 4.5rem); }
  .rx-marketing .rx-marketing__page-header { padding-top: clamp(2.5rem, 10vw, 4rem); }
  .rx-marketing .rx-marketing__pricing-strip-inner { align-items: stretch; }
  .rx-marketing .rx-marketing__pricing-chip { justify-content: space-between; }
  .rx-marketing .rx-marketing__whatsapp { bottom: max(1rem, env(safe-area-inset-bottom)); right: max(1rem, env(safe-area-inset-right)); }
}
@media (max-width: 479px) {
  .rx-marketing { --rx-public-gutter: 1rem; }
  .rx-marketing .rx-marketing__page-header > h1 { font-size: clamp(1.9rem, 10vw, 2.6rem); }
  .rx-marketing .rx-marketing__cta,
  .rx-marketing .rx-btn--full { box-sizing: border-box; justify-content: center; width: 100%; }
  .rx-marketing .rx-marketing__trust-row { align-items: flex-start; flex-direction: column; }
  .rx-marketing .rx-journey-booking__body { padding: 1rem; }
}
@media (max-width: 359px) {
  .rx-marketing { --rx-public-gutter: .75rem; }
  .rx-marketing .rx-journey-booking__body { padding: .75rem; }
  .rx-marketing .rx-journey-booking__tab { padding-inline: .5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .rx-marketing *, .rx-marketing *::before, .rx-marketing *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
@media (forced-colors: active) {
  .rx-marketing :is(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid CanvasText; }
  .rx-marketing :is(.rx-marketing__media-card, .rx-marketing__vehicle-card, .rx-marketing__destination-card, .rx-trust-card) { border: 1px solid CanvasText; }
}
