/* =============================================
   Mueble Hogar ELM — Estilos principales
   Paleta: mostaza, magenta, verde bosque, teal
   ============================================= */

:root {
  --mustard: #c4a02a;
  --mustard-deep: #9a7c1c;
  --magenta: #e0187a;
  --magenta-deep: #b0105f;
  --forest: #2d6a4f;
  --teal: #1a4554;
  --teal-deep: #0f2f3a;
  --teal-soft: #2a5f70;
  --white: #ffffff;
  --cream-wood: #f7f3eb;
  --ink: #14282f;
  --muted: #5a6f76;
  --line: rgba(26, 69, 84, 0.12);
  --shadow: 0 18px 50px rgba(15, 47, 58, 0.14);
  --radius: 4px;
  --font-display: "Syne", sans-serif;
  --font-body: "Outfit", sans-serif;
  --header-w: 90vw;
  --body-w: 80vw;
  --wa-size: 56px;
  --wa-right: 24px;
  --wa-bottom: 24px;
  --scroll-gap: 50px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(196, 160, 42, 0.08), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 20%, rgba(224, 24, 122, 0.05), transparent 50%),
    linear-gradient(180deg, #fbfaf7 0%, var(--cream-wood) 45%, #f3eee4 100%);
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--magenta);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--mustard-deep);
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  color: var(--teal);
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }

p { margin: 0 0 1em; }

.container {
  width: var(--body-w);
  max-width: 1400px;
  margin-inline: auto;
}

/* ---------- Toolbar (90%) ---------- */
.toolbar {
  background: var(--teal);
  color: var(--white);
  font-size: 0.88rem;
}

.toolbar__inner {
  width: var(--header-w);
  max-width: 1600px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  flex-wrap: wrap;
}

.toolbar__location,
.toolbar__contact {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.toolbar__contact {
  gap: 1.25rem;
  flex-wrap: wrap;
}

.toolbar a {
  color: var(--white);
  opacity: 0.95;
}

.toolbar a:hover {
  color: var(--mustard);
}

.toolbar i {
  color: var(--mustard);
}

/* ---------- Header blanco (90%) ---------- */
.site-header {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 5px solid var(--magenta);
  box-shadow: 0 2px 20px rgba(26, 69, 84, 0.06);
}

.site-header__inner {
  width: var(--header-w);
  max-width: 1600px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.15rem 0;
}

.brand img {
  width: clamp(160px, 18vw, 230px);
  height: auto;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 0.5rem 1.85rem;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--teal);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  position: relative;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--magenta);
  transition: width 0.25s ease;
}

.main-nav a:hover {
  color: var(--magenta);
}

.main-nav a:hover::after {
  width: 100%;
}

.nav-cta {
  background: var(--magenta);
  color: var(--white) !important;
  padding: 0.7rem 1.35rem;
  border-radius: var(--radius);
  font-size: 1.15rem;
}

.nav-cta::after {
  display: none !important;
}

.nav-cta:hover {
  background: var(--mustard);
  color: var(--teal-deep) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--teal);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero animado full-bleed ---------- */
.hero {
  position: relative;
  min-height: calc(min(92vh, 820px) - 200px);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--white);
}

.hero__slides {
  position: absolute;
  inset: 0;
}

.hero__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.2s ease, transform 7s ease-out;
}

.hero__slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 47, 58, 0.55) 0%, rgba(15, 47, 58, 0.72) 45%, rgba(15, 47, 58, 0.65) 100%),
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(15, 47, 58, 0.35), transparent 70%);
  z-index: 1;
}

.hero__grid {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.45) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.45) 1px, transparent 1px);
  background-size: 18px 18px;
  mix-blend-mode: overlay;
}

.hero__grain {
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: 0.12;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 8s steps(6) infinite;
}

@keyframes grainShift {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-1%, 1%); }
  50% { transform: translate(1%, -1%); }
  75% { transform: translate(-1%, -1%); }
}

