/*
Theme Name: CashbackHubs
Theme URI: https://cashbackhubs.com
Author: CashbackHubs
Description: A cashback & rewards comparison theme styled like a running receipt — built to compare cashback portals, apps, and cards side by side.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: cashbackhubs
*/

/* ==========================================================================
   TOKENS
   ========================================================================== */
:root{
  --paper: #FAF7F0;
  --paper-dim: #F1ECE0;
  --ink: #1C1B19;
  --ink-soft: #4A463F;
  --ink-faint: #8C8779;
  --emerald: #0B6E4F;
  --emerald-dark: #084F39;
  --emerald-tint: #E3EFE8;
  --gold: #E8A33D;
  --gold-dark: #B87A1F;
  --red: #C1443D;
  --line: #D8D2C2;
  --white: #FFFFFF;

  --font-display: 'Archivo Black', Impact, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Mono', 'Courier New', monospace;

  --radius: 2px;
  --max: 1180px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  background: var(--paper-dim);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img{ max-width:100%; display:block; }
a{ color: var(--emerald-dark); text-decoration: none; }
a:hover{ text-decoration: underline; }
ul{ list-style:none; margin:0; padding:0; }
h1,h2,h3,h4{ font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.01em; line-height: 1.1; margin: 0 0 .5em; color: var(--ink); }
h1{ font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2{ font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3{ font-size: 1.15rem; }
p{ margin: 0 0 1em; color: var(--ink-soft); }

:focus-visible{ outline: 3px solid var(--gold); outline-offset: 2px; }

.container{ max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.eyebrow{
  font-family: var(--font-mono);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--emerald-dark);
  display:inline-block;
  margin-bottom: .6em;
}
.btn{
  display:inline-block;
  font-family: var(--font-mono);
  font-weight:700;
  font-size:.85rem;
  text-transform: uppercase;
  letter-spacing:.06em;
  padding: 14px 26px;
  border-radius: var(--radius);
  border: 2px solid var(--ink);
  background: var(--gold);
  color: var(--ink);
  cursor:pointer;
  text-decoration:none;
  transition: transform .12s ease;
}
.btn:hover{ transform: translate(-2px,-2px); box-shadow: 4px 4px 0 var(--ink); text-decoration:none; }
.btn-outline{ background: transparent; color: var(--ink); }
.btn-emerald{ background: var(--emerald); border-color: var(--emerald-dark); color: var(--white); }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header{
  background: var(--ink);
  color: var(--paper);
  position: sticky; top:0; z-index: 50;
  border-bottom: 4px solid var(--gold);
}
.site-header .inner{
  max-width: var(--max); margin:0 auto; padding: 16px 24px;
  display:flex; align-items:center; justify-content:space-between; gap: 24px;
}
.site-logo{ font-family: var(--font-display); font-size: 1.4rem; color: var(--paper); text-transform:uppercase; letter-spacing:.02em; }
.site-logo span{ color: var(--gold); }
.site-logo:hover{ text-decoration:none; }
.primary-nav ul{ display:flex; gap: 28px; }
.primary-nav a{
  color: var(--paper); font-family: var(--font-mono); font-size:.85rem;
  text-transform: uppercase; letter-spacing:.05em;
}
.primary-nav a:hover{ color: var(--gold); text-decoration:none; }
.nav-toggle{ display:none; background:none; border:none; color:var(--paper); font-size:1.6rem; cursor:pointer; }

@media (max-width: 820px){
  .primary-nav{ display:none; width:100%; }
  .primary-nav.is-open{ display:block; }
  .primary-nav ul{ flex-direction:column; gap:0; padding: 12px 0; }
  .primary-nav a{ display:block; padding: 12px 0; border-top: 1px solid rgba(250,247,240,.15); }
  .site-header .inner{ flex-wrap:wrap; }
  .nav-toggle{ display:block; }
}

/* ==========================================================================
   HERO — the printed receipt
   ========================================================================== */
.hero{ padding: 64px 0 48px; }
.hero .inner{ display:grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items:center; max-width: var(--max); margin:0 auto; padding:0 24px; }
@media (max-width: 900px){ .hero .inner{ grid-template-columns: 1fr; } }

.hero h1{ margin-bottom:.3em; }
.hero .lede{ font-size: 1.15rem; max-width: 46ch; }
.hero-actions{ display:flex; gap:14px; margin-top: 1.6em; flex-wrap:wrap; }

.receipt{
  background: var(--white);
  color: var(--ink);
  padding: 28px 26px 10px;
  font-family: var(--font-mono);
  box-shadow: 0 18px 40px rgba(28,27,25,.18);
  position: relative;
  transform: rotate(-1.2deg);
}
.receipt::after{
  content:"";
  display:block;
  height: 14px;
  margin-top: 6px;
  background-image: radial-gradient(circle at 8px 7px, var(--paper-dim) 7px, transparent 7.5px);
  background-size: 16px 14px;
  background-position: -4px 0;
}
.receipt-head{ text-align:center; border-bottom: 2px dashed var(--line); padding-bottom: 12px; margin-bottom: 10px; }
.receipt-head .store{ font-family: var(--font-display); font-size: 1.05rem; letter-spacing:.05em; }
.receipt-head .sub{ font-size: .72rem; color: var(--ink-faint); margin-top:4px; }
.receipt-row{ display:flex; justify-content:space-between; gap: 12px; font-size: .82rem; padding: 6px 0; border-bottom: 1px dotted var(--line); }
.receipt-row .name{ color: var(--ink-soft); }
.receipt-row .rate{ color: var(--emerald-dark); font-weight:700; }
.receipt-total{ display:flex; justify-content:space-between; font-size:.95rem; font-weight:700; padding-top: 12px; margin-top: 4px; border-top: 2px dashed var(--line); }
.receipt-total .amt{ color: var(--red); }
.receipt-foot{ text-align:center; font-size:.68rem; color: var(--ink-faint); margin-top: 12px; }

/* ==========================================================================
   MARQUEE TICKER
   ========================================================================== */
.ticker{ background: var(--emerald); border-top: 1px solid var(--emerald-dark); border-bottom: 1px solid var(--emerald-dark); overflow:hidden; padding: 10px 0; }
.ticker-track{ display:flex; gap: 48px; white-space:nowrap; animation: scroll 32s linear infinite; font-family: var(--font-mono); font-size:.8rem; color: var(--white); }
.ticker-track span b{ color: var(--gold); }
@keyframes scroll{ from{ transform: translateX(0);} to{ transform: translateX(-50%);} }
@media (prefers-reduced-motion: reduce){ .ticker-track{ animation: none; overflow-x:auto; } }

/* ==========================================================================
   SECTIONS
   ========================================================================== */
.section{ padding: 64px 0; }
.section-head{ max-width: 640px; margin: 0 0 36px; }
.section-alt{ background: var(--paper); }

.grid-3{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4{ display:grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px){ .grid-3{ grid-template-columns: 1fr 1fr; } .grid-4{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px){ .grid-3, .grid-4{ grid-template-columns: 1fr; } }

.card{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  transition: box-shadow .15s ease, transform .15s ease;
}
.card:hover{ box-shadow: 6px 6px 0 var(--ink); transform: translate(-3px,-3px); }
.card .tag{
  display:inline-block; font-family: var(--font-mono); font-size:.7rem; text-transform:uppercase;
  letter-spacing:.08em; background: var(--emerald-tint); color: var(--emerald-dark); padding: 3px 9px; border-radius: 20px; margin-bottom: 10px;
}

/* Category tiles */
.cat-tile{
  display:flex; flex-direction:column; gap: 14px; align-items:flex-start;
  background: var(--white); color: var(--ink); padding: 26px 22px; text-align:left;
  border-radius: var(--radius); border: 1px solid var(--line);
  border-top: 4px solid var(--emerald);
  position: relative; overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.cat-tile::after{
  content:"→"; position:absolute; right:20px; bottom:16px; font-family: var(--font-mono);
  font-size:1.1rem; color: var(--line); transition: color .15s ease, transform .15s ease;
}
.cat-tile:hover{
  border-top-color: var(--gold); box-shadow: 6px 6px 0 var(--ink); transform: translate(-3px,-3px); text-decoration:none;
}
.cat-tile:hover::after{ color: var(--gold); transform: translateX(4px); }
.cat-tile .icon{
  width: 46px; height: 46px; border-radius: 50%; background: var(--emerald-tint); color: var(--emerald-dark);
  display:flex; align-items:center; justify-content:center; font-size: 1.3rem; flex-shrink:0;
}
.cat-tile .n{ font-family: var(--font-display); font-size: 1rem; text-transform:uppercase; letter-spacing:.01em; color: var(--ink); }
.cat-tile .c{ font-family: var(--font-mono); font-size:.72rem; color: var(--ink-faint); margin-top:2px; }

/* ==========================================================================
   RECEIPT TABLE (comparison shortcode)
   ========================================================================== */
.receipt-table-wrap{ background: var(--white); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(28,27,25,.08); }
.receipt-table-head{ background: var(--ink); color: var(--paper); padding: 18px 24px; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:10px; }
.receipt-table-head h3{ margin:0; color: var(--paper); }
.receipt-table-head .updated{ font-family: var(--font-mono); font-size:.72rem; color: var(--gold); }
table.receipt-table{ width:100%; border-collapse: collapse; font-family: var(--font-mono); }
table.receipt-table th{
  text-align:left; font-size:.7rem; text-transform:uppercase; letter-spacing:.06em; color: var(--ink-faint);
  padding: 14px 24px; border-bottom: 2px dashed var(--line);
}
table.receipt-table td{ padding: 16px 24px; border-bottom: 1px dotted var(--line); font-size:.9rem; vertical-align:middle; }
table.receipt-table tr:last-child td{ border-bottom:none; }
table.receipt-table .prog-name{ font-family: var(--font-body); font-weight:700; color: var(--ink); }
table.receipt-table .prog-cat{ font-family: var(--font-body); font-size:.78rem; color: var(--ink-faint); }
table.receipt-table .rate-cell{ color: var(--emerald-dark); font-weight:700; font-size:1.05rem; }
table.receipt-table .go-btn{
  display:inline-flex; align-items:center; gap:6px;
  font-family: var(--font-mono); font-weight:700; font-size:.76rem; text-transform:uppercase; letter-spacing:.05em;
  background: var(--emerald); border: 2px solid var(--emerald-dark); color: var(--white);
  padding: 10px 18px; border-radius: 6px;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  white-space: nowrap;
}
table.receipt-table .go-btn::after{ content:"→"; font-size:.9rem; }
table.receipt-table .go-btn:hover{
  background: var(--gold); border-color: var(--gold-dark); color: var(--ink);
  transform: translate(-2px,-2px); box-shadow: 3px 3px 0 var(--ink); text-decoration:none;
}
@media (max-width: 700px){
  table.receipt-table thead{ display:none; }
  table.receipt-table, table.receipt-table tbody, table.receipt-table tr, table.receipt-table td{ display:block; width:100%; }
  table.receipt-table tr{ padding: 14px 20px; border-bottom: 1px dashed var(--line); }
  table.receipt-table td{ border:none; padding: 4px 0; }
}

/* ==========================================================================
   BLOG / ARTICLES
   ========================================================================== */
.post-list{ display:grid; gap: 28px; }
.post-card{ display:grid; grid-template-columns: 220px 1fr; gap: 22px; padding-bottom: 28px; border-bottom: 1px dashed var(--line); }
.post-card .thumb{ background: var(--paper-dim); border: 1px solid var(--line); aspect-ratio: 4/3; overflow:hidden; }
.post-card .thumb img{ width:100%; height:100%; object-fit:cover; }
.post-card .meta{ font-family: var(--font-mono); font-size:.72rem; color: var(--ink-faint); text-transform:uppercase; letter-spacing:.05em; margin-bottom:6px; }
@media (max-width: 640px){ .post-card{ grid-template-columns: 1fr; } }

article.single .entry-content{ max-width: 68ch; font-size: 1.05rem; }
article.single .entry-content h2{ margin-top: 1.6em; }
article.single .entry-content ul{ list-style: disc; padding-left: 1.4em; margin-bottom: 1.2em; }
article.single .entry-content li{ margin-bottom:.4em; color: var(--ink-soft); }

/* ==========================================================================
   DISCLOSURE BANNER
   ========================================================================== */
.disclosure-bar{ background: var(--gold); color: var(--ink); font-family: var(--font-mono); font-size:.76rem; text-align:center; padding: 8px 16px; }
.disclosure-bar a{ color: var(--ink); text-decoration:underline; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer{ background: var(--ink); color: var(--paper); margin-top: 64px; padding: 56px 0 28px; }
.footer-grid{ display:grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer-grid h4{ color: var(--gold); font-size:.85rem; margin-bottom: .8em; }
.footer-grid a{ color: var(--paper); opacity:.8; display:block; padding: 4px 0; font-size:.9rem; }
.footer-grid a:hover{ opacity:1; color: var(--gold); text-decoration:none; }
.footer-bottom{ border-top: 1px solid rgba(250,247,240,.15); padding-top: 20px; font-family: var(--font-mono); font-size:.72rem; color: var(--ink-faint); display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px; }
@media (max-width: 800px){ .footer-grid{ grid-template-columns: 1fr 1fr; } }

/* Widgets */
.widget{ margin-bottom: 28px; }
.widget h3{ font-size: 1rem; border-bottom: 2px dashed var(--line); padding-bottom: 8px; margin-bottom: 12px; }
