/* ============================================================
   ANCLAJES POWERS · Link in bio
   Distribuidor oficial de Milwaukee Tool en Venezuela
   ------------------------------------------------------------
   - Tipografía: Montserrat (auto-hospedada, licencia OFL).
   - Cero dependencias externas; compatible con la CSP estricta
     definida en .htaccess.
   - Mobile-first: el tráfico llega desde Instagram.
   ============================================================ */

/* ---------- Fuentes ---------- */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/montserrat-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/montserrat-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/montserrat-latin-800-normal.woff2") format("woff2");
}

/* ---------- Tokens de marca ---------- */
:root {
  /* Rojo tomado del logo oficial entregado por el cliente (#D61016) */
  --rojo: #D61016;
  --rojo-oscuro: #AE0C12;
  --carbon: #0E0E0E;
  --acero: #181818;
  --acero-claro: #1F1F1F;
  --grafito: #2A2A2A;
  --grafito-claro: #3A3A3A;
  --blanco: #FFFFFF;
  --gris: #A1A1A6;
  --gris-medio: #8A8A90;
  --gris-oscuro: #6E6E73;

  --fuente: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --ancho: 27.5rem;   /* 440 px */
  --corte: 14px;      /* chaflán del botón principal */
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html {
  background: var(--carbon);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--blanco);
  font-family: var(--fuente);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.45;
  border-top: 6px solid var(--rojo);
  background-color: var(--carbon);
  /* Textura de lámina antideslizante, casi imperceptible */
  background-image: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, .028) 0 1px,
    transparent 1px 9px
  );
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 0 1.25rem 2.5rem;
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
}

/* ---------- Hero ---------- */
.hero { padding: 2rem 0 1.5rem; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: .625rem;
  margin: 0 0 1rem;
  font-weight: 600;
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gris);
}
.eyebrow::before {
  content: "";
  flex: 0 0 auto;
  width: .875rem;
  height: .5rem;
  background: var(--rojo);
  transform: skewX(-24deg);
}

/* Logo Milwaukee (oficial, rojo sobre fondo oscuro) */
.logo-milwaukee {
  display: block;
  width: 15rem;
  max-width: 100%;
  height: auto;
  margin: 0 0 1.25rem;
}

.brand {
  margin: 0;
  font-weight: 800;
  font-size: clamp(2.125rem, 10vw, 2.875rem);
  line-height: .95;
  letter-spacing: -.02em;
  text-transform: uppercase;
}
.brand span { display: block; }

/* Logo Anclajes Powers (blanco), deliberadamente más pequeño que el de Milwaukee */
.brand--img img {
  display: block;
  width: 10rem;
  max-width: 100%;
  height: auto;
}

/* Firma visual: barra inclinada que evoca la itálica y el rayo de Milwaukee */
.slash {
  width: 4.5rem;
  height: .375rem;
  margin: 1rem 0 1rem .25rem;
  background: var(--rojo);
  transform: skewX(-24deg);
}

.tagline {
  margin: 0;
  font-weight: 600;
  font-size: .875rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--gris);
}
.tagline b { color: var(--blanco); font-weight: 800; }
.tagline sup { font-size: .6em; vertical-align: top; }

.lead {
  max-width: 36ch;
  margin: .75rem 0 0;
  font-size: .875rem;
  color: var(--gris);
}

/* ---------- Botones / enlaces ---------- */
.links {
  display: grid;
  gap: .75rem;
  margin-top: .5rem;
}

.btn {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: .875rem;
  min-height: 4rem;
  padding: .875rem 1rem;
  color: var(--blanco);
  text-decoration: none;
  background: var(--acero);
  border: 1px solid var(--grafito);
  border-left: 4px solid var(--rojo);
  transition: background-color .15s var(--ease), border-color .15s var(--ease);
  -webkit-tap-highlight-color: rgba(214, 16, 22, .25);
}
.btn:hover {
  background: var(--acero-claro);
  border-color: var(--grafito-claro);
  border-left-color: var(--rojo);
}
.btn:active { translate: 0 1px; }
.btn:focus-visible {
  outline: 3px solid var(--blanco);
  outline-offset: 3px;
}

