/* =========================================================
   PC Paradise – Base
   Reset, typography, layout wrappers, global helpers.
   Requires: tokens.css
   ========================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--space-4)); /* anchors aren't hidden under sticky header */
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

button {
  cursor: pointer;
}

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

/* :where() keeps this reset at zero specificity, so component classes can add padding/margins */
:where(ul[role="list"], ol[role="list"]) {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  margin: 0;
  color: var(--color-text);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }

h3 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
}

h4 {
  font-size: var(--fs-h4);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
  letter-spacing: 0;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

::selection {
  background: var(--color-accent-tint);
  color: var(--color-text);
}

/* ---------- Layout wrappers ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + (var(--gutter) * 2));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
}

.section--alt {
  background-color: var(--color-bg-alt);
}

/* ---------- Text helpers ---------- */

/* Small gold label above headings, with a thin line after it */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--color-accent-deep);
}

.eyebrow::after {
  content: "";
  width: 2.5rem;
  height: 1px;
  background-color: currentColor;
  opacity: 0.5;
}

/* The single italic serif word inside big headlines */
.accent-word {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: var(--fw-regular);
  letter-spacing: 0;
  color: var(--color-accent-display);
}

/* Supporting paragraph under headlines */
.lead {
  font-size: var(--fs-md);
  color: var(--color-text-muted);
  max-width: 38rem;
}

.text-muted {
  color: var(--color-text-muted);
}

/* ---------- Accessibility ---------- */
:focus-visible {
  outline: 2px solid var(--color-navy);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* "Skip to content" link – visible only when focused with keyboard */
.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: calc(var(--z-drawer) + 1);
  padding: var(--space-2) var(--space-4);
  background: var(--color-navy);
  color: var(--color-white);
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  transform: translateY(-200%);
  transition: transform var(--dur-base) var(--ease-out);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Respect users who turn off animations in their OS */
@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;
  }
}
