/*
Theme Name: Blink Fan Site
Theme URI: https://blink-182.net
Author: Fan site owner
Description: An unofficial fan-site theme for blink-182 fans with a dark/light selector. Dark mode uses the red, yellow and green of the Take Off Your Pants and Jacket cover; light mode uses the warm white, sage green and soft pink of the untitled album. Zine-style, full-width layout built for song-voting arenas, leaderboards, forums and blogs.
Version: 3.0.0
Requires at least: 6.3
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: blink-fan-site
Tags: blog, entertainment, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, wide-blocks
*/

/* ==========================================================================
   1. Palettes. Dark (default) and light, chosen with html[data-mode].
   Dark: red, yellow and green on near-black (Take Off Your Pants and Jacket).
   Light: warm white, sage green and soft pink (untitled album).
   ========================================================================== */
:root {
	--font-display: "Archivo", "Arial Black", "Helvetica Neue", Arial, sans-serif;
	--font-body: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-marker: "Permanent Marker", "Marker Felt", "Comic Sans MS", cursive;
	--radius: 14px;
	--line: 3px;
}
:root,
html[data-mode="dark"] {
	color-scheme: dark;
	--bg: #151311;          /* near-black */
	--deep: #0c0b0a;        /* header, footer, table heads */
	--surface: #221f1c;
	--ink: #f6f1e3;         /* cream text */
	--on-deep: #f6f1e3;     /* text on the header/footer */
	--shadow-color: #e8453a;
	--accent: #e8453a;      /* red */
	--accent-ink: #14110f;
	--pop: #f6c40f;         /* yellow */
	--green: #3fbf72;
	--link: #f6c40f;
	--bullet: #e8453a;
	--stripe: linear-gradient(90deg, #e8453a 0 33.34%, #f6c40f 33.34% 66.67%, #3fbf72 66.67% 100%);
	--row-alt: color-mix(in srgb, #f6f1e3 7%, transparent);
}
html[data-mode="light"] {
	color-scheme: light;
	--bg: #f5f3ec;          /* warm white */
	--deep: #1c2b25;
	--surface: #ffffff;
	--ink: #1c2b25;         /* green-black text */
	--on-deep: #f5f3ec;
	--shadow-color: #1c2b25;
	--accent: #f4a3c0;      /* soft pink */
	--accent-ink: #1c2b25;
	--pop: #a9d4b8;         /* sage green */
	--green: #2d6a4f;
	--link: #2d6a4f;
	--bullet: #2d6a4f;
	--stripe: linear-gradient(90deg, #f4a3c0 0 33.34%, #a9d4b8 33.34% 66.67%, #2d6a4f 66.67% 100%);
	--row-alt: color-mix(in srgb, #1c2b25 7%, transparent);
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}
img, svg, video, iframe { max-width: 100%; }
img, video { height: auto; }
a { color: var(--link); text-underline-offset: .2em; text-decoration-thickness: .12em; }
a:hover { text-decoration-thickness: .24em; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 6px var(--accent); }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-display);
	font-weight: 900;
	line-height: 1.08;
	letter-spacing: -.02em;
	margin: 0 0 .5em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.4rem; }
p { margin: 0 0 1.2em; }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute; width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus, .skip-link:focus {
	clip: auto; clip-path: none; height: auto; width: auto; margin: 0;
	left: .5rem; top: .5rem; z-index: 100000; padding: .75rem 1rem;
	background: var(--surface); color: var(--ink); border: var(--line) solid var(--ink);
}

/* Everything runs edge to edge; only a small side gutter keeps text off the screen edge. */
.container, .container--wide, .container--narrow { width: 100%; max-width: none; margin-inline: 0; padding-inline: clamp(1rem, 3vw, 2.5rem); }
.site-main { padding-block: 2.5rem 4rem; min-height: 50vh; }

/* ==========================================================================
   4. Header and navigation
   ========================================================================== */
.site-header { background: var(--deep); color: var(--on-deep); border-bottom: 4px solid var(--accent); position: relative; z-index: 20; }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding-block: .8rem; }
.brand { margin-right: auto; }
.brand-link {
	display: flex; align-items: center; gap: .65rem;
	color: inherit; text-decoration: none;
	font-family: var(--font-marker); font-size: 1.7rem; line-height: 1;
}
.brand .custom-logo { max-height: 3rem; width: auto; }
.brand-tagline { margin: .2rem 0 0; font-size: .8rem; opacity: .8; }

.header-account { display: flex; align-items: center; gap: .5rem; }
.header-account .button { box-shadow: none; padding: .4rem .9rem; font-size: .9rem; }

.mode-toggle {
	background: none; color: var(--on-deep); border: 2px solid var(--on-deep); border-radius: 999px;
	padding: .4rem .9rem; font: 800 .9rem var(--font-body); cursor: pointer;
}
.mode-toggle:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.nav-toggle {
	display: none; background: none; color: var(--on-deep);
	border: 2px solid var(--on-deep); border-radius: 10px;
	padding: .4rem .8rem; font: 800 .9rem var(--font-body); cursor: pointer;
}
.main-nav { order: 3; flex: 1 1 100%; }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav .menu { display: flex; flex-wrap: wrap; gap: .2rem; }
.main-nav li { position: relative; }
.main-nav a {
	display: block; padding: .4rem .8rem; border-radius: 999px;
	color: var(--on-deep); text-decoration: none; font-weight: 700; font-size: .95rem;
}
.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current-menu-ancestor > a,
.main-nav .current_page_item > a { background: var(--accent); color: var(--accent-ink); }
.main-nav .sub-menu {
	display: none; position: absolute; left: 0; top: 100%; min-width: 16rem; padding: .5rem;
	background: var(--surface); color: var(--ink);
	border: var(--line) solid var(--ink); border-radius: var(--radius);
	box-shadow: 5px 5px 0 var(--accent);
}
.main-nav li:hover > .sub-menu,
.main-nav li:focus-within > .sub-menu { display: block; }
.main-nav .sub-menu a { color: var(--ink); border-radius: 8px; }
.main-nav .sub-menu .sub-menu { left: 100%; top: 0; }

@media (max-width: 899px) {
	.nav-toggle { display: inline-flex; }
	.main-nav { display: none; padding-bottom: .5rem; }
	.main-nav.is-open { display: block; }
	.main-nav .menu { flex-direction: column; }
	.main-nav .sub-menu {
		position: static; display: block; min-width: 0; padding: 0 0 0 1rem;
		background: transparent; color: inherit; border: 0; box-shadow: none;
	}
	.main-nav .sub-menu a { color: var(--on-deep); }
}

/* ==========================================================================
   5. Buttons, forms
   ========================================================================== */
.button, .wp-block-button__link, button[type="submit"], input[type="submit"], .comment-form .submit {
	display: inline-block; padding: .7rem 1.3rem;
	background: var(--accent); color: var(--accent-ink);
	border: var(--line) solid var(--ink); border-radius: 999px;
	box-shadow: 4px 4px 0 var(--ink);
	font: 800 1rem/1.2 var(--font-body); text-decoration: none; cursor: pointer;
}
.button:hover, .wp-block-button__link:hover, button[type="submit"]:hover, input[type="submit"]:hover {
	transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink);
}
.button:active, .wp-block-button__link:active, button[type="submit"]:active, input[type="submit"]:active {
	transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink);
}
.button--ghost { background: var(--surface); color: var(--ink); }

