/*
Theme Name: Classic in the Country
Theme URI: https://classicinthecountry.com
Author: Paul Money
Description: Custom theme for Classic in the Country: handpicked YouTube videos celebrating small-town America. Old Glory Skull brand, tattoo-flash styling, self-hosted fonts.
Version: 1.3.0
Requires at least: 6.0
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: citc
*/

/* ---------- Fonts (self-hosted, SIL Open Font License) ---------- */
@font-face { font-family: "Alfa Slab One"; src: url("assets/fonts/alfa-slab-one.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "New Rocker"; src: url("assets/fonts/new-rocker.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Rye"; src: url("assets/fonts/rye.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("assets/fonts/public-sans.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
	--ink: #141414;
	--red: #B5282E;
	--red-dark: #7E1A1F;
	--navy: #1F3A6B;
	--gold: #D9A33A;
	--cream: #F4EAD2;
	--paper: #EFE4CC;
	--card: #F8F1E1;
	--muted: #55503F;
	--muted-dark: #A9A190;
	--font-display: "Alfa Slab One", Georgia, serif;
	--font-rugged: "New Rocker", Georgia, serif;
	--font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	--wrap: 1240px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); }
a:hover { color: var(--red-dark); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr-only, .screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; clip: auto; background: var(--cream); color: var(--ink); padding: 12px 16px; font-weight: 800; }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--red); }
.section-title { margin: 0; font-family: var(--font-rugged); font-weight: 400; font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1; }

/* ---------- Logo ---------- */
.citc-logo { display: block; width: 100%; height: 100%; }

/* ---------- Header ---------- */
.site-header { background: var(--ink); position: relative; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; gap: 18px; padding-top: 12px; padding-bottom: 12px; position: relative; }
.menu-toggle { width: 52px; height: 52px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; background: var(--ink); border: 3px solid var(--gold); border-radius: 6px; box-shadow: 3px 3px 0 var(--red); cursor: pointer; padding: 0; }
.menu-toggle:hover { background: #222; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-icon { width: 52px; height: 52px; flex: 0 0 auto; }
.brand-text { display: flex; flex-direction: column; gap: 3px; }
.brand-text .b1 { font-family: var(--font-display); font-size: 22px; line-height: 1; color: var(--cream); letter-spacing: .02em; }
.brand-text .b2 { font-family: var(--font-display); font-size: 10px; line-height: 1; color: var(--gold); letter-spacing: .14em; }
.main-nav { position: absolute; top: calc(100% + 10px); left: 24px; width: 290px; max-width: calc(100vw - 48px); background: var(--ink); border: 3px solid var(--cream); border-radius: 6px; box-shadow: 8px 8px 0 var(--red); padding: 8px; display: none; }
.main-nav.is-open { display: block; }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav li + li { border-top: 1px solid #3A3A3A; }
.main-nav a { display: flex; align-items: center; gap: 12px; color: var(--cream); text-decoration: none; font-weight: 800; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; padding: 14px; }
.main-nav a::before { content: "★"; color: var(--red); font-size: 13px; }
.main-nav a:hover, .main-nav .current-menu-item > a { color: var(--gold); }
.main-nav .sub-menu { padding-left: 18px; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--ink); overflow: hidden; }
.hero .wrap { padding-top: 8px; padding-bottom: 36px; display: flex; flex-direction: column; align-items: center; gap: 22px; }
/* Player sits right under the menu. The skull is a giant faded wallpaper behind it:
   twice the player's width, centered on the player, cropped by the hero's edges. */
.hero-stage { --player: min(900px, calc(100vw - 48px)); position: relative; width: 100%; padding: 24px 0 calc(var(--player) * 0.22); }
.hero-logo { position: absolute; z-index: 0; width: calc(var(--player) * 2); height: calc(var(--player) * 2); left: calc(50% + var(--player) * 0.111); top: calc(24px + 22px + var(--player) * 0.28125 - var(--player) * 1.0556); transform: translateX(-50%); pointer-events: none; }
.hero-player { position: relative; z-index: 1; width: var(--player); margin: 0 auto; }
.hero-title { position: relative; z-index: 1; margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.4rem, 3vw, 1.75rem); line-height: 1.15; color: var(--cream); text-align: center; max-width: 760px; background: var(--ink); padding: 8px 18px; border-radius: 4px; }
.hero-title a { color: inherit; text-decoration: none; }
.hero-title a:hover { color: var(--gold); }

