/* ============================================================
   Morning Brew Guide — Main Stylesheet
   ============================================================ */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Source+Sans+3:wght@300;400;600;700&display=swap');

/* --- CSS Variables --- */
:root {
  --color-bg:         #FBF7F0;
  --color-nav-bg:     #1A1207;
  --color-heading:    #3C2415;
  --color-accent:     #6F4E37;
  --color-highlight:  #C8A27A;
  --color-card:       #E8DDD3;
  --color-text:       #2C1F0E;
  --color-muted:      #8A7560;
  --color-border:     #D4C4B0;
  --color-white:      #FFFFFF;
  --color-link:       #6F4E37;
  --color-link-hover: #3C2415;

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Sans 3', system-ui, sans-serif;

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  16px;

  --shadow-sm:  0 1px 3px rgba(60,36,21,0.10);
  --shadow-md:  0 4px 12px rgba(60,36,21,0.12);
  --shadow-lg:  0 8px 32px rgba(60,36,21,0.15);

  --max-width:   1140px;
  --content-width: 780px;

  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

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

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  line-height: 1.25;
  font-weight: 700;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem);   margin-top: 2.5rem; margin-bottom: 0.75rem; }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); margin-top: 2rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.1rem; margin-top: 1.5rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1.1rem; }

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1.1rem;
}

li { margin-bottom: 0.35rem; }

strong { font-weight: 700; color: var(--color-heading); }

em { font-style: italic; }

hr {
  border: none;
  border-top: 2px solid var(--color-border);
  margin: 2.5rem 0;
}

blockquote {
  border-left: 4px solid var(--color-highlight);
  background: var(--color-card);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--color-accent);
}

/* --- Layout Helpers --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.content-container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* --- Navigation --- */
.site-nav {
  background: var(--color-nav-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-highlight) !important;
  text-decoration: none;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

.nav-brand:hover {
  color: var(--color-white) !important;
}

.nav-links {
  display: flex;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links li a {
  color: #C8A27A;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
  display: block;
  letter-spacing: 0.02em;
}

.nav-links li a:hover {
  color: var(--color-white);
  background: rgba(200,162,122,0.15);
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  background: var(--color-card);
  border-bottom: 1px solid var(--color-border);
  padding: 0.6rem 0;
  font-size: 0.82rem;
  color: var(--color-muted);
}

.breadcrumbs .container {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--color-accent);
  text-decoration: none;
}

.breadcrumbs a:hover { text-decoration: underline; }

.breadcrumb-sep { color: var(--color-muted); }

.breadcrumb-current { color: var(--color-muted); }

/* --- Hero (Homepage) --- */
.hero {
  background: linear-gradient(135deg, #1A1207 0%, #3C2415 40%, #6F4E37 100%);
  color: var(--color-white);
  padding: 5rem 1.25rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C8A27A' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 1;
}

.hero-content {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

.hero-eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-highlight);
  margin-bottom: 1rem;
  display: block;
}

.hero h1 {
  color: var(--color-white);
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: 1.25rem;
  line-height: 1.15;
}

.hero p {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.82);
  max-width: 520px;
  margin: 0 auto 2rem;
  line-height: 1.65;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--color-highlight);
  color: var(--color-nav-bg);
  border-color: var(--color-highlight);
}

.btn-primary:hover {
  background: #d9b38c;
  color: var(--color-nav-bg);
  border-color: #d9b38c;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* --- Section titles --- */
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: var(--color-heading);
  margin-bottom: 0.4rem;
}

.section-subtitle {
  color: var(--color-muted);
  font-size: 1rem;
  margin-bottom: 2rem;
}

