/*
Theme Name: PopPunks
Theme URI: https://poppunks.com
Author: PopPunks
Description: Custom theme for PopPunks — alternative music news. Modern, minimal, editorial.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: poppunks
Tags: news, music, editorial, minimal, responsive
*/

/* ============================================================
   TABLE OF CONTENTS
   1. Variables
   2. Reset & Base
   3. Typography
   4. Layout Utilities
   5. Skip Link & Accessibility
   6. Header
   7. Mobile Menu
   8. Homepage — Featured Story
   9. Homepage — Latest & Grid
   10. Homepage — Trending
   11. Post Cards
   12. Single Article
   13. Archive / Category
   14. Static Page
   15. 404 & Search
   16. Footer
   17. Widgets
   18. Pagination
   19. WordPress Core Classes
   20. Responsive Overrides
   ============================================================ */


/* ============================================================
   1. VARIABLES
   ============================================================ */

:root {
  /* Colors */
  --black:      #000000;
  --white:      #ffffff;
  --bg:         #f7f7f7;
  --text:       #111111;
  --text-muted: #666666;
  --border:     #e2e2e2;
  --card-bg:    #ffffff;
  --accent:     #c8001a;   /* deep red — used sparingly */

  /* Type */
  --font-display: 'Barlow Condensed', system-ui, sans-serif;
  --font-body:    system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;

  /* Layout */
  --max-w:     1240px;
  --content-w: 740px;
  --gutter:    1.25rem;
  --header-h:  56px;
  --logo-h:    32px;

  /* Motion */
  --ease:   cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 0.15s;
  --t-med:  0.25s;
  --t-slow: 0.4s;

  /* Shadows */
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.07);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.14);
}


/* ============================================================
   2. RESET & BASE
   ============================================================ */

*, *::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(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.menu-open {
  overflow: hidden;
}

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

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

ul, ol {
  list-style: none;
}

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

input, textarea, select {
  font: inherit;
}

table {
  border-collapse: collapse;
  width: 100%;
}


/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

p {
  margin-bottom: 1.4em;
}

p:last-child {
  margin-bottom: 0;
}

strong, b {
  font-weight: 700;
}

em, i {
  font-style: italic;
}

small {
  font-size: 0.8125rem;
}

abbr[title] {
  text-decoration: underline dotted;
  cursor: help;
}


/* ============================================================
   4. LAYOUT UTILITIES
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.content-container {
  width: 100%;
  max-width: var(--content-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.site-main {
  min-height: 60vh;
  padding-bottom: 4rem;
}

/* Visually hidden but accessible */
.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;
}

.desktop-only {
  display: none;
}

.mobile-only {
  display: flex;
}


/* ============================================================
   5. SKIP LINK & ACCESSIBILITY
   ============================================================ */

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.5rem 1.25rem;
  background: var(--black);
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 9999;
  border-radius: 0 0 4px 4px;
  transition: top var(--t-fast) var(--ease);
}

.skip-link:focus {
  top: 0;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Global focus style — clear, not obnoxious */
:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

/* Remove focus ring for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}


/* ============================================================
   6. HEADER
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--black);
  height: var(--header-h);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  gap: 1rem;
}

/* Logo */
.header-logo {
  flex-shrink: 0;
  /* Mobile: logo will be centered via absolute positioning trick */
}

.header-logo a {
  display: flex;
  align-items: center;
  transition: opacity var(--t-fast) var(--ease);
}

.header-logo a:hover,
.header-logo a:focus-visible {
  opacity: 0.75;
  outline-color: var(--white);
}

.header-logo img,
.header-logo .custom-logo {
  height: var(--logo-h);
  width: auto;
  display: block;
  transition: height 0.2s ease;
}

.site-name {
  font-family: var(--font-display);
  font-size: calc(var(--logo-h) * 0.625);
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Desktop nav (hidden on mobile) */
.header-nav {
  flex: 1;
  padding-left: 2rem;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
}

.nav-list li a {
  display: block;
  padding: 0.5rem 1rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.02em;
  transition: color var(--t-fast) var(--ease);
  position: relative;
}

.nav-list li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 1px;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-med) var(--ease);
}

.nav-list li a:hover,
.nav-list li.current-menu-item a {
  color: var(--white);
}