input[type="text"], input[type="email"], input[type="url"], input[type="password"],
input[type="search"], input[type="number"], select, textarea {
	width: 100%; padding: .65rem .85rem;
	background: var(--surface); color: var(--ink);
	border: var(--line) solid var(--ink); border-radius: 10px;
	font: inherit;
}
label { font-weight: 700; }

.search-form { display: flex; gap: .5rem; max-width: 30rem; }
.search-form label { flex: 1; }

/* ==========================================================================
   6. Cards and grids
   ========================================================================== */
.card {
	background: var(--surface); color: var(--ink);
	border: var(--line) solid var(--ink); border-radius: var(--radius);
	box-shadow: 6px 6px 0 var(--shadow-color);
}
.post-grid {
	display: grid; gap: 2rem;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 18.5rem), 1fr));
}
.post-card { overflow: hidden; display: flex; flex-direction: column; }
.post-card-media {
	display: block; aspect-ratio: 16 / 10; overflow: hidden;
	background: var(--bg); border-bottom: var(--line) solid var(--ink);
}
.post-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card-media--empty { background: var(--stripe); }
.post-card-body { padding: 1.1rem 1.25rem 1.4rem; }
.post-card-title { font-size: 1.35rem; margin-bottom: .3rem; }
.post-card-title a { color: inherit; text-decoration: none; }
.post-card-title a:hover { text-decoration: underline; text-decoration-thickness: .12em; }
.post-meta { font-size: .875rem; margin: 0 0 .75rem; opacity: .85; }
.post-card-excerpt p { margin: 0; }

