/* Minimal shared base. Import after tokens.css. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, video, canvas, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }

.label {
  font-family: var(--font-label, var(--font-text));
  font-size: var(--step--1);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  font-weight: 500;
}
.display { font-family: var(--font-display); font-weight: 400; line-height: 1.05; }

.btn {
  display: inline-flex; align-items: center; gap: .6em;
  padding: .95em 1.6em;
  border: 1px solid currentColor; border-radius: 999px;
  background: transparent; text-decoration: none; cursor: pointer;
  font-size: var(--step--1); letter-spacing: var(--tracking-label); text-transform: uppercase;
  transition: background var(--dur-sm) var(--ease-out), color var(--dur-sm) var(--ease-out);
}
.btn:hover, .btn:focus-visible { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Subtle animated film grain. Add <div class="grain" aria-hidden="true"></div>. */
.grain {
  position: fixed; inset: -50%; pointer-events: none; z-index: 9999; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); }
  80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}
@media (prefers-reduced-motion: reduce) { .grain { animation: none; } }

/* ---------- Mexico moodboard utilities (docs/moodboard.md) ---------- */

/* Rótulo lettering: fill + extruded shadow + outline, like hand-painted signs (#16, #40).
   Tune with --ro-fill / --ro-depth (extrusion color) / --ro-edge (outline) / --ro-pop (last offset). */
.rotulo {
  --ro-fill: var(--cannoli-cream);
  --ro-depth: var(--moonlit-ocean);
  --ro-edge: var(--moonlit-ocean);
  --ro-pop: var(--baltic-amber);
  font-family: var(--font-rotulo);
  color: var(--ro-fill);
  -webkit-text-stroke: 0.035em var(--ro-edge);
  paint-order: stroke fill;
  text-shadow:
    0.02em 0.02em 0 var(--ro-depth), 0.04em 0.04em 0 var(--ro-depth),
    0.06em 0.06em 0 var(--ro-depth), 0.08em 0.08em 0 var(--ro-depth),
    0.11em 0.11em 0 var(--ro-pop);
  line-height: 0.95;
}
.rotulo--flat { text-shadow: 0.06em 0.06em 0 var(--ro-depth); }

/* Sign-painter script with a soft offset shadow (#16 "Te Quiero Mucho más"). */
.sign {
  font-family: var(--font-sign);
  font-weight: 400;
  line-height: 1;
  text-shadow: 0.04em 0.05em 0 color-mix(in oklab, var(--moonlit-ocean) 25%, transparent);
}

/* Four-point twinkle star used around rótulo lettering. <span class="twinkle" aria-hidden="true"></span> */
.twinkle {
  display: inline-block; width: 0.6em; aspect-ratio: 1; background: currentColor;
  clip-path: polygon(50% 0, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0 50%, 42% 42%);
  animation: twinkle 3.6s ease-in-out infinite;
}
@keyframes twinkle { 0%, 100% { transform: scale(.85) rotate(0deg); opacity: .7; } 50% { transform: scale(1) rotate(12deg); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .twinkle { animation: none; } }
