/* ==========================================================================
   DE CIELO — estilos.css
   Orden: 1 Tokens · 2 Base · 3 Layout · 4 Header · 5 Hero · 6 Esencia
          7 Productos · 9 Experiencias · 10 Pedido · 11 FAQ
          12 Footer · 13 Barra flotante · 14 Utilidades · 15 Media queries
   ========================================================================== */

/* 1. TOKENS ------------------------------------------------------------- */
  :root {
  color-scheme: light only;
  /* paleta tomada de las etiquetas De Cielo */
  --crema: #f8f3ea;
  --crema-suave: #fdfaf4;
  --arena: #ede4d3;
  --madera: #3d2e21;
  --madera-suave: #6b5a4a;
  --cobre: #b0702c;
  --cobre-claro: #d9a15a;
  --salvia: #7d8f6d;
  --lavanda: #b7a9cc;
  --blanco: #ffffff;
  --whatsapp: #25d366;

  /* tipografía */
  --f-display: "Cormorant Garamond", Georgia, serif;
  --f-texto: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* espaciado y forma */
  --ancho: 1120px;
  --gutter: clamp(24px, 6vw, 56px);
  --seccion: clamp(72px, 10vw, 128px);
  --radio: 20px;
  --radio-chico: 12px;
  --sombra: 0 18px 40px -20px rgba(61, 46, 33, 0.28);
  --transicion: 200ms ease;
}

/* 2. BASE --------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  color-scheme: light only;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--crema);
  color: var(--madera);
  font-family: var(--f-texto);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.6rem, 7vw, 4.4rem); }
h2 { font-size: clamp(2rem, 5vw, 3rem); }
h3 { font-size: clamp(1.4rem, 3vw, 1.7rem); }

p { margin: 0 0 1em; }
a { color: var(--cobre); }

button { font: inherit; cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--cobre-claro);
  outline-offset: 3px;
}

/* 3. LAYOUT ------------------------------------------------------------- */
.contenedor {
  width: min(100% - 2 * var(--gutter), var(--ancho));
  margin-inline: auto;
}

.seccion { padding-block: var(--seccion); }

.seccion-cabecera {
  max-width: 62ch;
  margin-bottom: clamp(40px, 6vw, 64px);
}

.seccion-cabecera p {
  color: var(--madera-suave);
  font-size: 1.125rem;
  margin-top: 16px;
}

/* 4. HEADER ------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 243, 234, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(61, 46, 33, 0.08);
}

.header .contenedor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.marca {
  font-family: var(--f-display);
  font-size: 1.6rem;
  font-style: italic;
  font-weight: 600;
  color: var(--madera);
  text-decoration: none;
}

.nav { display: none; gap: 28px; }

.nav a {
  color: var(--madera-suave);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color var(--transicion);
}

.nav a:hover { color: var(--cobre); }

/* botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background var(--transicion), color var(--transicion), transform var(--transicion);
}

.btn:active { transform: scale(0.98); }

.btn-primario { background: var(--madera); color: var(--crema-suave); }
.btn-primario:hover { background: #2d2118; }

.btn-secundario { border-color: var(--madera); color: var(--madera); background: transparent; }
.btn-secundario:hover { background: rgba(61, 46, 33, 0.06); }

.btn-whatsapp { background: var(--whatsapp); color: #063d1d; }
.btn-whatsapp:hover { background: #1fc05a; }

.btn-chico { min-height: 44px; padding: 0 20px; font-size: 0.95rem; }

.btn svg { width: 20px; height: 20px; flex: none; }

/* 5. HERO --------------------------------------------------------------- */
.hero {
  padding-block: clamp(56px, 8vw, 104px) clamp(40px, 6vw, 80px);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 60vw;
  max-width: 640px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(217, 161, 90, 0.22), transparent 70%);
  pointer-events: none;
}

.hero .contenedor {
  display: grid;
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
}

.hero-texto { position: relative; }

.hero-logo {
  width: 96px;
  border-radius: 14px;
  box-shadow: var(--sombra);
  margin-bottom: 28px;
}

.hero h1 { margin-bottom: 20px; }

.hero-lead {
  font-size: clamp(1.125rem, 2.2vw, 1.35rem);
  color: var(--madera-suave);
  max-width: 48ch;
  margin-bottom: 32px;
}

