@layer reset, tokens, utilities;

@font-face {
  font-family: 'Funnel Display';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/funneldisplay-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Funnel Display';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/funneldisplay-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Funnel Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/funneldisplay-700.woff2') format('woff2');
}

@font-face {
  font-family: 'Funnel Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/funnelsans-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Funnel Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/funnelsans-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Funnel Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/funnelsans-600.woff2') format('woff2');
}

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

  html {
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
  }

  body {
    min-height: 100vh;
    font-family: var(--type-body);
    color: var(--sl-text);
    background: var(--sl-bg);
    line-height: 1.6;
  }

  img,
  picture {
    display: block;
    max-width: 100%;
    height: auto;
  }

  ul,
  ol {
    list-style: none;
  }

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

  button {
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
  }

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

  table {
    border-collapse: collapse;
  }

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

  @media (prefers-reduced-motion: reduce) {
    .reveal {
      transition: none;
    }
  }
}

@layer tokens {
  :root {
    /* superficies y texto */
    --sl-bg: rgb(255, 255, 255);
    --sl-text: rgb(10, 10, 10);
    --sl-muted: rgb(94, 94, 100);
    --sl-black: rgb(10, 10, 10);
    --sl-white: rgb(255, 255, 255);

    /* acento electric blue */
    --sl-blue: rgb(36, 87, 230);
    --sl-blue-hover: rgb(28, 70, 190);
    --sl-blue-bright: rgb(94, 133, 255);
    --sl-tint: rgb(233, 239, 255);

    /* líneas y sombra */
    --sl-line: rgba(10, 10, 10, 0.12);
    --sl-line-onblack: rgba(255, 255, 255, 0.14);
    --sl-glow: rgba(36, 87, 230, 0.35);
    --sl-shadow: 0 1px 2px rgba(10, 10, 10, 0.04), 0 12px 32px -12px rgba(10, 10, 10, 0.18);

    /* radios (escala única) */
    --sl-radius-sm: 8px;
    --sl-radius-md: 14px;
    --sl-radius-lg: 20px;
    --sl-radius-xl: 28px;

    /* tipografía */
    --type-head: 'Funnel Display', Arial, 'Helvetica Neue', sans-serif;
    --type-body: 'Funnel Sans', Arial, Helvetica, sans-serif;
    --sl-mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

    --fs-h1: clamp(2.8rem, 7vw, 6rem);
    --fs-h2: clamp(2rem, 4vw, 3.25rem);
    --fs-h3: clamp(1.4rem, 2.4vw, 1.9rem);
    --fs-lead: clamp(1.1rem, 1.6vw, 1.35rem);
    --fs-price: clamp(1.8rem, 3vw, 2.6rem);

    --container-w: min(1180px, 92vw);
    --sl-line-w: 1px;
    --mast-h: 72px;
  }
}

@layer utilities {
  .container {
    width: var(--container-w);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .flex {
    display: flex;
  }

  .grid {
    display: grid;
  }

  .items-center {
    align-items: center;
  }

  .items-start {
    align-items: start;
  }

  .justify-between {
    justify-content: space-between;
  }

  .justify-center {
    justify-content: center;
  }

  .flex-wrap {
    flex-wrap: wrap;
  }

  .gap-2 {
    gap: 0.5rem;
  }

  .gap-3 {
    gap: 0.75rem;
  }

  .gap-4 {
    gap: 1rem;
  }

  .gap-6 {
    gap: 1.5rem;
  }

  .mt-2 {
    margin-top: 0.5rem;
  }

  .mt-4 {
    margin-top: 1rem;
  }

  .mt-6 {
    margin-top: 1.5rem;
  }

  .mt-8 {
    margin-top: 2rem;
  }

  .mb-2 {
    margin-bottom: 0.5rem;
  }

  .mb-4 {
    margin-bottom: 1rem;
  }

  .mb-6 {
    margin-bottom: 1.5rem;
  }

  .text-sm {
    font-size: 0.875rem;
  }

  .text-lg {
    font-size: 1.125rem;
  }

  .text-xl {
    font-size: 1.35rem;
  }

  .font-display {
    font-family: var(--type-head);
  }

  .label {
    font-family: var(--sl-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}
