/* =========================================================
   SALANTO ARTESANÍAS — Estilos principales
   Identidad: terracota, crema, café, salvia.
   Fuentes: Playfair Display (display) + Jost (texto).
   ========================================================= */

:root {
  --terracota: #B76F31;
  --terracota-dark: #9C5A24;
  --terracota-soft: #DBAF66;
  --crema: #F5F0DC;
  --crema-dark: #EAE1CB;
  --cafe: #3E2F27;
  --cafe-light: #6E5A4A;
  --cafe-dark: #2F1F1B;
  --salvia: #8A9A5B;
  --vino: #A34542;
  --teal: #0D617B;
  --blanco: #FFFDF9;
  --shadow: 0 14px 34px rgba(59, 42, 32, 0.13);
  --shadow-sm: 0 6px 16px rgba(59, 42, 32, 0.1);
  --radius: 18px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Jost', 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  font-family: var(--font-body);
  color: var(--cafe);
  background: var(--crema);
  line-height: 1.65;
  overflow-x: hidden;
  cursor: default;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 100;
  opacity: 0;
  background: radial-gradient(circle, rgba(219, 175, 102, 0.18) 0%, rgba(219, 175, 102, 0.05) 34%, transparent 70%);
  transform: translate3d(calc(var(--pointer-x, -200px) - 50%), calc(var(--pointer-y, -200px) - 50%), 0);
  transition: opacity 0.45s ease;
}

body.mouse-active::before { opacity: 1; }

.container { width: min(1120px, 92%); margin-inline: auto; }

::selection { background: var(--terracota); color: #fff; }

/* ---------- Botones ---------- */
.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-block;
  padding: 0.95rem 2.1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.03em;
  transition: transform 0.3s cubic-bezier(.2,.8,.2,1), box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}
.btn::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  background: linear-gradient(115deg, transparent 25%, rgba(255,255,255,.44) 47%, transparent 68%);
  transform: translateX(-125%);
  transition: transform 0.55s ease;
}
.btn:hover::before { transform: translateX(125%); }
.btn--solid { background: var(--cafe); color: var(--blanco); box-shadow: var(--shadow-sm); }
.btn--solid::before { background: linear-gradient(115deg, transparent 25%, rgba(255,255,255,.28) 47%, transparent 68%); }
.btn--solid:hover { background: var(--cafe-dark); transform: translateY(-4px); box-shadow: 0 13px 25px rgba(47, 31, 27, .28); }
.btn--ghost { border: 1.5px solid var(--cafe); color: var(--cafe); }
.btn--ghost:hover { background: rgba(62, 47, 39, 0.08); transform: translateY(-4px); }
.section--dark .btn--solid { background: var(--terracota); color: var(--blanco); }
.section--dark .btn--solid:hover { background: var(--terracota-dark); box-shadow: 0 13px 25px rgba(183, 111, 49, .3); }
.section--dark .btn--ghost { border-color: rgba(255, 253, 249, 0.75); color: var(--blanco); }
.section--dark .btn--ghost:hover { background: rgba(255, 253, 249, 0.14); }

