:root {
  --tan: #c69f7a;
  --tan-dark: #b38a64;
  --cream: #efe4d4;
  --ink: #2a1c12;
  --brown: #6b4a30;
  --gold: #f3d9a6;
  --white: #fffaf3;
  --serif: 'Lora', Georgia, serif;
  --sans: 'Raleway', 'Helvetica Neue', Arial, sans-serif;
  --wrap: 1150px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.eyebrow {
  font-size: 12px;
  letter-spacing: .32em;
  text-transform: uppercase;
  font-weight: 400;
}

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: 80px;
  display: flex; align-items: center;
  transition: background .4s, border-color .4s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: rgba(239, 228, 212, .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom-color: rgba(107, 74, 48, .18);
}
.header .wrap { display: flex; justify-content: space-between; align-items: center; padding-inline: 48px; }
.logo { width: 40px; height: 40px; color: var(--ink); }
.logo svg { width: 100%; height: 100%; }
.nav { display: flex; gap: 40px; }
.nav a {
  font-size: 12px; letter-spacing: .28em; text-transform: uppercase;
  font-weight: 400; color: var(--brown);
  position: relative; padding: 4px 0;
}
.nav a::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .35s;
}
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Tan photo sections ---------- */
.tinted {
  position: relative; overflow: hidden;
  background: var(--tan);
  color: var(--white);
}
.tinted::before {
  content: ''; position: absolute; inset: 0;
  background: var(--bg, none) center / cover no-repeat;
  opacity: .16; filter: grayscale(.4) blur(1px);
}
.tinted > * { position: relative; }
.side-line {
  position: absolute; left: 62px; width: 1px;
  background: rgba(255, 250, 243, .7);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 120px 16px 90px;
  --bg: url('../img/hero.jpg');
}
.hero .side-line { top: 25%; height: 50%; }
.hero-mark { width: 64px; height: 64px; margin: 0 auto 44px; color: var(--white); }
.hero .eyebrow { color: var(--white); opacity: .9; margin-bottom: 26px; }
.hero h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(56px, 8.5vw, 100px);
  line-height: 1.02; letter-spacing: -.01em;
}
.hero h1 em { font-style: italic; display: block; }
.hero .divider { width: 1px; height: 48px; background: var(--white); margin: 38px auto; opacity: .8; }
.hero p {
  max-width: 460px; margin: 0 auto 44px;
  font-size: 17px; line-height: 1.6; color: var(--gold);
}
.actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 14px 34px;
  font-family: var(--sans); font-size: 12px; font-weight: 400;
  letter-spacing: .3em; text-transform: uppercase;
  border: 1px solid var(--white); cursor: pointer;
  transition: background .3s, color .3s, transform .3s;
}
.btn:hover { transform: translateY(-2px); }
.btn-ghost { background: rgba(255, 250, 243, .12); color: var(--white); }
.btn-ghost:hover { background: var(--white); color: var(--ink); }
.btn-solid { background: var(--white); color: var(--ink); }
.btn-solid:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }
.hero .handle {
  position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%);
  font-size: 13px; letter-spacing: .3em; opacity: .8;
}

/* ---------- Quote ---------- */
.quote { padding: 110px 16px; text-align: center; --bg: url('../img/taller.jpg'); }
.quote .side-line { top: 20px; bottom: 40px; }
.quote blockquote {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(26px, 3.2vw, 36px); line-height: 1.6;
  max-width: 780px; margin: 0 auto 36px;
}
.quote cite { font-style: normal; font-size: 12px; letter-spacing: .3em; opacity: .85; }

/* ---------- Obra ---------- */
.obra { padding: 140px 0 140px; }
.obra-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 32px; flex-wrap: wrap; margin-bottom: 56px;
}
.obra-head .eyebrow { color: var(--brown); margin-bottom: 18px; }
.obra-head h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 4.4vw, 52px); line-height: 1.1; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters button {
  font-family: var(--sans); font-size: 12px; font-weight: 400;
  letter-spacing: .22em; text-transform: uppercase;
  padding: 10px 16px; background: transparent; color: var(--brown);
  border: 1px solid rgba(107, 74, 48, .35); cursor: pointer;
  transition: background .25s, color .25s, border-color .25s;
}
.filters button:hover { border-color: var(--ink); color: var(--ink); }
.filters button.active { background: var(--ink); border-color: var(--ink); color: var(--white); }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: rgba(107, 74, 48, .15); }
.card {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  background: linear-gradient(135deg, #8a6446, #4a3222);
  cursor: pointer;
}
.card picture { display: block; height: 100%; }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.card:hover img { transform: scale(1.05); }
.card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(30, 18, 10, .7), rgba(30, 18, 10, 0) 45%);
}
.card figcaption { position: absolute; left: 24px; bottom: 26px; z-index: 1; color: var(--white); }
.card figcaption span { display: block; font-size: 12px; letter-spacing: .28em; text-transform: uppercase; opacity: .85; margin-bottom: 8px; }
.card figcaption strong { font-family: var(--serif); font-weight: 500; font-size: 20px; }
.card.hide { display: none; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20, 12, 6, .92);
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img { max-height: 84vh; max-width: 100%; object-fit: contain; }
.lightbox p { position: absolute; bottom: 24px; left: 0; right: 0; text-align: center; color: var(--white); font-family: var(--serif); font-size: 18px; }
.lightbox button {
  position: absolute; top: 20px; right: 24px;
  background: none; border: 0; color: var(--white); font-size: 36px; cursor: pointer; line-height: 1;
}