.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.section-title h2 { margin: 0; }

.archive-header { margin-bottom: 2rem; }
.archive-description { }

.with-sidebar { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr) 19rem; align-items: start; }
@media (max-width: 899px) { .with-sidebar { grid-template-columns: minmax(0, 1fr); } }
.widget { padding: 1.25rem; margin-bottom: 2rem; }
.widget-title { font-size: 1.2rem; }
.widget ul { margin: 0; padding-left: 1.2rem; }

/* ==========================================================================
   7. Hero
   ========================================================================== */
.hero { padding-block: clamp(3rem, 8vw, 6rem) 0; }
.hero-title { font-size: clamp(3rem, 9vw, 7rem); line-height: .95; letter-spacing: -.035em; margin-bottom: .35em; }
.hero-text { font-size: 1.25rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1.75rem 0 0; }
.tri-stripe { height: 14px; background: var(--stripe); margin-top: clamp(2.5rem, 6vw, 4rem); }

/* ==========================================================================
   8. Entries (posts, pages, plugin content)
   ========================================================================== */
.entry { max-width: 100%; }
.entry-header { margin-bottom: 1.5rem; }
.entry-title { margin-bottom: .3rem; }
.entry-thumbnail { margin: 0 0 2rem; border: var(--line) solid var(--ink); border-radius: var(--radius); overflow: hidden; box-shadow: 6px 6px 0 var(--shadow-color); }
.entry-thumbnail img { display: block; width: 100%; }
.entry-content { max-width: none; }
.entry-content > .alignwide, .entry-content > .alignfull { max-width: none; }
.container--wide .entry-content, .entry-content--wide { max-width: none; }
.entry-content h2, .entry-content h3 { margin-top: 1.8em; }
.entry-content blockquote {
	margin: 1.5rem 0; padding: .25rem 0 .25rem 1.25rem;
	border-left: 8px solid var(--accent); font-size: 1.15rem; font-weight: 600;
}
.entry-content ul:where(:not([class]), .wp-block-list) { list-style: none; padding-left: 0; }
.entry-content ul:where(:not([class]), .wp-block-list) > li { position: relative; padding-left: 1.75rem; margin-bottom: .4em; }
.entry-content ul:where(:not([class]), .wp-block-list) > li::before {
	content: ""; position: absolute; left: .15em; top: .55em; width: .6em; height: .6em; background: var(--bullet); transform: rotate(45deg);
}
.entry-content img { border-radius: 8px; }
.entry-content pre, .entry-content code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }
.entry-content pre { padding: 1rem; overflow-x: auto; background: var(--surface); border: var(--line) solid var(--ink); border-radius: 10px; }
.entry-footer { margin-top: 2rem; font-size: .95rem; }
.tag-list a { display: inline-block; margin: 0 .35rem .35rem 0; padding: .1rem .7rem; border: 2px solid var(--ink); border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 700; }
.tag-list a:hover { background: var(--accent); color: var(--accent-ink); }

/* Plugin and page content sits on a light panel, so plugins that draw white boxes
   (song battles, leaderboards, forums) always get dark, readable text. */
