/* PawValet — Base styles
   Reset, typography, accessibility, focus states. */

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  font-feature-settings: 'kern', 'liga', 'calt', 'ss01';
  font-optical-sizing: auto;
  min-height: 100vh;
  /* overflow-x: hidden on body BREAKS position: sticky inside it on iOS Safari.
     Use overflow-x: clip on html instead (see refine.css). */
}

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

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

button {
  background: none;
  border: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
  transition: color var(--duration-fast) var(--ease-out-soft);
}

ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 380;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-snug);
  color: var(--color-ink);
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
  text-wrap: balance;
}

p {
  color: var(--color-ink-2);
  line-height: var(--leading-relaxed);
  text-wrap: pretty;
  max-width: 60ch;
}

/* — Selection — */
::selection {
  background: var(--color-sage);
  color: var(--color-bg);
}

/* — Focus visible — */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--color-sage-deep);
  outline-offset: 3px;
  border-radius: 2px;
}

/* — Screen reader only — */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* — Layout helpers — */
.container {
  width: 100%;
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding-inline: var(--space-gutter);
}

.container-narrow {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding-inline: var(--space-gutter);
}

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

/* — Skip link — */
.skip-link {
  position: absolute;
  top: -40px;
  left: var(--space-4);
  background: var(--color-ink);
  color: var(--color-bg);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  z-index: 999;
  font-weight: 500;
}
.skip-link:focus { top: var(--space-4); }
