/*
 * Base Styles
 * Reset styles, typography, and fundamental element styling
 */

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-ui);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: var(--transition);
}

/* Typography - NYT Style */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headline);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
}

h1 { 
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
}
h2 { 
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
}
h3 { 
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 600;
  line-height: 1.3;
}
h4 { 
  font-size: 1.25rem;
  font-weight: 600;
}
h5 { 
  font-size: 1.125rem;
  font-weight: 600;
}
h6 { 
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

p {
  margin-bottom: var(--spacing-md);
  line-height: 1.7;
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

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

/* Font Consistency Override - Ensure all headings use Playfair Display */
h1, h2, h3, h4, h5, h6,
.post-title,
.hero-post .post-title,
.article-title,
.nyt-headline,
.nyt-hero-headline,
.nyt-section-title,
.nyt-article-headline,
.nyt-archive-title,
.nyt-archive-headline,
.nyt-archive-featured-headline,
.nyt-related-headline,
.nyt-recent-headline,
.nyt-popular-headline,
.entry-title,
.widget-title,
.sidebar-post h4,
.site-title,
.page-title,
.category-title,
.archive-title {
  font-family: var(--font-headline) !important;
}

/* Ensure article content uses body font */
.post-content,
.post-excerpt,
.article-content,
.nyt-article-body,
.entry-content,
.comment-content {
  font-family: var(--font-body) !important;
}

/* UI elements use UI font */
.post-meta,
.article-meta,
.nyt-article-meta,
.nyt-hero-meta,
.author-info,
.category-link,
.nav-menu,
.nyt-nav-menu,
.button,
.btn,
input,
textarea,
select {
  font-family: var(--font-ui) !important;
}

/* Global Font Updates */
body {
  font-family: var(--font-ui);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headline);
}

/* Update existing classes to use new fonts */
.site-logo {
  font-family: var(--font-headline);
}

.nav-menu {
  font-family: var(--font-ui);
}

.post-title,
.hero-post .post-title,
.article-title {
  font-family: var(--font-headline);
}

.post-content,
.post-excerpt,
.article-content {
  font-family: var(--font-body);
}
