/*
Theme Name: TheVacuumHub
Theme URI: https://thevacuumhub.com
Author: TheVacuumHub
Description: Custom theme for TheVacuumHub, a family-run vacuum testing and review publication. Version 2 design system.
Version: 2.0.3
Requires PHP: 7.4
Text Domain: thevacuumhub
*/

/* =========================================================
   Design Tokens
   ========================================================= */
:root {
  /* Brand */
  --color-ink: #1B2430;
  --color-ink-soft: #4A5468;
  --color-text-muted: #6B7480;

  --color-bg: #FFFFFF;
  --color-bg-soft: #F4F6F9;
  --color-bg-soft-2: #ECF0F5;

  --color-blue: #3D6FE0;
  --color-blue-dark: #2C56B8;
  --color-blue-pale: #EAF0FD;

  --color-green: #2E9E64;
  --color-green-pale: #E7F6ED;

  /* The one loud colour, reserved for primary CTAs only */
  --color-cta: #E85D2C;
  --color-cta-dark: #C74B21;

  --color-border: #E2E6ED;

  /* Type */
  --font-heading: 'Manrope', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Shape */
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;

  --shadow-sm: 0 1px 3px rgba(27, 36, 48, 0.06);
  --shadow-md: 0 10px 30px rgba(27, 36, 48, 0.08);
  --shadow-lg: 0 24px 60px rgba(27, 36, 48, 0.14);

  --container-width: 1200px;
  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

ul { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-ink);
  letter-spacing: -0.01em;
}

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

.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-blue);
  margin-bottom: 14px;
}

.section {
  padding: 110px 0;
}

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

.section__header {
  max-width: 640px;
  margin-bottom: 56px;
}

.section__header h2 {
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  margin-bottom: 16px;
}

.section__lede {
  color: var(--color-text-muted);
  font-size: 1.08rem;
}

.grid {
  display: grid;
  gap: 28px;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 30px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}

.btn--cta {
  background: var(--color-cta);
  color: #fff;
}

.btn--cta:hover {
  background: var(--color-cta-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--ghost {
  background: transparent;
  color: var(--color-ink);
  border-color: var(--color-border);
}

.btn--ghost:hover {
  border-color: var(--color-ink);
  transform: translateY(-2px);
}

.btn--lg {
  padding: 18px 38px;
  font-size: 1.05rem;
}

.btn:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: 2px;
}

/* =========================================================
   Navigation
   ========================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.nav.is-scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  gap: 24px;
}

.nav__logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--color-ink);
}

.nav__logo span {
  color: var(--color-blue);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-left: auto;
}

.nav__links a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-ink-soft);
  transition: color var(--transition);
}

.nav__links a:hover {
  color: var(--color-blue);
}

.nav__cta {
  margin-left: 8px;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav__toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-ink);
  transition: transform var(--transition), opacity var(--transition);
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  padding: 88px 0 96px;
  background: linear-gradient(180deg, var(--color-blue-pale) 0%, var(--color-bg) 100%);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 56px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-ink-soft);
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.hero h1 {
  font-size: clamp(2.2rem, 4.2vw, 3.2rem);
  margin-bottom: 22px;
}

.hero__subtext {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  max-width: 540px;
  margin: 0 0 36px;
}

.hero__actions {
  display: flex;
  justify-content: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.hero__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* =========================================================
   Story / Trust section
   ========================================================= */
.story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.story__content h2 {
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  margin-bottom: 20px;
}

.story__content p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-bottom: 18px;
}

.story__content p:last-of-type {
  margin-bottom: 0;
}

.story__lens {
  display: grid;
  gap: 12px;
  margin: 24px 0 28px;
}

.story__lens li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--color-ink-soft);
  font-size: 0.98rem;
}

.story__lens li::before {
  content: "✓";
  color: var(--color-green);
  background: var(--color-green-pale);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  margin-top: 2px;
}

.story__quote {
  background: var(--color-bg-soft);
  border-left: 3px solid var(--color-blue);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 24px 28px;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--color-ink);
}

.story__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.story__stat {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
}

.story__stat strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.7rem;
  color: var(--color-blue);
  margin-bottom: 6px;
}

.story__stat span {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* =========================================================
   Lead Magnet (Checklist) Banner
   ========================================================= */
.checklist-banner {
  background: var(--color-ink);
  border-radius: var(--radius-lg);
  padding: 56px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
  color: #fff;
}

.checklist-banner__content .eyebrow {
  color: #9DB8FF;
}

.checklist-banner__content h2 {
  color: #fff;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  margin-bottom: 16px;
}

.checklist-banner__content p {
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 20px;
}

.checklist-banner__list {
  display: grid;
  gap: 10px;
  margin-bottom: 8px;
}

.checklist-banner__list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
}

.checklist-banner__list li::before {
  content: "✓";
  color: var(--color-green);
  background: rgba(46, 158, 100, 0.18);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  margin-top: 2px;
}

.checklist-banner__form {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  padding: 32px;
}

.checklist-banner__form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.85);
}

