/* Serviyou Technologies — Base styles (resets, typography) v3.0
 *
 * Layered on top of Tailwind preflight. Provides typography defaults
 * that ensure 18px body text + 1.6 line height everywhere, accessible
 * focus rings, and motion-safety.
 */

html { scroll-behavior: smooth; }
*, *::before, *::after { box-sizing: border-box; }
@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;
  }
}

body {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* Headings — tight line height, semibold weight, serif option for hero */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-sans);
  line-height: var(--line-height-tight);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  letter-spacing: 0;
}
h1 { font-size: var(--font-size-4xl); font-weight: var(--font-weight-bold); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

@media (max-width: 640px) {
  h1 { font-size: var(--font-size-3xl); }
  h2 { font-size: var(--font-size-2xl); }
}

/* Links — keyboard + screen-reader friendly. Dark-tier defaults: no underline
 * on chrome (nav, buttons, cards). Body-prose links keep an underline via
 * the explicit selector below. */
a {
  color: var(--color-accent-light);
  text-decoration: none;
  transition: color var(--transition-fast), background-size var(--transition-fast);
  cursor: pointer;
}
a:hover { color: var(--color-accent-primary); }
a:not(.btn):not(.btn-primary):not(.btn-secondary):not(.btn-tertiary):not(.sv-logo):not(.sv-nav-link):not(.sv-nav-dropdown-link):not(.sv-mobile-nav-link):not(.sv-card-link):not(.sv-footer-social) {
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0 1px;
}
a:not(.btn):not(.btn-primary):not(.btn-secondary):not(.btn-tertiary):not(.sv-logo):not(.sv-nav-link):not(.sv-nav-dropdown-link):not(.sv-mobile-nav-link):not(.sv-card-link):not(.sv-footer-social):hover {
  background-size: 100% 1px;
}
a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}
/* Body prose — restore underlines inside flowing copy so it's still scannable */
.prose a, main p a, main li a, article a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

/* Buttons are always clickable cursor (overrides browser defaults) */
button, [role="button"] {
  cursor: pointer;
}
button:disabled, [role="button"][aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.5;
}
button:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Form elements — large tap targets + visible focus */
input, textarea, select, button {
  font-family: inherit;
  font-size: var(--font-size-base);
  min-height: var(--tap-target-min);
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-color: var(--color-primary);
}

/* Skip-link helper (a11y) — visible on focus, hidden otherwise */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding: var(--space-3) var(--space-4);
  font-weight: var(--font-weight-semibold);
  z-index: 100;
  transition: top var(--transition-fast);
}
.skip-link:focus {
  top: 0;
}

/* Screen-reader-only utility */
.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;
}
