/*
Theme Name: CoffeeLogik Modern
Theme URI: https://coffeelogik.com
Author: CoffeeLogik
Author URI: https://coffeelogik.com
Description: A modern, clean WordPress theme for CoffeeLogik with custom post types for coffee products, brewing guides, and coffee recipes.
Version: 2.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: coffeelogik-modern
Tags: coffee, recipes, reviews, modern, clean
*/

:root {
  --bg-primary: #fffdf9;
  --bg-secondary: #f6f1ea;
  --bg-tertiary: #f2ebe2;
  --bg-dark: #17120d;
  --surface: #ffffff;
  --surface-muted: #faf7f2;
  --text-primary: #1f1a16;
  --text-secondary: #5d5247;
  --text-muted: #8c7d71;
  --text-light: #ffffff;
  --accent: #b95f2d;
  --accent-hover: #944a22;
  --accent-light: #f8e5d7;
  --accent-dark: #7a3b17;
  --border: #e7ddd1;
  --border-light: #f1e9df;
  --shadow-sm: 0 10px 30px rgba(31, 26, 22, 0.05);
  --shadow-md: 0 18px 50px rgba(31, 26, 22, 0.09);
  --shadow-lg: 0 30px 80px rgba(31, 26, 22, 0.14);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-full: 9999px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --container: 1200px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-primary);
  background:
    radial-gradient(circle at top right, rgba(185, 95, 45, 0.08), transparent 30%),
    linear-gradient(180deg, #fffdf9 0%, #fffaf5 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.admin-bar .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

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

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

svg {
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4.4rem);
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.6rem);
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

p {
  color: var(--text-secondary);
}

ul, ol {
  padding-left: 1.25rem;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.section {
  padding: 4rem 0;
}

.section-sm {
  padding: 2.5rem 0;
}

.surface-card {
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(231, 221, 209, 0.75);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-full);
  background: var(--accent-light);
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.section-header p {
  max-width: 700px;
}

.section-link {
  font-weight: 700;
  color: var(--accent-dark);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 253, 249, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(231, 221, 209, 0.8);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 78px;
}

.branding {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.logo {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

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

.tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
}

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

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

.main-nav a {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
}

.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a {
  color: var(--text-primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.88rem 1.4rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--text-light);
  box-shadow: 0 12px 30px rgba(185, 95, 45, 0.22);
}

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

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-secondary:hover,
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text-primary);
}

.btn-block {
  width: 100%;
}

/* Home hero */
.hero-home {
  padding: 4.5rem 0 2.5rem;
}

.hero-shell {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 4vw, 3rem);
  background: linear-gradient(135deg, rgba(255,255,255,0.94) 0%, rgba(248, 241, 233, 0.94) 100%);
}

.hero-shell::before {
  content: '';
  position: absolute;
  inset: auto -120px -140px auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(185,95,45,0.18) 0%, rgba(185,95,45,0) 72%);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.95fr);
  gap: 2rem;
  align-items: center;
}

.hero-copy p {
  max-width: 640px;
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.6rem;
}

.hero-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1.75rem;
}

.highlight-chip {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(231, 221, 209, 0.85);
}

.highlight-chip strong {
  display: block;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.highlight-chip span {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.hero-panel {
  padding: 1.5rem;
}

.hero-panel .card-title {
  font-size: 1.2rem;
}

.mini-list {
  list-style: none;
  display: grid;
  gap: 0.9rem;
  margin-top: 1rem;
  padding-left: 0;
}

.mini-list li {
  display: flex;
  align-items: start;
  gap: 0.75rem;
  color: var(--text-secondary);
}

.mini-list li::before {
  content: '•';
  color: var(--accent);
  font-size: 1.2rem;
  line-height: 1;
}

/* Shared grid */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-1 {
  grid-template-columns: 1fr;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.75fr);
  gap: 2rem;
  align-items: start;
}

.sidebar-stack {
  display: grid;
  gap: 1.25rem;
  position: sticky;
  top: 100px;
}

/* Cards */
.card,
.product-card {
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(231, 221, 209, 0.8);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover,
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(185,95,45,0.28);
}

.card a,
.product-card a {
  display: block;
  height: 100%;
}

.card-image,
.single-featured-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--bg-secondary);
}

.card-content {
  padding: 1.35rem;
}

.card-category {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.8rem;
  padding: 0.38rem 0.7rem;
  border-radius: var(--radius-full);
  background: var(--accent-light);
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-title {
  margin-bottom: 0.5rem;
}

.card-excerpt {
  font-size: 0.96rem;
  color: var(--text-secondary);
}

.card-meta,
.recipe-meta,
.brew-guide-meta,
.single-meta,
.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.card-meta,
.brew-guide-meta,
.recipe-meta {
  margin: 0.9rem 0 0.95rem;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-full);
  background: var(--surface-muted);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.featured-story {
  padding: 1.5rem;
}

.featured-story-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 1.5rem;
  align-items: center;
}

