/* =============================================================================
   COMPONENTES COMPARTIDOS — Páginas internas
   Códigos Solares
   =============================================================================

   Piezas idénticas en todas las páginas internas, definidas una sola vez.
   Se carga después de main.css y antes del CSS de cada página, así cualquier
   página puede ajustar un componente con su propia clase.

   Prefijo "c-" (component) en todas las clases.

     .c-btn-primary     → botón dorado principal
     .c-enlace          → enlace de texto con flecha (acción secundaria)
     .c-acciones        → fila de un botón con su enlace secundario
     .c-eyebrow         → etiqueta superior de sección (fondo claro)
     .c-divider         → separador dorado de sección
     .c-heading         → titular h2 de sección
     .c-body            → párrafo de sección
     .c-icon-col / .c-icon-img → ícono decorativo con fade-in (sections.js)
     .c-hero-eyebrow    → etiqueta superior dentro del hero
     .c-cierre-heading / .c-cierre-divider → bloque de cierre centrado
     .c-hero + .c-hero-panel / -heading / -divider / -subtitle → hero estático

   El hero se ajusta por página con variables CSS (--hero-*) declaradas en el
   #id de la sección; ver la lista junto a la regla .c-hero, más abajo.

   Lo que NO vive aquí: la sección de cierre de cada página (varía en ancho y
   watermark) y el hero del artículo, que tiene otra estructura.

   El home (index.html) todavía usa sus propias clases por sección.
   ============================================================================= */

/* ─── Botón primario ─────────────────────────────────────────────────────────── */
.c-btn-primary {
  display: inline-block;
  padding: 0.9rem 2.5rem;
  background-color: var(--accent-fill);
  background-image: var(--accent-gradient);
  color: var(--on-accent);
  box-shadow: inset 0 -2px 0 var(--accent-line);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color var(--ease-default), transform 0.2s ease,
              box-shadow 0.2s ease;
}

.c-btn-primary:hover {
  background-image: var(--accent-gradient-hover);
  transform: translateY(-2px);
  box-shadow: inset 0 -2px 0 var(--accent-line), 0 6px 24px rgba(var(--accent-fill-rgb), 0.25);
}

.c-btn-primary:focus-visible {
  outline: 2px solid var(--gold-shadow);
  outline-offset: 3px;
}

/* ─── Enlace de texto con flecha ─────────────────────────────────────────────── */
/* Acción secundaria: acompaña a un botón o cierra un párrafo. */
.c-enlace {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--accent-text);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(var(--gold-leaf-rgb), 0.5);
  transition: border-color var(--ease-default), gap var(--ease-default);
}

.c-enlace:hover {
  border-bottom-color: var(--accent-text);
  gap: 0.6em;
}

.c-enlace:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 4px;
}

/* Un botón y su enlace secundario, lado a lado */
.c-acciones {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.1rem 1.75rem;
}

/* ─── Eyebrow ────────────────────────────────────────────────────────────────── */
.c-eyebrow {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--accent-text);
  text-transform: uppercase;
}

/* Versión para el hero: dorado hoja sobre charcoal */
.c-hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--accent-text);
  text-transform: uppercase;
  margin-bottom: var(--hero-eyebrow-gap, 1.5rem);
}

/* ─── Separador sutil ────────────────────────────────────────────────────────── */
.c-divider {
  width: 2.5rem;
  height: 1px;
  background-color: var(--gold-leaf);
  opacity: 0.45;
  border: none;
  margin: 0;
}

/* ─── Titular y párrafo de sección ───────────────────────────────────────────── */
.c-heading {
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  font-weight: 300;
  font-style: italic;
  color: var(--text);
  line-height: 1.18;
  margin: 0;
}

.c-body {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  font-weight: 300;
  color: var(--text);
  line-height: 1.85;
  max-width: 620px;
  margin: 0;
}

/* ─── Ícono decorativo — fade-in independiente (lo activa sections.js) ───────── */
.c-icon-col {
  flex: 0 0 52px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.4rem;

  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.c-icon-col.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.c-icon-img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  opacity: 0.50;
  display: block;
}

/* ─── Bloque de cierre ───────────────────────────────────────────────────────── */
.c-cierre-heading {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  font-style: italic;
  color: var(--text);
  line-height: 1.15;
  margin: 0;
}

