/* Square Coffee Co. — lean theme, main stylesheet */

:root {
	--ink: #2b1a12;
	--ink-soft: #6b5445;
	--bg: #fbf5ee;
	--bg-alt: #f2e4d4;
	--espresso: #4a2c20;
	--espresso-deep: #2e1810;
	--caramel: #c17d3f;
	--cream: #f7ecd9;
	--rust: #a84a30;
	--card-radius: 16px;
	--wrap: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: 'Karla', system-ui, -apple-system, sans-serif;
	color: var(--ink);
	background: var(--bg);
	overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--espresso-deep); text-decoration: none; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.screen-reader-text { position: absolute; left: -9999px; }

h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; line-height: 1.15; margin: 0; }
.section-title { font-size: clamp(1.4rem, 2.2vw, 1.9rem); margin: 0; }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--caramel); margin: 0 0 14px; }

/* Scroll progress bar */
.scroll-progress { position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 999; background: transparent; }
.scroll-progress-bar { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--rust), var(--caramel), var(--espresso)); transition: width .1s linear; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 90; background: rgba(251,245,238,.9); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(74,44,32,.1); transition: padding .25s ease, box-shadow .25s ease; }
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(43,26,18,.1); }
.header-inner { display: flex; align-items: center; gap: 24px; padding: 18px 24px; transition: padding .25s ease; }
.site-header.is-scrolled .header-inner { padding: 10px 24px; }
.logo-box { display: inline-flex; align-items: center; border: 2px solid var(--ink); padding: 6px 14px; transition: padding .25s ease; }
.site-header.is-scrolled .logo-box { padding: 4px 10px; }
.logo-text { font-family: 'Fraunces', serif; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .95rem; color: var(--ink); }
.primary-nav { margin-left: auto; }
.primary-nav .menu { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; font-weight: 500; font-size: .95rem; }
.primary-nav .menu a { color: var(--ink); }
.primary-nav .menu a:hover { color: var(--rust); }
.search-form { display: flex; align-items: center; background: #fff; border: 1px solid rgba(74,44,32,.15); border-radius: 100px; padding: 6px 6px 6px 16px; }
.search-form input { border: none; outline: none; font-family: inherit; font-size: .9rem; width: 140px; background: transparent; }
.search-form button { border: none; background: var(--espresso); color: #fff; border-radius: 50%; width: 32px; height: 32px; cursor: pointer; }
.nav-toggle, .menu-btn { display: none; }

/* Steam hero */
.steam-hero { position: relative; overflow: hidden; padding: 110px 0 90px; background: radial-gradient(circle at 25% 15%, var(--cream), var(--bg) 65%); }
.steam-field { position: absolute; inset: 0; z-index: 0; }
.steam { position: absolute; width: 60px; height: 160px; border-radius: 50% 50% 40% 40%; background: linear-gradient(to top, rgba(74,44,32,.14), transparent 80%); filter: blur(6px); opacity: .6; transform-origin: bottom center; }
.steam-a { left: 14%; top: 6%; animation: rise 9s ease-in-out infinite; }
.steam-b { right: 18%; top: 2%; animation: rise 11s ease-in-out infinite .6s; }
.steam-c { left: 46%; top: -30px; animation: rise 7.5s ease-in-out infinite 1.2s; }
@keyframes rise { 0% { transform: translateY(20px) scaleX(1) rotate(0deg); opacity: 0; } 20% { opacity: .6; } 50% { transform: translateY(-60px) scaleX(1.3) rotate(4deg); } 100% { transform: translateY(-140px) scaleX(1.7) rotate(-5deg); opacity: 0; } }
.bean { position: absolute; width: 22px; height: 14px; border-radius: 50%; background: var(--espresso); opacity: .18; }
.bean::after { content: ''; position: absolute; inset: 0; margin: auto; width: 1px; height: 80%; background: var(--bg); }
.bean-a { left: 8%; bottom: 20%; transform: rotate(30deg); animation: bob 6s ease-in-out infinite; }
.bean-b { right: 10%; bottom: 14%; transform: rotate(-20deg); animation: bob 7s ease-in-out infinite 1s; }
.bean-c { left: 42%; bottom: 8%; transform: rotate(60deg); animation: bob 5.5s ease-in-out infinite .5s; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(30deg); } 50% { transform: translateY(-10px) rotate(34deg); } }

.steam-inner { position: relative; z-index: 1; text-align: center; max-width: 720px; margin: 0 auto; }
.steam-title { font-size: clamp(2.2rem, 5vw, 3.8rem); margin-bottom: 18px; color: var(--ink); }
.steam-sub { font-size: 1.1rem; color: var(--ink-soft); margin: 0 0 32px; }
.steam-search { display: flex; max-width: 520px; margin: 0 auto; background: #fff; border-radius: 100px; padding: 8px 8px 8px 24px; box-shadow: 0 16px 40px rgba(74,44,32,.15); }
.steam-search input { flex: 1; border: none; outline: none; font-family: inherit; font-size: 1rem; background: transparent; }
.steam-search button { border: none; background: linear-gradient(135deg, var(--rust), var(--espresso)); color: #fff; font-weight: 700; border-radius: 100px; padding: 12px 26px; cursor: pointer; }

/* Reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; transition-delay: var(--d, 0ms); }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* Category cloud */
.cat-cloud { padding: 70px 0 40px; text-align: center; }
.cat-cloud-field { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 28px; }
.cat-pill { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 100px; font-weight: 700; font-size: .95rem; color: #fff; }
.cat-pill-count { font-size: .75rem; font-weight: 600; background: rgba(255,255,255,.3); border-radius: 100px; padding: 2px 8px; }
.cat-pill-0 { background: linear-gradient(135deg, var(--espresso), var(--espresso-deep)); }
.cat-pill-1 { background: linear-gradient(135deg, var(--rust), #c76548); }
.cat-pill-2 { background: linear-gradient(135deg, var(--caramel), #a8672f); }
.cat-pill-3 { background: linear-gradient(135deg, #8a5a3c, var(--rust)); }

/* Post rows with alternating parallax-tinted bands */
.post-row { padding: 60px 0; position: relative; }
.post-row.band-1 { background: var(--bg-alt); }
.post-row-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 26px; }
.post-row-viewall { font-weight: 700; font-size: .9rem; white-space: nowrap; color: var(--rust); }
.post-row-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; }
.entry-card { background: #fff; border-radius: var(--card-radius); overflow: hidden; box-shadow: 0 6px 20px rgba(43,26,18,.08); transition: transform .3s ease, box-shadow .3s ease; }
.entry-card:hover { transform: translateY(-6px); box-shadow: 0 16px 34px rgba(43,26,18,.16); }
.entry-card .thumb { display: block; aspect-ratio: 3/2; overflow: hidden; background: var(--bg-alt); }
.entry-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.entry-card:hover .thumb img { transform: scale(1.06); }
.entry-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.entry-title { font-size: 1.02rem; font-family: 'Karla', sans-serif; font-weight: 700; margin: 0; }
.entry-title a { color: var(--ink); }
.entry-excerpt { margin: 0; font-size: .88rem; line-height: 1.5; color: var(--ink-soft); }
.entry-cta { margin-top: 2px; font-size: .82rem; font-weight: 700; color: var(--rust); display: inline-flex; align-items: center; gap: 4px; transition: gap .2s ease; }
.entry-card:hover .entry-cta { gap: 8px; }

/* Stat break, parallax background */
.stat-break { padding: 90px 0; text-align: center; background: linear-gradient(135deg, var(--espresso), var(--espresso-deep)); color: #fff; background-attachment: fixed; background-size: cover; }
.stat-number { font-family: 'Fraunces', serif; font-size: clamp(2.6rem, 6vw, 4.5rem); margin: 0; }
.stat-label { margin: 6px 0 0; font-size: 1.1rem; opacity: .85; }

/* Single post */
.single-hero { position: relative; background: linear-gradient(135deg, var(--espresso-deep), var(--espresso)); color: #fff; overflow: hidden; }
.single-hero-img { aspect-ratio: 16/7; overflow: hidden; }
.single-hero-img img { width: 100%; height: 100%; object-fit: cover; }
.single-hero-panel { padding: 34px 24px 30px; max-width: var(--wrap); margin: 0 auto; }
.single-hero-panel .kicker a { color: var(--cream); }
.single-hero-panel h1 { color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.6rem); margin: 6px 0 10px; }
.single-hero-panel .byline { color: rgba(255,255,255,.75); font-size: .9rem; margin: 0 0 14px; }
.share-row { display: flex; gap: 10px; }
.share-row a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; text-transform: uppercase; font-size: .8rem; }
.share-row a:hover { background: rgba(255,255,255,.3); }

.breadcrumbs { font-size: .85rem; color: var(--ink-soft); margin: 24px 0 18px; }
.breadcrumbs a { color: var(--ink-soft); }
.single-wrap { padding-bottom: 60px; }
.entry-content { max-width: 720px; margin: 0 auto; font-size: 1.08rem; line-height: 1.75; }
.entry-content h2 { font-size: 1.5rem; margin: 2em 0 .6em; }
.entry-content h3 { font-size: 1.2rem; margin: 1.6em 0 .5em; }
.entry-content p { margin: 0 0 1.2em; }
.entry-content img { border-radius: var(--card-radius); margin: 1.5em 0; }
.entry-content a { text-decoration: underline; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }

.related { padding: 50px 0 10px; }
.related .section-title { margin-bottom: 20px; text-align: center; }
.related-grid { max-width: 920px; margin: 0 auto; }

/* Archive / search grids */
.archive-header { padding: 50px 0 10px; }
.archive-header h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin: 10px 0; }
.archive-desc { color: var(--ink-soft); max-width: 640px; }
.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 32px; padding: 30px 0 70px; }
.archive-grid .entry-card .thumb { aspect-ratio: 4/3; }
.archive-grid .entry-card .kicker { margin: 16px 18px 0; }
.archive-grid .entry-card .entry-title { padding: 6px 18px 20px; font-size: 1.15rem; }
.pagination { grid-column: 1 / -1; display: flex; gap: 10px; justify-content: center; padding-top: 10px; }
.pagination .page-numbers { padding: 8px 14px; border-radius: 8px; background: #fff; color: var(--ink); font-weight: 600; }
.pagination .page-numbers.current { background: var(--espresso); color: #fff; }

/* Footer */
.site-footer { position: relative; overflow: hidden; background: radial-gradient(circle at 15% 0%, #452a1e, var(--espresso-deep) 55%); color: #e3d2c4; padding: 0; margin-top: 30px; border-top: 3px solid transparent; border-image: linear-gradient(90deg, var(--rust), var(--caramel), var(--espresso)) 1; }
.footer-steam { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.f-steam { position: absolute; width: 60px; height: 160px; border-radius: 50% 50% 40% 40%; background: linear-gradient(to top, rgba(255,255,255,.08), transparent 80%); filter: blur(6px); opacity: .5; }
.f-steam-a { top: -40px; right: 10%; animation: rise 12s ease-in-out infinite; }
.f-steam-b { bottom: -60px; left: 15%; animation: rise 9s ease-in-out infinite 1.5s; }
.f-steam-c { bottom: 10px; right: 30%; animation: rise 10s ease-in-out infinite .8s; }

.footer-top { position: relative; z-index: 1; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding: 64px 24px 48px; }
.footer-brand .logo-box { border-color: #fff; }
.footer-logo-box .logo-text { color: #fff; }
.footer-brand p { color: #c9b6a5; max-width: 320px; font-size: .9rem; line-height: 1.6; margin: 14px 0 20px; }
.footer-col-title { color: #fff; font-family: 'Karla', sans-serif; font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 18px; }
.footer-topic-list, .footer-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.footer-topic-list a, .footer-menu a { color: #e3d2c4; font-size: .92rem; transition: color .2s ease, padding-left .2s ease; }
.footer-topic-list a:hover, .footer-menu a:hover { color: #fff; padding-left: 6px; }

.footer-bottom { position: relative; z-index: 1; border-top: 1px solid rgba(255,255,255,.08); padding: 20px 24px; }
.copy { font-size: .8rem; color: #a08b7a; margin: 0; }

/* Back to top */
.back-to-top { position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; border-radius: 50%; border: none; background: var(--espresso); color: #fff; font-size: 1.2rem; cursor: pointer; opacity: 0; transform: translateY(12px); transition: opacity .25s ease, transform .25s ease; z-index: 80; }
.back-to-top.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 860px) {
	.primary-nav { position: fixed; inset: 0 0 0 30%; background: #fff; transform: translateX(100%); transition: transform .3s ease; z-index: 95; padding: 90px 24px 24px; }
	.nav-toggle:checked ~ .primary-nav { transform: translateX(0); }
	.primary-nav .menu { flex-direction: column; }
	.menu-btn { display: flex; flex-direction: column; gap: 5px; margin-left: auto; cursor: pointer; z-index: 96; }
	.menu-btn span { width: 24px; height: 2px; background: var(--ink); }
	.search-form { display: none; }
	.footer-top { grid-template-columns: 1fr; gap: 36px; padding: 48px 24px 36px; }
}