.hero-acciones { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-imagen {
  margin: 0;
  position: relative;
  border-radius: var(--radio);
  overflow: hidden;
  box-shadow: var(--sombra);
  aspect-ratio: 4 / 5;
}

.hero-imagen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-etiqueta {
  position: absolute;
  left: 20px;
  bottom: 20px;
  background: rgba(253, 250, 244, 0.92);
  padding: 12px 18px;
  border-radius: var(--radio-chico);
  font-size: 0.9rem;
  color: var(--madera-suave);
}

.hero-etiqueta strong {
  display: block;
  color: var(--madera);
  font-family: var(--f-display);
  font-size: 1.25rem;
}

/* 6. ESENCIA ------------------------------------------------------------ */
.esencia { background: var(--crema-suave); }

.esencia .contenedor {
  display: grid;
  gap: clamp(32px, 5vw, 64px);
}

.esencia-texto p {
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  font-family: var(--f-display);
  line-height: 1.4;
  color: var(--madera);
}

.esencia-lista {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.esencia-lista li {
  padding: 22px 24px;
  background: var(--crema);
  border-radius: var(--radio-chico);
  border-left: 4px solid var(--salvia);
}

.esencia-lista strong {
  display: block;
  font-family: var(--f-display);
  font-size: 1.35rem;
  margin-bottom: 4px;
}

.esencia-lista span { color: var(--madera-suave); font-size: 0.98rem; }

/* 7. PRODUCTOS (tarjetas) ------------------------------------------------ */
.tarjetas {
  display: grid;
  gap: clamp(24px, 4vw, 36px);
}

.tarjeta {
  background: var(--blanco);
  border-radius: var(--radio);
  overflow: hidden;
  box-shadow: var(--sombra);
  display: flex;
  flex-direction: column;
  border: 2px solid transparent;
  transition: border-color var(--transicion);
}

.tarjeta[data-elegido="true"] { border-color: var(--cobre); }

.tarjeta-media {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  aspect-ratio: 2 / 3;
  background: var(--arena);
  cursor: zoom-in;
  overflow: hidden;
}

.tarjeta-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}

.tarjeta-media:hover img { transform: scale(1.03); }

.tarjeta-cuerpo {
  padding: clamp(24px, 4vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.tarjeta-linea {
  font-size: 0.85rem;
  color: var(--cobre);
  font-weight: 600;
}

.tarjeta-cuerpo h3 { font-size: clamp(1.7rem, 4vw, 2rem); }

.tarjeta-que { margin: 0; color: var(--madera); }

.tarjeta-para { margin: 0; color: var(--madera-suave); }

.tarjeta-uso {
  margin: 4px 0 0;
  padding: 14px 16px;
  background: var(--crema);
  border-radius: var(--radio-chico);
  font-size: 0.95rem;
  color: var(--madera-suave);
}

.tarjeta-uso strong { color: var(--madera); }

.tarjeta .producto-btn {
  margin-top: auto;
  width: 100%;
  min-height: 52px;
  font-size: 1rem;
}

.producto-btn {
  border-radius: 999px;
  border: 1.5px solid var(--madera);
  background: transparent;
  color: var(--madera);
  font-weight: 600;
  transition: background var(--transicion), color var(--transicion);
}

.tarjeta[data-elegido="true"] .producto-btn {
  background: var(--cobre);
  border-color: var(--cobre);
  color: var(--blanco);
}

.uso-nota {
  margin-top: clamp(32px, 5vw, 48px);
  font-size: 0.95rem;
  color: var(--madera-suave);
  max-width: 70ch;
}

/* 9. EXPERIENCIAS ------------------------------------------------------- */
.experiencias-grid {
  display: grid;
  gap: 20px;
}

.testimonio {
  background: var(--blanco);
  border-radius: var(--radio);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-top: 4px solid var(--lavanda);
}

.testimonio:nth-child(2) { border-top-color: var(--cobre-claro); }
.testimonio:nth-child(3) { border-top-color: var(--salvia); }
.testimonio:nth-child(4) { border-top-color: var(--cobre); }

.testimonio blockquote {
  margin: 0;
  font-family: var(--f-display);
  font-size: 1.3rem;
  line-height: 1.4;
  flex: 1;
}

.testimonio footer {
  font-size: 0.95rem;
  color: var(--madera-suave);
}

.testimonio footer strong { color: var(--madera); display: block; }

/* 10. PEDIDO ------------------------------------------------------------ */
.pedido { background: var(--crema-suave); }

.pedido .contenedor {
  display: grid;
  gap: clamp(32px, 5vw, 64px);
}

.pedido-intro p { color: var(--madera-suave); }

.resumen {
  background: var(--crema);
  border-radius: var(--radio-chico);
  padding: 20px 22px;
  margin-top: 24px;
}

.resumen h3 { font-size: 1.2rem; margin-bottom: 10px; }

.resumen ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.resumen li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.98rem;
}

.resumen li button {
  background: none;
  border: 0;
  color: var(--cobre);
  font-size: 0.85rem;
  padding: 6px;
}

.resumen-vacio { color: var(--madera-suave); font-size: 0.95rem; margin: 0; }

.formulario {
  background: var(--blanco);
  border-radius: var(--radio);
  padding: clamp(24px, 4vw, 40px);
  box-shadow: var(--sombra);
  display: grid;
  gap: 20px;
}

.campo { display: grid; gap: 8px; }

.campo label { font-weight: 600; font-size: 0.95rem; }

.campo input,
.campo select,
.campo textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1.5px solid rgba(61, 46, 33, 0.18);
  border-radius: var(--radio-chico);
  background: var(--crema-suave);
  font: inherit;
  color: var(--madera);
  -webkit-appearance: none;
  appearance: none;
}

.campo textarea { min-height: 120px; resize: vertical; }

.campo input:focus,
.campo select:focus,
.campo textarea:focus {
  outline: none;
  border-color: var(--cobre);
  box-shadow: 0 0 0 4px rgba(176, 112, 44, 0.15);
}

.campo-doble { display: grid; gap: 20px; }

.opciones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.opciones label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border: 1.5px solid rgba(61, 46, 33, 0.18);
  border-radius: var(--radio-chico);
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transicion), border-color var(--transicion);
}