.c-cierre-divider {
  width: 2rem;
  height: 1px;
  background-color: var(--gold-leaf);
  opacity: 0.4;
  border: none;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   HERO ESTÁTICO de página interna
   Fondo oscuro + símbolo como watermark + panel central con el texto.

   Cada página lo ajusta declarando variables en su sección (#fp-hero, etc.).
   Las que no se declaran usan el valor por defecto:

     --hero-mark                 url() del símbolo watermark (obligatoria)
     --hero-mark-size            min(640px, 85vw)
     --hero-mark-opacity         0.055
     --hero-min-h                92vh
     --hero-min-h-mobile         100svh
     --hero-pb-mobile            3rem
     --hero-panel-max            560px
     --hero-panel-pad            3.5rem 4rem
     --hero-panel-border-alpha   0.25
     --hero-eyebrow-gap          1.5rem
     --hero-h-size               clamp(2.2rem, 4.5vw, 3.8rem)
     --hero-h-size-mobile        clamp(2rem, 7vw, 2.8rem)
     --hero-h-lh                 1.12
     --hero-h-gap                1.75rem
     --hero-divider-gap          2rem
     --hero-sub-size             clamp(0.875rem, 1.2vw, 0.975rem)
     --hero-sub-alpha            0.88
     --hero-sub-max              440px
     --hero-sub-gap              0  (espacio bajo el subtítulo, si sigue un botón)
   ═══════════════════════════════════════════════════════════════════════════════ */

.c-hero {
  position: relative;
  overflow: hidden;
  background-color: var(--surface-feature);
  min-height: var(--hero-min-h, 92vh);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl) var(--space-md);
}

.c-hero::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: var(--hero-mark-size, min(640px, 85vw));
  aspect-ratio: 1;
  background-image: var(--hero-mark);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: var(--hero-mark-opacity, 0.055);
  pointer-events: none;
}

.c-hero-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: var(--hero-panel-max, 560px);
  padding: var(--hero-panel-pad, 3.5rem 4rem);
  background-color: var(--panel-feature);
  border: 1px solid rgba(var(--gold-leaf-rgb), var(--hero-panel-border-alpha, 0.25));
  border-radius: 2px;
}

.c-hero-heading {
  font-family: var(--font-heading);
  font-size: var(--hero-h-size, clamp(2.2rem, 4.5vw, 3.8rem));
  font-weight: 300;
  font-style: italic;
  color: var(--on-feature);
  line-height: var(--hero-h-lh, 1.12);
  margin: 0 0 var(--hero-h-gap, 1.75rem);
}

.c-hero-divider {
  width: 2rem;
  height: 1px;
  background-color: var(--gold-leaf);
  opacity: 0.4;
  border: none;
  margin: 0 0 var(--hero-divider-gap, 2rem);
}

.c-hero-subtitle {
  font-family: var(--font-body);
  font-size: var(--hero-sub-size, clamp(0.875rem, 1.2vw, 0.975rem));
  font-weight: 300;
  color: rgba(var(--on-feature-rgb), var(--hero-sub-alpha, 0.88));
  line-height: 1.8;
  max-width: var(--hero-sub-max, 440px);
  margin: 0 0 var(--hero-sub-gap, 0);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE — ≤767px
   ═══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {

  .c-hero {
    min-height: var(--hero-min-h-mobile, 100svh);
    padding: var(--space-lg) var(--space-sm);
    align-items: flex-end;
    padding-bottom: var(--hero-pb-mobile, 3rem);
  }

  .c-hero-panel {
    max-width: 100%;
    padding: 2rem 1.5rem;
    background-color: var(--panel-feature);
  }

  .c-hero-heading {
    font-size: var(--hero-h-size-mobile, clamp(2rem, 7vw, 2.8rem));
  }

  .c-btn-primary {
    width: 100%;
    text-align: center;
    display: block;
  }

  .c-icon-col {
    flex: unset;
    padding-top: 0;
  }
}

/* El panel del hero entra al cargar la página, mientras se forma el sello */
.c-hero-panel {
  animation: c-hero-entra 0.9s ease-out both;
}

@keyframes c-hero-entra {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .c-icon-col {
    transform: none;
    transition: opacity 0.4s ease;
  }

  .c-hero-panel { animation: none; }
}
