/* ==========================================================================
   ISOPREP Design System
   Pixel-matched from Next.js Continental Hotel design
   ========================================================================== */

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

/* ---------- CSS Custom Properties ---------- */
:root {
  --bg-primary: #050505;
  --bg-secondary: #0a0a0a;
  --bg-elevated: #141414;
  --gold: #c9985f;
  --gold-light: #d4a96a;
  --text-primary: #d4d4d4;
  --text-heading: #f5f5f5;
  --text-secondary: #999999;
  --border: #1a1a1a;
  --accent-red: #b33a1a;
  --status-success: #2d7a3a;
  --status-warning: #b8860b;
  --status-info: #4a7a8c;

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --max-width: 1152px;
  --max-width-prose: 42rem;
  --radius: 2px;
}

/* ---------- Base ---------- */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--gold-light);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--text-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h4, h5, h6 {
  color: var(--text-heading);
  font-weight: 500;
}

h1 { font-size: 3rem; line-height: 1.15; }
h2 { font-size: 2.25rem; line-height: 1.2; }
h3 { font-size: 1.75rem; line-height: 1.3; }
h4 { font-size: 1.375rem; line-height: 1.4; }
h5 { font-size: 1.125rem; line-height: 1.4; }
h6 { font-size: 1rem; line-height: 1.4; }

/* ---------- Layout ---------- */
.site-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: 5rem 0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(5, 5, 5, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
  padding: 0 1.5rem;
}

.site-logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold);
  text-decoration: none;
}

.site-logo:hover {
  color: var(--gold);
}

/* Desktop navigation */
.primary-nav {
  display: none;
  gap: 2rem;
  list-style: none;
}

.primary-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current-menu-ancestor > a,
.primary-nav .current-cat > a {
  color: var(--gold);
}

/* Hamburger button */
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.menu-toggle svg {
  width: 20px;
  height: 14px;
  color: var(--text-primary);
}

.menu-toggle line {
  stroke: currentColor;
  stroke-width: 1.5;
}

/* Mobile nav overlay */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 4rem 0 0 0;
  z-index: 40;
  background: rgba(20, 20, 20, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(201, 152, 95, 0.2);
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav ul {
  list-style: none;
  padding: 0 1.5rem;
}

.mobile-nav a {
  display: block;
  padding: 1rem 0;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-heading);
  border-bottom: 1px solid rgba(26, 26, 26, 0.5);
  text-decoration: none;
}

.mobile-nav a:hover,
.mobile-nav .current-menu-item > a {
  color: var(--gold);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, var(--bg-primary), var(--bg-primary), var(--bg-secondary));
}

.hero-content {
  position: relative;
  max-width: 56rem;
  margin: 0 auto;
  padding: 6rem 1rem;
  text-align: center;
}

.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--gold);
}

.hero h1 {
  margin-top: 1.5rem;
  font-size: 2.5rem;
  line-height: 1.1;
}

.hero-description {
  max-width: 36rem;
  margin: 1.5rem auto 0;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 2.5rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  padding: 0.75rem 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
  border: none;
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--gold), 0 0 0 4px var(--bg-primary);
}

.btn-primary {
  background: var(--gold);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: var(--gold-light);
  color: var(--bg-primary);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
}

.btn-secondary:hover {
  background: var(--gold);
  color: var(--bg-primary);
}

.btn-icon {
  margin-left: 0.5rem;
  width: 0.875rem;
  height: 0.875rem;
}

/* ---------- Section Headings ---------- */
.section-heading {
  margin-bottom: 2.5rem;
}

.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold);
}

.section-heading h2 {
  margin-top: 0.5rem;
}

.section-description {
  margin-top: 0.75rem;
  max-width: 42rem;
  color: var(--text-secondary);
}

/* ---------- Card Grid ---------- */
.card-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

/* ---------- Content Card (articles) ---------- */
.content-card {
  display: block;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s ease;
  text-decoration: none;
  color: inherit;
}

.content-card:hover {
  border-color: rgba(201, 152, 95, 0.4);
  color: inherit;
}

.content-card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-elevated);
}

.content-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.content-card:hover .content-card-image img {
  transform: scale(1.02);
}

.content-card-body {
  padding: 1.25rem;
}

