/* ==========================================================================
   The Procuress — base
   Reset, document defaults, links, focus, type utilities, shared keyframes,
   reduced-motion. This is the only file allowed to style bare elements.
   ========================================================================== */

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

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

  body {
    margin: 0;
    background: var(--tp-color-paper);
    color: var(--tp-color-text);
    font-family: var(--tp-font-serif);
    font-size: var(--tp-size-body);
    font-weight: var(--tp-weight-regular);
    line-height: var(--tp-leading-body);
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
  }

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

  svg {
    height: auto;
  }

  a {
    color: var(--tp-color-ink);
    text-decoration: none;
    transition: color var(--tp-dur-fast) ease;
  }

  a:hover {
    color: var(--tp-color-cobalt);
  }

  button,
  input,
  select,
  textarea {
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
    margin: 0;
  }

  button {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    border-radius: var(--tp-radius);
  }

  input,
  select,
  textarea {
    border-radius: var(--tp-radius);
  }

  h1,
  h2,
  h3,
  h4,
  p,
  ul,
  ol,
  figure {
    margin: 0;
  }

  ul,
  ol {
    padding: 0;
    list-style: none;
  }

  /* Focus: the design has no focus treatment, so a brass hairline ring is
     added for keyboard users only. */
  :focus-visible {
    outline: 1px solid var(--tp-color-brass);
    outline-offset: 3px;
  }

  :focus:not(:focus-visible) {
    outline: none;
  }

  ::placeholder {
    color: var(--tp-color-text-muted);
    opacity: 1;
  }

  ::selection {
    background: var(--tp-color-powder);
    color: var(--tp-color-ink);
  }

  /* ---- Type utilities (shared, minimal) ------------------------------ */
  .tp-eyebrow {
    font-family: var(--tp-font-mono);
    font-size: var(--tp-size-label-l);
    letter-spacing: var(--tp-track-eyebrow);
    text-transform: uppercase;
    color: var(--tp-color-gold-text);
  }

  .tp-italic {
    font-style: italic;
  }

  .tp-body-italic {
    font-size: var(--tp-size-body-l);
    font-style: italic;
    font-weight: var(--tp-weight-light);
    line-height: var(--tp-leading-body);
    color: var(--tp-color-text-body);
  }

  .tp-heading {
    font-weight: var(--tp-weight-regular);
    font-size: var(--tp-size-h2);
    letter-spacing: var(--tp-track-nav);
    text-transform: uppercase;
    color: var(--tp-color-ink);
    line-height: var(--tp-leading-heading);
  }

  /* Accessible hiding (WordPress convention). */
  .screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  .screen-reader-text:focus {
    position: absolute !important;
    top: 8px;
    left: 8px;
    width: auto;
    height: auto;
    padding: 12px 18px;
    margin: 0;
    clip: auto;
    clip-path: none;
    background: var(--tp-color-paper);
    color: var(--tp-color-ink);
    border: var(--tp-border-brass);
    font-family: var(--tp-font-mono);
    font-size: var(--tp-size-label-xl);
    letter-spacing: var(--tp-track-cta);
    text-transform: uppercase;
    z-index: 1000;
  }

  /* ---- Shared keyframes (from the exports) --------------------------- */
  @keyframes tp-fade {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  @keyframes tp-rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
  }

  @keyframes tp-view {
    from { opacity: 0; transform: translateY(14px) scale(0.994); }
    to { opacity: 1; transform: none; }
  }

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

    html {
      scroll-behavior: auto;
    }
  }
}

/* ==========================================================================
   Skip link — UNLAYERED, deliberately.

   WordPress core ships `.screen-reader-text:focus` in wp-block-library with no
   @layer, so it beats every layered rule in this theme regardless of
   specificity — the same vendor-precedence trap Phase 6 found in WooCommerce
   and Phase 8 documented. The theme's own treatment was losing, and the first
   thing a keyboard visitor saw was core's grey default box.

   Element-qualified and unlayered so it matches core's weight and wins on
   source order. It is the only unlayered rule in this file.
   ========================================================================== */
a.screen-reader-text:focus {
  top: 8px;
  left: 8px;
  padding: 12px 18px;
  background: var(--tp-color-paper);
  background-color: var(--tp-color-paper);
  color: var(--tp-color-ink);
  border: var(--tp-border-brass);
  border-radius: 0;
  box-shadow: none;
  font-family: var(--tp-font-mono);
  font-size: var(--tp-size-label-xl);
  letter-spacing: var(--tp-track-cta);
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.2;
  height: auto;
  width: auto;
  z-index: 1000;
}
