/* ==========================================================================
   16-utilities.css — Screen-reader-only, focus rings, responsive helpers
   ========================================================================== */

/* --------------------------------------------------------------------------
   Visually hidden — for screen readers only
   Use on icon-only button labels, skip links, etc.
   -------------------------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* --------------------------------------------------------------------------
   Skip link — keyboard users jump to main content
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -60px;
  left: var(--space-16);
  z-index: 999;
  background-color: var(--color-rust);
  color: var(--color-paper);
  font-size: 14px;
  font-weight: 500;
  padding: var(--space-8) var(--space-16);
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-16);
}

/* --------------------------------------------------------------------------
   Focus ring — used on all interactive elements
   Rust-coloured offset ring (no greys, no blues per design system)
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 3px solid var(--color-rust);
  outline-offset: 3px;
}

/* Remove outline for mouse users (only show for keyboard) */
:focus:not(:focus-visible) {
  outline: none;
}

/* --------------------------------------------------------------------------
   Display helpers
   -------------------------------------------------------------------------- */
.hidden          { display: none !important; }
.block           { display: block; }
.inline-block    { display: inline-block; }
.flex            { display: flex; }

/* --------------------------------------------------------------------------
   Text alignment
   -------------------------------------------------------------------------- */
.text-left   { text-align: left; }
.text-center { text-align: center; }
.text-right  { text-align: right; }

/* --------------------------------------------------------------------------
   Responsive visibility
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .hide-mobile { display: none !important; }
}

@media (min-width: 641px) {
  .show-mobile-only { display: none !important; }
}

/* --------------------------------------------------------------------------
   Margin helpers (sparse — prefer layout CSS over utility classes)
   -------------------------------------------------------------------------- */
.mt-0  { margin-top: 0; }
.mt-8  { margin-top: var(--space-8); }
.mt-16 { margin-top: var(--space-16); }
.mt-24 { margin-top: var(--space-24); }
.mt-32 { margin-top: var(--space-32); }
.mt-48 { margin-top: var(--space-48); }
.mt-64 { margin-top: var(--space-64); }

.mb-0  { margin-bottom: 0; }
.mb-8  { margin-bottom: var(--space-8); }
.mb-16 { margin-bottom: var(--space-16); }
.mb-24 { margin-bottom: var(--space-24); }
.mb-32 { margin-bottom: var(--space-32); }

/* --------------------------------------------------------------------------
   Image utilities
   -------------------------------------------------------------------------- */
.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   Hanging photo caption — Petersham Nurseries pattern
   Applied as a <span class="caption"> outside and below the photo frame.
   -------------------------------------------------------------------------- */
.caption {
  display: block;
  font-family: var(--font-caption);
  font-size: 14px;
  font-style: italic;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--color-dust);
  margin-top: 12px;
}

/* --------------------------------------------------------------------------
   PIC badge — inline metadata style
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.badge--trust {
  background: transparent;
  color: var(--color-green);
  border: 1px solid var(--color-green);
}

.badge--heritage {
  background-color: var(--color-bone);
  color: var(--color-ink);
}

/* --------------------------------------------------------------------------
   Print — hide nav and motion elements
   -------------------------------------------------------------------------- */
@media print {
  .site-nav,
  .hero__scroll-cue,
  .nav-drawer { display: none !important; }

  .hero {
    height: auto;
    min-height: 0;
  }
}