html:not([data-mode="light"]) .arena-wrap .entry-content,
html:not([data-mode="light"]) .page .entry-content,
html:not([data-mode="light"]) .bbpress .entry-content {
	--bg: #f6f1e3; --surface: #ffffff; --ink: #1a1a1a; --link: #1b7040;
	--deep: #1a1a1a; --on-deep: #f6f1e3; --shadow-color: #1a1a1a;
	--row-alt: color-mix(in srgb, #1a1a1a 7%, transparent);
	background: var(--bg); color: var(--ink);
	padding: clamp(1rem, 2.5vw, 2rem);
	border-radius: var(--radius);
}

/* Tables: leaderboards, standings, setlists */
.entry-content table, .arena-wrap table, #bbpress-forums table {
	width: 100%; border-collapse: collapse; background: var(--surface);
	border: var(--line) solid var(--ink); font-size: .95rem;
}
.entry-content th, .entry-content td, .arena-wrap th, .arena-wrap td {
	padding: .55rem .75rem; text-align: left; border-bottom: 1px solid color-mix(in srgb, var(--ink) 25%, transparent); vertical-align: middle;
}
.entry-content thead th, .arena-wrap thead th { background: var(--deep); color: var(--pop); font-weight: 800; }
.entry-content tbody tr:nth-child(even), .arena-wrap tbody tr:nth-child(even) { background: var(--row-alt); }
.entry-content td img, .arena-wrap td img { vertical-align: middle; max-width: 3rem; border-radius: 6px; }
@media (max-width: 700px) {
	.entry-content table, .arena-wrap table { display: block; overflow-x: auto; }
}

.arena-wrap { padding-block: 1rem; }

.post-navigation, .pagination { margin-top: 3rem; }
.nav-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.pagination .nav-links { justify-content: center; }
.page-numbers {
	display: inline-block; min-width: 2.6rem; padding: .4rem .8rem; text-align: center;
	border: var(--line) solid var(--ink); border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 800; background: var(--surface);
}
.page-numbers.current, .page-numbers:hover { background: var(--accent); color: var(--accent-ink); }

/* Comments */
.comments-area { margin-top: 3.5rem; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 1.5rem; }
.comment-body { padding: 1rem 1.25rem; margin-bottom: 1.25rem; background: var(--surface); border: var(--line) solid var(--ink); border-radius: var(--radius); }
.comment-meta { font-size: .875rem; margin-bottom: .5rem; }
.comment-author .avatar { border-radius: 50%; border: 2px solid var(--ink); vertical-align: middle; margin-right: .4rem; }
.comment-form p { margin-bottom: 1rem; }

/* 404 */
.not-found { text-align: center; }
.not-found .search-form { margin: 1.5rem auto; }

/* WordPress core alignment and captions */
.alignleft { float: left; margin: .25rem 1.5rem 1rem 0; }
.alignright { float: right; margin: .25rem 0 1rem 1.5rem; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text, figcaption { font-size: .875rem; opacity: .85; }
.sticky .post-card-title::before { content: "Featured: "; }
.bypostauthor > .comment-body { border-color: var(--accent); }

/* bbPress (forums) basics */
#bbpress-forums { font-size: .95rem; }
#bbpress-forums ul.bbp-forums, #bbpress-forums ul.bbp-topics, #bbpress-forums ul.bbp-replies { border: var(--line) solid var(--ink); border-radius: 10px; background: var(--surface); }
#bbpress-forums li.bbp-header, #bbpress-forums li.bbp-footer { background: var(--deep); color: var(--pop); }
#bbpress-forums div.bbp-forum-title a, #bbpress-forums div.bbp-topic-title a { font-weight: 800; }

/* ==========================================================================
   9. Footer
   ========================================================================== */
.site-footer { position: relative; background: var(--deep); color: var(--on-deep); padding-block: 3.5rem 2rem; margin-top: 2rem; }
.site-footer::before { content: ""; position: absolute; inset: 0 0 auto; height: 14px; background: var(--stripe); }
.site-footer a { color: var(--on-deep); }
.site-footer .widget { background: transparent; color: inherit; border-color: currentColor; box-shadow: none; }
.footer-widgets { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin-bottom: 2rem; }
.footer-menu { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; padding: 0; margin: 0 0 1rem; font-weight: 700; }
.disclaimer { font-size: .9rem; opacity: .9; }
.copyright { font-size: .875rem; margin: 0; }