.hero__content {
  position: relative;
  z-index: 4;
  width: var(--body-w);
  max-width: 1400px;
  margin: 0 auto;
  padding-block: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: heroRise 1s ease-out both;
}

@keyframes heroRise {
  from {
    opacity: 0;
    transform: translateY(36px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__brand {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.2vw, 2.15rem);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
  color: var(--white);
  animation: brandPulse 3.5s ease-in-out infinite;
}

.hero__brand-m {
  color: var(--magenta);
}

@keyframes brandPulse {
  0%, 100% { letter-spacing: 0.18em; }
  50% { letter-spacing: 0.22em; }
}

.hero__title {
  color: var(--white);
  max-width: 16ch;
  margin-bottom: 0.75rem;
}

.hero__lead {
  max-width: 42ch;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.75rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}

.hero__dots {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.hero__dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 0;
  transition: background 0.25s ease, transform 0.25s ease;
}

.hero__dots button.is-active {
  background: var(--mustard);
  transform: scale(1.25);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.45rem;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--magenta);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--mustard);
  color: var(--teal-deep);
}

.btn--ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
}

.btn--ghost:hover {
  background: var(--white);
  color: var(--teal);
  border-color: var(--white);
}

.btn--whatsapp {
  background: var(--forest);
  margin-top: 0.35rem;
}

.btn--whatsapp:hover {
  background: #248a58;
  color: var(--white);
}

/* ---------- Secciones (cuerpo 80%) ---------- */
.section {
  padding: clamp(3.5rem, 7vw, 5.5rem) 0;
}

.section--tint {
  background: linear-gradient(180deg, rgba(26, 69, 84, 0.04), rgba(196, 160, 42, 0.06));
}

.section__header {
  max-width: 42rem;
  margin-bottom: 2.75rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--magenta);
  margin-bottom: 0.65rem;
}

.section__lead {
  color: var(--muted);
  font-size: 1.08rem;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem 2.5rem;
}

.about-block {
  border-top: 3px solid var(--mustard);
  padding-top: 1.25rem;
}

.about-block:nth-child(2) {
  border-top-color: var(--magenta);
}

.about-block:nth-child(3) {
  border-top-color: var(--forest);
}

.about-block p {
  color: var(--muted);
  margin: 0;
}

/* Productos */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.product__media {
  aspect-ratio: 16 / 11;
  background-size: cover;
  background-position: center;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}

.product__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(15, 47, 58, 0.35));
  opacity: 0;
  transition: opacity 0.35s ease;
}

.product:hover .product__media::after {
  opacity: 1;
}

.product:hover .product__media {
  transform: scale(1.02);
  transition: transform 0.45s ease;
}

.product h3 {
  margin-bottom: 0.35rem;
}

.product p {
  color: var(--muted);
  margin: 0;
  font-size: 0.98rem;
}

/* Fortalezas */
.strengths {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem 2.5rem;
}

.strengths li {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
}

.strengths__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--teal);
  color: var(--mustard);
  font-size: 1.15rem;
}

.strengths p {
  color: var(--muted);
  margin: 0;
}

/* Contacto */
.section--contact {
  background:
    linear-gradient(135deg, rgba(26, 69, 84, 0.06), transparent),
    var(--white);
}

.contact-form {
  max-width: 760px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
}

.field {
  margin-bottom: 1.15rem;
}

.field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 0.4rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--magenta);
  box-shadow: 0 0 0 3px rgba(224, 24, 122, 0.15);
}

.field textarea {
  resize: vertical;
  min-height: 130px;
}

.form-note {
  margin-top: 0.85rem;
  font-size: 0.92rem;
  color: var(--forest);
  min-height: 1.4em;
}

.form-note.is-error {
  color: var(--magenta-deep);
}

