/*
Theme Name: Expense Reduction Experts
Theme URI: https://expensereductionexperts.com
Author: Expense Reduction Experts
Description: Professional B2B affiliate referral services theme for helping companies reduce costs and increase revenue.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: ere
Tags: business, corporate, affiliate, services, professional, b2b
*/

/* ============================================================
   DESIGN TOKENS — matching your existing brand
   ============================================================ */
:root {
  --ink:     #172426;
  --muted:   #5d6b6d;
  --line:    #dce6e3;
  --paper:   #fbfbf7;
  --white:   #ffffff;
  --teal:    #0a7b75;
  --teal-dk: #085f5a;
  --teal-lt: #edf5f3;
  --green:   #6ea83e;
  --gold:    #d99838;
  --coral:   #c95b4d;
  --blue:    #2d6f9f;
  --shadow:  0 20px 60px rgba(23,36,38,0.14);
  --shadow-sm: 0 4px 18px rgba(23,36,38,0.08);

  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;

  --radius: 8px;
  --pad-x: clamp(20px, 5vw, 72px);
  --pad-section: clamp(46px, 7vw, 88px);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a    { color: inherit; text-decoration: none; }
img  { display: block; max-width: 100%; }
p    { margin-top: 0; }
ul, ol { margin: 0; padding-left: 20px; }
li + li { margin-top: 12px; }
h1, h2, h3, h4 { margin: 0 0 10px; line-height: 1.05; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.eyebrow {
  margin: 0 0 14px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ============================================================
   SITE HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px var(--pad-x);
  background: rgba(251,251,247,0.93);
  border-bottom: 1px solid rgba(220,230,227,0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}
.brand-mark {
  display: grid;
  width: 48px;
  height: 44px;
  place-items: center;
  color: var(--white);
  background: var(--teal);
  border-radius: var(--radius);
  letter-spacing: 0.04em;
  font-size: 0.88rem;
}
.brand-text { font-size: 0.98rem; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 0.95rem;
}
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  color: var(--white) !important;
  background: var(--ink);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-weight: 700;
  transition: background 0.18s;
}
.nav-cta:hover { background: var(--teal) !important; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  padding: 4px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.button, .btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 13px 22px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s, transform 0.12s;
  white-space: nowrap;
}
.button.primary, .btn-primary {
  color: var(--white);
  background: var(--teal);
}
.button.primary:hover, .btn-primary:hover {
  background: var(--teal-dk);
  box-shadow: 0 4px 18px rgba(10,123,117,0.28);
  transform: translateY(-1px);
}
.button.secondary, .btn-secondary {
  color: var(--ink);
  border-color: var(--line);
  background: var(--white);
}
.button.secondary:hover { border-color: var(--teal); color: var(--teal); }

/* ============================================================
   LAYOUT HELPERS
   ============================================================ */
.section-pad {
  padding: var(--pad-section) var(--pad-x);
}
.section-heading {
  display: grid;
  grid-template-columns: minmax(180px, 0.4fr) minmax(0, 1fr);
  gap: 30px;
  align-items: start;
  margin-bottom: 34px;
}
.section-heading.narrow {
  display: block;
  max-width: 780px;
  margin-bottom: 34px;
}
.section-heading h2,
.section-heading.narrow h2 {
  font-size: clamp(1.8rem, 3.45vw, 3.45rem);
  line-height: 1.06;
}
.section-heading p:last-child {
  max-width: 720px;
  color: var(--muted);
}

/* Cards base */
.card-base {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* ============================================================
   HERO
   ============================================================ */
.hero-section,
.page-hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  gap: clamp(32px, 5vw, 70px);
  align-items: center;
  min-height: calc(100vh - 82px);
  padding: clamp(42px, 7vw, 96px) var(--pad-x);
}
.hero-copy h1 {
  max-width: 820px;
  font-size: clamp(2.2rem, 5.25vw, 5.15rem);
  line-height: 1;
  letter-spacing: 0;
  margin-bottom: 0;
}
.hero-lede {
  max-width: 660px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.75vw, 1.2rem);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}
.metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}
.metric-row div {
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.metric-row strong {
  display: block;
  color: var(--teal);
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1;
}
.metric-row span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}
.hero-visual {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-visual img {
  width: 100%;
  min-height: 560px;
  object-fit: cover;
}

/* ============================================================
   PROBLEM BAND
   ============================================================ */
.problem-band {
  padding: var(--pad-section) var(--pad-x);
}
.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 18px;
}
.problem-grid article {
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.icon-dot {
  display: block;
  width: 16px;
  height: 16px;
  margin-bottom: 28px;
  background: var(--gold);
  border-radius: 999px;
}

/* ============================================================
   SERVICES SECTION
   ============================================================ */
.services-section {
  padding: var(--pad-section) var(--pad-x);
}
.service-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.service-grid {
  grid-template-columns: repeat(5, minmax(220px, 1fr));
}
.service-card {
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: box-shadow 0.2s, transform 0.2s;
}
.service-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.service-card a {
  display: inline-flex;
  margin-top: 12px;
  color: var(--teal);
  font-weight: 800;
}
.service-card a:hover { color: var(--teal-dk); }
.featured-service       { border-top: 5px solid var(--teal);  }
.service-card:nth-child(2) { border-top: 5px solid var(--blue);  }
.service-card:nth-child(3) { border-top: 5px solid var(--coral); }
.service-card:nth-child(4) { border-top: 5px solid var(--green); }
.service-card:nth-child(5) { border-top: 5px solid var(--gold);  }

/* Badge on cards */
.service-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  margin-bottom: 10px;
}

