/* ============================================================
   GRULLA ESTUDIO — Base
   Reset · Design tokens · Tipografía · Utilidades
   ============================================================ */


/* ------------------------------------------------------------
   Tipografías (variable fonts, declaración propia)
   ------------------------------------------------------------ */

@font-face {
  font-family: 'Satoshi';
  src: url('../fonts/Satoshi/Fonts/WEB/fonts/Satoshi-Variable.woff2') format('woff2-variations');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Satoshi';
  src: url('../fonts/Satoshi/Fonts/WEB/fonts/Satoshi-VariableItalic.woff2') format('woff2-variations');
  font-weight: 300 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/SpaceGrotesk_Complete/Fonts/WEB/fonts/SpaceGrotesk-Variable.woff2') format('woff2-variations');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}


/* ------------------------------------------------------------
   Design Tokens
   ------------------------------------------------------------ */

:root {

  /* Colores de marca */
  --color-black:        #121212;
  --color-charcoal:     #353535;
  --color-white:        #ffffff;
  --color-cream:        #f5f1e8;
  --color-gray-light:   #f3f3f3;

  --color-lime:         #e5fd68;
  --color-lime-dark:    #d4ec57;
  --color-blue:         #3d7fdd;
  --color-orange:       #ff781d;
  --color-orange-hot:   #ff5000;
  --color-gold:         #f8c70d;

  /* Tipografías */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Satoshi', system-ui, sans-serif;

  /* Escala tipográfica */
  --text-xs:    0.75rem;    /* 12px */
  --text-sm:    0.875rem;   /* 14px */
  --text-base:  1rem;       /* 16px */
  --text-md:    1.125rem;   /* 18px */
  --text-lg:    1.25rem;    /* 20px */
  --text-xl:    1.5rem;     /* 24px */
  --text-2xl:   2rem;       /* 32px */
  --text-3xl:   2.5rem;     /* 40px */

  /* Espaciado */
  --sp-1:   0.25rem;    /* 4px  */
  --sp-2:   0.5rem;     /* 8px  */
  --sp-3:   0.75rem;    /* 12px */
  --sp-4:   1rem;       /* 16px */
  --sp-5:   1.25rem;    /* 20px */
  --sp-6:   1.5rem;     /* 24px */
  --sp-7:   1.75rem;   /* 28px */
  --sp-8:   2rem;       /* 32px */
  --sp-9:   2.25rem;   /* 36px */
  --sp-10:  2.5rem;     /* 40px */
  --sp-12:  3rem;       /* 48px */
  --sp-14:  3.5rem;    /* 56px */
  --sp-16:  4rem;       /* 64px */
  --sp-20:  5rem;       /* 80px */
  --sp-24:  6rem;       /* 96px */

  /* Layout */
  --container-max: 1280px;
  --container-pad: clamp(1.25rem, 5vw, 4rem);
  --header-height: 72px;

  /* Radios */
  --radius-sm:   0.25rem;
  --radius-md:   0.5rem;
  --radius-lg:   0.75rem;
  --radius-xl:   1rem;
  --radius-full: 9999px;

  /* Sombras */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);

  /* Transiciones */
  --ease-fast:   150ms ease;
  --ease-normal: 300ms ease;
  --ease-slow:   600ms ease-out;
  --ease-enter:  500ms cubic-bezier(0.22, 1, 0.36, 1);
}


/* ------------------------------------------------------------
   Reset moderno
   ------------------------------------------------------------ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height); /* compensa el header fixed en anchors */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-black);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  list-style: none;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* Evitar overflow horizontal */
body {
  overflow-x: hidden;
}


/* ------------------------------------------------------------
   Utilidades de layout
   ------------------------------------------------------------ */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* Bloqueo de scroll (mobile menu abierto) */
body.no-scroll {
  overflow: hidden;
}


/* ------------------------------------------------------------
   Skip link (accesibilidad)
   ------------------------------------------------------------ */

.skip-link {
  position: fixed;
  top: calc(-100% - 4px);
  left: var(--sp-4);
  z-index: 9999;
  padding: var(--sp-3) var(--sp-6);
  background-color: var(--color-lime);
  color: var(--color-black);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  border-radius: var(--radius-full);
  transition: top var(--ease-fast);
  white-space: nowrap;
}

.skip-link:focus {
  top: var(--sp-4);
}


/* ------------------------------------------------------------
   Botones
   ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition:
    background-color var(--ease-fast),
    border-color var(--ease-fast),
    color var(--ease-fast),
    transform var(--ease-fast),
    box-shadow var(--ease-fast);
}

.btn:active {
  transform: scale(0.97);
}

/* Primario global: fondo lima */
.btn--primary {
  background-color: var(--color-lime);
  color: var(--color-black);
  border-color: var(--color-lime);
}

.btn--primary:hover {
  background-color: var(--color-lime-dark);
  border-color: var(--color-lime-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Hero primario: fondo blanco — mayor peso visual que el outline */
.btn--hero-primary {
  background-color: var(--color-white);
  color: var(--color-black);
  border-color: var(--color-white);
  font-size: var(--text-base);
  font-weight: 700;
  padding: 0.9rem 2.1rem;
}

.btn--hero-primary:hover {
  background-color: var(--color-lime);
  border-color: var(--color-lime);
  transform: translateY(-1px);
}

/* Hero outline: peso visual secundario explícito */
.btn--hero-outline {
  background-color: transparent;
  color: rgba(255, 255, 255, 0.82);
  border-color: rgba(255, 255, 255, 0.40);
  font-size: var(--text-sm);
}

.btn--hero-outline:hover {
  border-color: rgba(255, 255, 255, 0.75);
  color: var(--color-white);
  background-color: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}


/* ------------------------------------------------------------
   Animaciones de scroll (Intersection Observer)
   ------------------------------------------------------------ */

@media (prefers-reduced-motion: no-preference) {
  .anim-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition:
      opacity var(--ease-enter),
      transform var(--ease-enter);
    transition-delay: var(--anim-delay, 0ms);
  }

  .anim-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ------------------------------------------------------------
   Visually hidden (accesibilidad)
   ------------------------------------------------------------ */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ------------------------------------------------------------
   Focus visible global
   ------------------------------------------------------------ */

:focus-visible {
  outline: 2px solid var(--color-lime);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}


/* ------------------------------------------------------------
   Stubs de secciones futuras
   ------------------------------------------------------------ */

.section-stub {
  min-height: 1px;
}