/* Página legal */
.page-hero {
  background: var(--teal);
  color: var(--white);
  padding: 3.5rem 0 2.75rem;
}

.page-hero h1 {
  color: var(--white);
}

.page-hero .section__lead {
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

.page-hero .eyebrow {
  color: var(--mustard);
}

.legal article {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.legal__updated {
  font-size: 0.92rem;
  color: var(--muted);
}

/* ---------- Footer 4 columnas (80%) ---------- */
.site-footer {
  background: var(--teal-deep);
  color: rgba(255, 255, 255, 0.88);
  padding-top: 3.5rem;
}

.site-footer__inner {
  width: var(--body-w);
  max-width: 1400px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem 1.75rem;
  padding-bottom: 2.75rem;
}

.footer-col h3 {
  color: var(--mustard);
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.footer-col p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
}

.footer-brand {
  display: inline-block;
  margin-bottom: 1rem;
  background: var(--white);
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
}

.footer-brand img {
  width: 160px;
}

.footer-menu li {
  margin-bottom: 0.55rem;
  padding-left: 1rem;
  position: relative;
}

.footer-menu li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--magenta);
}

.footer-menu li:nth-child(even)::before {
  background: var(--mustard);
}

.footer-menu a {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
}

.footer-menu a:hover {
  color: var(--mustard);
}

.footer-contact li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
  font-size: 0.95rem;
}

.footer-contact i {
  color: var(--mustard);
  width: 1.1em;
  margin-top: 0.2em;
  flex-shrink: 0;
}

.footer-contact a {
  color: rgba(255, 255, 255, 0.88);
}

.footer-contact a:hover {
  color: var(--magenta);
}

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.2);
}

.copyright__inner {
  width: var(--body-w);
  max-width: 1400px;
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.1rem 0;
  font-size: 0.88rem;
}

.copyright p {
  margin: 0;
}

.copyright a {
  color: var(--mustard);
}

.copyright a:hover {
  color: var(--white);
}

/* ---------- WhatsApp + Scroll-up ---------- */
.wa-gadget {
  position: fixed;
  right: var(--wa-right);
  bottom: var(--wa-bottom);
  width: var(--wa-size);
  height: var(--wa-size);
  border-radius: 50%;
  background: #25d366;
  color: var(--white);
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: waFloat 2.8s ease-in-out infinite;
}

.wa-gadget:hover {
  color: var(--white);
  transform: scale(1.08);
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.55);
}

@keyframes waFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.scroll-up {
  position: fixed;
  right: var(--wa-right);
  /* Centrado respecto al gadget: mismo right + mismo tamaño */
  bottom: calc(var(--wa-bottom) + var(--wa-size) + var(--scroll-gap));
  width: var(--wa-size);
  height: var(--wa-size);
  border-radius: 50%;
  border: 0;
  background: var(--mustard);
  color: var(--teal-deep);
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 200;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease, background 0.2s ease;
  box-shadow: 0 8px 22px rgba(196, 160, 42, 0.4);
}

.scroll-up.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-up:hover {
  background: var(--magenta);
  color: var(--white);
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .about-grid,
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .site-footer__inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --header-w: 92vw;
    --body-w: 90vw;
    --wa-right: 16px;
    --wa-bottom: 16px;
    --wa-size: 52px;
  }

  .toolbar__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 1rem 5vw 1.25rem;
    display: none;
  }

  .main-nav.is-open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  .nav-cta {
    text-align: center;
  }

  .hero {
    min-height: calc(78vh - 200px);
    place-items: center;
  }

  .about-grid,
  .product-grid,
  .strengths,
  .form-row,
  .site-footer__inner {
    grid-template-columns: 1fr;
  }

  .copyright__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__slide,
  .hero__content,
  .hero__brand,
  .hero__grain,
  .wa-gadget,
  .reveal {
    animation: none !important;
    transition: none !important;
  }
  .hero__slide.is-active {
    transform: none;
  }
}
