/* ==========================================================================
   Base Styles - Reset & Typography
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
}

body.loading {
  overflow: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.2;
  color: var(--text-primary);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

a {
  color: var(--electric-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

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

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* Utility Classes */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.container--wide {
  max-width: var(--container-wide);
}

.section {
  padding: var(--space-4xl) 0;
}

.section--sm {
  padding: var(--space-2xl) 0;
}

.section--lg {
  padding: calc(var(--space-4xl) * 1.5) 0;
}

/* Text Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-electric { color: var(--electric-blue); }
.text-navy { color: var(--navy); }

/* Background Utilities */
.bg-primary { background-color: var(--bg-primary); }
.bg-secondary { background-color: var(--bg-secondary); }
.bg-accent { background-color: var(--bg-accent); }
.bg-navy { background-color: var(--navy); }
.bg-electric { background-color: var(--electric-blue); }

/* Screen reader only */
.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;
}

/* Focus styles */
:focus-visible {
  outline: 2px solid var(--electric-blue);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background-color: var(--electric-blue);
  color: white;
}

/* ==========================================================================
   WordPress Admin Bar Offset
   ========================================================================== */
.admin-bar .header {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar .header {
    top: 46px;
  }
}

/* ==========================================================================
   WordPress Core Classes (align, caption, etc.)
   ========================================================================== */
.alignnone { margin: 0.5em 1em 0.5em 0; }
.aligncenter, div.aligncenter {
  display: block;
  margin: 0.5em auto;
}
.alignright { float: right; margin: 0.5em 0 0.5em 1em; }
.alignleft  { float: left;  margin: 0.5em 1em 0.5em 0; }

.wp-caption {
  background: var(--bg-secondary);
  border: 1px solid var(--light-gray);
  max-width: 100%;
  padding: var(--space-sm);
  text-align: center;
  border-radius: var(--radius-md);
}
.wp-caption img { margin: 0 auto; }
.wp-caption p.wp-caption-text {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: var(--space-sm) 0 0;
}

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

.screen-reader-text:focus {
  background-color: var(--bg-primary);
  clip: auto !important;
  clip-path: none;
  color: var(--electric-blue);
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* ==========================================================================
   Post / Page Content (Blog posts etc)
   ========================================================================== */
.entry-content > *,
.entry-summary > * {
  margin-bottom: var(--space-md);
}

.entry-content p,
.entry-summary p {
  margin-bottom: var(--space-md);
}

.entry-content ul,
.entry-content ol,
.entry-summary ul,
.entry-summary ol {
  list-style: revert;
  padding-left: var(--space-xl);
  margin-bottom: var(--space-md);
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
}

.entry-content blockquote {
  border-left: 4px solid var(--electric-blue);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-xl) 0;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.125rem;
}

.entry-content img {
  border-radius: var(--radius-md);
}
