/*
 * CoolThings — Main Theme Stylesheet
 * Ported from mockup base.css + nav + footer.
 * All values use CSS custom properties for dark mode compatibility.
 */

/* ── Fonts ─────────────────────────────────────────────────────────────────── */
/* Loaded via Fontshare in enqueue.php */

/* ── Design Tokens ─────────────────────────────────────────────────────────── */
:root {
  --bg:           #FAF7F2;
  --surface:      #FFFFFF;
  --surface-alt:  #F2EDE4;
  --border:       #E0D9CC;
  --border-strong:#C9C0AE;
  --text:         #1A1815;
  --text-muted:   #6B665D;
  --primary:      #C8553D;
  --primary-hover:#A8412C;
  --secondary:    #1F4E5F;
  --success:      #5A7D3A;

  --font-display: 'Sentient', 'Times New Roman', Georgia, serif;
  --font-body:    'Satoshi', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-md:   1.0625rem;
  --text-lg:   1.25rem;
  --text-xl:   1.5rem;
  --text-2xl:  2rem;
  --text-3xl:  2.75rem;
  --text-hero: 4.25rem;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  --radius-sm:   4px;
  --radius:      8px;
  --radius-lg:   14px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(26,24,21,0.04), 0 1px 3px rgba(26,24,21,0.06);
  --shadow:    0 4px 16px rgba(26,24,21,0.06), 0 2px 4px rgba(26,24,21,0.04);
  --shadow-lg: 0 12px 40px rgba(26,24,21,0.08), 0 4px 12px rgba(26,24,21,0.04);

  --container:        1240px;
  --container-narrow: 760px;
  --nav-h:            68px;

  --ease:   cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 140ms;
  --t-med:  280ms;
}

[data-theme="dark"] {
  --bg:           #1A1815;
  --surface:      #221F1B;
  --surface-alt:  #2B2722;
  --border:       #3A352E;
  --border-strong:#4A4339;
  --text:         #EFEAE0;
  --text-muted:   #9A958A;
  --primary:      #D86B53;
  --primary-hover:#E58671;
  --secondary:    #5FA0B2;
  --success:      #8FB360;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow:    0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.45);
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--t-med) var(--ease), color var(--t-med) var(--ease);
}
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font: inherit; color: inherit; }
ul, ol { list-style: none; }

/* ── Typography ────────────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text);
}
h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); letter-spacing: -0.018em; }
h3 { font-size: var(--text-xl); letter-spacing: -0.012em; line-height: 1.2; }
h4 { font-size: var(--text-lg); letter-spacing: -0.01em; line-height: 1.25; }
p { line-height: 1.6; }
.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.lede {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-xl);
  line-height: 1.45;
  letter-spacing: -0.005em;
  color: var(--text-muted);
}
.muted { color: var(--text-muted); }

/* ── Layout ────────────────────────────────────────────────────────────────── */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--space-6); }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 var(--space-5); }
@media (max-width: 640px) { .container, .container-narrow { padding: 0 var(--space-4); } }

/* ── Navigation ────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-6);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.nav-logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav-logo .wordmark {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: -0.025em;
  font-weight: 500;
  line-height: 1;
}
.nav-links {
  display: flex;
  gap: var(--space-5);
  font-size: var(--text-sm);
  font-weight: 500;
  flex: 1;
}
.nav-links a { position: relative; color: var(--text); padding: 6px 2px; transition: color var(--t-fast) var(--ease); }
.nav-links a:hover { color: var(--primary); }
.nav-links a.current-menu-item::after, .nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--primary);
}
.nav-actions { display: flex; align-items: center; gap: var(--space-3); }
.nav-icon-btn {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  color: var(--text);
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.nav-icon-btn:hover { background: var(--surface-alt); }
.saved-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: var(--text-xs); font-weight: 600;
  color: var(--text);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.saved-pill:hover { border-color: var(--text); }
.saved-pill .heart { color: var(--primary); }
.menu-toggle { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: var(--radius-pill); }
@media (max-width: 920px) { .nav-links { display: none; } .menu-toggle { display: inline-flex; } .nav-cta-find { display: none; } }
@media (max-width: 520px) {
  .saved-pill .saved-label { display: none; }
  .saved-pill { padding: 0 10px; gap: 4px; }
  .nav-inner { padding: 0 var(--space-4); gap: var(--space-3); }
  .nav-actions { gap: 6px; }
}
.mobile-menu { display: none; border-top: 1px solid var(--border); padding: var(--space-4) var(--space-6); background: var(--bg); }
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: 10px 0; font-size: var(--text-md); border-bottom: 1px solid var(--border); }
.mobile-menu a:last-child { border-bottom: none; }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  height: 48px; padding: 0 var(--space-5);
  border-radius: var(--radius-pill);
  font-weight: 600; font-size: var(--text-sm); letter-spacing: 0.01em;
  border: 1px solid transparent; cursor: pointer;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #FFF; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--text); color: var(--bg); }
.btn-secondary:hover { background: var(--text); opacity: 0.85; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-alt); border-color: var(--text); }
.btn-sm { height: 36px; padding: 0 var(--space-4); font-size: var(--text-xs); }
.btn-lg { height: 56px; padding: 0 var(--space-6); font-size: var(--text-base); }

/* ── Forms ─────────────────────────────────────────────────────────────────── */
.input {
  height: 48px; width: 100%;
  padding: 0 var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.input:focus { outline: none; border-color: var(--text); }
.input::placeholder { color: var(--text-muted); }

/* ── Sections ──────────────────────────────────────────────────────────────── */
.section { padding: var(--space-9) 0; }
.section-sm { padding: var(--space-7) 0; }
@media (max-width: 720px) { .section { padding: var(--space-7) 0; } }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-5); margin-bottom: var(--space-6); }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
.section-head .link-more { font-size: var(--text-sm); font-weight: 500; border-bottom: 1px solid currentColor; padding-bottom: 2px; flex-shrink: 0; }
@media (max-width: 600px) { .section-head { flex-direction: column; align-items: flex-start; } }

