/* ==========================================================================
   PEPTIK — Base: reset, tipografia, primitivas de layout
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: var(--w-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--muted);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
picture,
video,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--action);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-weight: var(--w-display);
  line-height: 1.05;
  letter-spacing: var(--track-display);
}

h1,
h2,
h3,
h4 {
  text-wrap: balance;
}

/* ...menos dentro del hero clonado. `balance` reparte las lineas de otra forma y
   cambia donde cortan las palabras: el original parte el titular en 4 lineas y con
   balance salian 3. Se resetea por descendencia (no por hijo directo: el h1 cuelga
   de .peptik-hero-titlerow, no del hero).

   `overflow-wrap: break-word` viene del tema original por una regla global sin
   prefijo .peptik-, asi que el extractor no la ve. Sin ella "Peptides" desborda la
   caja de 219px en vez de partirse, y el titular queda en 3 lineas en lugar de 4.
   Verificado contra peptik.co al mismo ancho. */
.peptik-marketing-hero :is(h1, h2, h3, h4) {
  text-wrap: wrap;
  overflow-wrap: break-word;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); line-height: 1.25; }

p { margin: 0 0 var(--sp-4); text-wrap: pretty; }

:where(a, button, input, select, [tabindex]):focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* --- Layout ---------------------------------------------------------- */

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.wrap--tight {
  width: min(100% - 2.5rem, var(--wrap-tight));
  margin-inline: auto;
}

.section {
  padding-block: var(--sp-8);
}

.section--tight { padding-block: var(--sp-7); }

.stack > * + * { margin-top: var(--sp-4); }

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: center;
}

/* --- Tipografia de utilidad ------------------------------------------- */

/* El "eyebrow": mayusculas chicas muy espaciadas. Es el tic tipografico que
   se repite en toda la marca y lo que le da el aire clinico/farmaceutico. */
.eyebrow {
  font-size: var(--step--1);
  font-weight: var(--w-strong);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--muted-soft);
  margin: 0 0 var(--sp-3);
}

.eyebrow--gold { color: var(--gold); }

.lede {
  font-size: var(--step-1);
  font-weight: var(--w-display);
  line-height: 1.5;
  color: var(--ink-70);
}

.fine {
  font-size: var(--step--1);
  color: var(--muted-soft);
  line-height: 1.55;
}

.numeric {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* --- Botones ----------------------------------------------------------- */

.btn {
  --btn-bg: var(--ink);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.9em 1.9em;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: var(--step-0);
  font-weight: var(--w-strong);
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    background-color var(--dur) var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn:active { transform: translateY(0); }

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border-color: var(--line-strong);
}

.btn--ghost:hover { background: var(--surface-1); }

.btn--gold {
  --btn-bg: var(--gold);
  --btn-fg: #fff;
}

.btn--block { width: 100%; }

/* --- Badges ------------------------------------------------------------ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.3em 0.85em;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  font-size: var(--step--1);
  font-weight: var(--w-strong);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-70);
  white-space: nowrap;
}

.badge--gold {
  border-color: var(--gold-soft);
  background: color-mix(in srgb, var(--gold) 8%, white);
  color: var(--gold);
}

.badge--stock::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--in-stock);
}

.badge--out::before { background: var(--out-stock); }

/* --- Reveal on load / scroll ------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: reveal 0.9s var(--ease) forwards;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: none;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
