/* ============================================================
   OROVERDE JOYAS — PROPUESTA DE PIE DE PAGINA  ("Colofon")
   Archivo autocontenido. Cargar DESPUES de css/styles.css:
     <link rel="stylesheet" href="_prop/footer.css">
   No modifica ningun archivo existente. Sin !important.
   Sin imagenes externas, sin fuentes nuevas, sin backdrop-filter.

   Idea: cerrar el sitio como se cierra un catalogo de joyeria —
   una cinta de garantias, un bloque editorial de marca, y una
   firma tipografica enorme que se hunde en el borde de la pagina.

   Compatible con el marcado ACTUAL (degrada bien) y con el
   marcado nuevo de _prop/footer.html (version completa).
   ============================================================ */

/* ---------- 1. LIENZO ---------------------------------------- */

footer {
  position: relative;
  isolation: isolate;                 /* el glow no se escapa del footer */
  padding: clamp(3.5rem, 6vw, 6rem) 5vw clamp(3.5rem, 13vw, 11rem);
  background: var(--bg-deep);
  border-top: 0;                      /* lo sustituye el filete degradado */
  overflow: hidden;
  z-index: 10;
}

/* Filete superior: no una linea plana, sino un hilo de oro que
   nace y muere en los bordes. Es el gesto mas "editorial" del bloque. */
footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(197, 164, 101, 0.10) 12%,
    var(--line-strong) 50%,
    rgba(197, 164, 101, 0.10) 88%,
    transparent 100%
  );
  z-index: 0;
  pointer-events: none;
}

/* Halo esmeralda muy tenue bajo el filete: da profundidad y ata el
   footer al color de marca sin ensuciar el negro. Estatico: no repinta. */
footer::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 60%;
  background: radial-gradient(
    110% 100% at 50% 0%,
    var(--emerald-glow) 0%,
    rgba(15, 81, 50, 0.10) 38%,
    transparent 72%
  );
  opacity: 0.55;
  z-index: 0;
  pointer-events: none;
}

/* Todo el contenido por encima del halo */
footer > * {
  position: relative;
  z-index: 1;
}

/* ---------- 2. CINTA DE CONFIANZA (nueva) --------------------- */

.footer-trust {
  max-width: 1400px;
  margin: 0 auto clamp(3rem, 5vw, 4.5rem);
  padding-bottom: clamp(2.2rem, 4vw, 3.2rem);
  border-bottom: 1px solid var(--line);
}

.footer-trust ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}

.footer-trust li {
  padding: 0.35rem clamp(1rem, 2.4vw, 2.2rem);
  border-left: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ivory-soft);          /* #c8c1b3 s/ #050505 = 11.4:1 */
}

.footer-trust li:first-child {
  border-left: 0;
  padding-left: 0;
}

/* La palabra clave de cada garantia, en oro */
.footer-trust li b {
  display: block;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--gold);                /* #c5a465 s/ #050505 = 8.6:1 */
  margin-bottom: 0.35rem;
}

/* ---------- 3. REJILLA PRINCIPAL ------------------------------ */

.footer-grid {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) repeat(3, minmax(0, 1fr));
  column-gap: clamp(1.5rem, 3vw, 3.5rem);
  row-gap: clamp(2.5rem, 4vw, 3.5rem);
  padding-top: 0;
  align-items: start;
}

/* --- 3a. Columna de marca --- */

.footer-brand .lockup {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 1.05rem + 1.2vw, 2.25rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: 0.15em;
  color: var(--ivory);               /* 17:1 */
}

.footer-brand .lockup em {
  font-style: normal;
  color: var(--gold);
}

/* Regla corta bajo el lockup: firma de casa, no adorno */
.footer-brand .lockup::after {
  content: "";
  display: block;
  width: 3.25rem;
  height: 1px;
  margin-top: 1.35rem;
  background: linear-gradient(90deg, var(--gold), rgba(197, 164, 101, 0));
}

