/* Sechna — estilos según el manual de marca */
:root {
  --color-primary: #C4633D;
  --color-boton: #A9522F; /* terracota oscurecido: texto blanco regular con contraste 5,3 */
  --color-boton-hover: #8E4426;
  --color-text: #32473B;
  --color-body: #2B2B2B;
  --color-bg: #F1EEE2;
  --color-surface: #FFFFFF;
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;
  --radio: 8px;
  --sombra: 0 1px 3px rgba(50, 71, 59, 0.08);
  --sombra-elevada: 0 6px 18px rgba(50, 71, 59, 0.12);
  --ancho: 1100px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-body);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--color-text); }

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--color-text);
  line-height: 1.25;
  margin: 0 0 0.5em;
}
h1, h2 { font-weight: 700; letter-spacing: 0.08em; }
h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.6rem); }
h3 { font-size: 1.1rem; font-weight: 600; }

:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 3px; border-radius: 4px; }

.saltar {
  position: absolute; left: -9999px; top: 0;
  background: var(--color-surface); padding: 8px 16px; z-index: 10;
}
.saltar:focus { left: 16px; top: 16px; }

/* Encabezado flotante, redondeado */
.encabezado {
  position: sticky; top: 12px; z-index: 5;
  max-width: var(--ancho);
  margin: 12px auto 0;
  width: calc(100% - 32px);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  box-shadow: var(--sombra);
}
.logo {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-text);
  text-decoration: none;
  font-size: 1.15rem;
}
.encabezado nav { display: flex; gap: 20px; }
.encabezado nav a { text-decoration: none; font-weight: 500; }
.encabezado nav a:hover { color: var(--color-primary); }

/* Botones */
.boton {
  display: inline-block;
  background: var(--color-boton);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 19px;
  line-height: 1.2;
  padding: 12px 22px;
  border-radius: var(--radio);
  text-decoration: none;
  border: 0;
  transition: background-color 200ms ease-out;
}
.boton:hover { background: var(--color-boton-hover); }

