/* =========================================================
   BRUMA — BASE
   Escala tipográfica, espaciado, botones y movimiento
   ========================================================= */

:root {
  /* Color */
  --paper: #f2f0eb;
  --paper-2: #e7e3db;
  --surface: #f8f7f3;
  --ink: #121211;
  --grey: #625f59;          /* texto secundario sobre claro: contraste AA */
  --grey-2: #a3a09a;        /* texto secundario sobre oscuro: contraste AA */
  --line: rgba(18, 18, 17, 0.12);
  --line-strong: rgba(18, 18, 17, 0.28);
  --line-inv: rgba(242, 240, 235, 0.16);
  --accent: #85512c;        /* precio mayorista */

  /* Tipografía */
  --f-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  --t-h1: clamp(2.5rem, 1.55rem + 3.7vw, 5rem);
  --t-h2: clamp(1.8rem, 1.35rem + 1.7vw, 2.9rem);
  --t-h3: clamp(1.05rem, 0.98rem + 0.3vw, 1.25rem);
  --t-lead: clamp(1.02rem, 0.97rem + 0.22vw, 1.15rem);
  --t-small: 0.875rem;

  /* Espaciado */
  --pad: clamp(1rem, 0.45rem + 2.1vw, 2.5rem);
  --max: 1440px;
  --section: clamp(4rem, 2.8rem + 4.2vw, 6.75rem);
  --nav-h: 60px;
  --radius: 3px;

  /* Movimiento */
  --ease: cubic-bezier(0.22, 0.8, 0.18, 1);
  --ease-io: cubic-bezier(0.7, 0, 0.2, 1);
}
@media (min-width: 960px) {
  :root { --nav-h: 68px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--nav-h);
}
html:focus-within { scroll-behavior: smooth; }
html.is-locked { overflow: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-display);
  font-size: 1rem;
  line-height: 1.55;
  font-variation-settings: 'wdth' 100;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
[hidden] { display: none !important; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 2px; }

.skip { position: fixed; left: 1rem; top: -4rem; z-index: 200; padding: 0.6rem 1rem; background: var(--ink); color: var(--paper); }
.skip:focus { top: 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: var(--section); }

/* ---------- Tipografía ---------- */
.mono {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.45;
}

/* Marcador de sección: indica dónde está el usuario */
.label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
  color: var(--grey);
}
.label::before { content: ''; width: 16px; height: 1px; background: currentColor; }

.h2 {
  font-size: var(--t-h2);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.028em;
  font-variation-settings: 'wdth' 92;
  text-wrap: balance;
}

.lead {
  margin-top: 1rem;
  max-width: 44ch;
  font-size: var(--t-lead);
  line-height: 1.55;
  color: var(--grey);
}

/* ---------- Botones ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0 1.3rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn svg { flex: none; }
.btn--sm { min-height: 38px; padding: 0 1rem; font-size: 0.84rem; }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: #3a3834; }
.btn--paper { background: var(--paper); color: var(--ink); }
.btn--paper:hover { background: #fff; }
.btn--line { border-color: var(--line-inv); color: var(--paper); }
.btn--line:hover { border-color: var(--paper); }
.btn--line-ink { border-color: var(--line-strong); color: var(--ink); }
.btn--line-ink:hover { border-color: var(--ink); }

.link-u {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.9rem;
  font-weight: 500;
}
.link-u::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 11px;
  height: 1px;
  background: currentColor;
  opacity: 0.35;
  transition: opacity 0.3s var(--ease);
}
.link-u:hover::after { opacity: 1; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; margin-top: 1.75rem; }

/* ---------- Aparición (sutil) ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

.line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.line > span { display: block; }
.js .reveal-lines .line > span { transform: translateY(105%); transition: transform 0.95s var(--ease); }
.js .reveal-lines .line:nth-child(2) > span { transition-delay: 0.07s; }
.js .reveal-lines.is-in .line > span { transform: none; }

video[data-video] { opacity: 0; transition: opacity 0.9s var(--ease); }
video[data-video].is-ready { opacity: 1; }

/* ---------- Cursor (solo con mouse) ---------- */
.cursor {
  position: fixed;
  left: 0; top: 0;
  z-index: 150;
  width: 64px; height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  scale: 0.4;
  transition: opacity 0.25s var(--ease), scale 0.35s var(--ease);
}
.cursor.is-active { opacity: 1; scale: 1; }
.cursor__label { font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
  .js [data-reveal], .js .reveal-lines .line > span { opacity: 1; transform: none; }
  html:focus-within { scroll-behavior: auto; }
}
