/* Coffee's Alternatives: design system (forest / matcha / oat / sand, Playfair Display + Inter). Hand written, no framework. */

@font-face { font-family: 'Inter'; font-weight: 400; font-style: normal; font-display: swap; src: url(/assets/fonts/inter-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-style: normal; font-display: swap; src: url(/assets/fonts/inter-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-style: normal; font-display: swap; src: url(/assets/fonts/inter-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-weight: 600; font-style: normal; font-display: swap; src: url(/assets/fonts/playfair-display-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-weight: 700; font-style: normal; font-display: swap; src: url(/assets/fonts/playfair-display-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-weight: 600; font-style: italic; font-display: swap; src: url(/assets/fonts/playfair-display-latin-600-italic.woff2) format('woff2'); }

:root {
  --forest: #1a3626;
  --matcha: #9dc04b;
  --oat: #f7f5f0;
  --sand: #efece5;
  --matcha-ink: #567318;   /* matcha darkened for text on light backgrounds (AA contrast) */
  --matcha-display: #6b8f1e; /* large display text on light backgrounds */
  --line: rgba(26, 54, 38, 0.12);
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --shadow: 0 12px 24px -10px rgba(26, 54, 38, 0.15);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--oat); color: var(--forest); font-family: var(--sans); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; margin: 0 0 0.6em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--matcha); outline-offset: 2px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--matcha); color: var(--forest); padding: 0.6rem 1rem; z-index: 100; font-weight: 600; }
.skip-link:focus { left: 0; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 768px) { .wrap, .wrap-narrow { padding: 0 48px; } .wrap-narrow { max-width: 856px; } }

/* ------------------------------------------------------------ buttons */
.btn { display: inline-block; font: 600 1rem/1 var(--sans); padding: 1rem 2rem; border-radius: 4px; border: 2px solid transparent; text-decoration: none; cursor: pointer; transition: background-color 0.2s, color 0.2s, border-color 0.2s; text-align: center; }
.btn-dark { background: var(--forest); color: var(--oat); box-shadow: 0 10px 20px -8px rgba(26, 54, 38, 0.4); }
.btn-dark:hover { background: var(--matcha); color: var(--forest); }
.btn-outline { border-color: var(--forest); color: var(--forest); background: transparent; }
.btn-outline:hover { background: var(--forest); color: var(--oat); }
.btn-matcha { background: var(--matcha); color: var(--forest); }
.btn-matcha:hover { background: var(--sand); }
.btn-sm { padding: 0.6rem 1.25rem; font-size: 0.875rem; }

/* ------------------------------------------------------------ navigation */
.nav { position: sticky; top: 0; z-index: 50; background: var(--forest); color: var(--oat); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-top: 1rem; padding-bottom: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; font: 700 1.5rem/1 var(--serif); letter-spacing: -0.01em; text-decoration: none; }
.brand svg { width: 28px; height: 28px; color: var(--matcha); transition: transform 0.3s; flex: none; }
.brand:hover svg { transform: rotate(-12deg); }
.nav-links { display: none; gap: 2rem; font-size: 0.875rem; font-weight: 500; letter-spacing: 0.02em; }
.nav-links a { text-decoration: none; padding: 0.25rem 0; border-bottom: 2px solid transparent; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--matcha); border-color: var(--matcha); }
.nav-actions { display: flex; align-items: center; gap: 0.75rem; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 4px; background: transparent; border: 0; color: inherit; cursor: pointer; }
.icon-btn:hover { color: var(--matcha); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-cta { display: none; }
.menu-toggle { display: inline-flex; }
.nav-panel { display: none; border-top: 1px solid rgba(255, 255, 255, 0.12); padding: 0.75rem 0 1.25rem; }
.nav-open .nav-panel { display: block; }
.nav-panel a { display: block; padding: 0.7rem 0; text-decoration: none; font-weight: 500; }
.nav-panel a:hover { color: var(--matcha); }
.nav-panel .btn { margin-top: 0.75rem; display: block; color: var(--forest); }
@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-block; }
  .menu-toggle, .nav-panel { display: none !important; }
}

