/* ==========================================================================
   Play Station 653 -- base layer
   Resets, elements, layout primitives. Reads tokens.css + theme.css only;
   never hard-codes a color or a typeface.
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4 {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  line-height: var(--display-leading);
  letter-spacing: var(--display-tracking);
  text-transform: var(--display-transform);
  text-wrap: balance;
}

.h1, h1 { font-size: var(--text-4xl); }
.h2, h2 { font-size: var(--text-3xl); }
.h3, h3 { font-size: var(--text-xl); }
.h4, h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-md); }
h6 { font-size: var(--text-base); }

p { margin: 0 0 var(--space-sm); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--primary-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color var(--speed-fast) var(--ease-out);
}
a:hover { color: var(--primary); }

:focus-visible {
  outline: var(--focus-width) solid var(--focus-ring);
  outline-offset: var(--focus-offset);
  border-radius: var(--radius-sm);
}

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

ul, ol { margin: 0 0 var(--space-sm); padding-left: 1.25em; }
li { margin-bottom: var(--space-3xs); }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: var(--space-xl) 0;
}

strong, b { font-weight: 700; }

blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
}

table { border-collapse: collapse; width: 100%; }
th, td {
  text-align: left;
  padding: var(--space-xs) var(--space-sm);
  border-bottom: 1px solid var(--border);
}
th { font-weight: 700; font-size: var(--text-sm); }

/* --------------------------------------------------------------------------
   layout primitives
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--width-page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--wide { max-width: var(--width-wide); }
.container--text { max-width: var(--width-text); }

.section {
  padding-block: var(--space-2xl);
}
@media (min-width: 48rem) {
  .section { padding-block: var(--space-3xl); }
}
.section--tight { padding-block: var(--space-xl); }
.section--flush-top { padding-top: 0; }
.section--flush-bottom { padding-bottom: 0; }
.section--inverse {
  background: var(--surface-inverse);
  color: var(--on-inverse);
}
.section--inverse a { color: var(--accent); }
.section--inverse .lede,
.section--inverse .muted { color: color-mix(in srgb, var(--on-inverse) 78%, transparent); }

.stack > * + * { margin-top: var(--space-sm); }
.stack-md > * + * { margin-top: var(--space-md); }
.stack-lg > * + * { margin-top: var(--space-lg); }

.grid { display: grid; gap: var(--space-md); }
@media (min-width: 40rem) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 60rem) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
  .grid--2-3 { grid-template-columns: 2fr 3fr; }
  .grid--3-2 { grid-template-columns: 3fr 2fr; }
}
@media (min-width: 40rem) and (max-width: 59.99rem) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
.grid--gap-lg { gap: var(--space-lg); }
.grid--align-center { align-items: center; }

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  align-items: center;
}
.cluster--center { justify-content: center; }
.cluster--gap-sm { gap: var(--space-2xs); }

/* --------------------------------------------------------------------------
   text utilities
   -------------------------------------------------------------------------- */

.eyebrow {
  display: block;
  margin-bottom: var(--space-2xs);
  font-family: var(--font-body);
  font-size: var(--eyebrow-size);
  font-weight: var(--eyebrow-weight);
  letter-spacing: var(--eyebrow-tracking);
  text-transform: var(--eyebrow-transform);
  color: var(--eyebrow-color);
}

.lede {
  font-size: var(--text-md);
  line-height: var(--leading-loose);
  color: var(--ink-soft);
  max-width: 46ch;
}
.lede--center { margin-inline: auto; }

.muted { color: var(--ink-soft); }
.small { font-size: var(--text-sm); }
.xsmall { font-size: var(--text-xs); }
.center { text-align: center; }
.measure { max-width: var(--width-text); }
.measure--center { max-width: var(--width-text); margin-inline: auto; }
.nowrap { white-space: nowrap; }

.section-head { margin-bottom: var(--space-xl); }
.section-head--center { text-align: center; }
.section-head--center .lede { margin-inline: auto; }

.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-link {
  position: absolute;
  left: var(--space-sm);
  top: -4rem;
  z-index: var(--z-overlay);
  padding: var(--space-2xs) var(--space-sm);
  background: var(--primary);
  color: var(--on-primary);
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  transition: top var(--speed) var(--ease-out);
}
.skip-link:focus { top: var(--space-sm); color: var(--on-primary); }