.nav-list li a:hover::after,
.nav-list li.current-menu-item a::after {
  transform: scaleX(1);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Desktop merch button */
.header-merch-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1.125rem;
  background: var(--header-merch-color, #dc0000);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: opacity var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease);
}

.header-merch-btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.header-merch-btn:active {
  transform: scale(0.97);
  opacity: 1;
}

.header-merch-btn:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  color: var(--white);
  border-radius: 4px;
  transition: background var(--t-fast) var(--ease);
}

.hamburger:hover,
.hamburger:focus-visible {
  background: rgba(255,255,255,0.1);
  outline-color: var(--white);
}

.hamburger-line {
  display: block;
  width: 20px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transform-origin: center;
  transition: transform var(--t-med) var(--ease),
              opacity var(--t-med) var(--ease),
              top var(--t-med) var(--ease);
}

/* Hamburger → X when menu is open */
.hamburger.is-active .hamburger-line:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.hamburger.is-active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.is-active .hamburger-line:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}


/* ============================================================
   7. MOBILE MENU
   ============================================================ */

/* Overlay */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  z-index: 299;
  transition: opacity var(--t-slow) var(--ease);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.menu-overlay.is-visible {
  opacity: 1;
  pointer-events: all;
}

/* Menu panel */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 88%;
  max-width: 380px;
  background: var(--black);
  color: var(--white);
  z-index: 300;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  transform: translateX(100%);
  transition: transform var(--t-slow) cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.mobile-menu.is-open {
  transform: translateX(0);
}

/* Menu header (close button row) */
.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.mobile-menu-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: rgba(255,255,255,0.7);
  border-radius: 50%;
  transition: color var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease);
}

.mobile-menu-close:hover,
.mobile-menu-close:focus-visible {
  color: var(--white);
  background: rgba(255,255,255,0.1);
  outline-color: rgba(255,255,255,0.5);
}

/* Mobile nav list */
.mobile-nav {
  padding: 1.5rem 0;
  flex: 1;
}

.mobile-nav-list {
  list-style: none;
}

.mobile-nav-list li a {
  display: block;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.01em;
  line-height: 1;
  transition: color var(--t-fast) var(--ease),
              padding-left var(--t-fast) var(--ease);
}

.mobile-nav-list li a:hover,
.mobile-nav-list li.current-menu-item a {
  color: var(--white);
  padding-left: 2.25rem;
}

.mobile-nav-list li a:focus-visible {
  outline-color: rgba(255,255,255,0.5);
  outline-offset: -2px;
}

/* Merch section at bottom of mobile menu */
.mobile-merch {
  padding: 1.5rem 1.75rem 2rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.merch-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.9rem 1.25rem;
  margin-bottom: 1.25rem;
  background: var(--white);
  color: var(--black);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease);
  active-transform: scale(0.98);
}

.merch-button:hover {
  background: rgba(255,255,255,0.9);
  transform: translateY(-1px);
}

.merch-button:active {
  transform: scale(0.98);
}

.merch-button:focus-visible {
  outline-color: var(--white);
}

/* Product promo images */
.merch-products {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.merch-product {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(255,255,255,0.05);
  transition: opacity var(--t-fast) var(--ease),
              transform var(--t-med) var(--ease);
}

.merch-product img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}

.merch-product:hover img,
.merch-product:focus-visible img {
  transform: scale(1.04);
}

.merch-product:hover,
.merch-product:active {
  opacity: 0.88;
}


/* ============================================================
   8. FEATURED STORY
   ============================================================ */

.featured-story {
  background: var(--white);
  padding: 2rem 0;
}

.featured-inner {
  display: block;
  color: inherit;
  position: relative;
}

.featured-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--border);
  margin-bottom: 1.25rem;
}

.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease),
              opacity var(--t-slow) var(--ease);
}

.featured-inner:hover .featured-image img {
  transform: scale(1.025);
  opacity: 0.95;
}

.featured-content {
  padding: 0;
}

.featured-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--accent);
  padding: 0.25rem 0.625rem;
  margin-bottom: 0.625rem;
}

.featured-category {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.625rem;
}

.featured-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 0.875rem;
  transition: color var(--t-fast) var(--ease);
}

.featured-inner:hover .featured-title {
  color: var(--accent);
}

/* Accessible card link overlay */
.featured-title a {
  color: inherit;
}

.featured-title a::after {
  content: '';
  position: absolute;
  inset: 0;
}

.featured-excerpt {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}


/* ============================================================
   9. HOMEPAGE — LATEST & GRID
   ============================================================ */

