/*
Theme Name: Espresso Lifestyle
Theme URI: https://espressolifestyle.com/
Author: Espresso Lifestyle
Description: A fast, reading-first blog theme for espressolifestyle.com. Warm coffee palette, automatic table of contents, reading time, breadcrumbs and clean markup that works with Rank Math or Yoast.
Version: 1.0.2
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: espresso-lifestyle
*/

:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --ink: #2b1d16;
  --muted: #6e5f55;
  --line: #e8e0d6;
  --accent: #a4561b;
  --accent-dark: #7c3f12;
  --accent-soft: #f6e8da;
  --crema: #e9c99f;
  --radius: 12px;
  --max: 1160px;
  --read: 720px;
  --f-head: "Fraunces", Georgia, "Times New Roman", serif;
  --f-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 18px; line-height: 1.7; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--f-head); line-height: 1.2; color: var(--ink); font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); margin: 2em 0 .6em; }
h3 { font-size: 1.3rem; margin: 1.6em 0 .5em; }
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; clip: auto; width: auto; height: auto; padding: 10px 16px; background: var(--ink); color: #fff; border-radius: 6px; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.admin-bar .site-header { top: 32px; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; }
.site-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.site-brand .mark { width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 50% 45%, var(--crema) 0 38%, var(--accent) 40% 62%, var(--ink) 64%); flex: none; }
.site-brand .name { font-family: var(--f-head); font-weight: 700; font-size: 1.35rem; letter-spacing: -.01em; }
.custom-logo { max-height: 44px; width: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .95rem; font-weight: 500; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current-cat > a { background: var(--accent-soft); color: var(--accent-dark); }
.main-nav .sub-menu, .main-nav .children { display: none; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font: inherit; font-size: .95rem; color: var(--ink); cursor: pointer; }
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 20px 16px; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; }
}