/* ---------- Restauración ---------- */
.restauracion { padding: 0 0 140px; }
.restauracion .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 56px 90px; align-items: center; }
.restauracion-head { grid-column: 1 / -1; }
.restauracion .eyebrow { color: var(--brown); margin-bottom: 18px; }
.restauracion h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 4.4vw, 52px); line-height: 1.1; }
.restauracion-texto > p { line-height: 1.7; font-size: 16px; max-width: 480px; }

/* Antes / después: la foto "antes" se recorta hasta la barra */
.antes-despues {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  background: #4a3222; cursor: ew-resize; user-select: none; -webkit-user-select: none;
  touch-action: pan-y;
}
.antes-despues picture, .antes-despues img { position: absolute; inset: 0; width: 100%; height: 100%; }
.antes-despues img { object-fit: cover; pointer-events: none; }
.ad-antes { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ad-antes img { object-position: 50% 28%; }
.ad-badge {
  position: absolute; top: 18px; z-index: 2; pointer-events: none;
  padding: 7px 12px; background: rgba(30, 18, 10, .62); color: var(--white);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  font-size: 11px; font-weight: 500; letter-spacing: .26em; text-transform: uppercase;
  transition: opacity .25s;
}
.ad-badge-antes { left: 18px; }
.ad-badge-despues { right: 18px; }
.antes-despues.ad-min .ad-badge-antes, .antes-despues.ad-max .ad-badge-despues { opacity: 0; }
.ad-barra {
  position: absolute; top: 0; bottom: 0; left: var(--pos); z-index: 3;
  width: 2px; margin-left: -1px; background: var(--white);
  box-shadow: 0 0 12px rgba(20, 12, 6, .35); outline: none;
}
.ad-perilla {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--white); color: var(--ink);
  box-shadow: 0 4px 16px rgba(20, 12, 6, .3);
  transition: transform .2s;
}
.ad-perilla svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.antes-despues:hover .ad-perilla, .antes-despues.ad-arrastrando .ad-perilla { transform: translate(-50%, -50%) scale(1.08); }
.ad-barra:focus-visible .ad-perilla { outline: 2px solid var(--ink); outline-offset: 3px; }
.restauracion-lista { list-style: none; margin: 28px 0 40px; border-top: 1px solid rgba(107, 74, 48, .2); max-width: 480px; }
.restauracion-lista li {
  padding: 12px 0; border-bottom: 1px solid rgba(107, 74, 48, .2);
  font-family: var(--serif); font-size: 17px; color: var(--brown);
}
.btn-dark { background: var(--ink); border-color: var(--ink); color: var(--white); }
.btn-dark:hover { background: transparent; color: var(--ink); }

/* ---------- Contacto ---------- */
.contacto { padding: 140px 0; --bg: url('../img/contacto.jpg'); }
.contacto .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 110px; }
.contacto .eyebrow { color: var(--gold); margin-bottom: 28px; }
.contacto h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 4.4vw, 50px); line-height: 1.1; }
.contacto h2 em { display: block; }
.contacto .divider { width: 1px; height: 48px; background: var(--gold); margin: 36px 0 40px; opacity: .8; }
.contacto .intro { color: var(--gold); line-height: 1.6; font-size: 15px; max-width: 500px; }
.ig { margin-top: 40px; display: flex; gap: 24px; align-items: center; }
.ig .eyebrow { margin: 0; }
.ig a { color: var(--white); border-bottom: 1px solid transparent; transition: border-color .3s; }
.ig a:hover { border-color: var(--white); }