/* ---------- Navegación ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(246, 239, 230, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(59, 42, 32, 0.08);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; padding: 0.95rem 0; }
.nav__logo { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; color: var(--cafe); text-decoration: none; letter-spacing: 0.01em; }
.nav__logo-img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid var(--terracota-soft); transition: transform .45s cubic-bezier(.2,.8,.2,1), box-shadow .45s ease; }
.nav__logo:hover .nav__logo-img { transform: rotate(-10deg) scale(1.1); box-shadow: 0 6px 15px rgba(183, 111, 49, .3); }
.nav__logo em { color: var(--terracota); font-style: italic; }
.btn--nav { padding: 0.5rem 1.2rem; font-size: 0.85rem; }
.nav__links { display: flex; gap: 1.9rem; align-items: center; }
.nav__links a { color: var(--cafe-light); text-decoration: none; font-weight: 500; font-size: 0.95rem; position: relative; transition: color 0.2s; padding: 0.2rem 0; }
.nav__links a::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px; background: var(--terracota); transition: width 0.25s ease; }
.nav__links a:hover { color: var(--terracota); }
.nav__links a:hover::after { width: 100%; }
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; padding: 0.4rem; }
.nav__toggle span { display: block; width: 24px; height: 2px; background: var(--cafe); margin: 5px 0; border-radius: 2px; transition: 0.3s; }

/* ---------- Hero ---------- */
.hero { padding: 9.5rem 0 0; position: relative; background:
  radial-gradient(circle at 88% 18%, rgba(217, 166, 126, 0.35) 0%, transparent 52%),
  radial-gradient(circle at 6% 88%, rgba(138, 154, 91, 0.18) 0%, transparent 45%),
  url('../assets/img/textura-fique.jpg') repeat,
  var(--crema);
  isolation: isolate;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 30rem;
  height: 30rem;
  top: 3rem;
  left: -13rem;
  border-radius: 44% 56% 61% 39% / 43% 42% 58% 57%;
  opacity: .42;
  background: radial-gradient(circle at 35% 35%, rgba(183, 111, 49, .3), rgba(183, 111, 49, .04) 68%, transparent 70%);
  filter: blur(3px);
  animation: organic-drift 15s ease-in-out infinite alternate;
}
.hero__inner { position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 3.2rem; align-items: center; padding-bottom: 5rem; }
.hero__eyebrow, .section__eyebrow {
  text-transform: uppercase; letter-spacing: 0.24em; font-size: 0.76rem;
  color: var(--terracota); font-weight: 600; margin-bottom: 1rem;
}
.hero__title { font-family: var(--font-display); font-size: clamp(2.5rem, 5.2vw, 4rem); line-height: 1.1; font-weight: 700; color: var(--cafe); }
.hero__title em { font-style: italic; color: var(--terracota); }
.hero__subtitle { margin: 1.3rem 0 2.1rem; font-size: 1.14rem; color: var(--cafe-light); max-width: 38ch; font-weight: 300; }
.hero__cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero__badges { list-style: none; display: flex; gap: 1.4rem; flex-wrap: wrap; margin-top: 1.6rem; padding: 0; }
.hero__badges li { font-size: 0.9rem; color: var(--cafe-light); font-weight: 500; display: inline-flex; align-items: center; gap: .4rem; }

/* ---------- Prueba social / cifras ---------- */
.stats { background: var(--cafe-dark); color: var(--crema); padding: 3rem 0; }
.stats__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.8rem; text-align: center; }
.stat strong { display: block; font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.8rem); color: var(--terracota-soft); line-height: 1.1; }
.stat span { font-size: 0.92rem; color: #D9CBB8; font-weight: 300; }

/* ---------- Beneficios ---------- */
.beneficios { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.7rem; }
.beneficio {
  background: var(--blanco); border-radius: var(--radius); padding: 1.9rem 1.7rem;
  box-shadow: var(--shadow-sm); border-left: 3px solid var(--terracota);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease, border-color .35s ease;
}
.beneficio:hover { transform: translateY(-8px); box-shadow: 0 18px 34px rgba(62,47,39,.16); border-left-color: var(--salvia); }
.beneficio__icon { font-size: 1.9rem; display: inline-block; margin-bottom: .8rem; }
.beneficio h3 { font-family: var(--font-display); font-size: 1.22rem; color: var(--cafe); margin-bottom: .55rem; }
.beneficio p { font-size: 0.93rem; color: var(--cafe-light); font-weight: 300; }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin-inline: auto; display: grid; gap: 1rem; }
.faq__item {
  background: var(--blanco); border-radius: 14px; box-shadow: var(--shadow-sm);
  border: 1px solid rgba(183,111,49,.16); overflow: hidden;
}
.faq__item summary {
  cursor: pointer; list-style: none; padding: 1.1rem 1.4rem;
  font-weight: 600; color: var(--cafe); font-size: 1rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  transition: color .2s;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; font-size: 1.4rem; color: var(--terracota); transition: transform .25s ease; }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item summary:hover { color: var(--terracota); }
.faq__item p { padding: 0 1.4rem 1.2rem; color: var(--cafe-light); font-weight: 300; font-size: 0.96rem; }