.section-latest,
.section-trending {
  padding: 3rem 0;
}

.section-latest {
  background: var(--bg);
}

.section-trending {
  background: var(--white);
}

.section-title {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--black);
  margin-bottom: 2rem;
}

/* Posts grid — mobile: 1 col, tablet: 2 col, desktop: 3 col */
.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}


/* ============================================================
   10. HOMEPAGE — TRENDING
   ============================================================ */

.trending-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.trending-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.trending-item:last-child {
  border-bottom: none;
}

.trending-number {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--border);
  line-height: 1;
  min-width: 2.5rem;
  flex-shrink: 0;
  transition: color var(--t-fast) var(--ease);
}

.trending-item:hover .trending-number {
  color: var(--accent);
}

.trending-thumb {
  display: block;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--border);
  position: relative;
}

.trending-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-med) var(--ease);
}

.trending-item:hover .trending-thumb img {
  transform: scale(1.04);
}

.trending-info {
  flex: 1;
  min-width: 0;
}

.trending-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.4rem;
  transition: color var(--t-fast) var(--ease);
}

.trending-title a {
  color: inherit;
}

/* Full item clickable via link overlay */
.trending-title a::after {
  content: '';
  position: absolute;
  inset: 0;
}

.trending-item:hover .trending-title {
  color: var(--accent);
}

.trending-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.meta-sep {
  color: var(--border);
}


/* ============================================================
   11. POST CARDS
   ============================================================ */

.post-card {
  background: var(--card-bg);
  position: relative;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--t-med) var(--ease),
              transform var(--t-med) var(--ease);
}

.post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.post-card:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  color: inherit;
}

.card-image {
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--border);
  flex-shrink: 0;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease),
              opacity var(--t-slow) var(--ease);
}

.post-card:hover .card-image img {
  transform: scale(1.04);
  opacity: 0.92;
}

.card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.375rem;
}

.card-category {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  transition: color var(--t-fast) var(--ease);
}

.post-card:hover .card-title {
  color: var(--accent);
}

/* Accessible overlay link */
.card-title a {
  color: inherit;
}

.card-title a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: auto;
  padding-top: 0.25rem;
}


/* ============================================================
   12. SINGLE ARTICLE
   ============================================================ */

.single-article {
  background: var(--white);
}

.article-header {
  padding: 2.5rem 0 1.5rem;
  background: var(--white);
}

.article-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.article-category {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  transition: color var(--t-fast) var(--ease);
}

.article-category:hover {
  color: var(--black);
}

.article-title {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

/* Featured image — full bleed */
.article-featured-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--border);
  margin-bottom: 2.5rem;
}

.article-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Article body */
.article-body {
  padding-bottom: 3rem;
}

.article-content {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text);
}

/* Article content rich text */
.article-content h2 {
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 0.875rem;
}

.article-content h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.article-content h4 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 1.75rem;
  margin-bottom: 0.625rem;
}

.article-content p {
  margin-bottom: 1.5em;
}

.article-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color var(--t-fast) var(--ease);
}

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

.article-content ul,
.article-content ol {
  margin-bottom: 1.5em;
  padding-left: 1.5rem;
}

.article-content ul {
  list-style: disc;
}

.article-content ol {
  list-style: decimal;
}

.article-content li {
  margin-bottom: 0.5em;
}

.article-content blockquote {
  border-left: 3px solid var(--black);
  padding-left: 1.25rem;
  margin: 2rem 0;
  font-size: 1.125rem;
  font-style: italic;
  color: var(--text-muted);
}

.article-content blockquote cite {
  display: block;
  font-size: 0.8125rem;
  font-style: normal;
  font-weight: 600;
  margin-top: 0.5rem;
  color: var(--text);
}

.article-content figure {
  margin: 2rem 0;
}