.form label { display: block; color: var(--gold); margin-bottom: 10px; }
.form .field { margin-bottom: 26px; }
.form input, .form textarea {
  width: 100%; padding: 14px 16px;
  font-family: var(--sans); font-weight: 300; font-size: 15px; color: var(--white);
  background: rgba(255, 250, 243, .12);
  border: 1px solid rgba(243, 217, 166, .55);
  outline: none; transition: border-color .3s, background .3s;
}
.form textarea { min-height: 126px; resize: vertical; }
.form input::placeholder, .form textarea::placeholder { color: rgba(243, 217, 166, .85); }
.form input:focus, .form textarea:focus { border-color: var(--white); background: rgba(255, 250, 243, .2); }
.form .btn { margin-top: 4px; }
.form-note { margin-top: 18px; font-size: 14px; color: var(--white); min-height: 1.4em; }

/* ---------- Footer ---------- */
.footer { padding: 36px 0; }
.footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-inline: 48px; flex-wrap: wrap; }
.footer .logo { width: 32px; height: 32px; }
.footer small { font-size: 13px; color: var(--brown); }
.footer a.eyebrow { color: var(--brown); font-size: 12px; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s ease, transform 1s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Precio y "Agregar" en las tarjetas ---------- */
.card figcaption .precio { display: block; margin-top: 8px; font-style: normal; font-size: 15px; letter-spacing: .06em; color: var(--gold); }
.card:has(.add) figcaption { right: 150px; }
.nav { align-items: center; }
.card .add {
  position: absolute; right: 24px; bottom: 26px; z-index: 1;
  padding: 10px 16px; background: rgba(255, 250, 243, .12); color: var(--white);
  border: 1px solid var(--white); cursor: pointer;
  font-family: var(--sans); font-size: 12px; font-weight: 400; letter-spacing: .24em; text-transform: uppercase;
  transition: background .3s, color .3s;
}
.card .add:hover { background: var(--white); color: var(--ink); }

/* ---------- Carrito ---------- */
[hidden] { display: none !important; }
.cart-toggle {
  position: relative; background: none; border: 0; cursor: pointer;
  color: var(--brown); width: 26px; height: 26px; margin-top: -4px;
}
.cart-toggle svg, .cart-btn svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cart-toggle svg { width: 100%; height: 100%; }
.cart-count {
  position: absolute; top: -6px; right: -10px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--ink); color: var(--white);
  font-size: 11px; font-weight: 500; line-height: 18px; text-align: center;
}

.cart-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(20, 12, 6, .5); opacity: 0; visibility: hidden;
  transition: opacity .35s, visibility .35s;
}
.cart-overlay.open { opacity: 1; visibility: visible; }
.cart {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 95;
  width: min(440px, 100%);
  display: flex; flex-direction: column;
  background: var(--white); color: var(--ink);
  transform: translateX(100%); transition: transform .4s cubic-bezier(.2, .7, .2, 1);
  box-shadow: -12px 0 40px rgba(20, 12, 6, .18);
}
.cart.open { transform: none; }
.cart-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px; border-bottom: 1px solid rgba(107, 74, 48, .18);
}
.cart-head h2 { font-family: var(--serif); font-weight: 400; font-size: 26px; }
.cart-close { background: none; border: 0; font-size: 32px; line-height: 1; cursor: pointer; color: var(--ink); }
.cart-body { flex: 1; overflow-y: auto; }
.cart-empty { padding: 40px 24px; text-align: center; color: var(--brown); font-family: var(--serif); font-style: italic; font-size: 18px; }

