/*
Theme Name: The Peer Review
Theme URI: https://thepeerreview.ca
Author: The Peer Review
Description: Custom editorial theme for The Peer Review — non-toxic lifestyle product reviews.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: thepeerreview
*/

:root {
  --black: #000000;
  --white: #ffffff;
  --sage: #c6ddd4;
  --forest: #77868d;
  --beige: #d9d3c9;
  --dusty: #a4b6bc;
  --gray-200: #e5e5e5;
  --gray-400: #a3a3a3;
  --gray-500: #737373;
  --gray-600: #525252;
  --max-width: 1152px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--black);
  background: var(--white);
  line-height: 1.5;
}

h1 {
  font-family: 'Times New Roman', Times, serif;
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
  color: var(--forest);
}

h2, h3, .serif {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
  color: var(--forest);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Top bar */
.top-bar {
  background: var(--black);
  color: var(--gray-400);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  padding: 8px 16px;
}

/* Header */
.site-header {
  border-bottom: 2px solid var(--black);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  padding-bottom: 24px;
  gap: 24px;
}
.site-logo img { height: 160px; width: auto; }
.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  flex-wrap: wrap;
}
.main-nav a:hover { color: var(--forest); }
.btn {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 20px;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn-sage { background: var(--sage); color: var(--black); }
.btn-sage:hover { background: var(--black); color: var(--white); }
.btn-dark { background: var(--black); color: var(--white); padding: 12px 24px; }
.btn-dark:hover { background: var(--forest); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: end;
  padding: 56px 0 64px;
  border-bottom: 1px solid var(--gray-200);
}
@media (min-width: 900px) {
  .hero { grid-template-columns: 8fr 4fr; }
}
.hero-badge {
  display: inline-block;
  background: var(--sage);
  color: var(--black);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  margin-bottom: 12px;
}
.hero h1 { font-size: 44px; }
@media (min-width: 900px) { .hero h1 { font-size: 56px; } }
.hero-sub {
  font-size: 20px;
  color: var(--gray-600);
  border-left: 2px solid var(--black);
  padding-left: 16px;
  margin: 0 0 20px;
}
@media (min-width: 900px) {
  .hero-sub { font-size: 23px; }
}

/* Featured grid */
.featured-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding: 64px 0;
}
@media (min-width: 900px) {
  .featured-grid { grid-template-columns: repeat(3, 1fr); }
  .featured-grid .featured-main { grid-column: span 2; grid-row: span 2; }
}
/*
 * Fixed-ratio image crop, used anywhere a photo needs to be a guaranteed
 * uniform size no matter its original dimensions (featured cards, post
 * cards). Uses the classic percentage-padding technique rather than the
 * CSS aspect-ratio property, since aspect-ratio did not reliably size
 * WordPress's own <img> tags (which carry width/height/srcset attributes)
 * inside a CSS Grid — this padding-based approach is more universally
 * dependable.
 */
.card-img-wrap { display: block; position: relative; width: 100%; padding-top: 75%; overflow: hidden; }
.card-img-wrap img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.card-eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--forest);
  margin-top: 16px;
}
.featured-main h2 { font-size: 30px; margin-top: 8px; }
.featured-grid article h3 { font-size: 18px; margin-top: 4px; }
.card-excerpt { color: var(--gray-600); margin-top: 12px; }
.card-link { display: inline-block; margin-top: 12px; font-size: 14px; font-weight: 700; text-decoration: underline; }

/* Method section */
.method-section { background: var(--black); color: var(--white); padding: 64px 0; }
.method-section h2 { font-size: 30px; margin-bottom: 40px; color: var(--dusty); }
.method-grid { display: grid; grid-template-columns: 1fr; gap: 40px; }
@media (min-width: 640px) { .method-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .method-grid { grid-template-columns: repeat(4, 1fr); } }
.method-num { font-family: 'Times New Roman', Times, serif; font-size: 36px; font-weight: 700; color: var(--sage); }
.method-grid > div:nth-child(1) .method-num { color: var(--sage); }
.method-grid > div:nth-child(2) .method-num { color: var(--beige); }
.method-grid > div:nth-child(3) .method-num { color: var(--dusty); }
.method-grid > div:nth-child(4) .method-num { color: var(--forest); }
.method-grid h3 { font-size: 16px; margin-top: 12px; color: var(--white); }
.method-grid p { font-size: 14px; color: var(--gray-400); margin-top: 8px; }

/* Category archive grid */
.archive-section { padding: 64px 0; }
.archive-section h2 { font-size: 24px; margin-bottom: 32px; }
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--gray-200);
  border-left: 1px solid var(--gray-200);
}
@media (min-width: 700px) { .category-grid { grid-template-columns: repeat(6, 1fr); } }
.category-grid a {
  border-right: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  padding: 24px;
  text-align: left;
  transition: background 0.15s;
}
.category-grid a:hover { background: rgba(198, 221, 212, 0.35); }
.category-grid img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}
.category-grid p { font-weight: 700; margin-top: 8px; font-size: 14px; }

/* Post cards (category archive listing) */
.post-grid { display: grid; grid-template-columns: 1fr; gap: 40px; padding: 48px 0; }
@media (min-width: 700px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }
.post-card h3 { font-size: 18px; margin-top: 12px; }

/* Single review */
.single-hero { padding: 48px 0 24px; border-bottom: 1px solid var(--gray-200); }
.single-hero .card-eyebrow { margin-top: 0; }
.single-hero h1 { font-size: 36px; margin-top: 8px; }
@media (min-width: 900px) { .single-hero h1 { font-size: 44px; } }
.single-featured-img-wrap { display: block; position: relative; width: 100%; padding-top: 56.25%; overflow: hidden; margin: 32px 0; }
.single-featured-img-wrap img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.disclosure-banner {
  background: var(--sage);
  color: var(--black);
  font-size: 13px;
  padding: 14px 20px;
  margin: 24px 0;
  border-left: 4px solid var(--forest);
}
.entry-content { max-width: 760px; margin: 0 auto; padding-bottom: 64px; font-size: 17px; line-height: 1.7; }
.entry-content h2 { font-size: 26px; margin-top: 40px; margin-bottom: 12px; }
.entry-content h3 { font-size: 20px; margin-top: 28px; margin-bottom: 10px; }
.entry-content img { margin: 24px 0; }
.entry-content p { margin: 0 0 16px; }
.entry-content a { text-decoration: underline; color: var(--forest); }

/* Footer */
.site-footer { border-top: 2px solid var(--black); padding: 40px 0; }
.site-footer p { font-size: 12px; color: var(--gray-500); line-height: 1.6; margin: 0 0 8px; }
.site-footer strong { color: var(--gray-600); }

/* Newsletter */
.newsletter-section { padding: 24px 0 8px; }
