/* ============================================================
   PERMAfit — Base resets & brand primitives
   Applied globally beneath the token layer.
   ============================================================ */

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  letter-spacing: var(--ls-body);
  color: var(--text-body);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--fw-regular);
  color: var(--text-strong);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-heading);
  margin: 0 0 0.4em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); letter-spacing: var(--ls-display); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p { margin: 0 0 1em; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img, svg, video { display: block; max-width: 100%; }
button { font-family: inherit; }

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* ---- Brand display helpers ---- */
.pf-display {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-display);
  color: var(--text-strong);
  margin: 0;
}

.pf-standfirst {
  font-family: var(--font-serif);
  font-size: var(--fs-standfirst);
  line-height: var(--lh-relaxed);
  font-weight: var(--fw-regular);
}

.pf-quote {            /* Amiri pull-quotes */
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--fs-h3);
  line-height: var(--lh-relaxed);
}

.pf-overline {         /* UPPERCASE labels — used heavily */
  font-family: var(--font-body);
  font-weight: var(--fw-bold);
  font-size: var(--fs-overline);
  letter-spacing: var(--ls-overline);
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---- Signature gradient surface + slat texture ---- */
.pf-gradient-surface {
  position: relative;
  background: var(--pf-gradient);
  color: var(--text-on-grad);
  isolation: isolate;
}
/* the vertical "blind"/slat shimmer seen across brand panels */
.pf-slats::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(255,255,255,0.00) 0px,
    rgba(255,255,255,0.00) 46px,
    rgba(255,255,255,0.07) 47px,
    rgba(255,255,255,0.00) 48px,
    rgba(0,0,0,0.05) 49px,
    rgba(0,0,0,0.00) 56px);
  mix-blend-mode: soft-light;
  z-index: -1;
}

/* the white content sheet that "lifts" over a gradient panel */
.pf-sheet {
  background: var(--surface-page);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  position: relative;
  z-index: 1;
}

/* big translucent watermark section title (e.g. "Dashboard") */
.pf-watermark {
  font-family: var(--font-display);
  color: rgba(255,255,255,0.22);
  line-height: 1;
  letter-spacing: var(--ls-display);
}

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

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