.opciones input { position: absolute; opacity: 0; pointer-events: none; }

.opciones input:checked + span {
  color: var(--blanco);
}

.opciones label:has(input:checked) {
  background: var(--madera);
  border-color: var(--madera);
  color: var(--blanco);
}

.form-aviso {
  font-size: 0.9rem;
  color: var(--madera-suave);
  margin: 0;
}

.form-error {
  color: #a6402b;
  font-size: 0.95rem;
  margin: 0;
  display: none;
}

.form-error[data-visible="true"] { display: block; }

/* 11. FAQ --------------------------------------------------------------- */
.faq-lista {
  display: grid;
  gap: 12px;
  max-width: 760px;
}

.faq-lista details {
  background: var(--blanco);
  border-radius: var(--radio-chico);
  border: 1.5px solid rgba(61, 46, 33, 0.1);
}

.faq-lista summary {
  cursor: pointer;
  padding: 20px 22px;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.faq-lista summary::-webkit-details-marker { display: none; }

.faq-lista summary::after {
  content: "+";
  font-size: 1.5rem;
  color: var(--cobre);
  line-height: 1;
  transition: transform var(--transicion);
}

.faq-lista details[open] summary::after { transform: rotate(45deg); }

.faq-lista details p {
  padding: 0 22px 22px;
  margin: 0;
  color: var(--madera-suave);
}

/* 12. FOOTER ------------------------------------------------------------ */
.footer {
  background: var(--madera);
  color: rgba(253, 250, 244, 0.78);
  padding-block: 56px 120px;
  font-size: 0.95rem;
}

.footer .contenedor {
  display: grid;
  gap: 28px;
}

.footer .marca { color: var(--crema-suave); }

.footer p { margin: 0; }

.footer a { color: var(--cobre-claro); text-decoration: none; }

.footer-legal {
  font-size: 0.85rem;
  color: rgba(253, 250, 244, 0.55);
  max-width: 70ch;
}

/* 13. BARRA FLOTANTE ---------------------------------------------------- */
.barra {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translate(-50%, 140%);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 10px 10px 20px;
  background: var(--madera);
  color: var(--crema-suave);
  border-radius: 999px;
  box-shadow: 0 20px 40px -12px rgba(61, 46, 33, 0.5);
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
  width: max-content;
  max-width: calc(100% - 32px);
}

.barra[data-visible="false"] { visibility: hidden; }
.barra[data-visible="true"] { transform: translate(-50%, 0); }

.barra span { font-size: 0.95rem; white-space: nowrap; }

.barra .btn { min-height: 44px; }

/* 13b. VISOR DE IMAGEN ------------------------------------------------- */
.visor {
  width: 100%;
  max-width: 720px;
  max-height: 100dvh;
  padding: 0;
  border: 0;
  background: transparent;
}

.visor::backdrop { background: rgba(40, 30, 20, 0.85); }

.visor img {
  width: 100%;
  height: auto;
  max-height: 92dvh;
  object-fit: contain;
  border-radius: var(--radio-chico);
}

.visor-cerrar {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top));
  right: 16px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: var(--crema-suave);
  color: var(--madera);
  font-size: 1.8rem;
  line-height: 1;
}

/* 14. UTILIDADES -------------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

/* 15. MEDIA QUERIES ----------------------------------------------------- */
@media (min-width: 640px) {
  .campo-doble { grid-template-columns: 1fr 1fr; }
  .tarjetas { grid-template-columns: repeat(2, 1fr); }
  .experiencias-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .nav { display: flex; }
  .hero .contenedor { grid-template-columns: 1.1fr 0.9fr; }
  .esencia .contenedor { grid-template-columns: 1.2fr 1fr; align-items: center; }
  .tarjetas { grid-template-columns: repeat(3, 1fr); }
  .pedido .contenedor { grid-template-columns: 0.8fr 1.2fr; align-items: start; }
  .pedido-intro { position: sticky; top: 100px; }
  .footer .contenedor { grid-template-columns: 1fr 1fr; align-items: end; }
}

@media (min-width: 1100px) {
  .experiencias-grid { grid-template-columns: repeat(4, 1fr); }
}