/* ── Grids ─────────────────────────────────────────────────────────────────── */
.grid { display: grid; gap: var(--space-6); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-6 { grid-template-columns: repeat(3, 1fr); }
@media (min-width: 900px) { .grid-6 { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .grid-6 { grid-template-columns: repeat(2, 1fr); gap: var(--space-4); } }

/* ── Horizontal scroll ─────────────────────────────────────────────────────── */
.scroller {
  display: flex; gap: var(--space-4); overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--space-3);
  margin: 0 calc(-1 * var(--space-6)); padding-left: var(--space-6); padding-right: var(--space-6);
  scrollbar-width: thin;
}
.scroller::-webkit-scrollbar { height: 6px; }
.scroller::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
.scroller > * { scroll-snap-align: start; flex-shrink: 0; }

/* ── Newsletter strip ──────────────────────────────────────────────────────── */
.newsletter {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--space-6);
  align-items: center;
}
@media (max-width: 760px) { .newsletter { grid-template-columns: 1fr; padding: var(--space-6); } }
.newsletter h3 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); margin-bottom: 6px; }
.newsletter p { color: var(--text-muted); font-size: var(--text-sm); }
.newsletter form { display: flex; gap: var(--space-2); align-items: stretch; }
.newsletter .input { background: var(--surface); }

/* ── FTC Disclosure ────────────────────────────────────────────────────────── */
.ftc-disclosure {
  background: color-mix(in srgb, var(--secondary) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--secondary) 25%, var(--border));
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}

/* ── Footer ────────────────────────────────────────────────────────────────── */
.site-footer {
  margin-top: var(--space-9);
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: var(--space-8) 0 var(--space-6);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: var(--space-7);
}
@media (max-width: 880px) { .footer-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-6); } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; gap: var(--space-5); } }
.footer-col h4 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: var(--text-sm); }
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
  margin-top: var(--space-7); padding-top: var(--space-5);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  font-size: var(--text-xs); color: var(--text-muted);
}
@media (max-width: 600px) { .footer-bottom { flex-direction: column; gap: var(--space-3); } }
.social-links { display: flex; gap: var(--space-3); }
.social-links a { color: var(--text-muted); transition: color var(--t-fast) var(--ease); }
.social-links a:hover { color: var(--primary); }

/* ── Skeleton ──────────────────────────────────────────────────────────────── */
.skel {
  background: linear-gradient(90deg, var(--surface-alt) 0%, var(--border) 50%, var(--surface-alt) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: var(--radius);
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ── Animations ────────────────────────────────────────────────────────────── */
.fade-in { animation: fadeIn 280ms var(--ease); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── Toast ─────────────────────────────────────────────────────────────────── */
.ct-toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text); color: var(--bg);
  padding: 12px 20px; border-radius: var(--radius-pill);
  font-size: var(--text-sm); font-weight: 500;
  z-index: 100; opacity: 0;
  transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease);
  pointer-events: none; box-shadow: var(--shadow-lg);
}
.ct-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }

/* ── Utilities ─────────────────────────────────────────────────────────────── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* ── Breadcrumbs ───────────────────────────────────────────────────────────── */
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: var(--text-xs); color: var(--text-muted); margin-bottom: var(--space-5); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .sep { opacity: 0.4; }

/* ── Taxonomy archive hero ─────────────────────────────────────────────────── */
.tax-hero { padding: var(--space-8) 0 var(--space-7); border-bottom: 1px solid var(--border); margin-bottom: var(--space-7); }
.tax-hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: var(--space-3); }
.tax-hero p { font-size: var(--text-lg); color: var(--text-muted); max-width: 600px; }

/* ── Search ────────────────────────────────────────────────────────────────── */
.search-form { display: flex; gap: var(--space-2); }
.search-form .input { border-radius: var(--radius-pill); }
