/**
 * BusinesToMarks Modern Editorial Theme Stylesheet
 * Responsive typography, modern editorial layout, zero-pill metadata, 10 SEO tools UI
 */

:root {
  --color-primary: #0f172a;
  --color-primary-light: #1e293b;
  --color-accent: #b45309; /* warm amber/editorial */
  --color-accent-light: #d97706;
  --color-stone-50: #fafaf9;
  --color-stone-100: #f5f5f4;
  --color-stone-200: #e7e5e4;
  --color-stone-300: #d6d3d1;
  --color-stone-400: #a8a29e;
  --color-stone-500: #78716c;
  --color-stone-600: #57534e;
  --color-stone-700: #44403c;
  --color-stone-800: #292524;
  --color-stone-900: #1c1917;
  --font-serif: 'Playfair Display', Georgia, Cambria, 'Times New Roman', serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', Menlo, Monaco, Consolas, monospace;
}

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

body {
  font-family: var(--font-sans);
  background-color: #faf9f6;
  color: var(--color-stone-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}

a:hover {
  color: var(--color-accent);
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--color-stone-900);
  font-weight: 700;
  line-height: 1.25;
}

.font-serif { font-family: var(--font-serif); }
.font-sans { font-family: var(--font-sans); }
.font-mono { font-family: var(--font-mono); }

/* Containers */
.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.container-narrow {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Header & Top Bar Contract */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-stone-200);
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-stone-100);
}

.site-brand {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--color-stone-900);
}

.brand-title span {
  color: var(--color-accent);
}

.brand-tagline {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-stone-500);
  font-weight: 600;
  display: none;
}

@media (min-width: 768px) {
  .brand-tagline { display: inline-block; }
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-stone-700);
  position: relative;
  padding: 0.25rem 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--color-stone-900);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--color-accent);
  transition: width 0.2s ease;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-search {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-stone-600);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.btn-search:hover {
  color: var(--color-stone-900);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--color-stone-900);
  color: #fff !important;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.6rem 1.15rem;
  border-radius: 4px;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.btn-primary:hover {
  background-color: var(--color-accent);
  transform: translateY(-1px);
}

.mobile-menu-btn {
  display: inline-flex;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-stone-800);
}

@media (min-width: 992px) {
  .mobile-menu-btn { display: none; }
}

/* Category Ribbon */
.category-ribbon {
  overflow-x: auto;
  white-space: nowrap;
  padding: 0.6rem 0;
  scrollbar-width: none;
}
.category-ribbon::-webkit-scrollbar { display: none; }

.category-nav-list {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.category-nav-item a {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-stone-600);
  padding: 0.25rem 0;
}

.category-nav-item a:hover, .category-nav-item.current-menu-item a {
  color: var(--color-stone-900);
  border-bottom: 2px solid var(--color-accent);
}

/* Zero-Pill Metadata Discipline */
.meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.075em;
  color: var(--color-stone-500);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.meta-category {
  color: var(--color-accent);
  font-weight: 700;
}

.meta-separator {
  color: var(--color-stone-300);
}

/* Cards & Editorial Grid */
.article-card {
  background-color: #fff;
  border: 1px solid var(--color-stone-200);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.08);
  border-color: var(--color-stone-300);
}

.article-thumb-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background-color: var(--color-stone-100);
}

.article-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.article-card:hover .article-thumb {
  transform: scale(1.03);
}

.article-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.article-title a {
  color: var(--color-stone-900);
}

.article-title a:hover {
  color: var(--color-accent);
}

.article-excerpt {
  font-size: 0.875rem;
  color: var(--color-stone-600);
  margin-bottom: 1rem;
  flex: 1;
  line-height: 1.55;
}

.article-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-stone-100);
  font-size: 0.75rem;
  color: var(--color-stone-500);
}

.author-chip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.author-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

/* Horizontal Compact Cards */
.article-card-horizontal {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-stone-200);
  padding: 1rem 0;
  border-radius: 0;
}

.article-card-horizontal:hover {
  transform: none;
  box-shadow: none;
}

.article-card-horizontal .article-thumb-wrapper {
  aspect-ratio: 1;
  border-radius: 4px;
}

.article-card-horizontal .article-body {
  padding: 0;
}

.article-card-horizontal .article-title {
  font-size: 1rem;
}

/* Hero Section */
.hero-editorial {
  padding: 2.5rem 0 3.5rem;
  border-bottom: 1px solid var(--color-stone-200);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 992px) {
  .hero-grid {
    grid-template-columns: 1.75fr 1fr;
    gap: 3rem;
  }
}

.hero-lead-card {
  position: relative;
  background-color: #fff;
  border: 1px solid var(--color-stone-200);
  border-radius: 8px;
  overflow: hidden;
}

.hero-lead-card .article-thumb-wrapper {
  aspect-ratio: 16 / 9;
}

.hero-lead-card .article-body {
  padding: 2rem;
}

