/*
Theme Name: Pulsewire
Description: An original music and culture news theme with a hero and trending block, top picks carousel, latest news feed and category sections. Colors, section categories and newsletter form are set under Appearance > Customize > Pulsewire options.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: pulsewire
*/

:root {
	--paper: #ffffff;
	--surface: #f0f0ed;
	--ink: #111111;
	--muted: #666660;
	--line: #d9d9d4;
	--accent: #3d2bff;
	--hot: #ffd23f;
	--display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
	--body: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	--wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.55 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.05; margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.screen-reader-text, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; }
.meta { color: var(--muted); font-size: .8rem; }
.tag { display: inline-block; background: var(--hot); color: var(--ink); font: 600 .72rem/1 var(--body); padding: 4px 7px; margin-right: 6px; }
.thumb-fallback { display: block; width: 100%; height: 100%; min-height: 60px; background: var(--surface); }

/* Header */
.topbar { background: var(--ink); color: #fff; font-size: .8rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; min-height: 34px; }
.social-nav .menu { display: flex; gap: 16px; }
.topbar a:hover { color: var(--hot); }
.topbar-cta { font-weight: 600; }
.mainbar { border-bottom: 4px solid var(--ink); background: var(--paper); position: sticky; top: 0; z-index: 50; }
.mainbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.brand-text { font: 900 2rem/1 var(--display); letter-spacing: -.01em; }
.brand-text:hover { color: var(--accent); }
.custom-logo { max-height: 48px; width: auto; }
.primary-nav { display: flex; align-items: center; gap: 24px; }
.primary-nav .menu { display: flex; gap: 22px; }
.primary-nav .menu > li { position: relative; }
.primary-nav .menu > li > a { display: block; padding: 22px 0; font: 800 1.15rem/1 var(--display); }
.primary-nav .sub-menu { position: absolute; top: 100%; left: -14px; min-width: 190px; background: var(--paper); border: 2px solid var(--ink); padding: 8px 0; display: none; z-index: 60; }
.primary-nav li:hover > .sub-menu, .primary-nav li:focus-within > .sub-menu { display: block; }
.primary-nav .sub-menu a { display: block; padding: 8px 16px; font-weight: 500; }
.primary-nav .sub-menu a:hover { background: var(--surface); }
.search-form { display: flex; }
.search-form input { width: 150px; border: 2px solid var(--ink); border-right: 0; padding: 7px 10px; font: inherit; font-size: .85rem; background: var(--paper); }
.search-form button { border: 2px solid var(--ink); background: var(--ink); color: #fff; padding: 0 12px; font: 600 .85rem var(--body); cursor: pointer; }
.search-form button:hover { background: var(--accent); border-color: var(--accent); }
.nav-toggle { display: none; background: none; border: 2px solid var(--ink); width: 44px; height: 44px; cursor: pointer; }
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after { display: block; width: 20px; height: 2px; background: var(--ink); margin: 0 auto; position: relative; content: ""; }
.nav-toggle .bars::before { position: absolute; top: -6px; left: 0; }
.nav-toggle .bars::after { position: absolute; top: 6px; left: 0; }

/* Section headings: thick accent bar */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; border-bottom: 4px solid var(--ink); margin-bottom: 20px; }
.section-title { font-size: 2.2rem; padding-bottom: 6px; position: relative; }
.section-head .section-title::after { content: ""; position: absolute; left: 0; bottom: -4px; width: 64px; height: 4px; background: var(--accent); }
.view-all { font-weight: 600; font-size: .85rem; padding-bottom: 10px; }
.view-all:hover { text-decoration: underline; }

/* Top strip */
.strip { background: var(--surface); border-bottom: 1px solid var(--line); }
.strip-inner { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.strip-item { display: flex; gap: 10px; align-items: flex-start; }
.strip-thumb { flex: 0 0 56px; aspect-ratio: 16 / 9; overflow: hidden; background: var(--line); }
.strip-thumb img { width: 100%; height: 100%; object-fit: cover; }
.strip-text { display: flex; flex-direction: column; gap: 4px; font-size: .78rem; line-height: 1.25; }
.strip-text strong { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Hero + trending */
.hero { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 28px; padding-top: 28px; padding-bottom: 40px; }
.hero-link { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ink); }
.hero-link img { width: 100%; height: 100%; object-fit: cover; }
.hero-caption { position: absolute; inset: auto 0 0 0; padding: 60px 24px 22px; background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,0)); color: #fff; }
.hero-title { display: block; margin-top: 8px; font: 900 clamp(1.8rem, 3.6vw, 3rem)/1 var(--display); }
.hero-link:hover { color: #fff; }
.hero-link:hover .hero-title { text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 4px; text-decoration-color: var(--accent); }
.trending .section-title { border-bottom: 4px solid var(--ink); display: block; margin-bottom: 4px; }
.trending .section-title::after { content: ""; position: absolute; left: 0; bottom: -4px; width: 64px; height: 4px; background: var(--accent); }
.trending ol { counter-reset: t; }
.trending li { counter-increment: t; display: grid; grid-template-columns: 1fr 78px; gap: 12px; align-items: center; padding: 14px 0 14px 34px; border-bottom: 1px solid var(--line); position: relative; }
.trending li::before { content: counter(t); position: absolute; left: 0; top: 12px; font: 900 1.9rem/1 var(--display); color: var(--accent); }
.trend-title { display: block; margin-top: 4px; font-weight: 600; font-size: .92rem; line-height: 1.3; }
.trend-thumb { aspect-ratio: 1; overflow: hidden; background: var(--line); }
.trend-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Picks carousel */
.picks, .latest, .cat-block { padding-bottom: 44px; }
.picks-nav { display: flex; gap: 6px; padding-bottom: 8px; }
.picks-nav button { width: 36px; height: 36px; border: 2px solid var(--ink); background: var(--paper); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.picks-nav button:hover { background: var(--ink); color: #fff; }
.picks-track { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; scrollbar-width: thin; }
.pick { flex: 0 0 200px; scroll-snap-align: start; display: block; }
.pick-art { display: block; aspect-ratio: 1; overflow: hidden; background: var(--line); margin-bottom: 8px; }
.pick-art img { width: 100%; height: 100%; object-fit: cover; }
.pick strong { display: block; font: 800 1.1rem/1.1 var(--display); }

/* Latest feed */
.feed li { display: grid; grid-template-columns: 170px 1fr; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: center; }
.feed-thumb { aspect-ratio: 16 / 9; overflow: hidden; background: var(--line); }
.feed-thumb img { width: 100%; height: 100%; object-fit: cover; }
.feed h3 { font-size: 1.5rem; margin-top: 4px; }
.feed h3 a:hover { text-decoration: underline; }

/* Category blocks */
.cat-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; }
.cat-lead-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--line); margin-bottom: 10px; }
.cat-lead-img img { width: 100%; height: 100%; object-fit: cover; }
.cat-lead h3 { font-size: 2rem; }
.cat-lead a:hover h3 { text-decoration: underline; }
.cat-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.cat-list li:first-child { padding-top: 0; }
.cat-list a { display: block; font-weight: 600; line-height: 1.3; }
.cat-list a:hover { text-decoration: underline; }

/* Archive grid */
.archive { padding-top: 32px; padding-bottom: 48px; }
.page-title { font-size: clamp(2.2rem, 5vw, 3.6rem); border-bottom: 4px solid var(--ink); padding-bottom: 8px; margin-bottom: 24px; }
.archive-desc { color: var(--muted); margin: -12px 0 24px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.card-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--line); margin-bottom: 10px; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card h2, .card h3 { font-size: 1.5rem; margin: 4px 0 6px; }
.card h2 a:hover, .card h3 a:hover { text-decoration: underline; }
.card p { margin: 0; color: var(--muted); font-size: .92rem; }
.pagination { margin-top: 36px; }
.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers { border: 2px solid var(--ink); padding: 6px 12px; font-weight: 600; }
.pagination .current, .pagination .page-numbers:hover { background: var(--ink); color: #fff; }
.empty { color: var(--muted); }

/* Single */
.single { max-width: 820px; padding-top: 36px; padding-bottom: 32px; }
.single-head h1 { font-size: clamp(2.2rem, 5.5vw, 4rem); margin: 10px 0 12px; }
.byline { color: var(--muted); font-size: .9rem; margin: 0 0 20px; }
.single-img { margin: 0 0 28px; }
.single-img img { width: 100%; }
.entry { font-size: 1.1rem; line-height: 1.7; }
.entry p, .entry ul, .entry ol { margin: 0 0 1.2em; }
.entry ul { list-style: disc; padding-left: 1.4em; }
.entry ol { list-style: decimal; padding-left: 1.4em; }
.entry a { color: var(--accent); text-decoration: underline; }
.entry h2, .entry h3 { margin: 1.6em 0 .5em; }
.entry blockquote { border-left: 4px solid var(--accent); margin: 1.5em 0; padding: 4px 0 4px 20px; font-size: 1.2rem; }
.entry iframe, .entry video { max-width: 100%; }
.post-tags a { display: inline-block; margin: 0 6px 6px 0; padding: 4px 10px; background: var(--surface); font-size: .8rem; }
.related { padding-bottom: 48px; }
.related .section-title { border-bottom: 4px solid var(--ink); display: block; margin-bottom: 20px; }
.comments-wrap { max-width: 820px; padding-bottom: 48px; }
.comment-list { margin-bottom: 24px; }
.comment-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; border: 2px solid var(--ink); padding: 8px 10px; font: inherit; }
.comment-form .submit { background: var(--ink); color: #fff; border: 0; padding: 10px 20px; font: 600 1rem var(--body); cursor: pointer; }
.comment-form .submit:hover { background: var(--accent); }

/* Newsletter + footer */
.newsletter { background: var(--accent); color: #fff; padding: 36px 0; }
.newsletter-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
.newsletter h2 { font-size: 2.2rem; }
.newsletter p { margin: 6px 0 0; }
.newsletter input[type="email"], .newsletter input[type="text"] { padding: 10px 12px; border: 2px solid #fff; font: inherit; }
.newsletter input[type="submit"], .newsletter button { background: var(--ink); color: #fff; border: 2px solid var(--ink); padding: 10px 20px; font: 600 1rem var(--body); cursor: pointer; }
.site-footer { background: var(--ink); color: #fff; padding: 36px 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; }
.site-footer .menu { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: .88rem; }
.site-footer a:hover { color: var(--hot); }
.copyright { width: 100%; margin: 0; color: #aaa; font-size: .8rem; border-top: 1px solid #333; padding-top: 16px; }

/* Responsive */
@media (max-width: 960px) {
	.strip-inner { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.hero, .cat-grid, .newsletter-inner { grid-template-columns: 1fr; }
	.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
	.nav-toggle { display: block; }
	.primary-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--paper); border-bottom: 4px solid var(--ink); padding: 8px 20px 18px; }
	.primary-nav.is-open { display: flex; }
	.primary-nav .menu { flex-direction: column; gap: 0; }
	.primary-nav .menu > li > a { padding: 12px 0; border-bottom: 1px solid var(--line); }
	.primary-nav .sub-menu { position: static; display: block; border: 0; padding: 0 0 0 14px; }
	.search-form input { flex: 1; width: auto; }
}
@media (max-width: 600px) {
	.strip-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.grid { grid-template-columns: 1fr; }
	.feed li { grid-template-columns: 110px 1fr; gap: 12px; }
	.feed h3 { font-size: 1.15rem; }
	.section-title { font-size: 1.8rem; }
	.cat-lead h3 { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) {
	.picks-track { scroll-behavior: auto; }
}