/* --- Article Cards --- */
.cards-section {
  padding: 3.5rem 0;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.card-image-placeholder {
  height: 160px;
  background: linear-gradient(135deg, var(--color-card) 0%, var(--color-border) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

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

.card-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.card h3 {
  font-size: 1.1rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.card h3 a {
  color: var(--color-heading);
  text-decoration: none;
}

.card h3 a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.card p {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-bottom: 0;
  flex: 1;
}

.card-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--color-muted);
}

.card-read-more {
  color: var(--color-accent);
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.card-read-more:hover { color: var(--color-heading); }

/* --- Article Layout --- */
.article-header {
  background: linear-gradient(to bottom, var(--color-card) 0%, var(--color-bg) 100%);
  padding: 3rem 1.25rem 2.5rem;
  border-bottom: 1px solid var(--color-border);
}

.article-header .container {
  max-width: var(--content-width);
}

.article-tag {
  display: inline-block;
  background: var(--color-highlight);
  color: var(--color-nav-bg);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  margin-bottom: 1rem;
  text-decoration: none;
}

.article-title {
  margin-bottom: 1rem;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--color-muted);
  flex-wrap: wrap;
  margin-top: 1rem;
}

.article-meta-sep { color: var(--color-border); }

/* --- Table of Contents --- */
.toc {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 2rem 0;
}

.toc-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.25rem;
}

.toc li {
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
}

.toc a {
  color: var(--color-accent);
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
  color: var(--color-heading);
}

/* --- Article Body --- */
.article-body {
  padding: 2.5rem 0 4rem;
}

.article-body .content-container {
  /* already constrained */
}

/* --- Product/Review Box --- */
.product-box {
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 2rem 0;
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.product-box-header {
  background: var(--color-card);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--color-border);
}

.product-rank {
  background: var(--color-accent);
  color: var(--color-white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 2rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.product-name {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-heading);
  flex: 1;
}

.product-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-accent);
  white-space: nowrap;
}

.product-box-body {
  padding: 1.5rem;
}

.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.pros, .cons {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.pros h4, .cons h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0;
  margin-bottom: 0.6rem;
}

