/* ============================================================
   CYNTEK — reset.css
   Normalización cross-browser. No aplica estilos visuales,
   solo elimina comportamientos por defecto inconsistentes.
   ============================================================ */

/* ------------------------------------------------------------
   1. BOX MODEL
   ------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ------------------------------------------------------------
   2. HTML / BODY
   ------------------------------------------------------------ */
html {
  font-size: 100%;             /* 16px base */
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ------------------------------------------------------------
   3. MÁRGENES POR DEFECTO
   ------------------------------------------------------------ */
body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd,
pre {
  margin: 0;
}

/* ------------------------------------------------------------
   4. TIPOGRAFÍA BASE
   ------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

b, strong {
  font-weight: var(--fw-bold);
}

small {
  font-size: 80%;
}

/* ------------------------------------------------------------
   5. ENLACES
   ------------------------------------------------------------ */
a {
  color: inherit;
  text-decoration: none;
  background-color: transparent;
}

a:focus-visible {
  outline: 2px solid var(--state-focus);
  outline-offset: 3px;
}

/* ------------------------------------------------------------
   6. MEDIOS
   ------------------------------------------------------------ */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

svg {
  fill: currentColor;
}

/* ------------------------------------------------------------
   7. FORMULARIOS
   ------------------------------------------------------------ */
button,
input,
optgroup,
select,
textarea {
  font: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

button {
  cursor: pointer;
  background: transparent;
  text-align: inherit;
  line-height: inherit;
}

button:disabled {
  cursor: not-allowed;
}

textarea {
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  opacity: 1;
}

/* Quitar la X de limpiar en inputs de búsqueda */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
}

/* Quitar el spin de number */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Quitar estilos feos de autofill (Chrome) */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: var(--text-primary);
  -webkit-box-shadow: 0 0 0 1000px var(--surface-2) inset;
  transition: background-color 5000s ease-in-out 0s;
}

fieldset {
  margin: 0;
  padding: 0;
  border: none;
}

legend {
  padding: 0;
}

/* ------------------------------------------------------------
   8. TABLAS
   ------------------------------------------------------------ */
table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

th, td {
  padding: 0;
  text-align: left;
}

/* ------------------------------------------------------------
   9. HR
   ------------------------------------------------------------ */
hr {
  margin: 0;
  border: none;
  border-top: var(--border-width) solid var(--border-default);
  height: 0;
  color: inherit;
}

/* ------------------------------------------------------------
   10. CITAS / CÓDIGO
   ------------------------------------------------------------ */
blockquote, q {
  quotes: none;
}

blockquote::before,
blockquote::after,
q::before,
q::after {
  content: '';
  content: none;
}

code, pre, kbd, samp {
  font-family: var(--font-mono);
  font-size: 1em;
}

/* ------------------------------------------------------------
   11. DETALLES
   ------------------------------------------------------------ */
summary {
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

/* ------------------------------------------------------------
   12. ACCESIBILIDAD — utilidades invisibles
   ------------------------------------------------------------ */
[hidden] {
  display: none !important;
}

/* Foco consistente en toda la web */
:focus-visible {
  outline: 2px solid var(--state-focus);
  outline-offset: 2px;
}

/* Quitar el outline cuando se navega con ratón */
:focus:not(:focus-visible) {
  outline: none;
}

/* ------------------------------------------------------------
   13. SCROLLBAR (sutil, coherente con la marca)
   ------------------------------------------------------------ */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background-color: var(--border-strong);
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: var(--cyntek-orange);
  background-clip: padding-box;
}

/* ------------------------------------------------------------
   14. SELECCIÓN DE TEXTO
   ------------------------------------------------------------ */
::selection {
  background-color: var(--cyntek-orange);
  color: var(--white);
}

/* ------------------------------------------------------------
   15. IFRAMES
   ------------------------------------------------------------ */
iframe {
  border: 0;
  display: block;
}