/* ------------------------------------------------------------ hero */
.hero { border-bottom: 1px solid var(--line); text-align: center; padding: 5rem 0 5.5rem; }
.hero .inner { max-width: 896px; margin: 0 auto; }
.badge { display: inline-block; padding: 0.25rem 0.75rem; margin-bottom: 1.5rem; border: 1px solid rgba(26, 54, 38, 0.2); border-radius: 999px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.5rem); line-height: 1.1; margin-bottom: 1.5rem; }
.hero h1 em { color: var(--matcha-display); font-style: italic; font-weight: 600; }
.hero p.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); font-weight: 400; opacity: 0.85; line-height: 1.7; max-width: 42rem; margin: 0 auto 2.5rem; }
.hero .actions { display: flex; flex-direction: column; gap: 1rem; justify-content: center; }
@media (min-width: 640px) { .hero .actions { flex-direction: row; } }

/* ------------------------------------------------------------ sections */
.section { padding: 5rem 0; }
.section-sand { background: var(--sand); }
.section-title { display: inline-block; font-size: 1.9rem; margin-bottom: 2.5rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--matcha); }
.section-head { text-align: center; max-width: 48rem; margin: 0 auto 3.5rem; }
.section-head h2 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 1rem; }
.section-head p { font-size: 1.1rem; opacity: 0.85; margin: 0; }
.eyebrow { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--matcha-ink); display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.eyebrow .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--forest); }
.eyebrow .muted { color: rgba(26, 54, 38, 0.65); }

/* ------------------------------------------------------------ cards */
.card { background: var(--sand); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.section-sand .card { background: var(--oat); }
.card-img { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--sand); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s; }
.card:hover .card-img img { transform: scale(1.04); }
.card-body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.card h3 { font-size: 1.35rem; margin-bottom: 0.6rem; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { color: var(--matcha-ink); }
.card p { font-size: 0.95rem; opacity: 0.85; margin-bottom: 1.25rem; flex: 1; }
.card .more { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; text-decoration: none; color: var(--matcha-ink); }
.card .more:hover { text-decoration: underline; }
.grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.featured { display: flex; flex-direction: column; background: var(--oat); border: 1px solid rgba(26, 54, 38, 0.06); border-radius: 16px; overflow: hidden; text-decoration: none; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.featured:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.featured .media { aspect-ratio: 4 / 3; overflow: hidden; }
.featured .media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s; }
.featured:hover .media img { transform: scale(1.05); }
.featured .copy { padding: 2rem; display: flex; flex-direction: column; justify-content: center; }
.featured h3 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin-bottom: 1rem; }
.featured:hover h3 { color: var(--matcha-ink); }
.featured p { opacity: 0.85; margin-bottom: 1.5rem; }
.featured .cta { font-weight: 600; border-bottom: 1px solid var(--forest); padding-bottom: 0.25rem; align-self: flex-start; }
@media (min-width: 768px) { .featured { flex-direction: row; } .featured .media, .featured .copy { width: 50%; } .featured .media { aspect-ratio: auto; min-height: 340px; } .featured .copy { padding: 3rem; } }

/* ------------------------------------------------------------ split sections (intro, why switch) */
.split { display: flex; flex-direction: column; gap: 3rem; align-items: center; }
.split > * { width: 100%; }
.split img { border-radius: 12px; box-shadow: 0 24px 40px -16px rgba(26, 54, 38, 0.3); border: 1px solid var(--line); }
@media (min-width: 768px) { .split { flex-direction: row; gap: 4rem; } .split > * { width: 50%; } }
.reasons { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1.5rem; }
.reasons li { display: flex; gap: 1rem; align-items: flex-start; }
.reasons .ico { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--forest); color: var(--matcha); display: flex; align-items: center; justify-content: center; margin-top: 4px; }
.reasons .ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.reasons h3 { font-size: 1.25rem; margin-bottom: 0.25rem; }
.reasons p { font-size: 0.95rem; opacity: 0.85; margin: 0; }

