/* Variáveis de fonte para A11y */
:root {
  --base-font-size: 1rem; /* 16px */
  --scale-small: 0.9375; /* 15px */
  --scale-large: 1.0625; /* 17px */
  --scale-xl: 1.125; /* 18px */
}

/* Estilos de Acessibilidade e Base */
html {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, Arial;
  scroll-behavior: smooth;
}

/* Foco Visível A11y */
.focus-ring:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5); /* indigo-500 com transparência */
  border-radius: 0.5rem; /* Arredondamento para elementos inline/simples */
}

/* Chips de Estilo */
.chip[aria-pressed="true"] {
  outline: 2px solid rgb(59 130 246); /* indigo-500 */
  outline-offset: 2px;
  background-color: rgb(238 242 255); /* indigo-50 */
  border-color: rgb(59 130 246);
}

/* Dropzone Ativa */
.drop-active {
  border-color: rgb(99 102 241) !important; /* indigo-500 */
  background: rgba(99, 102, 241, 0.05); /* indigo-50 */
}

/* Ocultar Visualmente (A11y) */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* -------------------------------------------------- */
/* Custom Range Input (Slider) Styling for Modern UI */
/* -------------------------------------------------- */

.custom-range {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
  height: 0.5rem; /* 8px */
}

/* Track (Barra) */
.custom-range::-webkit-slider-runnable-track {
  background: #e2e8f0; /* slate-200 */
  border-radius: 0.25rem; /* rounded-md */
  height: 0.5rem;
}

.custom-range::-moz-range-track {
  background: #e2e8f0;
  border-radius: 0.25rem;
  height: 0.5rem;
}

/* Thumb (Botão) */
.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  margin-top: -0.375rem; /* Centralizar com a barra de 8px */
  height: 1.25rem; /* 20px */
  width: 1.25rem;
  background-color: #4f46e5; /* indigo-600 */
  border-radius: 9999px; /* rounded-full */
  border: 3px solid #ffffff; /* Borda branca para contraste */
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  transition: background-color 0.15s ease-in-out;
}

.custom-range::-moz-range-thumb {
  height: 1.25rem;
  width: 1.25rem;
  background-color: #4f46e5;
  border-radius: 9999px;
  border: 3px solid #ffffff;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  transition: background-color 0.15s ease-in-out;
}

/* Foco no Thumb */
.custom-range:focus::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.35);
}

.custom-range:focus::-moz-range-thumb {
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.35);
}

/* -------------------------------------------------- */
/* Font Size A11y Classes (Mobile-first) */
/* -------------------------------------------------- */

/* Pequena */
.text-small {
  font-size: var(--scale-small);
}

/* Média (Padrão) */
.text-base {
  font-size: var(--base-font-size);
}

/* Grande */
.text-large {
  font-size: var(--scale-large);
}

/* Extra Grande */
.text-xlarge {
  font-size: var(--scale-xl);
}

/* Aplicação das classes no body via JS */
body[data-font-size="small"] {
  font-size: var(--scale-small);
}

body[data-font-size="medium"] {
  font-size: var(--base-font-size);
}

body[data-font-size="large"] {
  font-size: var(--scale-large);
}

body[data-font-size="xlarge"] {
  font-size: var(--scale-xl);
}

/* Garante que elementos com tamanhos fixos (como h1, h2) também escalem */
body[data-font-size="small"] h1 { font-size: 2.5rem; }
body[data-font-size="small"] h2 { font-size: 1.15rem; }
body[data-font-size="large"] h1 { font-size: 3.25rem; }
body[data-font-size="large"] h2 { font-size: 1.45rem; }
body[data-font-size="xlarge"] h1 { font-size: 3.5rem; }
body[data-font-size="xlarge"] h2 { font-size: 1.6rem; }

/* Ajuste para mobile (h1 e h2) */
@media (max-width: 640px) {
  body[data-font-size="small"] #hero-title { font-size: 1.8rem; }
  body[data-font-size="large"] #hero-title { font-size: 2.2rem; }
  body[data-font-size="xlarge"] #hero-title { font-size: 2.4rem; }
}