/* =========================================================
   El Taller del Detalle — estilos
   Paleta inspirada en el logo y el catálogo
   ========================================================= */
:root {
  --cream: #f6f0e6;
  --cream-2: #efe5d6;
  --sand: #dcc2a6;
  --rose: #d69a95;
  --rose-dark: #b9716c;
  --ink: #2b2522;
  --ink-soft: #5d534d;
  --white: #fffdf9;

  --font-serif: "Fraunces", Georgia, serif;
  --font-script: "Caveat", cursive;
  --font-hand: "Amatic SC", "Caveat", cursive;
  --font-body: "Nunito", system-ui, sans-serif;

  --radius: 18px;
  --shadow: 0 10px 30px rgba(43, 37, 34, .08);
  --header-h: 72px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
h1, h2 { font-family: var(--font-serif); font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: min(1120px, 100% - 32px); margin-inline: auto; }

.script { font-family: var(--font-script); font-weight: 700; color: var(--rose-dark); }

.hand-title {
  font-family: var(--font-hand);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.eyebrow {
  font-size: .8rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 700;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  padding: .85em 1.6em;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  font: 700 1rem var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s, background .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); background: var(--rose-dark); border-color: var(--rose-dark); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { color: var(--white); }
.btn--small { padding: .5em 1.1em; font-size: .9rem; }

.link {
  color: var(--rose-dark);
  font-weight: 700;
  text-decoration: none;
}
.link:hover { text-decoration: underline; }

/* ---------- Cabecera ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 240, 230, .9);
  backdrop-filter: blur(8px);
  transition: box-shadow .3s;
}
.header.is-scrolled { box-shadow: 0 2px 16px rgba(43, 37, 34, .08); }
.header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.brand__logo { width: 48px; height: 48px; }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name { font-family: var(--font-serif); font-weight: 700; font-size: 1.25rem; }
.brand__script { font-family: var(--font-script); font-size: 1.2rem; }

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a:not(.btn) {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  position: relative;
}
.nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: var(--rose);
  transition: width .25s;
}
.nav a:not(.btn):hover::after { width: 100%; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 44px; height: 44px;
  padding: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: transform .3s, opacity .3s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 4rem 0 5rem; }
.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 3rem;
  position: relative;
}
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.hero h1 .script { font-size: 1.2em; }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 34em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; }
.hero__image img {
  width: 100%;
  max-width: 460px;
  margin-inline: auto;
  filter: drop-shadow(0 20px 40px rgba(43, 37, 34, .12));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.blob {
  position: absolute;
  border-radius: 50%;
  background: var(--sand);
  opacity: .55;
}
.blob--1 { width: 320px; height: 320px; top: -120px; right: -80px; }
.blob--2 { width: 220px; height: 220px; bottom: -100px; left: -70px; }

/* ---------- Secciones ---------- */
.section { padding: 5rem 0; }
.section--tint { background: var(--cream-2); }
.section__head { text-align: center; max-width: 620px; margin: 0 auto 2.5rem; }
.section__head h2 { font-size: clamp(2.6rem, 6vw, 3.6rem); margin-bottom: .1em; }
.section__head p { color: var(--ink-soft); }

/* ---------- Filtros ---------- */
.filters { display: flex; justify-content: center; flex-wrap: wrap; gap: .6rem; margin-bottom: 2.5rem; }
.filter {
  font: 700 .95rem var(--font-body);
  padding: .5em 1.2em;
  border-radius: 999px;
  border: 2px solid var(--sand);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.filter:hover { border-color: var(--rose); }
.filter.is-active { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* ---------- Productos ---------- */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 2rem;
}
.product {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .3s, box-shadow .3s;
}
.product:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(43, 37, 34, .12); }
.product.is-hidden { display: none; }

.product__media {
  border: 0;
  padding: 0;
  cursor: zoom-in;
  background: var(--cream-2);
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.product__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .5s;
}
.product:hover .product__media img { transform: scale(1.05); }

.product__body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.product__body h3 { font-size: 2rem; margin-bottom: .3em; }
.product__body p { color: var(--ink-soft); flex: 1; }

.tag {
  align-self: flex-start;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  background: #f4dedb;
  color: var(--rose-dark);
  padding: .25em .8em;
  border-radius: 999px;
  margin-bottom: .6rem;
}

/* ---------- Callout ---------- */
.callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
}
.callout h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.callout p { color: var(--ink-soft); max-width: 40em; margin: 0; }
.callout .btn { flex-shrink: 0; }

/* ---------- Pasos ---------- */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.step { text-align: center; padding: 1rem; }
.step__num {
  display: inline-grid;
  place-items: center;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--sand);
  font: 700 2rem var(--font-script);
  margin-bottom: 1rem;
}
.step h3 { font-family: var(--font-serif); font-size: 1.3rem; }
.step p { color: var(--ink-soft); }