/* ---------- Hero media ---------- */
.hero__media { position: relative; }
.hero__media::before {
  content: ""; position: absolute; inset: 18px -18px -18px 18px;
  border: 1.5px solid var(--terracota-soft); border-radius: var(--radius); z-index: 0;
}
.hero__media img {
  position: relative; z-index: 1; border-radius: var(--radius);
  box-shadow: var(--shadow); object-fit: cover; width: 100%; aspect-ratio: 4/5;
  transition: transform .65s cubic-bezier(.2,.8,.2,1), filter .65s ease, box-shadow .65s ease;
}
.hero__media:hover img { transform: translateY(-8px) rotate(1.2deg) scale(1.018); filter: saturate(1.08) contrast(1.03); box-shadow: 0 24px 44px rgba(62, 47, 39, .22); }
.hero__media::after { content: ""; position: absolute; z-index: 2; pointer-events: none; inset: 0; border-radius: var(--radius); background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.28) 49%, transparent 63%); transform: translateX(-130%); transition: transform .9s ease; }
.hero__media:hover::after { transform: translateX(130%); }
.hero__strip {
  display: flex; justify-content: center; align-items: center; gap: 1.6rem;
  padding: 1.1rem 0; background: var(--cafe); color: var(--crema);
  overflow: hidden; white-space: nowrap; font-size: 0.85rem; letter-spacing: 0.18em; text-transform: uppercase;
}
.hero__strip i { color: var(--terracota-soft); font-style: normal; }
.hero__strip span, .hero__strip i { animation: soft-pulse 3s ease-in-out infinite; }
.hero__strip i { animation-delay: .5s; }