.checklist-banner__form input[type="email"] {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.checklist-banner__form .btn {
  width: 100%;
}

.checklist-banner__form .form-note {
  margin-top: 14px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

.checklist-banner__message {
  margin-top: 14px;
  font-size: 0.85rem;
  min-height: 1.2em;
}

/* Compact variant used mid-article / sidebar */
.checklist-banner--compact {
  grid-template-columns: 1fr;
  padding: 36px;
  background: var(--color-bg-soft);
  color: var(--color-ink);
}

.checklist-banner--compact .checklist-banner__content h2 {
  color: var(--color-ink);
  font-size: 1.3rem;
}

.checklist-banner--compact .checklist-banner__content p {
  color: var(--color-text-muted);
}

.checklist-banner--compact .checklist-banner__list li {
  color: var(--color-ink);
}

.checklist-banner--compact .checklist-banner__form {
  background: var(--color-bg);
  border-color: var(--color-border);
}

/* =========================================================
   Team / Authors
   ========================================================= */
.grid--team {
  grid-template-columns: repeat(2, 1fr);
}

.team-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 36px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.team-card__photo {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--color-bg-soft-2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--color-ink-soft);
  border: 1px dashed var(--color-border);
}

.team-card__photo--real {
  width: 140px;
  height: 140px;
  border: none;
  background: none;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.team-card__photo--real img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card__pending {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  display: block;
  margin-top: 4px;
}

.team-card h3 {
  font-size: 1.2rem;
  margin-bottom: 2px;
}

.team-card__role {
  color: var(--color-blue);
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 16px;
  display: block;
}

.team-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.team-card__quote {
  font-style: italic;
  color: var(--color-ink);
  font-size: 0.95rem;
  border-left: 3px solid var(--color-green);
  padding-left: 14px;
  margin-top: 18px;
}

/* =========================================================
   Category Cards
   ========================================================= */
.grid--categories {
  grid-template-columns: repeat(4, 1fr);
}

.category-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-blue);
}

.category-card__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--color-blue-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
}

.category-card h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.category-card p {
  color: var(--color-text-muted);
  font-size: 0.88rem;
}

/* =========================================================
   How We Test teaser
   ========================================================= */
.method {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.method-card {
  text-align: left;
  padding: 8px;
}

.method-card__num {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--color-blue);
  background: var(--color-blue-pale);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.method-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.method-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* =========================================================
   Latest Articles
   ========================================================= */
.grid--articles {
  grid-template-columns: repeat(3, 1fr);
}

.article-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.article-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.article-card__body {
  padding: 24px;
}

.article-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-blue);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.article-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  line-height: 1.35;
}

.article-card p {
  color: var(--color-text-muted);
  font-size: 0.92rem;
}

/* =========================================================
   Footer
   ========================================================= */
.footer {
  background: var(--color-ink);
  color: rgba(255, 255, 255, 0.85);
  padding-top: 72px;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer .nav__logo {
  color: #fff;
}

.footer__brand p {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  max-width: 280px;
}

.footer__col h4 {
  color: #fff;
  font-size: 0.92rem;
  margin-bottom: 18px;
}

.footer__col a {
  display: block;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
  margin-bottom: 13px;
  transition: color var(--transition);
}

.footer__col a:hover {
  color: #fff;
}

.footer__legal {
  padding: 24px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

/* =========================================================
   Article / Page Prose Content
   Everything rendered via the_content() lands in .page-content —
   the global reset zeroes margins and strips link styling site-wide
   (needed for nav/buttons/cards), so prose needs its own explicit
   typography rather than inheriting it.
   ========================================================= */
.page-content > *:first-child {
  margin-top: 0;
}

.page-content p {
  margin-bottom: 22px;
  font-size: 1.05rem;
  line-height: 1.75;
}

.page-content h2 {
  margin: 44px 0 18px;
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
}

.page-content h3 {
  margin: 34px 0 14px;
  font-size: 1.2rem;
}

.page-content ul,
.page-content ol {
  margin: 8px 0 24px;
  padding-left: 24px;
}

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

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

.page-content li {
  margin-bottom: 10px;
  font-size: 1.05rem;
  line-height: 1.65;
}

.page-content li > ul,
.page-content li > ol {
  margin-top: 10px;
  margin-bottom: 0;
}

.page-content a {
  color: var(--color-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}

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

.page-content strong {
  font-weight: 700;
}

.page-content blockquote {
  border-left: 3px solid var(--color-blue);
  padding-left: 20px;
  margin: 28px 0;
  color: var(--color-text-muted);
  font-style: italic;
  font-size: 1.05rem;
}

.page-content img {
  border-radius: var(--radius-md);
  margin: 28px 0;
}

/* =========================================================
   Scroll reveal (progressive enhancement, JS toggled)
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__subtext {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__media {
    max-width: 420px;
    margin: 0 auto;
    order: -1;
  }

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

  .story {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .checklist-banner {
    grid-template-columns: 1fr;
    padding: 40px;
  }

  .method {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .nav__links {
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background: var(--color-bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition), opacity var(--transition);
  }

  .nav__links.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav__cta { display: none; }
  .nav__toggle { display: flex; }

  .nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .section { padding: 72px 0; }

  .grid--categories,
  .grid--team,
  .grid--articles {
    grid-template-columns: 1fr;
  }

  .checklist-banner {
    padding: 28px;
  }

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

@media (max-width: 480px) {
  .footer__inner {
    grid-template-columns: 1fr;
  }
}
