/* pcl-base.css — Proculr base styles, custom properties, reset, typography */

/* ===== CUSTOM PROPERTIES ===== */
:root {
  /* Color palette */
  --pcl-ink: #0E0F12;
  --pcl-ink-alt: #161820;
  --pcl-ink-surface: #1E2028;
  --pcl-parchment: #F5F1EA;
  --pcl-parchment-alt: #EDE8DE;
  --pcl-white: #FFFFFF;
  --pcl-amber: #E8A84A;
  --pcl-amber-light: #F0BC6E;
  --pcl-amber-muted: #8C6228;
  --pcl-charcoal: #2C2F3A;
  --pcl-slate: #6B7080;
  --pcl-slate-light: #9BA3B4;

  /* Semantic foreground tokens */
  --pcl-fg-on-ink: #F5F1EA;
  --pcl-fg-muted-on-ink: #9BA3B4;
  --pcl-fg-accent-on-ink: #E8A84A;

  --pcl-fg-on-parchment: #0E0F12;
  --pcl-fg-muted-on-parchment: #4A4F5C;
  --pcl-fg-accent-on-parchment: #8C6228;

  --pcl-fg-on-white: #0E0F12;
  --pcl-fg-muted-on-white: #6B7080;
  --pcl-fg-accent-on-white: #C27F28;

  /* Typography */
  --pcl-font-heading: 'Playfair Display', Georgia, serif;
  --pcl-font-body: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --pcl-font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  /* Spacing */
  --pcl-space-xs: 8px;
  --pcl-space-sm: 16px;
  --pcl-space-md: 24px;
  --pcl-space-lg: 40px;
  --pcl-space-xl: 64px;
  --pcl-space-2xl: 96px;

  /* Layout */
  --pcl-container-max: 1200px;
  --pcl-reading-max: 720px;
  --pcl-nav-height: 72px;

  /* Border radius */
  --pcl-radius-sm: 4px;
  --pcl-radius-md: 8px;
  --pcl-radius-lg: 12px;

  /* Transitions */
  --pcl-transition: 200ms ease;
}

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

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

body {
  font-family: var(--pcl-font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--pcl-fg-on-ink);
  background-color: var(--pcl-ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.pcl-page--light-top {
  background-color: var(--pcl-parchment);
  color: var(--pcl-fg-on-parchment);
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

ul, ol {
  list-style: none;
}

/* ===== CONTAINER ===== */
.pcl-container {
  width: 100%;
  max-width: var(--pcl-container-max);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--pcl-font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.pcl-display {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.1;
}

.pcl-h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
}

.pcl-h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.2;
}

.pcl-h3 {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  line-height: 1.3;
}

.pcl-h4 {
  font-size: 1.125rem;
  line-height: 1.4;
  font-weight: 600;
  font-family: var(--pcl-font-body);
}

.pcl-lead {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-weight: 300;
  line-height: 1.6;
}

.pcl-caption {
  font-size: 0.8125rem;
  line-height: 1.4;
  font-weight: 400;
}

.pcl-mono {
  font-family: var(--pcl-font-mono);
  font-size: 0.875rem;
}

.pcl-italic {
  font-style: italic;
}

/* ===== SECTION BACKGROUNDS ===== */
.pcl-section--dark {
  background-color: var(--pcl-ink);
  color: var(--pcl-fg-on-ink);
}

.pcl-section--dark-alt {
  background-color: var(--pcl-ink-alt);
  color: var(--pcl-fg-on-ink);
}

.pcl-section--parchment {
  background-color: var(--pcl-parchment);
  color: var(--pcl-fg-on-parchment);
}

.pcl-section--white {
  background-color: var(--pcl-white);
  color: var(--pcl-fg-on-white);
}

/* ===== SECTION PADDING ===== */
.pcl-section {
  padding: var(--pcl-space-2xl) 0;
}

@media (max-width: 768px) {
  .pcl-section {
    padding: var(--pcl-space-xl) 0;
  }
}

/* ===== UTILITY ===== */
.pcl-text-amber { color: var(--pcl-amber); }
.pcl-text-muted-ink { color: var(--pcl-fg-muted-on-ink); }
.pcl-text-muted-light { color: var(--pcl-fg-muted-on-parchment); }
.pcl-text-muted-white { color: var(--pcl-fg-muted-on-white); }

.pcl-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;
}

.pcl-divider {
  width: 48px;
  height: 3px;
  background-color: var(--pcl-amber);
  border: none;
  margin: 0;
}

/* ===== FADE-IN ANIMATION ===== */
.pcl-fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.pcl-fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}