.cart-items { list-style: none; }
.cart-item {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: start;
  padding: 18px 24px; border-bottom: 1px solid rgba(107, 74, 48, .18);
}
.cart-item img { width: 64px; height: 64px; object-fit: cover; background: var(--tan); }
.cart-item strong { font-family: var(--serif); font-weight: 500; font-size: 16px; }
.cart-price { font-weight: 500; white-space: nowrap; }
.qty { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.qty button {
  width: 28px; height: 28px; background: none; cursor: pointer;
  border: 1px solid rgba(107, 74, 48, .35); color: var(--ink); font-size: 15px;
}
.qty button:hover { border-color: var(--ink); }
.qty span { min-width: 12px; text-align: center; }
.qty .quitar { width: auto; height: auto; border: 0; margin-left: 6px; color: var(--brown); font-family: var(--sans); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }

.cart-datos { padding: 20px 24px 8px; }
.cart-datos summary {
  cursor: pointer; margin-bottom: 18px;
  font-size: 12px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase;
}
.cart-field { margin-bottom: 16px; }
.cart-field label { display: block; font-size: 11px; color: var(--brown); margin-bottom: 8px; }
.cart-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cart-field input, .cart-field select {
  width: 100%; padding: 12px 14px;
  font-family: var(--sans); font-size: 15px; color: var(--ink);
  background: #fff; border: 1px solid rgba(107, 74, 48, .3); border-radius: 0; outline: none;
}
.cart-field input:focus, .cart-field select:focus { border-color: var(--ink); }

.cart-foot { padding: 20px 24px 22px; border-top: 1px solid rgba(107, 74, 48, .18); display: flex; flex-direction: column; gap: 10px; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; }
.cart-total span { font-size: 16px; }
.cart-total strong { font-family: var(--serif); font-weight: 500; font-size: 24px; }
.cart-total-desc span, .cart-total-desc strong { color: var(--brown); font-size: 14px; font-weight: 500; }
.cart-total-desc strong { font-family: var(--sans); font-size: 17px; }
.cart-aviso { color: var(--brown); font-size: 13px; text-align: center; }
.cart-aviso:empty { display: none; }
.cart-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 15px; border: 0; cursor: pointer;
  font-family: var(--sans); font-size: 12px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase;
  transition: filter .25s, transform .25s;
}
.cart-btn:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.cart-btn:disabled { opacity: .4; cursor: not-allowed; filter: grayscale(.6); }
.cart-btn svg { width: 18px; height: 18px; }
.cart-btn-wa { background: #25d366; color: #0b2e17; }
.cart-btn-wa svg { fill: currentColor; stroke: none; }
.cart-btn-tr { background: var(--ink); color: var(--white); }
.cart-note { text-align: center; font-size: 13px; color: var(--brown); }

/* ---------- Ventana de transferencia ---------- */
.transfer {
  margin: auto; padding: 0; border: 0;
  width: min(420px, calc(100% - 32px));
  background: var(--white); color: var(--ink);
  box-shadow: 0 24px 60px rgba(20, 12, 6, .35);
}
.transfer::backdrop { background: rgba(20, 12, 6, .6); }
.transfer[open] { animation: tr-in .3s cubic-bezier(.2, .7, .2, 1); }
@keyframes tr-in { from { opacity: 0; transform: translateY(16px); } }
.transfer-box { position: relative; padding: 28px 24px 24px; display: flex; flex-direction: column; gap: 14px; }
.transfer h2 { font-family: var(--serif); font-weight: 400; font-size: 26px; padding-right: 32px; }
.transfer p { font-size: 14px; line-height: 1.55; }
.transfer p strong { font-weight: 600; }
.tr-close { position: absolute; top: 18px; right: 20px; background: none; border: 0; font-size: 30px; line-height: 1; cursor: pointer; color: var(--ink); }
.tr-desc { color: var(--brown); font-weight: 500; }
.tr-datos { display: flex; flex-direction: column; gap: 1px; background: rgba(107, 74, 48, .18); border: 1px solid rgba(107, 74, 48, .18); }
.tr-dato { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; padding: 12px 14px; background: var(--cream); }
.tr-dato .eyebrow { grid-column: 1 / -1; font-size: 11px; color: var(--brown); }
.tr-dato strong { font-weight: 500; font-size: 16px; letter-spacing: .02em; word-break: break-all; font-variant-numeric: lining-nums tabular-nums; }
.tr-dato button {
  padding: 7px 12px; background: var(--white); cursor: pointer;
  border: 1px solid var(--ink); color: var(--ink);
  font-family: var(--sans); font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
}
.tr-dato button:hover { background: var(--ink); color: var(--white); }
.tr-pedido { text-align: center; color: var(--brown); font-variant-numeric: lining-nums; }
.tr-nota { padding: 12px 14px; border-left: 2px solid var(--brown); background: var(--cream); }
.transfer .cart-btn-wa svg { fill: currentColor; stroke: none; flex-shrink: 0; }
.transfer .cart-btn { letter-spacing: .12em; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .contacto .wrap, .restauracion .wrap { grid-template-columns: 1fr; gap: 60px; }
  .side-line { display: none; }
}
@media (max-width: 640px) {
  .header .wrap, .footer .wrap { padding-inline: 0; }
  .nav { gap: 16px; }
  .nav a { letter-spacing: .14em; font-size: 11px; }
  .grid { grid-template-columns: 1fr; }
  .obra, .contacto { padding: 90px 0; }
  .restauracion { padding-bottom: 90px; }
  .restauracion .btn { letter-spacing: .16em; padding-inline: 24px; }
  .footer .wrap { flex-direction: column; text-align: center; }
  .cart-row { grid-template-columns: 1fr; gap: 0; }
}