/* ------------------------------------------------------------ page and post headers */
.page-head { padding: 4rem 0 2rem; text-align: center; border-bottom: 1px solid var(--line); background: var(--oat); }
.page-head h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 auto; max-width: 820px; }
.page-head .eyebrow { justify-content: center; }
.page-head .sub { max-width: 40rem; margin: 1rem auto 0; opacity: 0.8; font-size: 1.1rem; }
.post-head { padding: 3.5rem 0 1.5rem; text-align: center; }
.post-head h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin-bottom: 1rem; }
.post-head .eyebrow { justify-content: center; }
.post-hero { max-width: 1000px; margin: 1.5rem auto 0; padding: 0 24px; }
.post-hero img { width: 100%; border-radius: 16px; max-height: 520px; object-fit: cover; box-shadow: var(--shadow); }
.page-body { padding: 3rem 0 5rem; }
.list-body { padding: 3.5rem 0 5rem; }

/* ------------------------------------------------------------ prose (post and page content) */
.prose { font-size: 1.125rem; line-height: 1.8; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 2rem; margin: 2.2em 0 0.6em; }
.prose h3 { font-size: 1.5rem; margin: 1.9em 0 0.5em; }
.prose h4 { font-size: 1.2rem; margin: 1.6em 0 0.4em; }
.prose a { color: var(--matcha-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { color: var(--forest); text-decoration-thickness: 2px; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.4em; }
.prose li::marker { color: var(--matcha-ink); }
.prose li.ql-indent-1 { margin-left: 1.5em; }
.prose img { border-radius: 10px; margin: 1.5rem auto; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
.prose blockquote { margin: 1.5rem 0; padding: 0.5rem 1.25rem; border-left: 4px solid var(--matcha); background: var(--sand); border-radius: 0 8px 8px 0; }
.prose cite { font-size: 0.85rem; opacity: 0.7; }
.prose sup { font-size: 0.7em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 1rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 0.6rem 0.8rem; text-align: left; }
.prose th { background: var(--sand); }
.alignleft { float: left; margin: 0.4em 1.5em 1em 0; }
.alignright { float: right; margin: 0.4em 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.prose .alignleft, .prose .alignright { max-width: 45%; margin-top: 0.4em; margin-bottom: 1em; }
.prose::after { content: ''; display: block; clear: both; }
@media (max-width: 575px) { .alignleft, .alignright, .prose .alignleft, .prose .alignright { float: none; display: block; margin: 1rem auto; max-width: 100%; } .prose { font-size: 1.05rem; } }

/* old grid shortcode */
.gdc_row { display: grid; gap: 2rem; margin: 0 0 1.5rem; }
@media (min-width: 768px) { .gdc_row { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; } }
.gdc_column .gdc_inner { padding: 0; }

/* table of contents */
#toc_container { background: var(--sand); border: 1px solid var(--line); border-radius: 12px; padding: 1.25rem 1.5rem; margin: 0 0 2rem; font-size: 1rem; line-height: 1.5; width: auto; display: block; }
#toc_container p.toc_title { font: 700 1.15rem/1.3 var(--serif); margin: 0; text-align: left; }
#toc_container .toc_toggle { font: 500 0.8rem var(--sans); margin-left: 0.4rem; }
#toc_container ul { list-style: none; margin: 0; padding: 0; }
#toc_container ul ul { margin: 0.2rem 0 0.2rem 1.25rem; }
#toc_container ul.toc_list { margin-top: 0.9rem; }
#toc_container li { margin: 0.25rem 0; padding: 0; }
#toc_container li::marker { content: none; }
#toc_container a { text-decoration: none; color: var(--forest); }
#toc_container a:hover { color: var(--matcha-ink); text-decoration: underline; }
#toc_container .toc_number { color: var(--matcha-ink); font-weight: 600; margin-right: 0.35em; }
#toc_container.toc-collapsed ul.toc_list { display: none; }
.prose [id] { scroll-margin-top: 84px; }

/* share bar */
.share-bar { margin: 3rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.share-title { font: 700 0.75rem var(--sans); letter-spacing: 0.08em; text-transform: uppercase; margin-right: 0.5rem; }
.share-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.share-btn { display: inline-block; padding: 0.5rem 1rem; border: 1px solid var(--forest); border-radius: 4px; font-size: 0.85rem; font-weight: 600; text-decoration: none; }
.share-btn:hover { background: var(--forest); color: var(--oat); }

/* pagination */
.pagi { display: flex; justify-content: center; gap: 0.4rem; flex-wrap: wrap; margin: 3rem 0 0; }
.pagi .page-numbers { min-width: 2.6rem; padding: 0.6rem 0.8rem; text-align: center; border-radius: 4px; border: 1px solid var(--line); text-decoration: none; font-weight: 600; background: var(--oat); }
.pagi a.page-numbers:hover { border-color: var(--forest); }
.pagi .current { background: var(--forest); color: var(--oat); border-color: var(--forest); }
.pagi .dots { border-color: transparent; background: transparent; }

/* forms */
.form-control, .field { width: 100%; font: inherit; color: inherit; background: #fff; border: 1px solid rgba(26, 54, 38, 0.25); border-radius: 6px; padding: 0.8rem 1rem; }
.form-control:focus, .field:focus { outline: 2px solid var(--matcha); border-color: var(--forest); }
textarea.form-control { resize: vertical; }
.contact-form { max-width: 640px; }
.contact-form label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.contact-form .req { color: #b00020; margin-left: 2px; }
.contact-form .cf-consent label { font-weight: 400; font-size: 0.95rem; }
.contact-form .cf-hp { position: absolute; left: -9999px; }
.contact-form .cf-status { font-size: 1rem; }
.contact-form .cf-status.error { color: #b00020; }
.contact-form .button, .button { background: var(--forest); color: var(--oat); border: 0; border-radius: 4px; padding: 0.9rem 2rem; font: 600 1rem var(--sans); cursor: pointer; }
.contact-form .button:hover { background: var(--matcha); color: var(--forest); }
.rank-math-html-sitemap__title { font-size: 1.5rem; margin-top: 2rem; }
.rank-math-html-sitemap ul { padding-left: 1.2em; }

/* search */
.search-form { display: flex; gap: 0.75rem; max-width: 640px; margin: 1.5rem auto 0; }
.search-form .field { flex: 1; }
.not-found { text-align: center; font-size: 1.1rem; opacity: 0.8; }

/* ------------------------------------------------------------ newsletter + footer */
.footer { background: var(--forest); color: var(--oat); padding: 5rem 0 2.5rem; position: relative; overflow: hidden; margin-top: 0; }
.footer::before { content: ''; position: absolute; top: 0; right: 0; width: 256px; height: 256px; border-radius: 50%; background: var(--matcha); opacity: 0.05; filter: blur(60px); transform: translate(50%, -50%); pointer-events: none; }
.footer .wrap { position: relative; }
.newsletter { text-align: center; max-width: 42rem; margin: 0 auto 4rem; }
.newsletter h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); color: var(--matcha); margin-bottom: 1rem; }
.newsletter p { opacity: 0.85; margin-bottom: 2rem; }
.newsletter form { display: flex; flex-direction: column; gap: 0.75rem; max-width: 28rem; margin: 0 auto; }
@media (min-width: 640px) { .newsletter form { flex-direction: row; } }
.newsletter .field { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.25); color: var(--oat); }
.newsletter .field::placeholder { color: rgba(247, 245, 240, 0.6); }
.newsletter .field:focus { border-color: var(--matcha); outline-color: var(--matcha); }
.newsletter .fine { font-size: 0.75rem; opacity: 0.6; margin: 1rem 0 0; }
.footer-cols { display: grid; gap: 3rem; grid-template-columns: 1fr; border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 3rem; }
@media (min-width: 768px) { .footer-cols { grid-template-columns: 2fr 1fr 1fr; } }
.footer .brand { margin-bottom: 1rem; }
.footer .about { opacity: 0.7; font-size: 0.9rem; max-width: 22rem; }
.footer h4 { font-size: 1.1rem; color: var(--matcha); margin-bottom: 1rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; font-size: 0.9rem; opacity: 0.85; }
.footer ul a { text-decoration: none; }
.footer ul a:hover { color: var(--matcha); }
.legal { border-top: 1px solid rgba(255, 255, 255, 0.08); margin-top: 3rem; padding-top: 2rem; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.75rem; opacity: 0.6; }
@media (min-width: 768px) { .legal { flex-direction: row; justify-content: space-between; } }

/* standalone subscribe page */
.landing { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; background: var(--forest); color: var(--oat); }
.landing .box { max-width: 36rem; text-align: center; }
.landing h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); color: var(--matcha); }
.landing ul { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 0.4rem; opacity: 0.9; }
.landing .newsletter { margin: 2rem 0 0; }
.landing .brand { justify-content: center; margin-bottom: 2rem; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
