/*
Theme Name: Librarianly
Theme URI: https://librarianly.com
Author: Librarianly
Author URI: https://librarianly.com
Description: A cozy, editorial directory theme for Librarianly — Nashville's directory of libraries, indie bookstores, used & rare shops, book clubs, author readings, writing workshops, reading cafés, poetry nights, and children's storytime. Built for content publishing with affiliate, course, and merch monetization.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: librarianly
Tags: blog, directory, two-columns, custom-colors, custom-logo, custom-menu, featured-images, full-width-template, threaded-comments, translation-ready, block-styles, wide-blocks
*/

/* ============================================================
   Librarianly — Stylesheet
   Cozy editorial / indie-bookshop newsletter
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* Paper & ink */
  --paper: #F5EDE0;
  --paper-warm: #EFE3D0;
  --ink: #2A1F2A;
  --ink-muted: rgba(42, 31, 42, 0.62);
  --rule: rgba(42, 31, 42, 0.14);

  /* Accent (logo-derived) */
  --accent: #E37238;
  --accent-soft: rgba(227, 114, 56, 0.22);

  /* Brand gradient (pulled from the Librarianly mark) */
  --grad-plum: #453641;
  --grad-mid: #944f5a;
  --grad-coral: #e37238;
  --brand-gradient: linear-gradient(90deg, var(--grad-plum) 0%, var(--grad-mid) 50%, var(--grad-coral) 100%);

  /* Type stack */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Motion */
  --t-fast: 0.12s ease;
  --t-base: 0.15s ease;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

/* ---------- Paper grain overlay ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.16 0 0 0 0 0.12 0 0 0 0 0.16 0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------- Navigation ---------- */
.nav-link {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color var(--t-base);
}
.nav-link:hover { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn-primary-sm {
  background: var(--ink);
  color: var(--paper);
  border: none;
  padding: 10px 18px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
  cursor: pointer;
  border-radius: 999px;
  transition: background var(--t-base);
}
.btn-primary-sm:hover { background: var(--accent); }

/* ---------- Filter bar ---------- */
.filter-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-muted);
  margin-right: 4px;
  padding: 6px 0;
}

.chip {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
}
.chip:hover { border-color: var(--ink); }
.chip.chip-on {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.chip.chip-sm {
  font-size: 12px;
  padding: 6px 12px;
}

.view-toggle {
  background: var(--paper);
  border: none;
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--ink);
  transition: all var(--t-fast);
}
.view-toggle.view-on {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- Tags & meta ---------- */
.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: var(--accent-soft);
  color: var(--ink);
  padding: 4px 8px;
  font-weight: 500;
}

.bookmark-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border: 1px solid var(--ink);
  padding: 6px 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--t-fast);
}
.bookmark-btn:hover {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- Cards ---------- */
.listing-card {
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.listing-card:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--accent-soft);
  z-index: 2;
  position: relative;
}

.event-card { transition: background var(--t-base); }
.event-card:hover { background: var(--paper-warm) !important; }

.book-cover { transition: transform var(--t-base); }

/* ---------- Carousel ---------- */
.carousel-btn {
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
  border-radius: 999px;
  font-family: var(--font-body);
  transition: all var(--t-base);
}
.carousel-btn:hover {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- Inline links ---------- */
.link-arrow {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: gap var(--t-base);
}
.link-arrow:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- Utilities ---------- */
.hide-scrollbar::-webkit-scrollbar { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 800px) {
  .main-nav { gap: 14px !important; }
  .main-nav .nav-link { display: none; }
  .main-nav .btn-primary-sm { display: inline-block; }
  .hide-sm { display: none; }
  .map-grid { grid-template-columns: 1fr !important; }
  .courses-grid { grid-template-columns: 1fr !important; gap: 32px !important; }
  .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 32px !important; }
}

/* ---------- Print ---------- */
@media print {
  body::before { display: none !important; }
  .carousel-btn,
  [data-tweaks-panel] { display: none !important; }
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}
