/*
 * WorldYellowPages — main stylesheet entry.
 * Import order: tokens → typography → layout → components → utilities → pages.
 */
@import "_tokens-84id0yj.css";
@import "_typography-2kZONWk.css";
@import "_layout-9QtyuSo.css";
@import "_components-8TydgcS.css";
@import "_utilities-TbGEdrH.css";
@import "_pages-5OYFhCw.css";

/* Light-only theme — declared so UA chrome (form controls, scrollbars) tracks our palette. */
:root { color-scheme: light; }

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

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

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings get balanced wrapping where supported (Chrome, Safari TP, Firefox 121+). */
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }

img, svg, video { max-width: 100%; height: auto; }
img { vertical-align: middle; }

:focus-visible {
  outline: 2px solid var(--wyp-navy);
  outline-offset: 2px;
}

::selection { background: var(--wyp-navy); color: var(--wyp-paper); }

/* Skip link — appears only when keyboard-focused. Targets <main id="main-content">. */
.wyp-skip-link {
  position: absolute;
  top: 0;
  left: 0;
  padding: var(--wyp-space-3) var(--wyp-space-4);
  background: var(--wyp-ink);
  color: var(--wyp-yellow);
  font-family: var(--wyp-font-body);
  font-size: var(--wyp-text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--wyp-tracking-caps);
  text-decoration: none;
  transform: translateY(-100%);
  transition: transform var(--wyp-trans-fast);
  z-index: 1000;
}
.wyp-skip-link:focus-visible { transform: translateY(0); }

/* Honour user motion preferences — disable animations and smooth scroll. */
@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;
    scroll-behavior: auto !important;
  }
}

/* Print — hide nav/footer, ink on paper, link URLs alongside anchors. */
@media print {
  .home-nav, .home-footer,
  .pub-nav, .pub-footer,
  .err-nav,
  .wyp-skip-link { display: none; }
  body { background: white; color: black; }
  a { color: inherit; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; color: #555; }
}