/* Affiliate CTA link */
.affiliate-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 10px 18px;
  background: var(--teal);
  color: var(--white);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 800;
  transition: background 0.18s;
  width: 100%;
  justify-content: center;
}
.affiliate-cta:hover { background: var(--teal-dk); }
.affiliate-cta:visited { color: var(--white); }

.service-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 8px 0;
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 700;
}
.service-price {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 6px;
}

/* ============================================================
   HOW IT WORKS / PROCESS
   ============================================================ */
.process-section {
  padding: var(--pad-section) var(--pad-x);
  background: var(--white);
}
.process-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 18px;
}
.process-steps article {
  padding: 24px;
  border-left: 4px solid var(--teal);
  background: #f7fbfa;
  border-radius: var(--radius);
}
.process-steps span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  margin-bottom: 20px;
  color: var(--white);
  background: var(--teal);
  border-radius: var(--radius);
  font-weight: 900;
}

/* ============================================================
   PROOF / DARK BAND
   ============================================================ */
.proof-section {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: 38px;
  align-items: center;
  padding: var(--pad-section) var(--pad-x);
  color: var(--white);
  background: var(--ink);
}
.proof-section .eyebrow { color: #85d0c6; }
.proof-copy p,
.proof-copy cite       { color: rgba(255,255,255,0.76); }
blockquote {
  margin: 28px 0 0;
  padding-left: 22px;
  border-left: 4px solid var(--gold);
  font-size: 1.25rem;
}
cite {
  display: block;
  margin-top: 14px;
  font-size: 0.95rem;
  font-style: normal;
}
.proof-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px;
}
.proof-stats div {
  padding: 26px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--radius);
}
.proof-stats strong {
  display: block;
  color: #85d0c6;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1;
}
.proof-stats span {
  display: block;
  margin-top: 8px;
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
}

/* ============================================================
   FIT SECTION
   ============================================================ */
.fit-section { padding: var(--pad-section) var(--pad-x); }
.fit-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 18px;
}
.fit-panel {
  padding: 30px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.fit-panel.accent {
  background: #f3f8f2;
  border-color: #cfdfc8;
}

/* ============================================================
   CTA BAND
   ============================================================ */
.cta-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: var(--pad-section) var(--pad-x);
  background: var(--teal-lt);
}
.cta-section div { max-width: 760px; }
.cta-section h2  { font-size: clamp(1.8rem, 3.45vw, 3.45rem); }

/* ============================================================
   AFFILIATE DISCLOSURE NOTICE
   ============================================================ */
.affiliate-notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px 18px;
  background: #fffbf0;
  border: 1px solid #f0d89a;
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 24px;
}
.affiliate-notice strong { color: var(--ink); }

/* ============================================================
   SIGNUP / FORM PAGE
   ============================================================ */
.signup-main {
  background: linear-gradient(180deg, var(--paper) 0%, var(--teal-lt) 100%);
}
.signup-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  gap: clamp(32px, 5vw, 70px);
  align-items: center;
  padding: clamp(42px, 7vw, 72px) var(--pad-x) 36px;
}
.signup-hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  line-height: 1;
}
.signup-hero img {
  width: 100%;
  max-height: 430px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.form-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
  padding: 24px var(--pad-x) var(--pad-section);
}
.lead-form,
.signup-sidebar {
  padding: clamp(22px, 4vw, 34px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 44px rgba(23,36,38,0.08);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 18px;
}
label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.9rem;
}
input, select, textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid #cbd8d5;
  border-radius: var(--radius);
  padding: 12px 13px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
  font-size: 0.95rem;
}
textarea {
  margin-top: 18px;
  resize: vertical;
  min-height: 120px;
}
input:focus, select:focus, textarea:focus {
  outline: 3px solid rgba(10,123,117,0.18);
  border-color: var(--teal);
}
.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--teal);
  font-weight: 700;
  font-size: 0.875rem;
}
.hidden-field { display: none; }
.signup-sidebar {
  position: sticky;
  top: 100px;
}
.signup-sidebar h2 {
  font-size: 1.4rem;
  margin-bottom: 16px;
}
.signup-sidebar ol { padding-left: 18px; }
.signup-sidebar li {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}
.sidebar-note {
  display: grid;
  gap: 8px;
  margin-top: 28px;
  padding: 18px;
  color: var(--white);
  background: var(--teal);
  border-radius: var(--radius);
  font-size: 0.875rem;
}
.sidebar-note strong { color: var(--white); font-size: 0.95rem; }