.featured-story-media img {
  border-radius: calc(var(--radius-md) - 4px);
  aspect-ratio: 16 / 11;
  object-fit: cover;
}

/* Archive pages */
.archive-hero,
.entry-hero,
.page-hero {
  padding: 2.6rem 0 1.4rem;
}

.archive-hero-card,
.entry-hero-card,
.page-hero-card {
  padding: clamp(1.6rem, 3vw, 2.5rem);
}

.archive-hero-card p,
.entry-hero-card p,
.page-hero-card p {
  max-width: 760px;
  font-size: 1.04rem;
}

.archive-count {
  margin-top: 1rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Single layout */
.entry-layout {
  padding: 1.75rem 0 4rem;
}

.content-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.7fr);
  gap: 2rem;
  align-items: start;
}

.article-card,
.sidebar-card {
  padding: 1.6rem;
}

.article-card > *:first-child {
  margin-top: 0;
}

.entry-content {
  max-width: 100%;
}

.entry-content > * + * {
  margin-top: 1.25rem;
}

.entry-content p,
.page-content p {
  font-size: 1.03rem;
}

.entry-content h2,
.page-content h2 {
  margin-top: 2.6rem;
  margin-bottom: 1rem;
}

.entry-content h3,
.page-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.8rem;
}

.entry-content ul,
.entry-content ol,
.page-content ul,
.page-content ol {
  margin: 1rem 0 1.4rem;
}

.entry-content li,
.page-content li {
  margin-bottom: 0.55rem;
}

.entry-content a,
.page-content a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.entry-content blockquote,
.page-content blockquote {
  border-left: 4px solid var(--accent);
  padding: 0.3rem 0 0.3rem 1.25rem;
  font-style: italic;
  color: var(--text-secondary);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.info-item {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: var(--surface-muted);
  border: 1px solid var(--border-light);
}

.info-item strong {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.info-item span {
  color: var(--text-primary);
  font-weight: 700;
}

.list-card {
  padding: 1.25rem;
  border-radius: var(--radius-md);
  background: var(--surface-muted);
  border: 1px solid var(--border-light);
}

.list-card h3,
.list-card h4 {
  margin-bottom: 0.9rem;
}

.list-clean {
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: 0.8rem;
}

.list-clean li {
  position: relative;
  padding-left: 1.2rem;
  color: var(--text-secondary);
}

.list-clean li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.68rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.steps-list {
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: 1rem;
}

.steps-list li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding: 1rem;
  background: var(--surface-muted);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.step-badge {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--text-light);
  font-weight: 800;
}

.sidebar-card h3,
.sidebar-card h4 {
  margin-bottom: 0.9rem;
}

.sidebar-card p + p {
  margin-top: 0.7rem;
}

/* Product */
.product-price {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--accent-dark);
  margin-top: 0.5rem;
}

.product-rating {
  color: #b36a00;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.product-cta {
  margin-top: 1rem;
}

/* Footer */
.site-footer {
  margin-top: 4rem;
  padding: 4rem 0 2rem;
  background: var(--bg-dark);
  color: var(--text-light);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-brand h3,
.footer-links h4 {
  color: var(--text-light);
}

.footer-brand p,
.footer-links a,
.footer-bottom {
  color: rgba(255,255,255,0.72);
}

.footer-links ul {
  list-style: none;
  padding-left: 0;
}

.footer-links li + li {
  margin-top: 0.55rem;
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.9rem;
}

/* Pagination */
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 2rem;
}

.nav-links .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 0.9rem;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  font-weight: 700;
  color: var(--text-secondary);
}

.nav-links .page-numbers.current,
.nav-links .page-numbers:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

/* Tables and media */
table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

th,
 td {
  padding: 0.95rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

th {
  color: var(--text-primary);
  background: var(--surface-muted);
}

.wp-block-image,
.wp-block-gallery,
.wp-block-embed {
  margin: 1.8rem 0;
}

.wp-block-image img {
  border-radius: var(--radius-md);
}

.wp-block-image figcaption {
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
}

/* Utilities */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-4xl { font-size: clamp(2rem, 4vw, 3rem); }
.font-bold { font-weight: 800; }
.py-8 { padding: 4rem 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mr-2 { margin-right: 0.75rem; }

.screen-reader-text {
  position: absolute;
  left: -9999px;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid,
  .layout-grid,
  .content-shell,
  .featured-story-inner,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-stack {
    position: static;
  }

  .hero-highlights {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .header-inner,
  .header-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .header-inner {
    padding: 1rem 0;
  }

  .main-nav ul {
    flex-wrap: wrap;
    gap: 0.9rem 1rem;
  }

  .section,
  .py-8,
  .entry-layout {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}

@media (max-width: 680px) {
  .grid-2,
  .grid-3,
  .grid-4,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .section-header {
    align-items: start;
    flex-direction: column;
  }

  .hero-actions,
  .single-meta,
  .meta-pills {
    flex-direction: column;
    align-items: start;
  }

  .article-card,
  .sidebar-card,
  .featured-story,
  .hero-panel {
    padding: 1.2rem;
  }
}
