/* ==========================================================================
   Reset moderno + estilos base del documento
   ========================================================================== */

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

  * {
    margin: 0;
  }

  html {
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
  }

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

  img,
  video {
    height: auto;
  }

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

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

  a {
    color: inherit;
    text-decoration: none;
  }

  ul[role="list"],
  ol[role="list"] {
    list-style: none;
    padding: 0;
  }

  p,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    overflow-wrap: break-word;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-weight: inherit;
    font-size: inherit;
    line-height: inherit;
    text-wrap: balance;
  }
}

@layer base {
  html {
    color-scheme: dark;
    background-color: var(--color-bg);
    scroll-behavior: smooth;
  }

  body {
    min-height: 100dvh;
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.5;
    font-feature-settings: "cv03" on, "cv04" on, "cv09" on, "cv11" on;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
  }

  ::selection {
    background-color: var(--color-accent);
    color: var(--color-text-inverse);
  }

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

  /* Acento en itálica dentro de títulos: <h2>Lo que <em>Hacemos</em></h2> */
  em.accent,
  .accent {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    color: var(--color-accent);
  }

  @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;
    }
  }
}

@layer utilities {
  .screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  .skip-link:focus {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1000;
    width: auto;
    height: auto;
    padding: 12px 16px;
    margin: 0;
    overflow: visible;
    clip: auto;
    background: var(--color-accent);
    color: var(--color-text-inverse);
    border-radius: var(--radius-sm);
  }
}