/* ============================================================
   THANK-YOU PAGE
   ============================================================ */
.thankyou-section {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  gap: clamp(32px, 5vw, 70px);
  align-items: center;
  min-height: calc(100vh - 160px);
  padding: clamp(42px, 7vw, 96px) var(--pad-x);
}
.thankyou-section img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
  padding: 26px var(--pad-x);
  color: var(--muted);
  background: var(--white);
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
}
.site-footer p { margin: 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding: 48px var(--pad-x) 28px;
  background: var(--ink);
  color: rgba(255,255,255,0.65);
}
.footer-brand { font-size: 0.9rem; line-height: 1.6; }
.footer-brand .brand-mark { background: rgba(255,255,255,0.12); }
.footer-brand .brand-text { color: var(--white); }
.footer-brand p { margin-top: 14px; max-width: 300px; }
.footer-col h5 {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #85d0c6;
  margin-bottom: 14px;
}
.footer-col ul { padding: 0; list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a  { font-size: 0.875rem; color: rgba(255,255,255,0.6); transition: color 0.16s; }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 18px var(--pad-x);
  background: var(--ink);
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}
.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: rgba(255,255,255,0.85); }

/* ============================================================
   PAGE HERO (inner pages)
   ============================================================ */
.page-hero {
  padding: clamp(42px, 6vw, 80px) var(--pad-x);
  background: var(--ink);
  color: var(--white);
}
.page-hero .eyebrow { color: #85d0c6; }
.page-hero h1 {
  color: var(--white);
  font-size: clamp(2rem, 4.5vw, 4rem);
  max-width: 800px;
  line-height: 1;
}
.page-hero p {
  color: rgba(255,255,255,0.7);
  max-width: 680px;
  font-size: 1.1rem;
  margin-top: 16px;
}

/* ============================================================
   SEARCH / FILTER BAR
   ============================================================ */
.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  padding: 18px 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
}
.filter-search {
  flex: 1;
  min-width: 200px;
  position: relative;
}
.filter-search input {
  padding-left: 2.4rem;
  background: var(--paper);
}
.filter-search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.filter-select {
  padding: 11px 14px;
  border: 1px solid #cbd8d5;
  border-radius: var(--radius);
  font: inherit;
  font-size: 0.875rem;
  color: var(--muted);
  background: var(--paper);
  cursor: pointer;
}

/* ============================================================
   WORDPRESS CORE
   ============================================================ */
.wp-post-image { border-radius: var(--radius); }
.aligncenter { display: block; margin: 0 auto; }
.alignright  { float: right; margin-left: 1rem; }
.alignleft   { float: left;  margin-right: 1rem; }
.wp-caption  { max-width: 100%; }
.wp-caption-text { font-size: 0.85rem; color: var(--muted); margin-top: 6px; }

/* Comments */
.comment-form input,
.comment-form textarea { width: 100%; }
.comment-form label { display: block; margin-bottom: 6px; font-weight: 700; }

/* Widget areas */
.widget { margin-bottom: 28px; }
.widget-title {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--line);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 980px) {
  .hero-section,
  .signup-hero,
  .thankyou-section,
  .proof-section,
  .fit-layout,
  .form-section {
    grid-template-columns: 1fr;
  }
  .hero-section { min-height: auto; }
  .hero-visual img { min-height: 360px; }
  .problem-grid,
  .process-steps { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: repeat(2, minmax(240px,1fr)); overflow-x: visible; }
  .section-heading { display: block; }
  .signup-sidebar { position: static; }
  .cta-section { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 768px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 720px) {
  .site-header { flex-direction: column; align-items: flex-start; position: static; }
  .nav-links    { flex-wrap: wrap; gap: 12px; }
  .metric-row,
  .proof-stats,
  .form-grid,
  .service-grid { grid-template-columns: 1fr; }
  .form-footer  { flex-direction: column; align-items: stretch; }
  .button       { width: 100%; }
  .cta-section  { flex-direction: column; }
}