/* ---------- Sobre ---------- */
.about { display: flex; align-items: center; gap: 2.5rem; max-width: 820px; }
.about__img { width: 140px; height: 140px; flex-shrink: 0; }
.about h2 { font-size: 3rem; }
.about p { color: var(--ink-soft); font-size: 1.1rem; }

/* ---------- Formulario ---------- */
.form {
  max-width: 720px;
  margin-inline: auto;
  background: var(--white);
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 1.2rem;
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.form label { display: grid; gap: .4rem; font-weight: 700; font-size: .95rem; }
.form input,
.form select,
.form textarea {
  font: 400 1rem var(--font-body);
  padding: .8em 1em;
  border: 2px solid var(--cream-2);
  border-radius: 12px;
  background: var(--cream);
  color: var(--ink);
  width: 100%;
  transition: border-color .2s;
}
.form input:focus,
.form select:focus,
.form textarea:focus { outline: none; border-color: var(--rose); }
.form .is-invalid { border-color: #c0544d; }
.form .btn { justify-self: start; }
.form__status { margin: 0; font-weight: 600; min-height: 1.5em; }
.form__status.ok { color: #4f7a55; }
.form__status.error { color: #c0544d; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn:disabled { opacity: .6; cursor: wait; }

/* ---------- Pie ---------- */
.footer { background: var(--ink); color: var(--cream); padding: 3rem 0; text-align: center; }
.footer__brand { font-family: var(--font-serif); font-size: 1.6rem; margin-bottom: .2em; }
.footer__brand .script { color: var(--sand); font-size: 1.1em; }
.footer__tag { letter-spacing: .15em; text-transform: uppercase; font-size: .8rem; opacity: .8; }
.footer__copy { font-size: .85rem; opacity: .6; margin: 0; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(43, 37, 34, .85);
  display: grid;
  place-items: center;
  padding: 2rem;
  animation: fade .25s;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 85vh; border-radius: var(--radius); background: var(--white); }
.lightbox__close {
  position: absolute;
  top: 1rem; right: 1.2rem;
  background: none;
  border: 0;
  color: var(--white);
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
}
@keyframes fade { from { opacity: 0; } }

/* ---------- Animación al hacer scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__image img { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    gap: 1.2rem;
    padding: 2rem 1rem 2.5rem;
    background: var(--cream);
    box-shadow: 0 12px 24px rgba(43, 37, 34, .1);
    transform: translateY(-120%);
    visibility: hidden;
    transition: transform .35s ease, visibility .35s;
  }
  .nav.is-open { transform: none; visibility: visible; }

  .hero { padding: 2.5rem 0 4rem; }
  .hero__inner { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
  .hero__image { order: -1; }
  .hero__image img { max-width: 280px; }
  .lead { margin-inline: auto; }
  .hero__actions { justify-content: center; }

  .callout { flex-direction: column; text-align: center; padding: 2rem 1.5rem; }
  .steps { grid-template-columns: 1fr; gap: 1rem; }
  .about { flex-direction: column; text-align: center; }
}

@media (max-width: 560px) {
  .section { padding: 3.5rem 0; }
  .form { padding: 1.5rem; }
  .form__row { grid-template-columns: 1fr; }
  .form .btn { justify-self: stretch; }
  .products { grid-template-columns: 1fr; }
}
