/**
 * FleetOps Landing Pages - Modern CSS Reset
 *
 * A minimal, modern CSS reset for consistent cross-browser styling.
 * Based on modern best practices (2024).
 */

/* ===== Box Sizing ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ===== Remove Default Margins ===== */
* {
  margin: 0;
  padding: 0;
}

/* ===== Root & Document ===== */
html {
  /* Prevent font size inflation */
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;

  /* Smooth scrolling for anchor links */
  scroll-behavior: smooth;

  /* Base font size for rem calculations */
  font-size: 16px;
}

/* ===== Body Defaults ===== */
body {
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ===== Typography Reset ===== */
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  overflow-wrap: break-word;
}

p {
  text-wrap: pretty;
  overflow-wrap: break-word;
}

/* ===== List Styles ===== */
ul, ol {
  list-style: none;
}

/* ===== Links ===== */
a {
  color: inherit;
  text-decoration: none;
}

/* ===== Images & Media ===== */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ===== Form Elements ===== */
input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

/* Textarea resize */
textarea {
  resize: vertical;
}

/* Remove number input spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

/* ===== Tables ===== */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ===== Accessibility ===== */

/* Remove all animations and transitions for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Focus visible for keyboard navigation */
:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Remove default focus outline for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* ===== Selection ===== */
::selection {
  background-color: var(--color-primary, #00A0E9);
  color: white;
}

/* ===== Hidden Attribute Support ===== */
[hidden] {
  display: none !important;
}

/* ===== Screen Reader Only ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
