/* Utilidades compartidas Arcilyx */

/* --- Manrope autohospedada (fuente variable 200–800) --- */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('fonts/manrope-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* FAQ <details>: ocultar el triángulo/marcador por defecto */
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }

/* Evita el "flash"/reajuste del nav al cargar (Tailwind CDN + fuente web):
   el contenido del header se muestra cuando ya está estilado y la fuente cargada. */
#site-header nav, #site-header #lang-bar { opacity: 0; }
#site-header.ready nav, #site-header.ready #lang-bar { opacity: 1; }

/* H1 (display): un poco más pequeño y menos pesado. 48px escritorio / 40px móvil */
h1.text-display-lg { font-size: 48px; line-height: 1.15; font-weight: 600; }
@media (max-width: 767px) {
  h1.text-display-lg { font-size: 40px; }
}

/* Ocultar la barra de scroll manteniendo el desplazamiento (sliders horizontales) */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* --- Reveal on scroll ---
   Usa @keyframes (no `transition`) para que clases como transition-colors /
   transition-all en el mismo elemento no pisen la animación de entrada. */
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(48px); }
  to   { opacity: 1; transform: translateY(0); }
}
[data-reveal] {
  opacity: 0;
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  animation: reveal-up 1.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* --- Parallax --- */
[data-parallax] { will-change: transform; }

/* Respeta a quien prefiere menos movimiento */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; animation: none !important; }
  [data-parallax] { transform: none !important; }
  html { scroll-behavior: auto !important; }
}

/* --- Página de contacto --- */
.mineral-gradient {
  background: radial-gradient(circle at 0% 0%, rgba(74, 63, 46, 0.05) 0%, transparent 50%);
}
/* input./textarea. para ganar especificidad al plugin @tailwindcss/forms */
input.form-input,
textarea.form-input {
  background-color: #ffffff;
  border: 1px solid #d9d0bd; /* outline-variant */
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
  color: #2c261d;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
input.form-input:focus,
textarea.form-input:focus {
  outline: none;
  border-color: #4a3f2e;
  box-shadow: 0 0 0 1px #4a3f2e;
}
input.form-input::placeholder,
textarea.form-input::placeholder {
  color: #9a927f;
}

/* Simulador — spinner de "generando" */
.sim-spin {
  animation: sim-rotate 1.1s linear infinite;
}
@keyframes sim-rotate {
  to { transform: rotate(360deg); }
}

/* Catálogo — flip 3D de las tarjetas (ambiente ↔ placa) al pasar por encima */
.flip-card { perspective: 1200px; }
.flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  transform-style: preserve-3d;
}
.flip-card:hover .flip-inner,
.flip-card:focus-visible .flip-inner,
.flip-card:focus-within .flip-inner {
  transform: rotateY(180deg);
}
.flip-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.flip-back { transform: rotateY(180deg); }
@media (prefers-reduced-motion: reduce) {
  .flip-inner { transition: none; }
}

/* --- Texto enriquecido del CMS (secciones "Texto legal" y "Texto libre") --- */
.cms-prose { color: rgb(111 102 86); font-size: 16px; line-height: 1.6; }
.cms-prose > * + * { margin-top: 1rem; }
.cms-prose h2 { color: rgb(74 63 46); font-size: 24px; font-weight: 600; line-height: 1.4; margin-top: 2.5rem; }
.cms-prose h3 { color: rgb(74 63 46); font-size: 20px; font-weight: 600; line-height: 1.4; margin-top: 2rem; }
.cms-prose h4 { color: rgb(74 63 46); font-size: 17px; font-weight: 600; margin-top: 1.5rem; }
.cms-prose > :first-child { margin-top: 0; }
.cms-prose > :last-child { margin-bottom: 1rem; }
.cms-prose strong, .cms-prose b { color: rgb(44 38 29); font-weight: 500; }
.cms-prose a { color: rgb(74 63 46); text-decoration: underline; text-underline-offset: 2px; }
.cms-prose ul { list-style: disc; padding-left: 1.4rem; }
.cms-prose ol { list-style: decimal; padding-left: 1.4rem; }
.cms-prose li + li { margin-top: .35rem; }
.cms-prose blockquote { border-left: 3px solid rgb(111 102 86 / .3); padding-left: 1rem; font-style: italic; }

/* Popups de Leaflet acordes al tema (mapa de distribuidores) */
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background:#ffffff; color:#2c261d; }
.leaflet-popup-content a { color:#4a3f2e; }

/* --- Secciones genéricas del CMS (/_cms/sections.css) con la paleta Arcilyx --- */
:root {
  --cms-max: 1152px;                 /* 1280 - 2×64 (max-w-container-max con px-margin-desktop) */
  --cms-gutter: 20px;
  --cms-gutter-lg: 64px;
  --cms-space: 8rem;                 /* como mb-32 */
  --cms-text: rgb(44 38 29);
  --cms-muted: rgb(111 102 86);
  --cms-accent: rgb(74 63 46);
  --cms-accent-ink: #fff;
  --cms-surface: rgb(239 233 220);
  --cms-line: rgb(217 208 189);
  --cms-radius: .5rem;
  --cms-h2: 32px;
  --cms-h3: 24px;
}
