/* Naasir Travel prototype: the few things Tailwind's CDN build can't do. */

@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@400;500;600;700&display=swap');

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Lexend', ui-sans-serif, system-ui, sans-serif;
  color: #111827;
  line-height: 1.6;
}

/* Visible focus ring on every interactive element, per the a11y checklist. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #ea580c;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Every clickable element gets a pointer cursor and a smooth hover transition. */
a,
button,
[role='button'],
summary {
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease, opacity 200ms ease, transform 200ms ease;
}

/* 44px minimum touch target for interactive controls. */
.tap-target {
  min-height: 44px;
  min-width: 44px;
}

.sr-only-focusable:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Horizontal-scroll containers (pricing tables, wide forms on small screens)
   never let the page itself scroll sideways. */
.scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Testimonial + step transitions respect reduced-motion. */
.fade-in {
  animation: nt-fade-in 300ms ease both;
}

@keyframes nt-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Lucide icons: single stroke style everywhere. */
.icon {
  stroke-width: 2;
  vertical-align: middle;
}

/* Press feedback on every tap target, consistent with the global hover
   transition above. Reduced-motion strips the animated duration (see the
   media query below) but the instant transform stays, which is fine. */
.tap-target:active {
  transform: scale(0.98);
}

/* Scroll-reveal utility (one IntersectionObserver drives every .nt-reveal
   element via NT.initScrollReveal, see components.js). Reduced-motion users
   see content in its final state immediately, never mid-animation. */
.nt-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 400ms ease, transform 400ms ease;
}

.nt-reveal.nt-revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .nt-reveal {
    opacity: 1;
    transform: none;
  }
}

/* Spinner for in-flight submit buttons. */
.nt-spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: nt-spin 700ms linear infinite;
}

@keyframes nt-spin {
  to { transform: rotate(360deg); }
}