/* Lightweight YouTube player: shows a thumbnail until clicked */
/* Brass-plate frame around the player */
.frame { position: relative; background: var(--gold); border: 4px solid var(--ink); border-radius: 6px; padding: 18px; box-shadow: 12px 12px 0 var(--red); }
.frame-tab { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); z-index: 2; background: var(--ink); color: var(--gold); border: 3px solid var(--gold); border-radius: 4px; padding: 6px 18px; font-family: var(--font-display); font-size: 15px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.rivet { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--cream); border: 2px solid var(--ink); }
.rivet-tl { top: 4px; left: 4px; } .rivet-tr { top: 4px; right: 4px; } .rivet-bl { bottom: 4px; left: 4px; } .rivet-br { bottom: 4px; right: 4px; }
.player { aspect-ratio: 16 / 9; background: #2B2B2B; border: 4px solid var(--ink); overflow: hidden; position: relative; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lite-yt { all: unset; position: absolute; inset: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lite-yt img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.play-badge { position: relative; width: 92px; height: 92px; border-radius: 50%; background: var(--red); border: 4px solid var(--cream); display: flex; align-items: center; justify-content: center; transition: transform .15s; }
.lite-yt:hover .play-badge, .lite-yt:focus-visible .play-badge { transform: scale(1.08); }
.player-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted-dark); font-size: 15px; text-align: center; padding: 24px; }

/* ---------- Stripe ---------- */
.stripe { background: var(--red); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); }
.stripe .wrap { padding-top: 14px; padding-bottom: 14px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; font-family: var(--font-display); font-size: 18px; letter-spacing: .08em; color: var(--cream); text-transform: uppercase; }
.stripe a { color: inherit; text-decoration: none; }
.stripe a:hover { color: var(--ink); }