/* Hero */
.hero { background: linear-gradient(135deg, #3a2419 0%, #5b3420 55%, #8a4a1f 100%); color: #fff; padding: 72px 0 64px; }
.hero h1 { color: #fff; max-width: 18ch; }
.hero p { font-size: 1.2rem; color: #f3e5d6; max-width: 56ch; margin: 0 0 28px; }
.hero .eyebrow { color: var(--crema); }
.btn { display: inline-block; background: var(--accent); color: #fff; padding: 12px 22px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 1rem; }
.btn:hover { background: var(--accent-dark); color: #fff; }
.btn.ghost { background: transparent; border: 1.5px solid rgba(255,255,255,.6); margin-left: 8px; }
.eyebrow { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--accent); margin: 0 0 10px; }

/* Category pills */
.topic-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 8px; }
.topic-row a { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; text-decoration: none; color: var(--ink); font-size: .95rem; font-weight: 500; }
.topic-row a:hover { border-color: var(--accent); color: var(--accent-dark); }

/* Sections and cards */
.section { padding: 48px 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 20px; }
.section-head h2 { margin: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: 0 10px 30px rgba(43,29,22,.08); transform: translateY(-2px); }
.card-thumb { aspect-ratio: 16/10; background: linear-gradient(135deg, var(--accent-soft), var(--crema)); display: block; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-cat { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--accent); text-decoration: none; }
.card h3 { margin: 0; font-size: 1.2rem; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--accent-dark); }
.card p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.55; }
.card .meta { margin-top: auto; font-size: .85rem; color: var(--muted); }
.card.featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.2fr 1fr; }
.card.featured .card-thumb { aspect-ratio: auto; min-height: 280px; }
.card.featured h3 { font-size: 1.7rem; }
@media (max-width: 760px) { .card.featured { grid-template-columns: 1fr; } .card.featured .card-thumb { min-height: 200px; } }

/* Start here band */
.band { background: var(--accent-soft); border-radius: var(--radius); padding: 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.band h3 { margin: 0 0 6px; font-size: 1.15rem; }
.band p { margin: 0; font-size: .95rem; color: var(--muted); }

/* Single */
.article-header { max-width: var(--read); margin: 40px auto 24px; }
.breadcrumbs { font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: .9rem; }
.article-hero { max-width: 960px; margin: 0 auto 32px; border-radius: var(--radius); overflow: hidden; }
.entry-content { max-width: var(--read); margin: 0 auto; }
.entry-content > * { margin-top: 0; margin-bottom: 1.2em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: .4em; }
.entry-content blockquote { border-left: 4px solid var(--accent); margin-left: 0; padding: 4px 0 4px 20px; color: var(--muted); font-style: italic; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.entry-content th { background: var(--accent-soft); font-weight: 600; }
.entry-content tr:nth-child(even) td { background: #fdfbf8; }
.entry-content h2 { border-top: 1px solid var(--line); padding-top: 1.2em; }
.entry-content .quick-picks, .entry-content .callout { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: var(--radius); padding: 18px 22px; }
.entry-content .quick-picks ul { margin: 0; }
.entry-content .pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.entry-content .pros-cons > div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; }
.entry-content .pros-cons h4 { margin: 0 0 6px; font-family: var(--f-body); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
.entry-content .pros-cons .pros h4 { color: #2f7d4f; }
.entry-content .pros-cons .cons h4 { color: #b23a2e; }
.entry-content .pros-cons ul { margin: 0; padding-left: 1.1em; font-size: .95rem; }
@media (max-width: 600px) { .entry-content .pros-cons { grid-template-columns: 1fr; } }
.affiliate-disclosure { font-size: .88rem; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: 8px; padding: 10px 14px; }

/* TOC */
.toc { max-width: var(--read); margin: 0 auto 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 22px; }
.toc summary { font-weight: 700; cursor: pointer; font-family: var(--f-head); font-size: 1.1rem; }
.toc ol { margin: 10px 0 0; padding-left: 1.3em; font-size: .95rem; }
.toc li { margin: 4px 0; }
.toc a { text-decoration: none; color: var(--ink); }
.toc a:hover { color: var(--accent); }

/* Author box, related, tags */
.post-footer { max-width: var(--read); margin: 40px auto 0; }
.tags a { display: inline-block; font-size: .85rem; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; margin: 0 6px 6px 0; text-decoration: none; color: var(--muted); }
.author-box { display: flex; gap: 16px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-top: 24px; }
.author-box img { border-radius: 50%; flex: none; }
.author-box h3 { margin: 0 0 4px; font-size: 1.1rem; }
.author-box p { margin: 0; font-size: .95rem; color: var(--muted); }
.related { margin-top: 56px; }

/* Archive / page */
.archive-header { padding: 48px 0 8px; }
.archive-header p { color: var(--muted); max-width: 60ch; }
.page-content { max-width: var(--read); margin: 40px auto 64px; }
.pagination { display: flex; gap: 8px; justify-content: center; margin: 40px 0; flex-wrap: wrap; }
.pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); text-decoration: none; color: var(--ink); }
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Search form */
.search-form { display: flex; gap: 8px; max-width: 480px; }
.search-form input[type=search] { flex: 1; font: inherit; font-size: 1rem; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); min-width: 0; }
.search-form button { font: inherit; font-size: 1rem; font-weight: 600; padding: 10px 18px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; cursor: pointer; }

/* Comments */
.comments-area { max-width: var(--read); margin: 48px auto 0; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 12px; }
.comment-form input, .comment-form textarea { width: 100%; font: inherit; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.comment-form .submit { width: auto; background: var(--accent); color: #fff; border: 0; padding: 10px 20px; border-radius: 999px; font-weight: 600; cursor: pointer; }

/* Footer */
.site-footer { background: #2b1d16; color: #d9cbbd; margin-top: 72px; padding: 48px 0 28px; font-size: .95rem; }
.site-footer a { color: #f3e5d6; text-decoration: none; }
.site-footer a:hover { color: var(--crema); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-grid h2, .footer-grid .widget-title { font-family: var(--f-head); color: #fff; font-size: 1.1rem; margin: 0 0 12px; border: 0; padding: 0; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 6px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 32px; padding-top: 20px; font-size: .85rem; color: #a8998e; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* WordPress core */
.alignwide { max-width: 960px; margin-left: auto; margin-right: auto; }
.alignfull { width: 100vw; position: relative; left: 50%; transform: translateX(-50%); }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text, figcaption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: 6px; }
.sticky, .bypostauthor, .gallery-caption { }