.content-card-date {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.content-card-body h3 {
  margin-top: 0.5rem;
  font-size: 1.125rem;
  line-height: 1.35;
}

.content-card-excerpt {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.content-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.content-card-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

/* ---------- Product Card ---------- */
.product-card {
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.product-card:hover {
  border-color: rgba(201, 152, 95, 0.4);
}

.product-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.product-card-image {
  aspect-ratio: 4 / 3;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 1rem;
}

.product-card-image img {
  max-height: 100%;
  object-fit: contain;
}

.product-card-body {
  padding: 1.25rem;
}

.product-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.product-card-brand {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.product-card-name {
  margin-top: 0.25rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-heading);
  line-height: 1.35;
  font-family: var(--font-body);
  letter-spacing: 0;
}

.product-card-summary {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-pricing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
}

.product-card-price {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  color: var(--text-heading);
}

.product-card-rating {
  font-size: 0.875rem;
  color: var(--gold);
}

.product-card-cta {
  margin-top: 1rem;
}

.product-card-cta .btn {
  width: 100%;
}

/* ---------- Tier Badge ---------- */
.tier-badge {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius);
  border: 1px solid;
  padding: 0.125rem 0.5rem;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.tier-budget {
  border-color: var(--text-secondary);
  color: var(--text-secondary);
}

.tier-mid {
  border-color: var(--status-info);
  color: var(--status-info);
}

.tier-premium {
  border-color: var(--gold);
  color: var(--gold);
}

.tier-milspec {
  border-color: var(--accent-red);
  color: var(--accent-red);
}

/* ---------- Affiliate Disclosure ---------- */
.affiliate-disclosure {
  border-left: 2px solid rgba(201, 152, 95, 0.3);
  background: var(--bg-secondary);
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.affiliate-disclosure strong {
  color: var(--text-primary);
}

/* ---------- Product Info Card (single article) ---------- */
.product-info-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.product-info-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.product-info-image {
  flex-shrink: 0;
  width: 5rem;
  height: 5rem;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.5rem;
}

.product-info-image img {
  max-height: 100%;
  object-fit: contain;
}

.product-info-details {
  flex: 1;
}

.product-info-brand {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.product-info-name {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-heading);
}

.product-info-price {
  font-family: var(--font-mono);
  color: var(--gold);
}

/* ---------- Spec Table ---------- */
.spec-table {
  width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.spec-table-title {
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.spec-table table {
  width: 100%;
  font-size: 0.875rem;
  border-collapse: collapse;
}

.spec-table td {
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border);
}

.spec-table td:first-child {
  color: var(--text-secondary);
  white-space: nowrap;
  padding-right: 1rem;
}

.spec-table td:last-child {
  font-family: var(--font-mono);
  color: var(--text-primary);
}

/* ---------- Newsletter / Briefing CTA ---------- */
.briefing-cta {
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}

.briefing-cta-inner {
  max-width: 42rem;
  margin: 0 auto;
  padding: 5rem 1rem;
  text-align: center;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-primary);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold);
}

.footer-tagline {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.footer-nav-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-heading);
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
  list-style: none;
}

.footer-nav a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--gold);
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.footer-disclaimer {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.footer-copyright {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ---------- Article Layouts ---------- */
.article-header {
  margin-bottom: 2.5rem;
}

.article-eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold);
}

.article-header h1 {
  margin-top: 0.75rem;
}

.article-description {
  margin-top: 0.75rem;
  color: var(--text-secondary);
}

.article-date {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ---------- Archive / Category Page ---------- */
.archive-header {
  padding: 4rem 0 2rem;
}

/* ---------- 404 ---------- */
.error-404 {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 4rem 1rem;
}

.error-404-code {
  font-family: var(--font-mono);
  font-size: 6rem;
  color: var(--border);
  line-height: 1;
}

.error-404 h1 {
  margin-top: 1rem;
  font-size: 2rem;
}

.error-404 p {
  margin-top: 0.75rem;
  color: var(--text-secondary);
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 3rem 0;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s ease;
}

.pagination a:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.pagination .current {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg-primary);
}

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }

  .primary-nav {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero-actions {
    flex-direction: row;
    justify-content: center;
  }
}

@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero h1 {
    font-size: 3.75rem;
  }
}

/* Mobile responsive typography */
@media (max-width: 640px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.375rem; }
}

/* ---------- WordPress-specific overrides ---------- */
.wp-block-image img {
  border-radius: var(--radius);
}

.aligncenter {
  display: block;
  margin: 0 auto;
}

.alignleft {
  float: left;
  margin-right: 1.5rem;
  margin-bottom: 1rem;
}

.alignright {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute;
  height: 1px;
  width: 1px;
  overflow: hidden;
}
