/* Huerta Lenta — escala 4/8: 4 8 12 16 24 32 48 64 96 128. Un acento: rubí. */
:root {
  --crema: #ede4d6;
  --crema-2: #e4d8c5;
  --papel: #f6f0e6;
  --tinta: #2b211c;
  --tinta-2: #6b5d53;
  --rubi: #8e1f2a;
  --rubi-2: #74161f;
  --linea: rgba(43, 33, 28, 0.12);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter Tight", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--crema);
  color: var(--tinta);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
em { font-style: italic; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }

.kicker {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tinta-2);
}

h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; line-height: 1.02; }

.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  background: var(--rubi); color: var(--papel); text-decoration: none;
  font-size: 15px; font-weight: 500; letter-spacing: 0.01em;
  transition: background-color 180ms var(--ease), transform 180ms var(--ease);
}
.boton:hover { background: var(--rubi-2); }
.boton:active { transform: scale(0.97); }
.boton[disabled] { opacity: 0.5; pointer-events: none; }
.boton--linea { background: transparent; color: var(--tinta); box-shadow: inset 0 0 0 1px var(--tinta); }
.boton--linea:hover { background: var(--tinta); color: var(--papel); }

/* ---------- Carga ---------- */
.loader {
  position: fixed; inset: 0; z-index: 50; background: var(--crema);
  display: grid; place-content: center; justify-items: center; gap: 16px;
  transition: opacity 500ms var(--ease), visibility 500ms;
}
.loader.oculto { opacity: 0; visibility: hidden; }
.loader__marca { font-family: var(--serif); font-size: 28px; letter-spacing: 0.08em; }
.loader__barra { width: 160px; height: 1px; background: var(--linea); overflow: hidden; }
.loader__barra span { display: block; height: 100%; width: 0; background: var(--tinta); transition: width 200ms linear; }
.loader__pct { font-size: 12px; letter-spacing: 0.14em; color: var(--tinta-2); font-variant-numeric: tabular-nums; }

