/*
  Font loading: Bricolage Grotesque, DM Sans y Lora se cargan exclusivamente
  desde Google Fonts (ver <link rel="preload"> en index.html). No hay @font-face
  locales. Google Fonts ya inyecta font-display:swap internamente — no es necesario
  ni posible sobreescribirlo desde aquí. Si en el futuro se migra a self-hosted,
  agregar @font-face con font-display:swap y font-size-adjust para Lora
  (fallback: Georgia, serif) para minimizar CLS en el hero.
  Pendiente: evaluar self-hosting cuando se necesite control completo del CLS.
*/

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  background: var(--surface);
  color: var(--text);
  overflow-x: hidden;
  cursor: none;
}

a { text-decoration: none; }

svg.ph {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

#hero a:focus-visible,
#hero button:focus-visible,
#about a:focus-visible,
#about button:focus-visible,
#contact a:focus-visible,
#contact button:focus-visible {
  outline-color: var(--text-on-dark);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

@media (hover: none), (pointer: coarse) {
  body,
  .srv-item,
  .pf-row { cursor: auto; }
}

/* Easter egg gif popup */
.easter-egg-popup {
  position: fixed;
  z-index: var(--z-toast);
  pointer-events: none;
  width: 220px;
  border-radius: var(--radius-md);
  overflow: hidden;
  opacity: 0;
  transform: scale(0.88) translateY(10px);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
  box-shadow: var(--shadow-xl);
}

.easter-egg-popup.is-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.easter-egg-popup img {
  display: block;
  width: 100%;
  height: auto;
}

@media (hover: none), (pointer: coarse) {
  .easter-egg-popup { display: none; }
}

@media (forced-colors: active) {
  body { cursor: auto; }
}

.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
  z-index: 9999;
  padding: 12px 24px;
  background: var(--text);
  color: var(--text-on-dark);
  font-family: var(--font);
  font-size: var(--fs-caption);
  font-weight: 500;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.skip-link:focus {
  width: auto;
  height: auto;
  clip: auto;
  clip-path: none;
  overflow: visible;
  white-space: normal;
  top: 16px;
  left: 16px;
}
