/* Variables del theme: las inyecta app.js desde site.json -> theme.
   Estos son los valores por defecto (fallback). Paleta cuero/pergamino. */
:root {
  --bg: #E6D8BC;
  --bg-accent: #D9C7A3;
  --panel: #F1E8D4;
  --ink: #20180F;
  --ink-muted: #5C4A33;
  --leather: #6E4A2B;
  --leather-dark: #4A2F1A;
  --leather-text: #F3E9D2;
  --brass: #B0863F;
  --accent: #8A3324;
  --stitch: rgba(243, 233, 210, 0.55);
  --radius: 14px;
  --font-display: "Oswald", system-ui, sans-serif;
  --font-body: "Bitter", Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  height: 100vh;
  height: 100dvh;
  overflow: hidden; /* sin scroll: el contenido se escala para entrar siempre */
  color: var(--ink);
  font-family: var(--font-body);
  background: var(--bg);
  display: grid;
  place-items: center;
}

.page {
  width: 100%;
  max-width: 560px;
  padding: 20px 22px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transform-origin: center center;
  /* El fondo va acá (no en body) para que el mix-blend-mode del logo blendee
     contra el pergamino aun cuando se aplica transform: scale() al contenedor. */
  background:
    radial-gradient(120% 80% at 50% -12%, rgba(176, 134, 63, 0.18), transparent 55%),
    radial-gradient(100% 70% at 50% 118%, rgba(74, 47, 26, 0.20), transparent 62%),
    var(--bg);
}

.loader {
  margin-top: 30vh;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

/* --- Eyebrow (sello estampado) --- */
.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.7rem;
  color: var(--accent);
  margin-bottom: 2px;
}

/* --- Marca / logo: se integra al pergamino con multiply (sin recuadro).
   Los márgenes negativos recortan el espacio en blanco propio de la imagen. --- */
.brandmark {
  width: min(196px, 56vw);
  height: auto;
  display: block;
  mix-blend-mode: multiply;
  margin: -8px 0 -26px;
}
.brandmark.is-initials {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  mix-blend-mode: normal;
  background: var(--leather);
  color: var(--leather-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.4rem;
  letter-spacing: 0.05em;
  border: 3px solid var(--brass);
}

.tagline {
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--ink-muted);
  max-width: 34ch;
  margin-top: 5px;
}

/* --- Divisor con herradura --- */
.rule {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 360px;
  margin: 16px 0 4px;
}
.rule__line {
  flex: 1;
  height: 0;
  border-top: 1.5px solid rgba(32, 24, 15, 0.28);
}
.rule__mark { color: var(--brass); display: inline-flex; }
.rule__mark svg { width: 26px; height: 26px; }

/* --- Rótulo de sección --- */
.heading {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.82rem;
  color: var(--ink);
  margin: 4px 0 10px;
}

/* --- Vendedores: etiquetas de cuero (signature) --- */
/* gap chico = grupo cohesivo de vendedores */
.links { width: 100%; display: flex; flex-direction: column; gap: 9px; }

.tag {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--leather), var(--leather-dark));
  color: var(--leather-text);
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(32, 24, 15, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.14s ease, box-shadow 0.2s ease;
}
.tag::before { /* costura punteada */
  content: "";
  position: absolute;
  inset: 6px;
  border: 1.5px dashed var(--stitch);
  border-radius: 9px;
  pointer-events: none;
}
.tag:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(32, 24, 15, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.tag:active { transform: translateY(0); box-shadow: 0 4px 10px rgba(32, 24, 15, 0.30); }

.tag__brand {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--leather-dark);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  border: 2px solid var(--brass);
  box-shadow: inset 0 0 0 2px rgba(110, 74, 43, 0.25);
}
.tag__main { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tag__name {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 1.04rem;
  line-height: 1.12;
}
.tag__role { font-family: var(--font-body); font-size: 0.76rem; color: rgba(243, 233, 210, 0.72); }
/* chip circular: da peso al lado derecho y elimina el hueco muerto */
.tag__wa {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #E0BE7A;
}
.tag__wa svg { width: 22px; height: 22px; }

/* --- Enlace simple (fallback para links sin rol) --- */
.link {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 15px 18px;
  border-radius: var(--radius);
  background: var(--leather);
  color: var(--leather-text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 1rem;
  transition: transform 0.14s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 16px rgba(32, 24, 15, 0.24);
}
.link:hover { transform: translateY(-2px); }
.link__icon { width: 22px; height: 22px; color: var(--brass); display: inline-flex; }
.link__label { flex: 1; text-align: center; }

/* --- Ubicación: mini-mapa clickeable (donde antes iba la frase) --- */
.mapcard {
  position: relative;
  display: block;
  width: 100%;
  margin: 12px 0 2px;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  border: 1px solid rgba(32, 24, 15, 0.20);
  box-shadow: 0 8px 22px rgba(32, 24, 15, 0.22);
  transition: transform 0.14s ease, box-shadow 0.2s ease;
}
.mapcard:hover { transform: translateY(-2px); box-shadow: 0 13px 28px rgba(32, 24, 15, 0.30); }
.mapcard:active { transform: translateY(0); }
.mapcard__img { display: block; width: 100%; height: 116px; object-fit: cover; }
.mapcard__attr {
  position: absolute;
  top: 5px; right: 6px;
  font-family: var(--font-body);
  font-size: 9px;
  line-height: 1;
  color: rgba(20, 16, 12, 0.6);
  background: rgba(255, 255, 255, 0.6);
  padding: 2px 5px;
  border-radius: 6px;
}
.mapcard__bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 13px 10px;
  text-align: left;
  color: #F3E9D2;
  background: linear-gradient(to top, rgba(16, 13, 10, 0.93) 12%, rgba(16, 13, 10, 0.55) 55%, rgba(16, 13, 10, 0) 100%);
}
.mapcard__pin { flex: 0 0 auto; color: #E76A52; display: inline-flex; }
.mapcard__pin svg { width: 22px; height: 22px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.5)); }
.mapcard__txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.mapcard__name {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.98rem;
  line-height: 1.15;
}
.mapcard__sub { font-family: var(--font-body); font-size: 0.74rem; color: rgba(243, 233, 210, 0.82); }
.mapcard__go { flex: 0 0 auto; color: rgba(243, 233, 210, 0.85); display: inline-flex; }
.mapcard__go svg { width: 20px; height: 20px; }

/* --- Redes --- */
.socials { display: flex; gap: 14px; justify-content: center; margin-top: 6px; }
.social {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--ink);
  border: 1.5px solid rgba(32, 24, 15, 0.35);
  transition: transform 0.12s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.social:hover {
  background: var(--leather);
  color: var(--leather-text);
  border-color: var(--leather);
  transform: translateY(-2px);
}
.social svg { width: 21px; height: 21px; }

/* --- Footer --- */
.footer {
  margin-top: 14px;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  color: var(--ink-muted);
}

/* --- Accesibilidad --- */
a:focus-visible, .tag:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

@media (max-width: 360px) {
  .tag__name, .locard__name { font-size: 0.98rem; }
}
