/* ============================================================
 * AreaTeam v3 — Base styles
 * ============================================================
 * Reset minimo + body + scrollbars + focus ring.
 * Importare DOPO tokens.css.
 * ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

html {
  font-family: var(--at-font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--at-text);
  background: var(--at-bg);
}

body {
  min-height: 100vh;
  font-family: var(--at-font-sans);
  color: var(--at-text);
  background: var(--at-bg);
  font-feature-settings: "ss01", "cv11";
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: transparent;
  padding: 0;
}

a {
  color: var(--at-primary);
  text-decoration: none;
}

a:hover {
  color: var(--at-primary-hover);
}

img, svg {
  display: block;
  max-width: 100%;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: var(--at-font-weight-display);
  color: var(--at-text);
  line-height: 1.25;
}

p { margin: 0; }

hr {
  border: 0;
  height: 1px;
  background: var(--at-border);
}

/* ============================================================
 * Focus ring uniforme (accessibilità)
 * ============================================================ */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--at-primary);
  outline-offset: 2px;
  border-radius: var(--at-radius-sm);
}

/* ============================================================
 * Scrollbars custom (sottili, semi-trasparenti)
 * ============================================================ */
.at-scroll::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.at-scroll::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
  background: transparent;
}

.at-scroll::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
  background: rgba(127, 127, 127, 0.25);
  border-radius: 99px;
}

.at-scroll::-webkit-scrollbar-thumb:hover,
*::-webkit-scrollbar-thumb:hover {
  background: rgba(127, 127, 127, 0.4);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(127, 127, 127, 0.25) transparent;
}

/* ============================================================
 * Utility minime (le altre vivono in components.css)
 * ============================================================ */

/* Visualmente nascosto ma accessibile */
.at-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;
}

.at-hidden {
  display: none !important;
}

/* Mono font helper */
.at-mono {
  font-family: var(--at-font-mono);
  font-variant-numeric: tabular-nums;
}

/* Text helpers */
.at-text-muted { color: var(--at-text-muted); }
.at-text-subtle { color: var(--at-text-subtle); }

/* Status soft backgrounds */
.at-bg-primary-soft { background: var(--at-primary-soft); }
.at-bg-success-soft { background: var(--at-success-soft); }
.at-bg-warning-soft { background: var(--at-warning-soft); }
.at-bg-danger-soft  { background: var(--at-danger-soft);  }
.at-bg-info-soft    { background: var(--at-info-soft);    }

/* ============================================================
 * Reduced motion
 * ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