.btn__icon {
  flex: 0 0 auto;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--rojo);
}
.btn__text { flex: 1 1 auto; min-width: 0; }
.btn__label {
  display: block;
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.15;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.btn__sub {
  display: block;
  margin-top: .1875rem;
  font-weight: 400;
  font-size: .75rem;
  color: var(--gris);
}
.btn__chev {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  color: var(--gris-oscuro);
}

/* Botón principal: rojo macizo con esquina cortada (chaflán industrial).
   El recorte vive en ::before para no cortar el anillo de foco. */
.btn--primary {
  min-height: 4.5rem;
  padding-left: calc(1rem + 5px);
  background: transparent;
  border: 0;
}
.btn--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--rojo);
  clip-path: polygon(
    0 0,
    calc(100% - var(--corte)) 0,
    100% var(--corte),
    100% 100%,
    0 100%
  );
  transition: background-color .15s var(--ease);
}
.btn--primary:hover::before { background: var(--rojo-oscuro); }
.btn--primary .btn__label { font-size: 1.0625rem; }
.btn--primary .btn__icon { color: var(--blanco); }
.btn--primary .btn__sub { color: var(--blanco); }
.btn--primary .btn__chev { color: rgba(255, 255, 255, .9); }

/* ---------- Grupo desplegable "Ventas" (sin JavaScript) ---------- */
.group { display: block; }
.group > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.group > summary::-webkit-details-marker { display: none; }
.group > summary .btn__chev { transition: rotate .2s var(--ease); }
.group[open] > summary .btn__chev { rotate: 90deg; }

.group__items {
  display: grid;
  gap: .5rem;
  margin: .5rem 0 0 .625rem;
  padding: .125rem 0 0 .875rem;
  border-left: 2px solid var(--grafito);
}
.btn--item { min-height: 3.5rem; }
.btn--item .btn__icon { width: 1.375rem; height: 1.375rem; }

/* ---------- Botón "Próximamente" (sin enlace) ---------- */
.btn--soon {
  cursor: default;
  border-left-color: var(--grafito-claro);
}
.btn--soon:hover {
  background: var(--acero);
  border-color: var(--grafito);
  border-left-color: var(--grafito-claro);
}
.btn--soon:active { translate: none; }
.btn--soon .btn__icon { color: var(--gris-oscuro); }
.btn--soon .btn__label { color: var(--gris); }
.btn__tag {
  flex: 0 0 auto;
  padding: .3125rem .5rem;
  font-weight: 800;
  font-size: .625rem;
  line-height: 1;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blanco);
  background: var(--rojo);
}

/* ---------- Sección "Líneas que manejamos" ---------- */
.section { margin-top: 2rem; }

.section__title {
  display: flex;
  align-items: center;
  gap: .625rem;
  margin: 0 0 .625rem;
  font-weight: 600;
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gris-medio);
}
.section__title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--grafito);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chip {
  padding: .4375rem .625rem;
  font-weight: 800;
  font-size: .75rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--blanco);
  background: var(--acero);
  border: 1px solid var(--grafito);
}
.chip sup {
  font-size: .55em;
  vertical-align: top;
  color: var(--gris);
}

/* ---------- Pie ---------- */
.footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--grafito);
  font-size: .6875rem;
  line-height: 1.55;
  color: var(--gris-medio);
}
.footer p { margin: 0 0 .5rem; }
.footer strong { color: var(--gris); font-weight: 600; }
.footer a {
  color: var(--gris);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer a:focus-visible {
  outline: 2px solid var(--blanco);
  outline-offset: 2px;
}

/* ---------- Página de error ---------- */
.error { padding: 4rem 0; }
.error .brand { font-size: clamp(4rem, 24vw, 6rem); color: var(--rojo); }
.error p { color: var(--gris); margin: 0 0 1.5rem; }

/* ---------- Movimiento (solo si el usuario no lo desactivó) ---------- */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise {
    from { opacity: 0; translate: 0 10px; }
    to   { opacity: 1; translate: 0 0; }
  }
  .hero,
  .links > *,
  .section,
  .footer {
    animation: rise .55s var(--ease) backwards;
  }
  .links > :nth-child(1) { animation-delay: .10s; }
  .links > :nth-child(2) { animation-delay: .16s; }
  .links > :nth-child(3) { animation-delay: .22s; }
  .links > :nth-child(4) { animation-delay: .28s; }
  .section { animation-delay: .36s; }
  .footer  { animation-delay: .44s; }
  .group[open] > .group__items { animation: rise .25s var(--ease) backwards; }
}

/* ---------- Pantallas anchas (escritorio): misma tarjeta, centrada ---------- */
@media (min-width: 48rem) {
  .page { padding-top: 2rem; }
  .hero { padding-top: 3rem; }
}