footer .footer-brand p {
  max-width: 34ch;
  margin-top: 1.35rem;
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.85;
  color: var(--ivory-soft);          /* 11.4:1 */
}

/* Bloque de contacto directo dentro de la marca */
.footer-brand .footer-reach {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-top: 1.9rem;
}

footer .footer-brand .footer-reach a {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 0.95rem + 0.3vw, 1.3rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--gold-bright);         /* #e0c089 s/ #050505 = 11.9:1 */
  overflow-wrap: anywhere;
}

/* Enlace de Instagram como sello, no como link perdido */
.footer-brand .footer-ig {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.6rem;
  padding: 0.7rem 1.15rem;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  color: var(--ivory);               /* 17:1 */
  background-image: none;
  transition:
    border-color 0.45s var(--ease),
    color 0.45s var(--ease),
    background-color 0.45s var(--ease);
}

.footer-brand .footer-ig svg {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--gold);
  transition: color 0.45s var(--ease);
}

.footer-brand .footer-ig:hover,
.footer-brand .footer-ig:focus-visible {
  border-color: var(--gold);
  color: var(--gold-bright);
  background-color: rgba(197, 164, 101, 0.06);
}

.footer-brand .footer-ig:hover svg { color: var(--gold-bright); }

/* --- 3b. Columnas de enlaces --- */

footer .footer-grid h3,
footer .footer-grid h5 {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);                /* 8.6:1 */
  margin: 0 0 1.5rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}

footer .footer-grid ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

footer .footer-grid a {
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--ivory-soft);          /* 11.4:1 */
  /* red de seguridad: ningun token largo (email) desborda su columna */
  overflow-wrap: anywhere;
  /* subrayado que crece: solo pinta background-size, sin reflow */
  background-image: linear-gradient(var(--gold-bright), var(--gold-bright));
  background-repeat: no-repeat;
  background-position: 0 calc(100% - 0.4rem);
  background-size: 0 1px;
  transition:
    background-size 0.5s var(--ease),
    color 0.4s var(--ease);
}

footer .footer-grid a:hover,
footer .footer-grid a:focus-visible {
  color: var(--ivory);
  background-size: 100% 1px;
}

/* ---------- 4. MEDIOS DE PAGO (nuevo) ------------------------- */

.footer-pay {
  max-width: 1400px;
  margin: clamp(2.5rem, 4vw, 3.5rem) auto 0;
  padding-top: clamp(2rem, 3.5vw, 2.75rem);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.footer-pay > span {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);                /* 8.6:1 */
}

.footer-pay ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.footer-pay li {
  padding: 0.42rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ivory-soft);          /* 11.4:1 */
  white-space: nowrap;
}

/* ---------- 5. LINEA LEGAL ------------------------------------ */

.footer-bottom {
  max-width: 1400px;
  margin: clamp(2.5rem, 4vw, 3.5rem) auto 0;
  padding-top: 0;
  border-top: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.6rem 2rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 300;
  line-height: 1.7;
  letter-spacing: 0.1em;
  color: var(--ivory-soft);          /* 11.4:1 */
}

/* ---------- 6. FIRMA TIPOGRAFICA (marca de agua) -------------- */
/* Se mueve del borde SUPERIOR al INFERIOR: deja de ser un estorbo
   detras del contenido y pasa a ser el cierre del documento.       */

.footer-marquee {
  position: absolute;
  top: auto;
  bottom: -0.16em;
  left: 0;
  width: 100%;
  transform: none;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  text-align: center;
  font-family: var(--serif);
  font-style: normal;
  font-weight: 300;
  font-size: clamp(2.4rem, 15vw, 13rem);
  line-height: 0.85;
  letter-spacing: 0.03em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(197, 164, 101, 0.22);
  /* se desvanece hacia los lados: el corte parece intencional */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 16%, #000 84%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 16%, #000 84%, transparent 100%);
}