/* ---------- Secciones ---------- */
.section { padding: 5.2rem 0; position: relative; overflow: hidden; isolation: isolate; }
.section > .container { position: relative; z-index: 1; }
.bg--textura { background: url('../assets/img/textura-fique.jpg') repeat, var(--crema); }
.section--tint { background: linear-gradient(180deg, var(--crema-dark), #EFE5D4); }
.section--tint::before, .section--dark::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 24rem;
  height: 24rem;
  right: -10rem;
  bottom: -13rem;
  border-radius: 58% 42% 38% 62% / 50% 61% 39% 50%;
  pointer-events: none;
  animation: organic-drift 18s ease-in-out infinite alternate-reverse;
}
.section--tint::before { background: radial-gradient(circle, rgba(183, 111, 49, .17), transparent 67%); }
.section--dark { background: radial-gradient(circle at 50% 0%, #4A3526, var(--cafe-dark) 70%); color: var(--crema); }
.section--dark::before { background: radial-gradient(circle, rgba(13, 97, 123, .25), transparent 67%); }
.section--dark .section__title { color: var(--blanco); }
.section--dark .section__eyebrow { color: var(--terracota-soft); }
.section__title { font-family: var(--font-display); font-size: clamp(1.9rem, 3.4vw, 2.75rem); font-weight: 700; color: var(--cafe); margin-bottom: 2.6rem; line-height: 1.15; }

/* ---------- Galería ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.7rem; }
.gallery__item {
  position: relative; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transform: translateZ(0); transition: transform .5s cubic-bezier(.2,.8,.2,1), box-shadow .5s ease;
}
.gallery__item::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.3) 49%, transparent 68%); transform: translateX(-130%); transition: transform .8s ease; }
.gallery__item img { width: 100%; aspect-ratio: 1/1; object-fit: cover; transition: transform 0.7s ease, filter .45s ease; }
.gallery__item:hover { transform: translateY(-10px) rotate(-.6deg); box-shadow: 0 23px 40px rgba(62, 47, 39, .23); }
.gallery__item:nth-child(even):hover { transform: translateY(-10px) rotate(.6deg); }
.gallery__item:hover img { transform: scale(1.09); filter: saturate(1.12); }
.gallery__item:hover::after { transform: translateX(130%); }
.gallery__item figcaption {
  position: absolute; inset: auto 0 0 0; padding: 2.6rem 1.2rem 1.1rem;
  background: linear-gradient(transparent, rgba(59, 42, 32, 0.78));
  color: #fff; font-family: var(--font-display); font-size: 1.12rem;
}

/* ---------- Catálogo ---------- */
.catalog { display: grid; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); gap: 1.7rem; }
.card {
  background: var(--blanco); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.35s ease, border-color .35s ease;
  display: flex; flex-direction: column;
  border: 1px solid transparent;
  transform-style: preserve-3d;
}
.card:hover { transform: translateY(-10px); box-shadow: 0 22px 38px rgba(62, 47, 39, .2); border-color: rgba(183, 111, 49, .32); }
.card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform .55s ease, filter .45s ease; }
.card:hover img { transform: scale(1.06); filter: saturate(1.08); }
.card h3 { font-family: var(--font-display); font-size: 1.28rem; padding: 1.05rem 1.25rem 0.15rem; color: var(--cafe); }
.card p { padding: 0 1.25rem; font-size: 0.93rem; color: var(--cafe-light); font-weight: 300; flex-grow: 1; }
.card__price { font-weight: 600; font-size: 1.05rem !important; color: var(--terracota) !important; padding-top: 0.5rem !important; }
.card__cta {
  margin: 0.8rem 1.25rem 1.25rem; text-align: center; text-decoration: none;
  padding: 0.65rem 1rem; border-radius: 999px; border: 1.5px solid var(--terracota);
  color: var(--terracota); font-weight: 600; font-size: 0.9rem; transition: 0.25s;
}
.card__cta:hover { background: var(--terracota); color: #fff; transform: translateY(-2px); box-shadow: 0 7px 14px rgba(183, 111, 49, .2); }

/* ---------- Historia ---------- */
.historia { display: grid; grid-template-columns: 1fr 1fr; gap: 3.4rem; align-items: center; }
.historia__media { position: relative; }
.historia__media::after {
  content: ""; position: absolute; inset: -18px 18px 18px -18px;
  border: 1.5px solid var(--terracota-soft); border-radius: var(--radius); z-index: 0;
}
.historia__media img { position: relative; z-index: 1; border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform .55s cubic-bezier(.2,.8,.2,1), box-shadow .55s ease; }
.historia__media:hover img { transform: scale(1.025) rotate(.5deg); box-shadow: 0 22px 40px rgba(62, 47, 39, .22); }
.historia__text p:not(.section__eyebrow) { color: var(--cafe-light); font-weight: 300; margin-bottom: 1rem; }

/* ---------- Testimonios ---------- */
.testimonios { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.7rem; }.testimonio {
  background: var(--blanco); border-radius: var(--radius); padding: 1.8rem 1.7rem;
  box-shadow: var(--shadow-sm); border-top: 3px solid var(--terracota); transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease, border-color .35s ease;
}
.testimonio:hover { transform: translateY(-8px); box-shadow: 0 18px 32px rgba(62, 47, 39, .16); border-color: var(--teal); }
.testimonio p { font-family: var(--font-display); font-style: italic; font-size: 1.05rem; color: var(--cafe); line-height: 1.5; }
.testimonio footer { margin-top: 1rem; font-size: 0.85rem; color: var(--terracota); font-weight: 600; letter-spacing: 0.04em; }

/* ---------- Contacto ---------- */
.contacto { text-align: center; }
.contacto__text { max-width: 50ch; margin: 0 auto 2.2rem; color: #EADFCF; font-weight: 300; font-size: 1.05rem; }
.contacto__cta { display: flex; gap: 1.1rem; justify-content: center; flex-wrap: wrap; }
.contacto__meta { margin-top: 2.2rem; font-size: 0.92rem; color: #C9B8A3; font-weight: 300; }

/* ---------- Footer ---------- */
.footer { background: #2E2018; color: #C9B8A3; padding: 1.7rem 0; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: 0.92rem; }
.footer__ig { color: var(--terracota-soft); text-decoration: none; font-weight: 500; transition: color 0.2s; }
.footer__ig:hover { color: var(--terracota); }
.footer__legal { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.footer__legal .legal-link {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: #C9B8A3; font-size: 0.92rem; font-weight: 400;
  text-decoration: underline; text-underline-offset: 3px; transition: color 0.2s;
}
.footer__legal .legal-link:hover { color: var(--terracota-soft); }

/* ---------- Banner de cookies ---------- */
/* La clase .hidden debe ocultar el banner (bug corregido: faltaba esta regla) */
.hidden { display: none !important; }
.cookie-banner {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 90;
  background: var(--blanco); color: var(--cafe); border-radius: 16px;
  padding: 1.2rem 1.4rem; box-shadow: 0 18px 44px rgba(47, 31, 27, 0.32);
  border: 1px solid rgba(183, 111, 49, 0.25);
  max-width: 720px; margin-inline: auto;
  display: flex; flex-direction: column; gap: 1rem;
}
.cookie-banner p { font-size: 0.94rem; color: var(--cafe-light); font-weight: 300; margin: 0; }
.cookie-banner .legal-link {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--terracota); font-weight: 600; text-decoration: underline;
  text-underline-offset: 3px; font-size: inherit;
}
.cookie-banner__actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.btn--sm { padding: 0.6rem 1.3rem; font-size: 0.85rem; }

/* ---------- Modal legal ---------- */
.legal-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1.2rem; }
.legal-modal.hidden { display: none; }
.legal-modal__overlay { position: absolute; inset: 0; background: rgba(47, 31, 27, 0.6); backdrop-filter: blur(3px); }
.legal-modal__panel {
  position: relative; z-index: 1; background: var(--blanco); border-radius: 20px;
  width: min(720px, 100%); max-height: 82vh; overflow: hidden;
  box-shadow: 0 28px 60px rgba(47, 31, 27, 0.4); border: 1px solid rgba(183, 111, 49, 0.2);
  display: flex; flex-direction: column;
}
.legal-modal__close {
  position: absolute; top: 0.8rem; right: 0.8rem; z-index: 2;
  background: var(--crema); border: 1px solid rgba(183,111,49,.3); color: var(--cafe);
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  font-size: 1rem; transition: background .2s, transform .2s;
}
.legal-modal__close:hover { background: var(--terracota); color: #fff; transform: rotate(90deg); }
.legal-modal__content { padding: 2rem 2.2rem 2.2rem; overflow-y: auto; }
.legal-modal__content h2 { font-family: var(--font-display); font-size: 1.7rem; color: var(--cafe); margin-bottom: 1.1rem; padding-right: 2.2rem; }
.legal-modal__content h3 { font-size: 1.05rem; color: var(--terracota); margin: 1.3rem 0 0.45rem; }
.legal-modal__content p, .legal-modal__content li { font-size: 0.95rem; color: var(--cafe-light); font-weight: 300; line-height: 1.7; }
.legal-modal__content ul { padding-left: 1.3rem; margin: 0.4rem 0; }
.legal-modal__content a { color: var(--terracota); font-weight: 600; }

/* ---------- Animaciones ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.75s ease, transform 0.75s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
/* Las tarjetas usan profundidad 3D propia: no heredan el estado oculto del reveal. */
.card.reveal { opacity: 1; transform: none; }
@keyframes soft-pulse { 0%, 100% { opacity: .76; } 50% { opacity: 1; text-shadow: 0 0 10px rgba(219,175,102,.48); } }
@keyframes organic-drift {
  0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  100% { transform: translate3d(4rem, -2rem, 0) rotate(18deg) scale(1.12); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
  body::before { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero__inner, .historia { grid-template-columns: 1fr; }
  .hero { padding: 7.5rem 0 0; }
  .hero__media { order: -1; max-width: 480px; margin-inline: auto; }
  .hero__strip { justify-content: flex-start; padding-inline: 1rem; }
  .nav__links {
    position: fixed; inset: 0 0 auto 0; top: 62px;
    flex-direction: column; align-items: center; gap: 1.3rem;
    padding: 2.2rem 1rem 2rem; background: var(--crema);
    box-shadow: 0 20px 40px rgba(59, 42, 32, 0.15);
    transform: translateY(-130%); transition: transform 0.35s ease;
  }
  .nav__links.open { transform: translateY(0); }
  .nav__toggle { display: block; }
  .btn--nav { display: none; }
  body::before { display: none; }
}
