/* ============================================================
   PET-Xi RecruitXI — base element styling

   Adapted from the prototype's base block, with two deliberate
   departures:

   1. Headings use clamp() rather than the prototype's fixed px
      (its h1 was a flat 62px, which does not survive a phone).
   2. A real :focus-visible ring exists. The prototype had no CSS
      at all, so it had no focus styling of any kind.
   ============================================================ */

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: var(--fw-regular);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-body);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  color: var(--text-strong);
  line-height: var(--leading-tight);
  margin: 0 0 0.4em;
  text-wrap: balance;
}

/* Brand rule: Light weight for headlines and key messaging. */
h1 {
  font-size: clamp(var(--text-3xl), 6vw, var(--text-5xl));
  font-weight: var(--fw-light);
  letter-spacing: var(--tracking-tight);
}

h2 {
  font-size: clamp(var(--text-2xl), 4.5vw, var(--text-4xl));
  font-weight: var(--fw-light);
  letter-spacing: var(--tracking-tight);
}

h3 {
  font-size: clamp(var(--text-xl), 3vw, var(--text-2xl));
  font-weight: var(--fw-semibold);
}

h4 {
  font-size: var(--text-xl);
  font-weight: var(--fw-semibold);
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

a {
  color: var(--text-link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* Inputs do not inherit font by default. */
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* The prototype faked focus with onFocus/onBlur state and had no
   keyboard affordance at all. This is the real thing: visible for
   keyboard users, absent for mouse users. */
:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

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

/* The brand eyebrow — tracked-out caps, as in "FIRING UP YOUR MIND". */
.petxi-eyebrow {
  font-weight: var(--fw-bold);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--brand-primary);
}

/* Skip link — visible only once focused. */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: calc(var(--space-4) * -4);
  z-index: 100;
  padding: var(--space-3) var(--space-4);
  background: var(--brand-primary);
  color: var(--text-on-brand);
  border-radius: var(--radius-sm);
  font-weight: var(--fw-bold);
  transition: top var(--dur-fast) var(--ease-out);
}

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

::selection {
  background: var(--pink-200);
  color: var(--ink-900);
}

@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;
  }
}

/* Visually hidden, still announced. Used for accessible names where the
   visual treatment carries the meaning for sighted users — star ratings,
   icon-only controls, native inputs behind custom switches. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
