/* ═══════════════════════════════════════════
   BASE — reset, font, element defaults
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

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

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

body {
  font-family: var(--font);
  font-size: var(--fs-md);
  font-weight: var(--fw-regular);
  line-height: var(--lh-relaxed);
  background: var(--page-bg, var(--bg));
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition:
    background var(--dur-med) var(--ease-smooth),
    color      var(--dur-med) var(--ease-smooth);
}

/* Page frame: sides + bottom inset only. Top is flush with viewport
   so the nav sits at the very top, matching Figma. */
.pl-frame {
  /* Side margins grow past 128px once the viewport exceeds
     content-max + 2×page-pad, keeping inner content at ≤1280px. */
  padding: 0 max(var(--page-pad, 128px), calc((100vw - var(--content-max, 1280px)) / 2));
  background: var(--page-bg, transparent);
  min-height: 100vh;
}
.pl-frame__inner {
  border-left:  1px solid var(--grid-line);
  border-right: 1px solid var(--grid-line);
  background: var(--bg);
  /* Horizontal overflow visible so row divider lines can extend past
     the frame's side borders into the outer page-padding area. */
  overflow: visible;
}

@media (max-width: 1024px) { .pl-frame { padding: 0 40px; } }
@media (max-width: 640px)  { .pl-frame { padding: 0 16px; } }

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

a:hover { color: var(--accent); }

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

ul, ol { list-style: none; }

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

/* ─────────────────────────────────────────
   LAYOUT HELPERS
   ───────────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.stack > * + * { margin-top: var(--sp-16); }
.stack-lg > * + * { margin-top: var(--sp-32); }

.row {
  display: flex;
  align-items: center;
  gap: var(--sp-16);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-24);
}

@media (max-width: 880px) {
  .grid-3 { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────
   TYPOGRAPHY UTILITIES
   ───────────────────────────────────────── */
.t-display {
  font-size: var(--fs-display);
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-display);
}

.t-h1 {
  font-size: var(--fs-h1);
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-heading);
}

.t-h2 {
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-heading);
}

.t-h3 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-snug);
}

.t-body {
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  color: var(--text-soft);
}

.t-body-sm {
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
  color: var(--text-muted);
}

.t-caption {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-muted);
}

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

/* ─────────────────────────────────────────
   ACCESSIBILITY
   ───────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

::selection {
  background: var(--color-orange-300);
  color: var(--color-charcoal);
}

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

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

/* ─────────────────────────────────────────
   SCROLL-REVEAL
   Targets tagged with .pl-reveal start hidden
   and fade + slide into view once JS adds
   .pl-reveal--visible (IntersectionObserver).
   Stagger siblings via --reveal-delay.
   ───────────────────────────────────────── */
.pl-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity   640ms var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1)),
    transform 640ms var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1));
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.pl-reveal--visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .pl-reveal { opacity: 1; transform: none; transition: none; }
}