.article-content figcaption {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.article-content img {
  width: 100%;
  height: auto;
}

.article-content .wp-block-embed,
.article-content .wp-block-video {
  margin: 2rem 0;
}

.article-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

.article-content pre {
  background: var(--bg);
  padding: 1.25rem;
  overflow-x: auto;
  font-size: 0.875rem;
  margin-bottom: 1.5em;
}

.article-content code {
  background: var(--bg);
  padding: 0.15em 0.4em;
  font-size: 0.875em;
  border-radius: 2px;
}

.article-content pre code {
  background: none;
  padding: 0;
}

/* Page links (multi-page posts) */
.page-links {
  margin-top: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
}


/* ============================================================
   13. ARCHIVE / CATEGORY
   ============================================================ */

.archive-header {
  background: var(--white);
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.archive-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.archive-title span {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  font-family: var(--font-body);
}

.archive-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  max-width: 48rem;
}


/* ============================================================
   14. STATIC PAGE
   ============================================================ */

.page-header {
  background: var(--white);
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.page-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.1;
}

.page-content {
  font-size: 1.0625rem;
  line-height: 1.75;
  padding-bottom: 4rem;
}

.page-content h2 {
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.page-content p {
  margin-bottom: 1.4em;
}

.page-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.page-content ul,
.page-content ol {
  margin-bottom: 1.4em;
  padding-left: 1.5rem;
}

.page-content ul { list-style: disc; }
.page-content ol { list-style: decimal; }

.page-content li { margin-bottom: 0.4em; }


/* ============================================================
   15. 404 & SEARCH
   ============================================================ */

.error-404,
.search-page {
  padding: 4rem 0;
  text-align: center;
}

.error-title,
.search-title {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.error-number {
  font-size: 6rem;
  line-height: 1;
  color: var(--border);
  display: block;
  margin-bottom: 0.5rem;
}

.error-message,
.search-message {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.search-form-wrap {
  max-width: 480px;
  margin: 0 auto;
}

.search-form-wrap .search-form {
  display: flex;
  gap: 0;
  border: 2px solid var(--black);
}

.search-form-wrap .search-field {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  background: var(--white);
  font-size: 1rem;
}

.search-form-wrap .search-field:focus {
  outline: none;
}

.search-form-wrap .search-submit {
  padding: 0.75rem 1.25rem;
  background: var(--black);
  color: var(--white);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}

.search-form-wrap .search-submit:hover {
  background: var(--accent);
}

.no-content {
  color: var(--text-muted);
  font-size: 0.9375rem;
  padding: 2rem 0;
}

.search-results-header {
  margin-bottom: 2rem;
}

.search-results-header h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
}

.search-results-header p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-top: 0.375rem;
}


/* ============================================================
   16. FOOTER
   ============================================================ */

.site-footer {
  background: var(--black);
  color: rgba(255,255,255,0.7);
  margin-top: auto;
}

/* 3-column footer layout */
.footer-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding: 3rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-col--text {}   /* no extra styles needed */

.footer-col--nav {}

.footer-col--social {}

/* Default / hint text */
.footer-default-text {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.65;
  margin: 0;
}

.footer-hint {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.25);
  font-style: italic;
  margin: 0;
}

/* Footer nav */
.footer-nav-list {
  list-style: none;
}

.footer-nav-list li a {
  display: block;
  padding: 0.35rem 0;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.55);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: color var(--t-fast) var(--ease),
              padding-left var(--t-fast) var(--ease);
}

.footer-nav-list li:last-child a {
  border-bottom: none;
}

.footer-nav-list li a:hover {
  color: var(--white);
  padding-left: 0.375rem;
}

/* Social icons */
.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: rgba(255,255,255,0.45);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  transition: color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease);
}

.footer-social-link:hover,
.footer-social-link:focus-visible {
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.06);
  transform: translateY(-2px);
  outline-color: rgba(255,255,255,0.5);
}

.footer-social-link:active {
  transform: scale(0.94);
}

/* Footer bottom bar */
.footer-bottom {
  padding: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-copy {
  font-size: 0.8125rem;
  margin: 0;
  color: rgba(255,255,255,0.4);
}

.footer-privacy {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.3);
  transition: color var(--t-fast) var(--ease);
}

.footer-privacy:hover {
  color: rgba(255,255,255,0.6);
}


/* ============================================================
   17. WIDGETS
   ============================================================ */

.widget {
  font-size: 0.9rem;
}