/* ---------- 7. FOCO VISIBLE ----------------------------------- */

footer a:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ---------- 8. RESPONSIVE ------------------------------------- */

/* <= 1180px: la marca pasa a fila completa y los 3 grupos de
   enlaces se reparten la fila siguiente (evita el hueco muerto). */
@media (max-width: 1180px) {
  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .footer-brand {
    grid-column: 1 / -1;
    max-width: 54ch;
  }
  footer .footer-brand p {
    max-width: 46ch;
  }
  /* contacto en linea: el bloque de marca deja de ser una torre */
  .footer-brand .footer-reach {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.2rem 2.2rem;
    margin-top: 1.6rem;
  }
  .footer-brand .footer-ig {
    margin-top: 1.3rem;
  }
  .footer-trust ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-trust li {
    padding: 0.9rem clamp(1rem, 3vw, 2rem);
    border-left: 1px solid var(--line);
  }
  .footer-trust li:nth-child(odd) {
    border-left: 0;
    padding-left: 0;
  }
}

/* <= 640px: una sola columna en la cinta, enlaces aun en dos */
@media (max-width: 640px) {
  .footer-trust ul {
    grid-template-columns: minmax(0, 1fr);
  }
  .footer-trust li {
    border-left: 0;
    padding: 0.75rem 0;
    border-top: 1px solid var(--line);
  }
  .footer-trust li:first-child {
    border-top: 0;
    padding-top: 0;
  }
  .footer-trust li b {
    display: inline;
    margin-bottom: 0;
  }
  .footer-trust li b::after {
    content: " ·";
    color: var(--line-strong);
  }
}

/* <= 560px: dos columnas de enlaces (los rotulos son cortos, evita
   una torre de 10 items) */
@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  /* el email es un token indivisible: en columna nunca roza el borde */
  .footer-brand .footer-reach {
    flex-direction: column;
    gap: 0.15rem;
  }
  footer .footer-brand .footer-reach a {
    font-size: 1.05rem;
  }
}

/* <= 430px: nada de nowrap que desborde, chips mas compactos */
@media (max-width: 430px) {
  footer {
    padding-left: 6vw;
    padding-right: 6vw;
  }
  .footer-grid {
    column-gap: 1.25rem;
  }
  .footer-pay {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-pay li {
    font-size: 0.66rem;
    letter-spacing: 0.12em;
  }
  .footer-bottom {
    flex-direction: column;
  }
}

/* ---------- 9. MOVIMIENTO REDUCIDO ---------------------------- */

@media (prefers-reduced-motion: reduce) {
  footer .footer-grid a,
  .footer-brand .footer-ig,
  .footer-brand .footer-ig svg {
    transition: none;
  }
  footer .footer-grid a:hover,
  footer .footer-grid a:focus-visible {
    background-size: 100% 1px;
  }
}

/* ---------- 10. ALTO CONTRASTE (bonus, no rompe nada) --------- */

@media (prefers-contrast: more) {
  .footer-trust li,
  .footer-pay li,
  footer .footer-grid a,
  footer .footer-brand p,
  .footer-bottom {
    color: var(--ivory);
  }
  .footer-marquee {
    -webkit-text-stroke-color: rgba(197, 164, 101, 0.35);
  }
}

/* 2026-08-02 · Enlaces dentro del texto de las policies.
   axe (link-in-text-block) los marcaba desde hace semanas: van en dorado sobre
   marfil, y el color por si solo NO basta para distinguir un enlace de su parrafo
   — quien no percibe bien el contraste de color no ve que ahi hay un enlace.
   La regla de WCAG pide una segunda senal; el subrayado es la de siempre.
   Va en esta hoja porque las policies ya la cargan y asi no se toca styles.css. */
.legal-page p a[href],
.policy-page p a[href],
main p a[href][style*="--gold"] {
  text-decoration: underline;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(197, 164, 101, 0.55);
}
