/* Funerales Guatemala G. — hoja de estilos única */
:root {
  --cal: #F4F0E4;
  --cal-2: #ECE6D6;
  --musgo: #DDE5D5;
  --cipres: #1F3B2C;
  --cipres-2: #2B4E3B;
  --hondo: #0E1C15;
  --oro: #775411;
  --oro-claro: #E2BE74;
  --tinta: #17231C;
  --tinta-suave: #47574D;
  --sobre-oscuro: #F4F0E4;
  --sobre-oscuro-suave: #B9C7BB;
  --linea: rgba(23, 35, 28, .16);
  --linea-clara: rgba(244, 240, 228, .2);

  --f-titulo: "Marcellus", "Times New Roman", serif;
  --f-texto: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --margen: clamp(1.25rem, 5vw, 4rem);
  --ancho: 72rem;
  --seccion: clamp(4rem, 11vw, 8rem);
  --radio: 4px;
  --suave: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: var(--cipres) var(--cal-2); }
body {
  margin: 0; background: var(--cal); color: var(--tinta);
  font: 400 1.0625rem/1.6 var(--f-texto);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  padding-bottom: 4.25rem;
}
::selection { background: var(--cipres); color: var(--cal); }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--oro); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
.ico { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.solo-lector { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.saltar { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--cipres); color: var(--cal); padding: .75rem 1rem; }
.saltar:focus { top: 1rem; }

/* Tipos */
.t-xl, .t-l, .t-m { font-family: var(--f-titulo); font-weight: 400; letter-spacing: -.012em; text-wrap: balance; }
.t-xl { font-size: clamp(2.5rem, 9.5vw, 5.25rem); line-height: 1.02; }
.t-l { font-size: clamp(2rem, 6.4vw, 3.5rem); line-height: 1.08; }
.t-m { font-size: clamp(1.4rem, 4vw, 1.9rem); line-height: 1.2; }
.entrada { font-size: clamp(1.125rem, 2.6vw, 1.3rem); line-height: 1.5; color: var(--tinta-suave); max-width: 34ch; text-wrap: pretty; }
.texto { max-width: 62ch; color: var(--tinta-suave); text-wrap: pretty; }
.texto + .texto { margin-top: 1em; }
.nota { font-size: .875rem; color: var(--tinta-suave); }

/* Estructura */
.caja { width: min(100% - 2 * var(--margen), var(--ancho)); margin-inline: auto; }
.s { padding-block: var(--seccion); position: relative; }
.s--musgo { background: var(--musgo); }
.s--cipres, .s--hondo { color: var(--sobre-oscuro); }
.s--cipres { background: var(--cipres); }
.s--hondo { background: var(--hondo); }
.s--cipres .entrada, .s--cipres .texto, .s--cipres .nota,
.s--hondo .entrada, .s--hondo .texto, .s--hondo .nota { color: var(--sobre-oscuro-suave); }
.pila > * + * { margin-top: 1.25rem; }
.pila > .t-l + *, .pila > .t-xl + * { margin-top: 1.1rem; }
.dos { display: grid; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
@media (min-width: 56rem) {
  .dos { grid-template-columns: 1fr 1fr; }
  .dos--foto-ancha { grid-template-columns: 1.25fr 1fr; }
  .dos--invertir > :first-child { order: 2; }
}

/* Botones */
.acciones { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 3.25rem; padding: .8rem 1.4rem; border-radius: var(--radio);
  font: 600 1rem/1.1 var(--f-texto); text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background-color .25s var(--suave), color .25s var(--suave), border-color .25s var(--suave), transform .25s var(--suave);
}
.btn:active { transform: translateY(1px); }
.btn--wa { background: var(--cipres); color: var(--cal); }
.btn--wa:hover { background: var(--cipres-2); }
.btn--linea { border-color: currentColor; background: transparent; color: inherit; }
.btn--linea:hover { background: var(--tinta); color: var(--cal); border-color: var(--tinta); }
.s--cipres .btn--wa, .s--hondo .btn--wa, .en-oscuro .btn--wa { background: var(--oro-claro); color: var(--hondo); }
.s--cipres .btn--wa:hover, .s--hondo .btn--wa:hover, .en-oscuro .btn--wa:hover { background: #EDD092; }
.s--cipres .btn--linea:hover, .s--hondo .btn--linea:hover { background: var(--cal); color: var(--hondo); border-color: var(--cal); }
.enlace { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; text-decoration: underline; text-decoration-color: var(--oro); text-decoration-thickness: 2px; text-underline-offset: .3em; }
.enlace .ico { transition: transform .3s var(--suave); }
.enlace:hover .ico { transform: translateX(4px); }

/* Vela: estado "abierto ahora" */
.vela { display: inline-flex; align-items: center; gap: .6rem; font-size: .9375rem; font-weight: 500; text-align: left; }
.vela__llama { width: .55rem; height: .8rem; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; background: #D99A2B; transform-origin: 50% 100%; animation: llama 2.6s ease-in-out infinite; }
@keyframes llama { 0%, 100% { transform: scaleY(1) rotate(-2deg); } 35% { transform: scaleY(1.14) rotate(2deg); } 70% { transform: scaleY(.94) rotate(-1deg); } }

/* Cabecera */
.cab { position: fixed; inset: 0 0 auto 0; z-index: 50; color: var(--tinta); transition: background-color .35s var(--suave), color .35s var(--suave), box-shadow .35s var(--suave); }
.cab.es-fija { background: rgba(244, 240, 228, .94); box-shadow: 0 1px 0 var(--linea); }
.cab.en-oscuro:not(.es-abierta) { color: var(--sobre-oscuro); background: transparent; box-shadow: none; }
.cab.en-oscuro.es-fija:not(.es-abierta) { background: rgba(14, 28, 21, .9); box-shadow: 0 1px 0 var(--linea-clara); }
.cab__fila { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.marca { font-family: var(--f-titulo); font-size: 1.2rem; line-height: 1; text-decoration: none; letter-spacing: .01em; }
.marca small { display: block; font: 500 .6875rem/1 var(--f-texto); letter-spacing: .14em; text-transform: uppercase; margin-bottom: .3rem; opacity: .75; }
.cab__nav { display: none; }
.cab__der { display: flex; align-items: center; gap: .25rem; }
.cab__icono { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 0; background: none; color: inherit; cursor: pointer; border-radius: var(--radio); }
.cab__icono .ico { width: 1.5rem; height: 1.5rem; }
.menu { position: fixed; inset: 0; z-index: 49; background: var(--cipres); color: var(--sobre-oscuro); padding: 5.5rem var(--margen) 6rem; display: flex; flex-direction: column; justify-content: space-between; overflow: auto; visibility: hidden; opacity: 0; transition: opacity .3s var(--suave), visibility 0s .3s; }
.menu.es-abierto { visibility: visible; opacity: 1; transition-delay: 0s; }
.menu a { text-decoration: none; }
.menu__lista a { display: block; font-family: var(--f-titulo); font-size: clamp(1.7rem, 7vw, 2.3rem); line-height: 1.15; padding: .45rem 0; border-bottom: 1px solid var(--linea-clara); }
.menu__lista a[aria-current="page"] { color: var(--oro-claro); }
.menu__pie { margin-top: 2rem; color: var(--sobre-oscuro-suave); font-size: .9375rem; }
.cab.es-abierta { color: var(--sobre-oscuro); background: transparent; box-shadow: none; }
@media (min-width: 64rem) {
  .cab__nav { display: flex; gap: 1.6rem; font-size: .9375rem; font-weight: 500; }
  .cab__nav a { text-decoration: none; padding: .5rem 0; border-bottom: 1px solid transparent; }
  .cab__nav a:hover, .cab__nav a[aria-current="page"] { border-bottom-color: var(--oro); }
  .cab__icono--menu { display: none; }
}

/* Barra inferior en celular */
.barra { position: fixed; inset: auto 0 0 0; z-index: 48; display: grid; grid-template-columns: 1.35fr 1fr; background: var(--hondo); color: var(--cal); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -6px 18px rgba(14, 28, 21, .18); }
.barra a { display: flex; align-items: center; justify-content: center; gap: .55rem; min-height: 3.75rem; font-weight: 600; text-decoration: none; }
.barra a:first-child { background: var(--oro-claro); color: var(--hondo); }
@media (min-width: 64rem) { .barra { display: none; } body { padding-bottom: 0; } }

/* Portada con ataúd 3D */
.hero { position: relative; background: var(--cal); }
.hero__escena { position: relative; height: 100svh; min-height: 36rem; overflow: hidden; background: var(--cal); color: var(--tinta); }
.hero__lienzo { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__texto { position: relative; z-index: 2; padding-top: clamp(5.5rem, 15svh, 9rem); }
.hero__texto .t-xl { max-width: 11ch; }
.hero__texto .vela { margin-top: 1.25rem; }
@media (max-width: 55.99rem) {
  .hero__texto { padding-top: clamp(5rem, 12svh, 7rem); }
  .hero__texto .btn--linea { display: none; }
  .hero__texto .acciones { margin-top: 1.25rem; }
}
.hero__partes { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.hero__partes li { position: absolute; left: 0; top: 0; opacity: 0; font-size: .8125rem; font-weight: 600; letter-spacing: .04em; color: var(--hondo); background: var(--oro-claro); padding: .3rem .6rem; border-radius: 2px; white-space: nowrap; will-change: transform; }
.hero__cierre { position: absolute; z-index: 2; inset: auto 0 clamp(6rem, 14svh, 9rem) 0; color: var(--sobre-oscuro); opacity: 0; visibility: hidden; }
.hero__cierre .t-l { max-width: 14ch; }
.hero__cierre .enlace { margin-top: 1.25rem; }
@media (min-width: 56rem) {
  .hero__texto { padding-top: clamp(7rem, 20svh, 11rem); max-width: 50%; }
  .hero__texto .caja { margin: 0; width: auto; padding-left: var(--margen); }
  .hero__cierre { inset: auto auto clamp(4rem, 12svh, 7rem) 0; }
}
.hero--estatica .hero__escena { height: auto; min-height: 0; padding-bottom: 46svh; }

/* Portadilla de páginas interiores */
.portadilla { padding-top: clamp(7.5rem, 20vw, 11rem); padding-bottom: clamp(3rem, 8vw, 5rem); }
.portadilla .t-xl { max-width: 14ch; }

/* Pasos */
.pasos { counter-reset: paso; display: grid; gap: 0; margin-top: 2.5rem; border-top: 1px solid var(--linea); }
.pasos li { counter-increment: paso; display: grid; grid-template-columns: 3.25rem 1fr; gap: .5rem 1rem; padding: 1.4rem 0; border-bottom: 1px solid var(--linea); align-items: baseline; }
.pasos li::before { content: counter(paso); font-family: var(--f-titulo); font-size: 2.4rem; line-height: 1; color: var(--oro); }
.pasos h3 { font: 600 1.1875rem/1.3 var(--f-texto); }
.pasos p { grid-column: 2; color: var(--tinta-suave); }
@media (min-width: 56rem) {
  .pasos { grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--linea); }
  .pasos li { border-bottom: 0; padding: 2rem 2rem 2rem 0; grid-template-columns: 1fr; }
  .pasos li + li { border-left: 1px solid var(--linea); padding-left: 2rem; }
  .pasos p { grid-column: 1; }
}
.s--cipres .pasos, .s--cipres .pasos li { border-color: var(--linea-clara); }
.s--cipres .pasos li::before { color: var(--oro-claro); }
.s--cipres .pasos p { color: var(--sobre-oscuro-suave); }

/* Lista de lo incluido */
.incluye { margin-top: 2.5rem; border-top: 1px solid var(--linea-clara); }
.incluye li { display: grid; gap: .25rem 2rem; padding: 1.35rem 0; border-bottom: 1px solid var(--linea-clara); }
.incluye strong { font: 400 clamp(1.6rem, 5.5vw, 2.4rem)/1.1 var(--f-titulo); }
.incluye span { color: var(--sobre-oscuro-suave); max-width: 40ch; }
@media (min-width: 56rem) { .incluye li { grid-template-columns: 1fr 1fr; align-items: baseline; } }
.s:not(.s--cipres):not(.s--hondo) .incluye, .s:not(.s--cipres):not(.s--hondo) .incluye li { border-color: var(--linea); }
.s:not(.s--cipres):not(.s--hondo) .incluye span { color: var(--tinta-suave); }

/* Carril de servicios */
.carril { display: grid; grid-auto-flow: column; grid-auto-columns: min(78vw, 20rem); gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: .25rem var(--margen) 1.25rem; margin-top: 2.5rem; scrollbar-width: thin; }
.carril > * { scroll-snap-align: center; }
@media (min-width: 64rem) { .carril { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; width: min(100% - 2 * var(--margen), var(--ancho)); margin-inline: auto; padding-inline: 0; } }
.servicio { display: flex; flex-direction: column; background: var(--cal); border: 1px solid var(--linea); border-radius: var(--radio); overflow: hidden; }
.servicio__img { display: block; aspect-ratio: 4 / 3; background: var(--hondo) radial-gradient(60% 55% at 50% 60%, #23402F 0%, var(--hondo) 100%); }
.servicio__img img { width: 100%; height: 100%; object-fit: cover; }
.servicio__cuerpo { padding: 1.25rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.servicio__cuerpo p { color: var(--tinta-suave); font-size: 1rem; flex: 1; }
.servicio__pie { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: .75rem; font-size: .9375rem; }

/* Fotos y huecos de foto */
.foto { position: relative; }
.foto img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radio); }
.hueco { aspect-ratio: var(--ar, 4 / 3); display: grid; place-content: center; gap: .4rem; text-align: center; padding: 1.5rem; background: var(--cal-2); color: var(--tinta-suave); border-radius: var(--radio); outline: 1px solid var(--oro); outline-offset: -.75rem; font-size: .875rem; }
.hueco b { font: 400 1.25rem/1.2 var(--f-titulo); color: var(--tinta); max-width: 18ch; margin-inline: auto; }
.hueco i { font-style: normal; font-weight: 600; letter-spacing: .1em; color: var(--oro); }
.s--cipres .hueco, .s--hondo .hueco { background: rgba(244, 240, 228, .07); color: var(--sobre-oscuro-suave); outline-color: var(--oro-claro); }
.s--cipres .hueco b, .s--hondo .hueco b { color: var(--sobre-oscuro); }
.s--cipres .hueco i, .s--hondo .hueco i { color: var(--oro-claro); }
.s--musgo .hueco { background: rgba(244, 240, 228, .7); }
.mosaico { display: grid; gap: .75rem; grid-template-columns: 1fr 1fr; margin-top: 2.5rem; }
.mosaico > :first-child { grid-column: 1 / -1; }
@media (min-width: 56rem) { .mosaico { grid-template-columns: 2fr 1fr 1fr; } .mosaico > :first-child { grid-column: auto; grid-row: span 2; } .mosaico > :first-child .hueco { height: 100%; aspect-ratio: auto; } }

/* Sedes */
.sedes { display: grid; gap: 0; margin-top: 2.5rem; border-top: 1px solid var(--linea); }
.sede { padding: 1.5rem 0; border-bottom: 1px solid var(--linea); }
.sede h3 { font: 400 1.6rem/1.2 var(--f-titulo); margin-bottom: .4rem; }
.sede p { color: var(--tinta-suave); }
.sede .enlace { margin-top: .9rem; }
@media (min-width: 56rem) { .sedes { grid-template-columns: 1fr 1fr; gap: 0 4rem; } }
.mapa { width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: var(--radio); filter: saturate(.75); }

/* Preguntas */
.preguntas { margin-top: 2rem; border-top: 1px solid var(--linea); max-width: 46rem; }
.preguntas details { border-bottom: 1px solid var(--linea); }
.preguntas summary { display: flex; justify-content: space-between; gap: 1rem; align-items: center; cursor: pointer; padding: 1.2rem 0; font-weight: 600; font-size: 1.125rem; list-style: none; min-height: 3.5rem; }
.preguntas summary::-webkit-details-marker { display: none; }
.preguntas summary::after { content: ""; flex: none; width: .7rem; height: .7rem; border-right: 2px solid var(--oro); border-bottom: 2px solid var(--oro); transform: rotate(45deg) translate(-2px, -2px); transition: transform .3s var(--suave); }
.preguntas details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.preguntas details p { padding: 0 0 1.4rem; color: var(--tinta-suave); max-width: 60ch; }

/* Cierre con corona */
.cierre { text-align: center; overflow: hidden; }
.cierre__corona { width: min(86vw, 30rem); aspect-ratio: 1; margin-inline: auto; position: relative; display: grid; place-content: center; padding: 15%; }
.cierre__corona svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cierre__corona .hoja { fill: var(--cipres-2); }
.cierre__corona .hoja:nth-child(3n) { fill: #3C6A4F; }
.cierre__corona .flor { fill: var(--oro-claro); }
.cierre__corona .t-l { font-size: clamp(1.7rem, 6.5vw, 2.6rem); position: relative; }
.cierre .acciones { justify-content: center; }
.cierre .vela { margin-top: 1.5rem; }

/* Pie */
.pie { background: var(--hondo); color: var(--sobre-oscuro-suave); padding: 3.5rem 0 2.5rem; font-size: .9375rem; }
.pie a { text-decoration: none; }
.pie a:hover { color: var(--oro-claro); }
.pie__rejilla { display: grid; gap: 2.25rem; }
.pie h2 { font: 600 .75rem/1 var(--f-texto); letter-spacing: .14em; text-transform: uppercase; color: var(--oro-claro); margin-bottom: 1rem; }
.pie li + li { margin-top: .55rem; }
.pie .marca { color: var(--sobre-oscuro); font-size: 1.5rem; }
.pie__fin { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--linea-clara); font-size: .8125rem; }
@media (min-width: 56rem) { .pie__rejilla { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }

/* Visor 3D de ataúdes */
.visor { display: grid; gap: 0; }
.visor__lienzo-caja { position: relative; height: min(44svh, 26rem); background: radial-gradient(70% 60% at 50% 62%, #244131 0%, var(--hondo) 100%); touch-action: pan-y; cursor: grab; }
.visor__lienzo-caja:active { cursor: grabbing; }
.visor__lienzo-caja canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.visor__pista { position: absolute; left: 0; right: 0; bottom: .9rem; text-align: center; font-size: .8125rem; color: var(--sobre-oscuro-suave); pointer-events: none; }
.visor__panel { padding: 1.5rem var(--margen) 2.5rem; }
.pestanas { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--linea-clara); border-radius: var(--radio); overflow: hidden; }
.pestanas button { appearance: none; border: 0; background: none; color: var(--sobre-oscuro-suave); font: 600 .875rem/1.1 var(--f-texto); min-height: 3rem; padding: .5rem .25rem; cursor: pointer; }
.pestanas button + button { border-left: 1px solid var(--linea-clara); }
.pestanas button[aria-selected="true"] { background: var(--oro-claro); color: var(--hondo); }
.visor__nombre { margin-top: 1.5rem; }
.visor__desc { margin-top: .5rem; color: var(--sobre-oscuro-suave); max-width: 44ch; }
.colores { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.colores button { appearance: none; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 2px solid transparent; background: none; padding: 3px; cursor: pointer; }
.colores button span { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.colores button[aria-pressed="true"] { border-color: var(--oro-claro); }
.visor__color { margin-top: .6rem; font-size: .9375rem; color: var(--sobre-oscuro-suave); }
@media (min-width: 64rem) {
  .visor { grid-template-columns: 1.5fr 1fr; align-items: stretch; }
  .visor__lienzo-caja { height: min(78svh, 44rem); }
  .visor__panel { padding: 3rem var(--margen) 3rem 3rem; align-self: center; }
}

/* Tabla comparativa simple */
.tabla { width: 100%; border-collapse: collapse; margin-top: 2rem; font-size: 1rem; }
.tabla th, .tabla td { text-align: left; padding: .9rem .5rem .9rem 0; border-bottom: 1px solid var(--linea); vertical-align: top; }
.tabla thead th { font: 600 .75rem/1 var(--f-texto); letter-spacing: .12em; text-transform: uppercase; color: var(--oro); }
.tabla tbody th { font: 400 1.25rem/1.2 var(--f-titulo); }
.tabla-caja { overflow-x: auto; }

/* Aparición al bajar */
.js [data-ver] { opacity: 0; transform: translateY(14px); transition: opacity .62s var(--suave), transform .62s var(--suave); transition-delay: var(--d, 0ms); }
.js [data-ver].visto { opacity: 1; transform: none; }
.js [data-cortina] { clip-path: inset(0 0 100% 0); transition: clip-path 1.1s var(--suave); }
.js [data-cortina].visto { clip-path: inset(0 0 0 0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .vela__llama { animation: none; }
  .js [data-ver], .js [data-cortina] { opacity: 1; transform: none; clip-path: none; transition: none; }
  .btn, .enlace .ico { transition: none; }
}