.widget-title {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  margin-bottom: 1rem;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.widget a {
  color: rgba(255,255,255,0.6);
  transition: color var(--t-fast) var(--ease);
}

.widget a:hover {
  color: var(--white);
}

.widget ul {
  list-style: none;
}

.widget ul li {
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.widget ul li:last-child {
  border-bottom: none;
}

.widget_search .search-form {
  display: flex;
  border: 1px solid rgba(255,255,255,0.2);
}

.widget_search .search-field {
  flex: 1;
  padding: 0.5rem 0.75rem;
  background: rgba(255,255,255,0.07);
  border: none;
  color: var(--white);
  font-size: 0.875rem;
}

.widget_search .search-field::placeholder {
  color: rgba(255,255,255,0.3);
}

.widget_search .search-field:focus {
  outline: none;
  background: rgba(255,255,255,0.12);
}

.widget_search .search-submit {
  padding: 0.5rem 0.875rem;
  background: rgba(255,255,255,0.15);
  color: var(--white);
  font-size: 0.8125rem;
  font-weight: 600;
  transition: background var(--t-fast) var(--ease);
}

.widget_search .search-submit:hover {
  background: rgba(255,255,255,0.25);
}

/* Footer nav (rendered inside default footer widget area) */
.footer-nav-list {
  list-style: none;
}

.footer-nav-list li a {
  display: block;
  padding: 0.3rem 0;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.55);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: color var(--t-fast) var(--ease), padding-left var(--t-fast) var(--ease);
}

.footer-nav-list li:last-child a {
  border-bottom: none;
}

.footer-nav-list li a:hover {
  color: var(--white);
  padding-left: 0.375rem;
}


/* ============================================================
   18. PAGINATION
   ============================================================ */

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.375rem;
  padding: 3rem 0 1rem;
}

.nav-links .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  color: var(--text);
  transition: all var(--t-fast) var(--ease);
}

.nav-links .page-numbers:hover {
  border-color: var(--black);
  background: var(--black);
  color: var(--white);
}

.nav-links .page-numbers.current {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.nav-links .page-numbers.dots {
  border-color: transparent;
  background: none;
}


/* ============================================================
   19. WORDPRESS CORE CLASSES
   ============================================================ */

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.alignleft {
  float: left;
  margin: 0.5rem 1.5rem 1rem 0;
}

.alignright {
  float: right;
  margin: 0.5rem 0 1rem 1.5rem;
}

.alignwide {
  margin-left: calc(-1 * var(--gutter));
  margin-right: calc(-1 * var(--gutter));
}

.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.375rem;
}

.sticky {
  /* WordPress sticky posts — no special styling needed */
}

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

/* WP block: embed */
.wp-block-embed__wrapper {
  position: relative;
  padding-top: 56.25%;
}

.wp-block-embed__wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}


/* ============================================================
   20. RESPONSIVE OVERRIDES
   ============================================================ */

/* ---- Tablet: 680px+ ---- */
@media (min-width: 680px) {
  :root {
    --header-h: 60px;
  }

  .posts-grid {
    grid-template-columns: 1fr 1fr;
  }

  .article-title {
    font-size: 2.75rem;
  }
}

/* ---- Tablet: 768px+ ---- */
@media (min-width: 768px) {
  :root {
    --gutter: 2rem;
  }

  /* Show desktop nav, hide hamburger */
  .desktop-only {
    display: flex;
  }

  .mobile-only {
    display: none;
  }

  /* Featured story: side by side */
  .featured-story {
    padding: 3rem 0;
  }

  .featured-inner {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 3rem;
    align-items: center;
  }

  .featured-image {
    aspect-ratio: 4 / 3;
    margin-bottom: 0;
  }

  .featured-title {
    font-size: 2.5rem;
  }

  /* Footer: 3 columns */
  .footer-columns {
    grid-template-columns: 1fr 1fr 1fr;
    align-items: start;
  }
}

/* ---- Desktop: 1024px+ ---- */
@media (min-width: 1024px) {
  :root {
    --header-h: 64px;
  }

  .posts-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .featured-title {
    font-size: 2.875rem;
  }

  .article-title {
    font-size: 3.25rem;
  }

  /* Trending: 2-column on large screens */
  .trending-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 3rem;
  }

  .trending-item {
    border-bottom: 1px solid var(--border);
  }

  /* Even last items in each column need bottom border removed */
  .trending-list .trending-item:nth-last-child(-n+2):nth-child(odd) ~ .trending-item,
  .trending-list .trending-item:last-child,
  .trending-list .trending-item:nth-last-child(2):nth-child(odd) {
    border-bottom: none;
  }
}

/* ---- Large desktop: 1280px+ ---- */
@media (min-width: 1280px) {
  :root {
    --gutter: 2.5rem;
  }

  .featured-title {
    font-size: 3.25rem;
  }
}

/* ============================================================
   21. SCROLL REVEAL (JS-driven, graceful degradation)
   ============================================================ */

.will-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

.will-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .mobile-menu {
    transition: none;
  }

  .will-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
