/* Base: reset, tipografía y superficies del navegador */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  scrollbar-color: var(--sage-300) var(--bg);
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
html.menu-open body { overflow: hidden; }

h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
  font-variation-settings: "opsz" 96;
}
p { text-wrap: pretty; }

::selection { background: var(--sage-100); color: var(--green-900); }
:focus-visible {
  outline: 2px solid var(--cta);
  outline-offset: 3px;
  border-radius: 6px;
}
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--sage-300); border-radius: 99px; border: 3px solid var(--bg); }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.icon {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--sm { width: 18px; height: 18px; }
/* Los íconos de relleno (WhatsApp, estrella) */
use[href="#i-whatsapp"], use[href="#i-star"] { fill: currentColor; stroke: none; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  background: var(--green-900);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; }

/* Aparición al hacer scroll: el contenido es visible por defecto;
   solo se oculta cuando JS confirma que puede revelarlo. */
.can-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity var(--dur) var(--ease-out) var(--d, 0ms),
    transform var(--dur) var(--ease-out) var(--d, 0ms);
}
.can-reveal [data-reveal].is-in { opacity: 1; transform: none; }
