/* ==========================================================================
   PPCM Theme — Main (Design System + Base Styles)
   Keep page/component styles in separate files in assets/css/.
   ========================================================================== */

/* ---------- CSS Reset / Normalize (lightweight) ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Colors */
  --color-primary: #1b2a4a; /* deep navy */
  --color-accent: #ff6b35; /* vibrant orange */
  --color-white: #ffffff;
  --color-bg: #ffffff;
  --color-bg-muted: #f5f5f5;
  --color-text: #333333;
  --color-text-muted: #5b6577;
  --color-border: rgba(27, 42, 74, 0.14);
  --color-shadow: rgba(0, 0, 0, 0.12);
  --color-overlay: rgba(0, 0, 0, 0.55);

  /* Typography */
  --font-heading: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Sizing / Layout */
  --container-max: 1200px;
  --gutter: 20px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-pill: 999px;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 80px; /* section padding */

  /* Shadows */
  --shadow-sm: 0 6px 20px var(--color-shadow);
  --shadow-md: 0 14px 40px rgba(0, 0, 0, 0.16);

  /* Transitions */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-1: 160ms;
  --dur-2: 260ms;

  /* Header height (helps with anchors) */
  --header-h: 76px;
}

/* ---------- Site shell (full-width; inner sections use .container) ---------- */
/* #primary + .site-main beats Customizer rules that target #primary alone. */
#content.site-content,
#primary.site-main {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  box-sizing: border-box;
}

/* ---------- Base Typography ---------- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  line-height: 1.15;
  color: var(--color-primary);
  margin: 0 0 var(--space-4);
}

h1 { font-size: clamp(34px, 4vw, 56px); letter-spacing: -0.02em; }
h2 { font-size: clamp(26px, 2.8vw, 40px); letter-spacing: -0.01em; }
h3 { font-size: clamp(20px, 2.2vw, 28px); }

p {
  margin: 0 0 var(--space-4);
  color: var(--color-text);
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-1) var(--ease), background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}

a:hover {
  color: var(--color-accent);
}

/* Accessible focus */
:focus-visible {
  outline: 3px solid rgba(255, 107, 53, 0.5);
  outline-offset: 3px;
}

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section-padding {
  padding-block: var(--space-8);
}

.text-center { text-align: center; }
.text-white { color: var(--color-white); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  border: 2px solid transparent;
  transition: transform var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease), background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
  will-change: transform;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-primary,
.btn.btn--primary {
  background: var(--color-accent);
  color: var(--color-white);
}

.btn-secondary,
.btn.btn--secondary {
  background: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-white,
.btn.btn--white {
  background: transparent;
  border-color: var(--color-white);
  color: var(--color-white);
}

/* Skip link */
.skip-to-content-link {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 9999;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-140%);
  transition: transform var(--dur-2) var(--ease);
}

.skip-to-content-link:focus {
  transform: translateY(0);
}

/* Screen reader text (WP convention) */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

/* Smooth scrolling anchors accounting for sticky header */
section[id] {
  scroll-margin-top: calc(var(--header-h) + 14px);
}

