/* dm sans variable: wght + opsz */
@font-face {
  font-family: "DM Sans";
  src: url("../type/DMSans-VariableFont_opsz-wght.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("../type/DMSans-Italic-VariableFont_opsz-wght.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: italic;
  font-display: swap;
}


/* variables */
:root {
  /* colores */
  --cal: #FFFFFF;
  --basalto: #24201A;
  --arcilla: #9C917B;
  --arena: #B6AD97;
  --lino: #D1CBBE;

  /* degradado corporativo (fondos de contacto) */
  --gradient-arena: linear-gradient(90deg, var(--lino) 0%, var(--arcilla) 120%);

  /* z-index */
  --z-header: 100;

  /* font */
  --font-dm-sans: "DM Sans", sans-serif;

  /* font sizes */
  --fs-96: 6rem;
  --fs-72: 4.5rem;
  --fs-48: 3rem;
  --fs-40: 2.5rem;
  --fs-32: 2rem;
  --fs-28: 1.75rem;
  --fs-24: 1.5rem;
  --fs-20: 1.25rem;
  --fs-16: 1rem;
  --fs-14: 0.875rem;
  --fs-12: 0.75rem;

  /* font weights */
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* line heights */
  --lh-110: 1.1;
  --lh-121: 1.21;

  /* spacing */
  --space-4: 0.25rem;
  --space-8: 0.5rem;
  --space-12: 0.75rem;
  --space-16: 1rem;
  --space-20: 1.25rem;
  --space-24: 1.5rem;
  --space-28: 1.75rem;
  --space-32: 2rem;
  --space-40: 2.5rem;
  --space-48: 3rem;
  --space-56: 3.5rem;
  --space-64: 4rem;
  --space-80: 5rem;
  --space-96: 6rem;
  --space-120: 7.5rem;

  /* motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 0.3s;
  --duration: 0.5s;
}


/* ==========================================================================
   reset
   ========================================================================== */

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

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow-x: clip;
}

body {
  position: relative;
  background: var(--cal, #FFFFFF);
  color: var(--basalto, #24201A);
  font-family: var(--font-dm-sans);
  font-size: var(--fs-16);
  font-weight: var(--fw-regular);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* quito márgenes por defecto de los bloques de texto */
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
  font-weight: normal;
}

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

/* height auto para que las imágenes de WP (con width/height) no se deformen */
img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

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

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

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

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* selección de texto con los colores de la marca */
::selection {
  background: var(--basalto, #24201A);
  color: var(--lino, #D1CBBE);
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
}

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

/* visible solo con foco */
.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: calc(var(--z-header) + 1);
  padding: var(--space-12) var(--space-16);
  background: var(--basalto, #24201A);
  color: var(--cal, #FFFFFF);
  transform: translateY(-100%);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

/* ==========================================================================
   entradas al hacer scroll (assets/js/reveal.js)
   data-reveal: el texto sube y aparece. ="fade": solo aparece, sin moverse.
   data-reveal-image: la imagen se descubre de abajo arriba y se asienta. ="zoom": solo se asienta, sin ocultarse
   (imágenes principales, que no deben retrasar la carga).
   data-reveal-line="top|bottom": el filete de ese lado se dibuja de izquierda a derecha; ="left": de arriba abajo.
   el color sale de --reveal-line (lino por defecto); un componente lo pone en transparent donde no lleva filete.
   solo con js y sin "reducir movimiento". reveal.js marca el html con .has-reveal al arrancar; si no llega a
   hacerlo, todo aparece solo a los 3 s. con animation (no transition) para no pisar los hovers de cada componente
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {

  .js [data-reveal]:not(.is-revealed),
  .js [data-reveal-image]:not([data-reveal-image="zoom"]):not(.is-revealed) {
    opacity: 0;
  }

  .js:not(.has-reveal) [data-reveal],
  .js:not(.has-reveal) [data-reveal-image]:not([data-reveal-image="zoom"]) {
    animation: reveal-fallback 0s linear 3s both;
  }

  .js [data-reveal-line] {
    border-color: transparent;
    background-image: linear-gradient(var(--reveal-line, var(--lino, #D1CBBE)), var(--reveal-line, var(--lino, #D1CBBE)));
    background-repeat: no-repeat;
    background-size: 0% 1px;
  }

  .js:not(.has-reveal) [data-reveal-line] {
    animation: reveal-line 0s linear 3s both;
  }

  .js [data-reveal-line="top"] {
    background-position: left top;
  }

  .js [data-reveal-line="bottom"] {
    background-position: left bottom;
  }

  .js [data-reveal-line="left"] {
    background-position: left top;
    background-size: 1px 0%;
  }

  .js:not(.has-reveal) [data-reveal-line="left"] {
    animation-name: reveal-line-left;
  }

  .js:not(.has-reveal) [data-reveal][data-reveal-line] {
    animation:
      reveal-fallback 0s linear 3s both,
      reveal-line 0s linear 3s both;
  }

  .js [data-reveal].is-revealed {
    animation: reveal-up 0.9s var(--ease-out) var(--reveal-delay, 0s) both;
  }

  .js [data-reveal="fade"].is-revealed {
    animation: reveal-fade 0.9s var(--ease-out) var(--reveal-delay, 0s) both;
  }

  .js [data-reveal-image]:not([data-reveal-image="zoom"]).is-revealed {
    animation: reveal-image 1.2s var(--ease-out) var(--reveal-delay, 0s) both;
  }

  .js [data-reveal-image="zoom"]:not(.is-revealed) img {
    scale: 1.06;
  }

  .js [data-reveal-image].is-revealed img {
    animation: reveal-image-scale 1.6s var(--ease-out) var(--reveal-delay, 0s) both;
  }

  .js [data-reveal-line].is-revealed {
    animation: reveal-line 1.1s var(--ease-in-out) var(--reveal-delay, 0s) both;
  }

  .js [data-reveal-line="left"].is-revealed {
    animation: reveal-line-left 1.4s var(--ease-in-out) var(--reveal-delay, 0s) both;
  }

  /* las dos cosas en el mismo elemento (campos del formulario): aparece y se dibuja su filete */
  .js [data-reveal="fade"][data-reveal-line].is-revealed {
    animation:
      reveal-fade 0.9s var(--ease-out) var(--reveal-delay, 0s) both,
      reveal-line 1.1s var(--ease-in-out) var(--reveal-delay, 0s) both;
  }

}

@keyframes reveal-fallback {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes reveal-up {
  from {
    opacity: 0;
    translate: 0 1.25rem;
  }

  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes reveal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes reveal-image {
  from {
    opacity: 1;
    clip-path: inset(100% 0 0 0);
  }

  to {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
}

@keyframes reveal-image-scale {
  from { scale: 1.06; }
  to { scale: 1; }
}

@keyframes reveal-line {
  from { background-size: 0% 1px; }
  to { background-size: 100% 1px; }
}

@keyframes reveal-line-left {
  from { background-size: 1px 0%; }
  to { background-size: 1px 100%; }
}
