/* ==========================================================================
   marinarte.soy — base.css
   Tokens, reset y tipografía. Todo lo visual se construye sobre estas variables.
   ========================================================================== */

:root {
  /* Color ---------------------------------------------------------------- */
  --crema: #faf4ec;
  --arena: #f0e4d6;
  --arena-oscura: #e0cdb9;
  --tinta: #2b211c;
  --tinta-suave: #6b5a50;
  --terracota: #c2603f;
  --terracota-oscura: #5e2c1b;
  --arcilla: #e8cbb4;
  --salvia: #7e8b72;
  --blanco: #fffdfa;

  /* Tipografía ----------------------------------------------------------- */
  --fuente-titulo: "Fraunces", "Georgia", serif;
  --fuente-texto: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Escala tipográfica fluida -------------------------------------------- */
  --texto-xs: 0.78rem;
  --texto-sm: 0.9rem;
  --texto-base: clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
  --texto-lg: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem);
  --texto-xl: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
  --texto-2xl: clamp(2rem, 1.4rem + 2.6vw, 3.2rem);
  --texto-3xl: clamp(2.6rem, 1.5rem + 4.5vw, 4.6rem);

  /* Espaciado ------------------------------------------------------------ */
  --esp-1: 0.25rem;
  --esp-2: 0.5rem;
  --esp-3: 0.75rem;
  --esp-4: 1rem;
  --esp-5: 1.5rem;
  --esp-6: 2rem;
  --esp-7: 3rem;
  --esp-8: 4.5rem;
  --ancho-max: 1272px;
  --ancho-texto: 64ch;

  /* Forma y sombra ------------------------------------------------------- */
  --radio-sm: 8px;
  --radio-md: 16px;
  --radio-lg: 28px;
  --radio-pill: 999px;
  --sombra-suave: 0 12px 32px -18px rgba(43, 33, 28, 0.45);
  --sombra-media: 0 24px 60px -30px rgba(43, 33, 28, 0.55);
  --transicion: 220ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul[class],
ol[class] {
  list-style: none;
  padding: 0;
}

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

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* Tipografía ------------------------------------------------------------- */
body {
  font-family: var(--fuente-texto);
  font-size: var(--texto-base);
  line-height: 1.65;
  color: var(--tinta);
  background: var(--crema);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: var(--fuente-titulo);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.015em;
  font-variation-settings: "SOFT" 30, "WONK" 1;
}

h1 {
  font-size: var(--texto-3xl);
  line-height: 1.02;
}

h2 {
  font-size: var(--texto-2xl);
}

h3 {
  font-size: var(--texto-xl);
}

p {
  text-wrap: pretty;
}

/* Accesibilidad ---------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--terracota);
  outline-offset: 3px;
  border-radius: 2px;
}

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

.saltar-contenido {
  position: absolute;
  top: -100%;
  left: var(--esp-4);
  z-index: 100;
  padding: var(--esp-3) var(--esp-4);
  background: var(--tinta);
  color: var(--crema);
  border-radius: var(--radio-sm);
  transition: top var(--transicion);
}

.saltar-contenido:focus {
  top: var(--esp-4);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