.pros h4 { color: #2e7d32; }
.cons h4 { color: #c62828; }

.pros ul, .cons ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.88rem;
}

.pros li::marker { color: #2e7d32; }
.cons li::marker { color: #c62828; }

.buy-btn {
  display: inline-block;
  margin-top: 1rem;
  background: var(--color-accent);
  color: var(--color-white) !important;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none !important;
  transition: background 0.2s, transform 0.2s;
}

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

/* --- Comparison Table --- */
.comparison-table-wrap {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: var(--color-white);
}

.comparison-table thead {
  background: var(--color-nav-bg);
  color: var(--color-highlight);
}

.comparison-table thead th {
  padding: 0.85rem 1rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.comparison-table tbody tr {
  border-bottom: 1px solid var(--color-border);
  transition: background 0.15s;
}

.comparison-table tbody tr:last-child { border-bottom: none; }

.comparison-table tbody tr:hover {
  background: var(--color-card);
}

.comparison-table td {
  padding: 0.85rem 1rem;
  vertical-align: top;
}

.comparison-table td:first-child {
  font-weight: 700;
  color: var(--color-heading);
  white-space: nowrap;
}

.badge-best {
  display: inline-block;
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 2rem;
  margin-left: 0.35rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: middle;
  white-space: nowrap;
}

/* --- Info/Callout Boxes --- */
.callout {
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  border-left: 4px solid;
}

.callout-tip {
  background: #fffde7;
  border-color: #f9a825;
}

.callout-info {
  background: #e3f2fd;
  border-color: #1565c0;
}

.callout-warning {
  background: #fff3e0;
  border-color: #e65100;
}

.callout-title {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.callout-tip .callout-title    { color: #e65100; }
.callout-info .callout-title   { color: #1565c0; }
.callout-warning .callout-title { color: #bf360c; }

.callout p:last-child { margin-bottom: 0; }

/* --- FAQ Section --- */
.faq-section { margin: 2.5rem 0; }

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  overflow: hidden;
  background: var(--color-white);
}

.faq-question {
  padding: 1rem 1.25rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-heading);
  background: var(--color-card);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-answer {
  padding: 1.1rem 1.25rem;
  font-size: 0.95rem;
  color: var(--color-text);
  border-top: 1px solid var(--color-border);
}

.faq-answer p:last-child { margin-bottom: 0; }

/* --- Internal Link Box --- */
.related-links {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 2rem 0;
}

.related-links h4 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
}

.related-links ul {
  margin: 0;
  padding-left: 1.1rem;
}

.related-links li {
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

/* --- Affiliate Disclosure Banner --- */
.affiliate-notice {
  background: #fffde7;
  border: 1px solid #f9e08b;
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  font-size: 0.82rem;
  color: #5d4037;
  margin: 1.5rem 0;
  line-height: 1.55;
}

.affiliate-notice a {
  color: var(--color-accent);
}

/* --- Site Footer --- */
.site-footer {
  background: var(--color-nav-bg);
  color: rgba(200,162,122,0.75);
  padding: 3rem 1.25rem 2rem;
  margin-top: 4rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-highlight) !important;
  text-decoration: none;
  display: block;
  margin-bottom: 0.75rem;
}

.footer-desc {
  font-size: 0.88rem;
  line-height: 1.65;
  margin-bottom: 0;
}

.footer-heading {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-highlight);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.85rem;
}

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

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

.footer-links a {
  color: rgba(200,162,122,0.7);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--color-highlight);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(200,162,122,0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-bottom a {
  color: rgba(200,162,122,0.7);
  text-decoration: none;
}
.footer-bottom a:hover { color: var(--color-highlight); }

/* --- Intro Section (Homepage) --- */
.intro-section {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.intro-text h2 {
  margin-top: 0;
}

.intro-features {
  list-style: none;
  padding: 0;
  margin-top: 1.25rem;
}

.intro-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.intro-features li::before {
  content: '✓';
  color: var(--color-highlight);
  font-weight: 700;
  flex-shrink: 0;
  line-height: 1.7;
}

.intro-aside {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--color-border);
}

.intro-aside h3 {
  margin-top: 0;
  font-size: 1.2rem;
}

/* --- Brew Method Comparison Grid (homepage) --- */
.brew-methods {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.brew-method-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
}

.brew-method-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  color: inherit;
}

.brew-method-icon { font-size: 2.2rem; display: block; margin-bottom: 0.5rem; }

.brew-method-card h4 {
  font-size: 0.95rem;
  margin-top: 0.3rem;
  margin-bottom: 0.25rem;
}

.brew-method-card p {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin: 0;
}

/* --- Page Header (about, privacy, etc.) --- */
.page-header {
  background: var(--color-card);
  padding: 3rem 1.25rem 2.5rem;
  border-bottom: 1px solid var(--color-border);
  text-align: center;
}

.page-header h1 { margin-bottom: 0.5rem; }

.page-header .lead {
  color: var(--color-muted);
  font-size: 1.1rem;
  max-width: 540px;
  margin: 0 auto;
}

.page-body {
  padding: 2.5rem 0 4rem;
}

/* --- Responsive: Tablets --- */
@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

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

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

/* --- Responsive: Mobile --- */
@media (max-width: 640px) {
  .nav-links {
    display: none;
  }

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

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

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

  .comparison-table {
    font-size: 0.8rem;
  }

  .comparison-table td, .comparison-table th {
    padding: 0.6rem 0.65rem;
  }

  .product-box-header {
    flex-direction: column;
  }

  .article-header {
    padding: 2rem 1.25rem 1.5rem;
  }
}

/* --- Product Images --- */
.product-image { max-width: 250px; height: auto; border-radius: 8px; margin: 0 auto 1rem; display: block; }
.product-review .product-image-link { display: block; text-align: center; }
.product-box-body .product-image-link { display: block; text-align: center; }

/* --- Print --- */
@media print {
  .site-nav, .site-footer, .buy-btn, .breadcrumbs { display: none; }
  body { background: white; color: black; }
  a { color: black; text-decoration: underline; }
}
