/* ==========================================================
   Mel Entre Buxos
   Paleta de las tarjetas: tinta, pergamino y oro viejo
   ========================================================== */

:root {
  --ink: #242117;
  --paper: #f0e4c5;
  --paper-2: #ede1c3;
  --paper-3: #e4d4ad;
  --gold: #b08a32;
  --gold-text: #735919;
  --muted: #65573b;
  --line: #b5a16e;
  --dark: #282418;
  --cream: #f3e3bd;
  --serif: Georgia, 'Times New Roman', serif;
  --pad-x: max(7vw, calc((100vw - 1450px) / 2));
}

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

html { scroll-behavior: smooth; scroll-padding-top: 20px; }

body {
  margin: 0;
  background: var(--paper) url('assets/panal.svg') 0 0 / 104px 180px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.7;
}

img { display: block; max-width: 100%; height: auto; }
figure, h1, h2, h3, blockquote { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
p { margin: 0 0 1.5rem; }
address { font-style: normal; }

h1, h2, h3, blockquote { font-weight: 400; letter-spacing: -.025em; }
h2 { font-size: clamp(2.6rem, 4.6vw, 4.3rem); line-height: 1.12; margin-bottom: 1.7rem; }
h3 { font-size: 1.7rem; line-height: 1.3; margin-bottom: .7rem; }

.eyebrow {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  line-height: 1.6;
  color: var(--gold-text);
  margin-bottom: 1.6rem;
}

:focus-visible { outline: 3px solid #8a5f0b; outline-offset: 4px; }

.skip {
  position: absolute; top: -100px; left: 15px; z-index: 100;
  background: var(--gold); color: var(--ink); padding: 12px;
}
.skip:focus { top: 10px; }

a:hover:not(.button):not(.wordmark) { text-decoration: underline; text-underline-offset: 5px; }

/* ---------- Cabecera ---------- */
.header {
  position: relative; z-index: 10;
  height: 105px;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  padding: 0 5%;
  background: #ede0bfee;
  border-bottom: 3px double var(--line);
}

.wordmark {
  display: grid;
  grid-template-columns: 66px auto;
  column-gap: 13px;
  align-items: center;
  font-size: 1.1rem;
  letter-spacing: .05em;
  white-space: nowrap;
}
.wordmark small {
  grid-column: 2;
  font-size: .7rem;
  letter-spacing: .1em;
  color: #6d571f;
}
.brand-seal { width: 66px; grid-row: 1 / 3; mix-blend-mode: multiply; }

.header nav { display: flex; gap: 2rem; font-size: 1rem; }
.header nav a:hover { color: var(--gold-text); }

.header-controls { display: flex; align-items: center; gap: 1rem; }

.language { display: flex; align-items: center; gap: 7px; font-size: .85rem; }
.language button {
  min-height: 44px; padding: 8px 4px;
  border: 0; background: none; color: inherit;
}
.language button[aria-pressed="true"] {
  color: #6d4e0f; font-weight: 700;
  text-decoration: underline; text-underline-offset: 7px;
}

.menu { display: none; }

/* ---------- Botones ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 12px 24px;
  background: var(--ink); color: #f6e6ba;
  border: 3px double #c2a358;
  font-size: 1rem; line-height: 1.5;
  transition: background .2s, transform .2s;
}
.button:hover { background: #574426; transform: translateY(-2px); }

/* ---------- Portada con pase de imágenes ---------- */
.hero {
  position: relative;
  min-height: 470px;
  margin: 28px 3% 0;
  padding: 45px 5% 75px;
  display: flex; align-items: center;
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid #aa9157;
}

.hero-slides { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-slides::after {
  content: ''; position: absolute; inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(28,30,20,.88) 0%, rgba(35,33,22,.76) 26%, rgba(35,33,22,.38) 43%, transparent 68%);
}
.hero-slide {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  opacity: 0; transition: opacity 1.1s ease;
}
.hero-slide.active { opacity: 1; }

.hero-copy { position: relative; z-index: 1; max-width: 380px; color: #fff5de; }
.hero-copy h1 { text-shadow: 0 2px 14px rgba(0,0,0,.22); }
.hero-copy h1 em { color: #e6c887; }
.hero-copy .eyebrow { font-size: .72rem; letter-spacing: .12em; color: #ead9b3; margin-bottom: 14px; }

h1 {
  font-size: clamp(2.4rem, 4vw, 3.8rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  font-weight: 400;
  margin-bottom: 20px;
}
h1 em { color: #65521e; font-weight: 400; }

.hero-intro { max-width: 300px; font-size: 1.05rem; line-height: 1.7; color: #f3e8d1; margin-bottom: 24px; }

.hero .button {
  background: rgba(28,30,20,.22); color: #fff5de;
  border: 1px solid #c8ad76;
  font-size: .95rem; padding: 10px 18px; min-height: 44px;
}
.hero .button:hover { background: #fff5de; color: #302b20; }

.slide-controls {
  position: absolute; z-index: 2; bottom: 18px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  padding: 3px 9px;
  background: #f0e4c5dc; border: 1px solid #aa9157; border-radius: 3px;
}
.slide-controls button { border: 0; background: none; color: #51401f; width: 36px; height: 36px; font-size: 1.6rem; line-height: 1; }
.slide-controls .slide-pause { font-size: .9rem; }
.slide-dots { display: flex; align-items: center; gap: 2px; }
.slide-dots button { width: 28px; height: 36px; padding: 9px; }
.slide-dots button::after { content: ''; display: block; width: 8px; height: 8px; border: 1px solid #76623a; border-radius: 50%; }
.slide-dots button[aria-pressed="true"]::after { background: #76623a; }

/* ---------- Franja de cualidades ---------- */
.qualities {
  display: flex; justify-content: space-around; gap: 2rem;
  margin: 0 3%; padding: 18px 5%;
  font-size: 1.1rem; font-style: italic; color: #55431e;
  border-bottom: 1px solid var(--line);
}
.qualities span { flex: 1; text-align: center; }
.qualities span + span { border-left: 1px solid #24211744; }

/* ---------- Secciones ---------- */
.section { padding: 85px var(--pad-x); }

/* Productos */
.catalog-heading { max-width: 760px; margin: 0 auto 45px; text-align: center; }
.catalog-heading > p:last-child { max-width: 580px; margin: 0 auto; color: var(--muted); }

.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 35px; }
.product-card { padding: 25px 18px 30px; text-align: center; }
.product-label { padding-bottom: 25px; }
.product-label img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border: 7px solid var(--paper-3); outline: 1px solid #aa9057;
  box-shadow: 0 6px 17px #49320e18;
}
.product-card h3 { font-size: 1.8rem; }
.product-card > p { font-size: 1rem; color: var(--muted); }
.product-card .product-format { margin-bottom: .6rem; color: var(--ink); font-weight: 700; }
.product-link {
  display: inline-block; padding: 6px 2px;
  color: var(--gold-text); font-size: .95rem;
  text-decoration: underline; text-underline-offset: 5px;
}

/* Historia */
.story {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8%; align-items: center;
  background: #dfcea480;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.story > div p:not(.eyebrow) { max-width: 490px; color: #4f4630; }
.story-card { align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.story-card img { width: 100%; mix-blend-mode: multiply; }
.story-card blockquote { margin: 28px 0 6px; font-size: clamp(1.8rem, 2.6vw, 2.8rem); font-style: italic; line-height: 1.3; text-align: center; color: #6b5019; }
.story-card p { margin: 0; font-size: .9rem; color: #4f4630; }

/* Proceso */
.section-heading { max-width: 750px; }
.section-heading > p:last-child { max-width: 500px; color: var(--muted); }

.process-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 7%; margin-top: 40px; }
.process-layout figure { position: relative; min-height: 570px; }
.process-layout img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  border: 8px solid #e6d6ae; outline: 1px solid #9d803b;
  filter: sepia(.18) saturate(.7);
}
figcaption {
  position: absolute; z-index: 2; bottom: 18px; right: 18px;
  padding: 2px 8px; font-size: .75rem; color: #fff; background: #15191299;
}

.steps { counter-reset: paso; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; justify-content: space-between; }
.step { counter-increment: paso; display: flex; gap: 25px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.step:first-child { padding-top: 0; }
.step::before { content: counter(paso, decimal-leading-zero); font-size: 2rem; line-height: 1.3; color: #8c6a20; }
.step p { margin: 0; max-width: 470px; font-size: .95rem; color: var(--muted); }

/* Preguntas */
.faq { padding-top: 10px; display: grid; grid-template-columns: 1fr 1.2fr; gap: 8%; align-items: start; }
.faq h2 { font-size: 2.6rem; }
details { padding: 18px 0; border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }
summary { position: relative; padding-right: 35px; cursor: pointer; list-style: none; font-weight: 600; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: 5px; top: -5px; font-size: 1.5rem; color: #8c6a20; }
details[open] summary::after { content: '−'; }
details p { margin: 15px 0 0; font-size: .95rem; color: var(--muted); }

/* Contacto */
.contact {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 10%;
  background: var(--dark); color: var(--cream);
  border-top: 6px double #b18d3e;
}
.contact h2 { font-size: clamp(2.8rem, 4.5vw, 4.6rem); }
.contact .eyebrow { color: #d4b772; }
.contact > div > p:not(.eyebrow), .contact address, .instagram p { color: #dfd0ac; }
.contact > div > p:not(.eyebrow) { max-width: 410px; }
.contact .button { background: #ddc18b; color: var(--ink); border-color: #ddc18b; }
.contact .button:hover { background: #ecd7a8; }
.phone { display: block; margin-top: 20px; font-size: 1.2rem; letter-spacing: .06em; }
.contact-details { padding-top: 5px; }
.contact-details .eyebrow { margin-bottom: .5rem; }
.name { font-size: 1.5rem; }
.contact address { margin-bottom: 30px; }
.instagram { position: relative; padding-top: 30px; border-top: 1px solid #ffffff30; }
.instagram svg { width: 28px; height: 28px; margin-bottom: 15px; color: #dfbd75; }
.instagram p { font-size: .95rem; }
.soon { display: inline-block; padding: 9px 15px; font-size: .85rem; color: #dfbd75; border: 1px solid #9f834a; }
a.soon[href] { color: var(--ink); background: #ddc18b; border-color: #ddc18b; font-weight: 700; }
a.soon[href]:hover { background: #ecd7a8; text-decoration: none; }

/* Pie */
footer {
  display: flex; justify-content: space-between; align-items: center; gap: 2rem;
  padding: 30px var(--pad-x);
  background: var(--dark); color: #dfd0ac;
  border-top: 1px solid #9f834a;
}
footer p { margin: 0; font-size: .8rem; }
footer > a:last-child { font-size: .85rem; }

/* ---------- Adorno: flor de jara en línea fina ---------- */
.orn { display: block; width: 84px; height: 50px; margin: 0 auto 1.1rem; color: var(--gold); }
.orn.left { margin-left: 0; }
.contact .orn { color: #d4b772; }
@media (max-width: 600px) { .orn { width: 70px; height: 42px; } }

/* ---------- Tablet ---------- */
@media (max-width: 1050px) {
  .header nav { gap: 1.1rem; }
  .section { padding: 75px 5%; }
  .contact { gap: 6%; }
  footer { flex-wrap: wrap; padding: 30px 5%; }
}

@media (max-width: 850px) {
  .header { height: 90px; }
  .wordmark { font-size: .85rem; grid-template-columns: 50px auto; }
  .brand-seal { width: 50px; }

  .menu {
    display: block; width: 44px; height: 44px;
    background: none; border: 1px solid var(--line); color: var(--ink);
    font-size: 1.4rem; line-height: 1;
  }
  .header nav {
    display: none; position: absolute; top: 90px; left: 0; right: 0;
    padding: 20px 5% 30px;
    background: #ede0bf; border-bottom: 1px solid var(--line);
  }
  .header nav.open { display: flex; flex-direction: column; gap: 0; }
  .header nav a { padding: 12px 0; font-size: 1.05rem; }

  .hero { min-height: 430px; padding: 40px 5% 75px; }
  .hero-slide { object-position: 60% center; }
  h1 { font-size: 2.65rem; }

  .product-grid { gap: 15px; }
  .product-card { padding: 15px 8px 25px; }
  .product-card h3 { font-size: 1.5rem; }

  .story { gap: 5%; }
  .process-layout { gap: 5%; }
  .step { gap: 15px; }
  .step h3 { font-size: 1.4rem; }
  .step p { font-size: .9rem; }

  .contact { grid-template-columns: 1fr; }
  .contact-details { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 2rem; }
  .instagram { grid-column: 1 / -1; }
}

/* ---------- Móvil ---------- */
@media (max-width: 600px) {
  html { scroll-padding-top: 15px; }
  .header { height: 86px; gap: 10px; }
  .header nav { top: 86px; }
  .header-controls { gap: 8px; }
  .wordmark { font-size: .75rem; grid-template-columns: 42px auto; column-gap: 7px; }
  .brand-seal { width: 42px; }
  .wordmark small { font-size: .6rem; }

  .hero { display: block; min-height: 640px; margin: 20px 4% 0; padding: 35px 25px 60px; background: var(--paper); }
  .hero-copy { max-width: 100%; padding-bottom: 320px; color: #302b20; }
  .hero-copy h1 { text-shadow: none; }
  .hero-copy h1 em { color: #65521e; }
  .hero-copy .eyebrow { color: #554625; }
  .hero .button { background: transparent; color: #2e2b1e; border-color: #6d5b34; }
  .hero .button:hover { background: var(--paper-3); }
  .hero-copy .eyebrow { font-size: .68rem; }
  h1 { font-size: 2.3rem; line-height: 1.2; }
  .hero-intro { max-width: 280px; font-size: 1rem; color: #4a3d25; margin-bottom: 18px; }
  .hero-slides { top: auto; bottom: 0; height: 340px; }
  .hero-slides::after { background: none; }
  .hero-slide { object-position: right center; }
  .slide-controls { bottom: 14px; }

  .qualities { margin: 0 4%; padding: 15px 0; gap: 8px; font-size: .95rem; }
  .qualities span { padding: 0 6px; line-height: 1.3; }

  .section { padding: 60px 6%; }
  .catalog { padding-bottom: 40px; }
  .catalog-heading { margin-bottom: 30px; }
  .product-grid { grid-template-columns: 1fr; gap: 0; }
  .product-card { padding: 20px 0 30px; }
  .product-card + .product-card { border-top: 1px solid var(--line); padding-top: 30px; }
  .product-card h3 { font-size: 2rem; }
  .product-label { max-width: 360px; margin: 0 auto; }

  .story { display: block; }
  .story h2 { font-size: 3rem; }
  .story-card { margin-top: 40px; }
  .story-card img { max-width: 460px; }
  .story-card blockquote { font-size: 2rem; }

  .process-layout { display: flex; flex-direction: column; gap: 30px; }
  .process-layout figure { min-height: 370px; }
  .process-layout img { object-position: center 45%; }
  .step { padding: 23px 0; gap: 23px; }
  .step h3 { font-size: 1.6rem; }
  .step p { font-size: 1rem; }

  .faq { display: block; padding-top: 0; }
  .faq h2 { font-size: 2.5rem; margin-bottom: 30px; }

  .contact { gap: 15px; }
  .contact h2 { font-size: 3rem; }
  .contact-details { display: block; }
  .contact-details > div { margin-top: 25px; }

  .eyebrow { font-size: .75rem; letter-spacing: .12em; }
  footer { flex-direction: column; align-items: flex-start; gap: 12px; padding: 30px 6%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* Información legal */
footer { flex-wrap: wrap; }
.legal-links { display:flex; flex-wrap:wrap; justify-content:center; gap:12px; width:100%; font-size:.85rem; }
.legal-links a { text-decoration:underline; text-underline-offset:4px; }
.legal-header { min-height:90px; padding:22px 6%; display:flex; justify-content:space-between; align-items:center; gap:20px; border-bottom:1px solid #aa9157; }
.legal-document { max-width:850px; margin:auto; padding:60px 24px; }
.legal-document h1 { font-size:clamp(2rem,5vw,3rem); }
.legal-document h2 { font-size:1.5rem; margin:30px 0 12px; }
.legal-document p,.legal-document li { line-height:1.8; margin-bottom:12px; }
.legal-document ul { padding-left:22px; }
.legal-document a { text-decoration:underline; text-underline-offset:3px; }
.legal-document [hidden] { display:none; }
.legal-pending { border-left:3px solid #aa9157; padding:12px 16px; background:var(--paper-2); }
.legal-document dt { font-weight:bold; margin-top:12px; }
.legal-document dd { margin-left:0; }
@media(max-width:600px) { .legal-header { align-items:flex-start; } .legal-document { padding-top:35px; } }
