/**
 * Litequo — Custom Styles
 *
 * Minimal overrides on top of Tailwind CSS.
 * Organised into logical sections:
 *   1. Custom properties
 *   2. Reveal-on-scroll animation
 *   3. Accessibility
 *   4. Typography
 *   5. Component refinements
 *   6. Scrollbar
 *   7. Mobile menu transition
 *   8. RTL support
 *   9. Print
 */

/* ── 1. Custom Properties ────────────────────────────────────────────────── */

:root {
  --ease-out-custom: cubic-bezier(0.16, 1, 0.3, 1);
  --brand: #22c55e;
  --transition-fast: 150ms;
  --transition-base: 300ms;
  --transition-slow: 700ms;
}

/* ── 2. Reveal-on-scroll ─────────────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(12px);
}

.reveal.reveal-in {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity var(--transition-slow) var(--ease-out-custom),
    transform var(--transition-slow) var(--ease-out-custom);
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal,
  .reveal.reveal-in {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ── 3. Accessibility ────────────────────────────────────────────────────── */

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ── 4. Typography ───────────────────────────────────────────────────────── */

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── 5. Component Refinements ────────────────────────────────────────────── */

.service-card {
  transition:
    transform var(--transition-base) var(--ease-out-custom),
    box-shadow var(--transition-base) var(--ease-out-custom);
}

.service-card:hover {
  transform: translateY(-4px);
}

/* Contact form submit loading state */
form[aria-busy="true"] button[type="submit"] {
  pointer-events: none;
  opacity: 0.6;
}

/* ── 6. Scrollbar ────────────────────────────────────────────────────────── */

@media (min-width: 640px) {
  ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }

  ::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.4);
    border-radius: 8px;
  }

  ::-webkit-scrollbar-track {
    background: transparent;
  }
}

/* ── 7. Mobile Menu Transition ───────────────────────────────────────────── */

#mobile-menu {
  transition:
    transform var(--transition-fast) var(--ease-out-custom),
    opacity var(--transition-fast) var(--ease-out-custom);
}

/* ── 8. RTL Support ──────────────────────────────────────────────────────── */

html[dir="rtl"] body {
  font-family: 'Noto Sans Arabic', Inter, system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html[dir="rtl"] .text-left {
  text-align: right;
}

html[dir="rtl"] .text-right {
  text-align: left;
}

/* ── 9. Print ────────────────────────────────────────────────────────────── */

@media print {
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 90%;
    color: #64748b;
  }

  header,
  footer,
  #mobile-menu {
    display: none !important;
  }

  .reveal,
  .reveal.reveal-in {
    opacity: 1 !important;
    transform: none !important;
  }
}