/* ---------- Navegación ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 32px; padding-top: max(16px, env(safe-area-inset-top));
  transition: background-color 300ms var(--ease), box-shadow 300ms var(--ease);
}
.nav.solida { background: rgba(237, 228, 214, 0.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--linea); }
.nav__marca { font-family: var(--serif); font-size: 24px; text-decoration: none; letter-spacing: 0.02em; }
.nav__links { display: flex; gap: 32px; font-size: 14px; }
.nav__links a { text-decoration: none; color: var(--tinta-2); transition: color 180ms var(--ease); }
.nav__links a:hover { color: var(--tinta); }
.nav__pedido {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border-radius: 999px; box-shadow: inset 0 0 0 1px var(--tinta); font-size: 14px; font-weight: 500;
  transition: background-color 180ms var(--ease), color 180ms var(--ease);
}
.nav__pedido:hover { background: var(--tinta); color: var(--papel); }
.nav__cuenta {
  min-width: 20px; height: 20px; padding: 0 4px; border-radius: 999px; background: var(--rubi); color: var(--papel);
  display: inline-grid; place-items: center; font-size: 12px; font-variant-numeric: tabular-nums;
}
.nav__cuenta.salto { animation: salto 260ms var(--ease); }
@keyframes salto { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* ---------- Hero con scroll ---------- */
.hero { height: 420vh; position: relative; }
.hero__escena { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
#cuadros { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__textos { position: absolute; inset: 0; pointer-events: none; }
.beat {
  position: absolute; opacity: 0; transform: translateY(16px);
  transition: opacity 400ms var(--ease), transform 400ms var(--ease);
}
.beat.visible { opacity: 1; transform: none; }
.beat .num { display: block; font-size: 12px; letter-spacing: 0.14em; color: var(--rubi); margin-bottom: 8px; }
.beat p { font-family: var(--serif); font-size: clamp(28px, 3.4vw, 44px); line-height: 1.08; letter-spacing: -0.01em; }
.beat--intro { left: 6vw; top: 50%; translate: 0 -50%; max-width: 30vw; }
.beat p.kicker { font-family: var(--sans); font-size: 12px; line-height: 1.4; letter-spacing: 0.14em; }
.beat--intro h1 { font-size: clamp(44px, 4.8vw, 84px); margin-top: 16px; }
.beat--intro h1 em { color: var(--rubi); }
.scroll-hint { margin-top: 24px; font-family: var(--sans) !important; font-size: 12px !important; letter-spacing: 0.14em; text-transform: uppercase; color: var(--tinta-2); }
.scroll-hint::after { content: ""; display: block; width: 1px; height: 32px; margin: 8px 0 0; background: var(--tinta-2); animation: bajar 1.6s var(--ease-in-out) infinite; transform-origin: top; }
@keyframes bajar { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.beat--izq { left: 6vw; top: 50%; translate: 0 -50%; max-width: 340px; }
.beat--der { left: 6vw; top: 50%; translate: 0 -50%; max-width: 340px; }
.beat--der em { color: var(--rubi); }
.beat--final { left: 6vw; bottom: 10vh; max-width: 420px; pointer-events: auto; }
.beat--final .boton { margin-top: 24px; }
.beat--intro.visible .scroll-hint { opacity: 1; }

/* ---------- Manifiesto ---------- */
.manifiesto { padding: 128px 32px; max-width: 1080px; margin: 0 auto; text-align: center; }
.sin { list-style: none; margin: 24px 0 48px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 32px; }
.sin li { font-family: var(--serif); font-size: clamp(40px, 6vw, 88px); line-height: 1; text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--rubi); }
.manifiesto__texto { max-width: 560px; margin: 0 auto; font-size: 19px; color: var(--tinta-2); }

/* ---------- Tienda ---------- */
.tienda { padding: 96px 32px 128px; background: var(--papel); }
.tienda__cabeza { max-width: 1200px; margin: 0 auto 48px; display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.tienda__cabeza h2 { font-size: clamp(48px, 6vw, 80px); }
.tienda__cabeza p { max-width: 360px; color: var(--tinta-2); font-size: 15px; }
.grilla { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 48px 24px; }
.cargando, .vacio { grid-column: 1 / -1; color: var(--tinta-2); padding: 48px 0; text-align: center; }

.prod { display: flex; flex-direction: column; gap: 16px; }
.prod__foto { aspect-ratio: 4 / 5; border-radius: 4px; overflow: hidden; background: var(--crema-2); }
.prod__foto img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
.prod:hover .prod__foto img { transform: scale(1.03); }
.prod__fila { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.prod__nombre { font-family: var(--serif); font-size: 28px; line-height: 1.1; }
.prod__precio { font-variant-numeric: tabular-nums; font-size: 16px; font-weight: 500; white-space: nowrap; }
.prod__cat { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--tinta-2); }
.tamanos { display: flex; flex-wrap: wrap; gap: 8px; }
.tamano {
  min-height: 36px; padding: 0 16px; border-radius: 999px; font-size: 14px;
  box-shadow: inset 0 0 0 1px var(--linea); transition: box-shadow 160ms var(--ease), background-color 160ms var(--ease);
}
.tamano:hover { box-shadow: inset 0 0 0 1px var(--tinta-2); }
.tamano[aria-pressed="true"] { background: var(--tinta); color: var(--papel); box-shadow: none; }
.prod .boton { width: 100%; }

/* ---------- Proceso ---------- */
.proceso { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 90vh; }
.proceso__foto { overflow: hidden; background: var(--crema-2); }
.proceso__foto img { width: 100%; height: 100%; object-fit: cover; }
.proceso__texto { padding: 96px 64px; align-self: center; max-width: 560px; }
.proceso__texto h2 { font-size: clamp(44px, 5vw, 72px); margin: 16px 0 48px; }
.proceso__texto h2 em { color: var(--rubi); }
.pasos { list-style: none; display: grid; gap: 24px; counter-reset: paso; }
.pasos li { counter-increment: paso; position: relative; padding: 24px 0 0 48px; color: var(--tinta-2); border-top: 1px solid var(--linea); }
.pasos li::before { content: "0" counter(paso); position: absolute; left: 0; top: 28px; font-size: 12px; letter-spacing: 0.14em; color: var(--rubi); }
.pasos li span { color: var(--tinta); font-weight: 500; }

/* ---------- Pie ---------- */
.pie { padding: 64px 32px; display: grid; gap: 16px; justify-items: center; text-align: center; border-top: 1px solid var(--linea); }
.pie__marca { font-family: var(--serif); font-size: 40px; }
.pie__links { display: flex; gap: 24px; font-size: 14px; }
.pie__tanda { font-size: 12px; color: var(--tinta-2); }

/* ---------- Carrito ---------- */
.velo { position: fixed; inset: 0; z-index: 30; background: rgba(43, 33, 28, 0.32); opacity: 0; transition: opacity 240ms var(--ease); }
.velo.abierto { opacity: 1; }
.carrito {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 31; width: min(440px, 100vw);
  background: var(--papel); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 280ms var(--ease);
  box-shadow: -24px 0 48px rgba(43, 33, 28, 0.12);
}
.carrito.abierto { transform: none; }
.carrito__cabeza { display: flex; align-items: center; justify-content: space-between; padding: 24px 24px 16px; padding-top: max(24px, env(safe-area-inset-top)); }
.carrito__cabeza h3 { font-size: 36px; }
.cerrar { width: 40px; height: 40px; border-radius: 999px; font-size: 24px; line-height: 1; transition: background-color 160ms var(--ease); }
.cerrar:hover { background: var(--crema); }
.carrito__cuerpo { flex: 1; overflow-y: auto; padding: 0 24px 24px; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
.linea { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--linea); }
.linea img { width: 64px; height: 80px; object-fit: cover; border-radius: 4px; background: var(--crema-2); }
.linea__nombre { font-family: var(--serif); font-size: 22px; line-height: 1.1; }
.linea__det { font-size: 13px; color: var(--tinta-2); }
.cantidad { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; }
.cantidad button { width: 32px; height: 32px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--linea); font-size: 16px; transition: background-color 160ms var(--ease); }
.cantidad button:hover { background: var(--crema); }
.cantidad span { min-width: 24px; text-align: center; font-variant-numeric: tabular-nums; }
.linea__precio { font-variant-numeric: tabular-nums; font-weight: 500; }
.total { display: flex; justify-content: space-between; align-items: baseline; padding: 24px 0; font-size: 15px; }
.total strong { font-family: var(--serif); font-size: 36px; font-weight: 400; font-variant-numeric: tabular-nums; }
.form { display: grid; gap: 16px; }
.campo { display: grid; gap: 4px; }
.campo label { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tinta-2); }
.campo input, .campo textarea {
  width: 100%; min-height: 48px; padding: 12px 16px; border-radius: 8px; border: 0;
  background: var(--crema); color: var(--tinta); font: inherit; font-size: 16px;
  box-shadow: inset 0 0 0 1px transparent; transition: box-shadow 160ms var(--ease);
}
.campo textarea { min-height: 80px; resize: vertical; }
.campo input:focus, .campo textarea:focus { outline: none; box-shadow: inset 0 0 0 1px var(--tinta); }
.opciones { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opcion { min-height: 48px; border-radius: 8px; background: var(--crema); font-size: 15px; transition: background-color 160ms var(--ease), color 160ms var(--ease); }
.opcion[aria-pressed="true"] { background: var(--tinta); color: var(--papel); }
.error { color: var(--rubi); font-size: 14px; }
.listo { text-align: center; padding: 48px 0; display: grid; gap: 16px; justify-items: center; }
.listo h4 { font-family: var(--serif); font-weight: 400; font-size: 40px; line-height: 1.05; }
.listo p { color: var(--tinta-2); }
.vacio-carrito { padding: 48px 0; color: var(--tinta-2); text-align: center; display: grid; gap: 24px; justify-items: center; }

.aviso {
  position: fixed; left: 50%; bottom: 24px; z-index: 40; translate: -50% 0;
  background: var(--tinta); color: var(--papel); padding: 12px 24px; border-radius: 999px; font-size: 14px;
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
}
.aviso.visible { opacity: 1; transform: none; }

/* ---------- Celular ---------- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav { padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); }
  .nav__links { display: none; }
  .nav__marca { font-size: 22px; }
  .hero { height: 360vh; }
  .manifiesto { padding: 96px 16px; }
  .tienda { padding: 64px 16px 96px; }
  .grilla { grid-template-columns: 1fr 1fr; gap: 32px 12px; }
  .prod__nombre { font-size: 22px; }
  .prod__fila { flex-direction: column; gap: 4px; }
  .tamano { padding: 0 12px; }
  .proceso { grid-template-columns: 1fr; }
  .proceso__foto { aspect-ratio: 4 / 3; }
  .proceso__texto { padding: 64px 16px; }
}
@media (max-width: 760px) { .solo-pc { display: none; } }
/* Pantallas que no son bien apaisadas: el frasco arriba y los textos abajo, sin pisarse. */
@media (max-aspect-ratio: 7/5) {
  .beat--intro, .beat--izq, .beat--der, .beat--final { left: clamp(16px, 6vw, 64px); right: clamp(16px, 6vw, 64px); top: auto; bottom: 6vh; translate: none; max-width: 640px; text-align: left; }
  .beat--intro h1 { font-size: clamp(40px, 7vw, 72px); }
}
@media (max-width: 380px) { .grilla { grid-template-columns: 1fr; } }

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