.hero-lead-card .article-title {
  font-size: 2.25rem;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

@media (max-width: 768px) {
  .hero-lead-card .article-title { font-size: 1.6rem; }
  .hero-lead-card .article-body { padding: 1.25rem; }
}

.hero-lead-card .article-excerpt {
  font-size: 1rem;
  line-height: 1.6;
}

/* Section Headers */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--color-stone-900);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-link {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Category Desks Layout */
.category-desk-section {
  padding: 3rem 0;
  border-bottom: 1px solid var(--color-stone-200);
}

.desk-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .desk-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .desk-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Single Post Layout */
.single-post-wrapper {
  padding: 2.5rem 0 4rem;
}

.post-header {
  margin-bottom: 2rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.post-title {
  font-size: 2.75rem;
  line-height: 1.18;
  margin: 1rem 0 1.25rem;
  font-weight: 800;
}

@media (max-width: 768px) {
  .post-title { font-size: 1.85rem; }
}

.post-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--color-stone-200);
  border-bottom: 1px solid var(--color-stone-200);
  margin-bottom: 2rem;
}

.post-featured-media {
  margin-bottom: 2.5rem;
  border-radius: 8px;
  overflow: hidden;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.post-content {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--color-stone-800);
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

.post-content p {
  margin-bottom: 1.5rem;
}

.post-content h2 {
  font-size: 1.85rem;
  margin: 2.5rem 0 1rem;
}

.post-content h3 {
  font-size: 1.4rem;
  margin: 2rem 0 0.85rem;
}

.post-content blockquote {
  border-left: 3px solid var(--color-accent);
  padding: 1rem 0 1rem 1.5rem;
  margin: 2rem 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--color-stone-700);
}

.post-content ul, .post-content ol {
  margin: 1rem 0 1.5rem 2rem;
}

.post-content li {
  margin-bottom: 0.5rem;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-stone-200);
}

.tag-badge {
  font-size: 0.8125rem;
  background-color: var(--color-stone-100);
  color: var(--color-stone-700);
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
}

.tag-badge:hover {
  background-color: var(--color-stone-200);
  color: var(--color-stone-900);
}

/* Author Box */
.author-box {
  background-color: #fff;
  border: 1px solid var(--color-stone-200);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 3rem 0;
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.author-box-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

/* SEO Tools Suite Layout */
.tool-container {
  padding: 3rem 0 5rem;
}

.tool-header {
  margin-bottom: 2.5rem;
  text-align: center;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.tool-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  background: rgba(180, 83, 9, 0.08);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.tool-title {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.tool-subtitle {
  font-size: 1.05rem;
  color: var(--color-stone-600);
}

.tool-card {
  background-color: #fff;
  border: 1px solid var(--color-stone-200);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  margin-bottom: 2rem;
}

.tool-form-group {
  margin-bottom: 1.5rem;
}

.tool-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-stone-800);
  margin-bottom: 0.5rem;
}

.tool-input, .tool-textarea, .tool-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-stone-300);
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  background-color: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tool-input:focus, .tool-textarea:focus, .tool-select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.12);
}

.tool-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-tool {
  background-color: var(--color-stone-900);
  color: #fff;
  border: none;
  cursor: pointer;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 6px;
  transition: background-color 0.15s ease;
}

.btn-tool:hover {
  background-color: var(--color-accent);
}

.btn-secondary {
  background-color: var(--color-stone-100);
  color: var(--color-stone-700);
  border: 1px solid var(--color-stone-300);
  cursor: pointer;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 6px;
}

.btn-secondary:hover {
  background-color: var(--color-stone-200);
}

.tool-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.metric-stat-box {
  background-color: var(--color-stone-50);
  border: 1px solid var(--color-stone-200);
  border-radius: 6px;
  padding: 1.25rem;
  text-align: center;
}

.metric-stat-val {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--color-stone-900);
}

.metric-stat-lbl {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-stone-500);
  font-weight: 600;
  margin-top: 0.25rem;
}

/* Footer */
.site-footer {
  background-color: var(--color-stone-900);
  color: var(--color-stone-300);
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--color-stone-800);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

@media (min-width: 640px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.5fr; }
}

.footer-brand .brand-title {
  color: #fff;
}

.footer-desc {
  font-size: 0.875rem;
  color: var(--color-stone-400);
  margin: 1rem 0 1.5rem;
  line-height: 1.6;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-stone-300);
}

.footer-heading {
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--color-stone-400);
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--color-stone-800);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--color-stone-500);
}

/* Modals & Drawers */
.search-modal {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  z-index: 100;
  padding: 4rem 1.25rem;
  align-items: flex-start;
  justify-content: center;
}

.search-modal.active {
  display: flex;
}

.search-modal-content {
  background: #fff;
  border-radius: 8px;
  width: 100%;
  max-width: 640px;
  padding: 1.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.mobile-drawer {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  background: #fff;
  z-index: 100;
  padding: 2rem 1.5rem;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
}

.mobile-drawer.active {
  transform: translateX(0);
}

.mobile-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 99;
}

.mobile-drawer-overlay.active {
  display: block;
}

/* Pagination */
.pagination-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid var(--color-stone-200);
  background: #fff;
  border-radius: 4px;
  color: var(--color-stone-700);
}

.page-numbers.current {
  background-color: var(--color-stone-900);
  color: #fff;
  border-color: var(--color-stone-900);
}

.page-numbers:hover:not(.current) {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