.enlace {
  font: inherit;
  font-weight: 500;
  color: var(--color-text);
  background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.enlace:hover { color: var(--color-primary); }

/* Portada */
.portada {
  max-width: 720px;
  margin: 0 auto;
  padding: 96px 16px 80px;
  text-align: center;
}
.campana { width: 120px; margin: 0 auto 28px; }
.portada h1 { font-size: clamp(2.4rem, 8vw, 3.6rem); margin-bottom: 32px; }
.portada-acciones { display: flex; flex-wrap: wrap; gap: 20px 28px; justify-content: center; align-items: center; }

/* Secciones */
.seccion {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 64px 16px;
}
.seccion > h2, .seccion > h1 { text-align: center; }
.seccion-bajada { text-align: center; max-width: 52ch; margin: 0 auto 40px; color: var(--color-text); }

/* Catálogo */
.grilla {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 24px;
}
.tarjeta {
  background: var(--color-surface);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 200ms ease-out, box-shadow 200ms ease-out;
}
@media (hover: hover) {
  .tarjeta:hover { transform: translateY(-3px); box-shadow: var(--sombra-elevada); }
}
.tarjeta-foto { display: block; background: var(--color-surface); aspect-ratio: 1; }
.tarjeta-foto img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }
.tarjeta-cuerpo { padding: 4px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.tarjeta-cuerpo p { margin: 0 0 16px; }
.tarjeta-acciones { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.etiqueta {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text);
  opacity: 0.75;
  margin: 12px 0 6px !important;
}

/* Lista de manuales */
.lista-manuales {
  list-style: none; padding: 0; margin: 0 auto;
  max-width: 640px;
  background: var(--color-surface);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
}
.lista-manuales li + li { border-top: 1px solid var(--color-bg); }
.lista-manuales a {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 18px 22px;
  text-decoration: none; font-weight: 500;
  transition: color 150ms ease-out;
}
.lista-manuales a:hover { color: var(--color-primary); }

/* Velas No Me Olvides */
.velas {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  max-width: 920px; margin: 0 auto;
  background: var(--color-surface); border-radius: var(--radio); box-shadow: var(--sombra);
  overflow: hidden;
}
.velas-foto { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; }
.velas-texto { padding: 40px 36px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.velas-texto h2 { margin: 0; }
.velas-texto p { margin: 0; color: var(--color-text); }
.velas-texto .etiqueta { margin: 0 !important; }
.velas-logo { width: 135px; margin-bottom: 4px; }
.velas-usuario { font-size: 0.9rem; }
.boton-icono { display: inline-flex; align-items: center; gap: 10px; margin-top: 8px; }

/* Formulario de contacto */
.formulario {
  max-width: 560px; margin: 0 auto;
  background: var(--color-surface); border-radius: var(--radio); box-shadow: var(--sombra);
  padding: 28px; display: grid; gap: 18px;
}
.formulario label { display: grid; gap: 6px; font-weight: 500; color: var(--color-text); }
.formulario input, .formulario textarea {
  font: inherit; color: var(--color-body);
  padding: 12px 14px;
  border: 1px solid rgba(50, 71, 59, 0.3); border-radius: var(--radio);
  background: var(--color-surface);
  transition: border-color 150ms ease-out;
}
.formulario input:focus, .formulario textarea:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(196, 99, 61, 0.2); }
.formulario textarea { resize: vertical; min-height: 120px; }
.formulario .boton { justify-self: start; cursor: pointer; }
.oculto { position: absolute; left: -9999px; }

.cabecera-pagina { padding-top: 72px; text-align: center; min-height: 60vh; }
.cabecera-pagina .campana { width: 96px; }

/* Manual */
.manual { max-width: 820px; margin: 0 auto; padding: 40px 16px 64px; }
.migas { font-size: 0.9rem; margin-bottom: 24px; color: var(--color-text); }
.manual-cabecera {
  display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: center;
  background: var(--color-surface); border-radius: var(--radio); box-shadow: var(--sombra);
  padding: 24px; margin-bottom: 32px;
}
.manual-cabecera img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.manual-cabecera h1 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); letter-spacing: 0.02em; }
.indice {
  border-left: 3px solid var(--color-primary);
  padding: 4px 0 4px 20px; margin-bottom: 40px;
}
.indice ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 32px; }
.indice li { break-inside: avoid; }
.manual-seccion { margin-bottom: 40px; scroll-margin-top: 96px; }
.manual-seccion h2 { font-size: 1.25rem; letter-spacing: 0.02em; }
.pasos, .items { padding-left: 0; margin: 0; list-style: none; }
.pasos { counter-reset: paso; }
.pasos li, .items li { position: relative; padding: 10px 0 10px 48px; border-bottom: 1px solid rgba(50, 71, 59, 0.1); }
.pasos li::before {
  counter-increment: paso; content: counter(paso);
  position: absolute; left: 0; top: 8px;
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--color-primary); color: var(--color-text);
  font-family: var(--font-heading); font-weight: 700; font-size: 0.9rem;
  display: grid; place-items: center;
}
.items li::before {
  content: ''; position: absolute; left: 12px; top: 20px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--color-primary);
}
.ayuda {
  background: var(--color-surface); border-radius: var(--radio); box-shadow: var(--sombra);
  padding: 28px; text-align: center;
}
.ayuda .tarjeta-acciones { justify-content: center; }
.imprimir { margin-top: 8px; }

/* Pie */
.pie { text-align: center; padding: 48px 16px 40px; color: var(--color-text); border-top: 1px solid rgba(50, 71, 59, 0.12); }
.pie p { margin: 4px 0; }
.pie-logo { font-family: var(--font-heading); font-weight: 700; letter-spacing: 0.08em; font-size: 1.1rem; }
.pie-chico { font-size: 0.85rem; opacity: 0.75; }

@media (max-width: 640px) {
  .encabezado { padding: 10px 16px; gap: 12px; }
  .logo { font-size: 1rem; }
  .encabezado nav { gap: 12px; font-size: 0.875rem; }
  .portada { padding: 64px 16px 56px; }
  .manual-cabecera { grid-template-columns: 1fr; text-align: center; }
  .manual-cabecera img { max-width: 200px; margin: 0 auto; }
  .indice ol { columns: 1; }
  .velas { grid-template-columns: 1fr; }
  .velas-foto { aspect-ratio: 4 / 3; object-position: center 60%; }
  .velas-texto { padding: 28px 22px 32px; }
}

@media (max-width: 480px) {
  .encabezado { flex-direction: column; gap: 6px; border-radius: 20px; padding: 10px 16px; }
  .encabezado nav { gap: 18px; font-size: 0.9rem; }
}

[id] { scroll-margin-top: 110px; }

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

@media print {
  .encabezado, .pie, .ayuda, .imprimir, .migas, .saltar { display: none !important; }
  body { background: #fff; }
  .manual-cabecera { box-shadow: none; border: 1px solid #ddd; }
}