/* ---------- Sections ---------- */
.section { padding: 64px 0 32px; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
.section-head > div:first-child { display: flex; flex-direction: column; gap: 6px; }

.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { font: inherit; font-weight: 800; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; padding: 10px 18px; min-height: 44px; border-radius: 999px; border: 3px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; }
.pill[aria-pressed="true"] { background: var(--ink); color: var(--cream); }

/* ---------- Video cards ---------- */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 32px; }
.video-card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: var(--card); border: 3px solid var(--ink); border-radius: 6px; box-shadow: 6px 6px 0 var(--ink); overflow: hidden; transition: transform .12s, box-shadow .12s; }
.video-card:hover { color: var(--ink); transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--red); }
.video-card[hidden] { display: none; }
.card-thumb { aspect-ratio: 16 / 9; background: #2B2B2B; border-bottom: 3px solid var(--ink); position: relative; display: flex; align-items: center; justify-content: center; }
.card-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-tag { position: absolute; top: 10px; left: 10px; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 5px 9px; border-radius: 3px; background: var(--red); }
.card-play { position: relative; width: 56px; height: 56px; border-radius: 50%; background: var(--red); border: 3px solid var(--cream); display: flex; align-items: center; justify-content: center; }
.card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.card-title { font-family: var(--font-display); font-size: 19px; line-height: 1.2; }
.card-meta { font-size: 14px; color: var(--muted); }

.btn { display: inline-block; text-decoration: none; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: 15px; padding: 14px 28px; border: 3px solid var(--ink); border-radius: 4px; background: var(--card); color: var(--ink); box-shadow: 5px 5px 0 var(--ink); }
.btn:hover { color: var(--ink); box-shadow: 5px 5px 0 var(--red); }
.center { display: flex; justify-content: center; margin-top: 40px; }

/* ---------- Category tiles ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; }
.cat-tile { display: flex; flex-direction: column; gap: 14px; text-decoration: none; background: var(--ink); color: var(--cream); border: 3px solid var(--ink); border-radius: 6px; padding: 28px; box-shadow: 6px 6px 0 var(--tile, var(--red)); }
.cat-tile:hover { color: var(--cream); transform: translate(-2px, -2px); }
.cat-name { font-family: var(--font-display); font-size: 26px; line-height: 1.1; }
.cat-blurb { font-size: 15px; line-height: 1.5; color: #CFC6B2; }
.cat-cta { font-weight: 800; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }

/* ---------- About ---------- */
.about-box { background: var(--card); border: 3px solid var(--ink); border-radius: 6px; padding: 36px; display: flex; flex-wrap: wrap; gap: 36px; align-items: center; }
.about-logo { flex: 0 0 180px; width: 180px; height: 180px; }
.about-copy { flex: 1 1 420px; display: flex; flex-direction: column; gap: 12px; }
.about-copy .section-title { font-size: clamp(2rem, 4vw, 2.6rem); }
.about-copy p { margin: 0; font-size: 1.05rem; line-height: 1.65; color: #33302A; }
.about-sign { font-weight: 800; color: var(--red) !important; }

/* ---------- Single video / pages ---------- */
.page-head { background: var(--ink); color: var(--cream); padding: 40px 0; }
.page-head .section-title { color: var(--cream); }
.page-head .eyebrow { color: var(--gold); }
/* Video page: same skull wallpaper as the homepage, a bit less space under the player */
.hero-single .hero-stage { padding-bottom: calc(var(--player) * 0.12); }
/* Title, channel line and description share one left edge */
.single-body { max-width: calc(900px + 48px); }
.single-meta { margin-top: 32px; display: flex; flex-direction: column; gap: 10px; }
.single-title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.1; }
.entry { max-width: 760px; margin: 0 auto; padding: 24px 0 48px; font-size: 1.05rem; }
.single-body .entry { margin: 0; }
.entry h2, .entry h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.15; }
.entry .wp-block-embed { margin: 24px 0; }
.entry .wp-block-embed__wrapper { position: relative; }
.wp-embed-aspect-16-9 .wp-block-embed__wrapper::before { content: ""; display: block; padding-top: 56.25%; }
.wp-has-aspect-ratio .wp-block-embed__wrapper iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.entry.has-hero-video .wp-block-embed-youtube:first-of-type { display: none; }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 40px; }
.pagination .page-numbers { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 14px; border: 3px solid var(--ink); border-radius: 4px; text-decoration: none; font-weight: 800; color: var(--ink); background: var(--card); }
.pagination .current { background: var(--ink); color: var(--cream); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #CFC6B2; margin-top: 48px; }
.site-footer .wrap { padding-top: 48px; padding-bottom: 48px; display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: space-between; }
.footer-brand { display: flex; align-items: center; gap: 20px; }
.footer-logo { width: 120px; height: 120px; flex: 0 0 auto; }
.footer-text { display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.6; max-width: 440px; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.footer-nav a { color: var(--cream); text-decoration: none; font-weight: 700; padding: 12px; display: inline-block; }
.footer-nav a:hover { color: var(--gold); }

/* ---------- Small screens ---------- */
@media (max-width: 600px) {
	body { font-size: 16px; }
	.play-badge { width: 64px; height: 64px; }
	.frame { padding: 10px; box-shadow: 6px 6px 0 var(--red); }
	.frame-tab { top: -15px; font-size: 11px; padding: 4px 10px; }
	.rivet { width: 6px; height: 6px; border-width: 1.5px; }
	.rivet-tl { top: 2px; left: 2px; } .rivet-tr { top: 2px; right: 2px; } .rivet-bl { bottom: 2px; left: 2px; } .rivet-br { bottom: 2px; right: 2px; }
	.player { border-width: 3px; }
	.section { padding-top: 48px; }
	.about-box { padding: 24px; }
	.about-logo { flex-basis: 120px; width: 120px; height: 120px; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; }
}
