/*
Theme Name: The Sweat
Theme URI: https://thesweat.com
Description: Presentation-only theme for The Sweat. Homepage, story template, hub pages, and mobile navigation. Structured content and domain logic belong in the-sweat-core, not here.
Author: The Sweat
Version: 0.1.0
Requires at least: 6.4
Requires PHP: 8.1
License: GPL-2.0-or-later
Text Domain: sweat
*/

:root {
	--sweat-bg: #060d18;
	--sweat-bg-2: #0b1626;
	--sweat-panel: #0e1c30;
	--sweat-line: rgba(120, 170, 230, .22);
	--sweat-yellow: #ffb81c;
	--sweat-yellow-ink: #1a1200;
	--sweat-text: #f2f5fa;
	--sweat-muted: #aab6c8;
	--sweat-paper: #fbfaf7;
	--sweat-ink: #14181f;
	--sweat-ink-muted: #5a6371;
	--sweat-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
	--sweat-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--sweat-wrap: 1240px;
	--sweat-radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--sweat-bg);
	color: var(--sweat-text);
	font-family: var(--sweat-sans);
	line-height: 1.55;
	overflow-x: hidden;
}
img, video, iframe { max-width: 100%; height: auto; }
a { color: inherit; }
.screen-reader-text {
	position: absolute !important; clip: rect(1px, 1px, 1px, 1px);
	width: 1px; height: 1px; overflow: hidden; white-space: nowrap;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; z-index: 1000;
	background: var(--sweat-yellow); color: var(--sweat-yellow-ink);
	padding: 12px 16px; top: 8px; left: 8px; border-radius: 6px;
}
:focus-visible { outline: 3px solid var(--sweat-yellow); outline-offset: 2px; }

.wrap { width: 100%; max-width: var(--sweat-wrap); margin: 0 auto; padding: 0 20px; }

/* Buttons */
.btn {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 13px 22px; border-radius: 8px; border: 2px solid var(--sweat-yellow);
	font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer;
	background: var(--sweat-yellow); color: var(--sweat-yellow-ink);
}
.btn:hover { filter: brightness(1.08); }
.btn--ghost { background: transparent; color: var(--sweat-text); border-color: rgba(255,255,255,.55); }
.btn--sm { padding: 9px 16px; font-size: .9rem; }
.btn--dark { background: transparent; color: var(--sweat-ink); border-color: var(--sweat-ink); }

/* Header */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(6, 13, 24, .94); backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--sweat-line);
}
.site-header__bar { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.site-logo img { display: block; height: 44px; width: auto; }
.site-logo { display: block; flex: none; }
.primary-nav { flex: 1; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; flex-wrap: wrap; }
.primary-nav a { text-decoration: none; font-weight: 600; font-size: .92rem; padding: 6px 0; }
.primary-nav a:hover, .primary-nav .current-menu-item > a { color: var(--sweat-yellow); }
.site-header__tag {
	font-size: .66rem; font-weight: 700; letter-spacing: .06em; line-height: 1.25;
	text-transform: uppercase; color: var(--sweat-muted); max-width: 110px;
}
.nav-toggle {
	display: none; margin-left: auto; width: 44px; height: 44px;
	background: none; border: 0; color: var(--sweat-text); cursor: pointer;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
	display: block; width: 24px; height: 2px; background: currentColor; border-radius: 2px; position: relative; margin: 0 auto;
}
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -8px; }
.nav-toggle__bars::after { top: 8px; }

/* Hero */
.hero { position: relative; border-radius: 0 0 var(--sweat-radius) var(--sweat-radius); overflow: hidden; background: var(--sweat-bg-2); }
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 20%; display: block; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6,13,24,.96) 0%, rgba(6,13,24,.72) 42%, rgba(6,13,24,.05) 75%); }
.hero__inner { position: relative; z-index: 1; padding: 72px 20px 80px; max-width: 640px; margin-left: max(0px, calc((100vw - var(--sweat-wrap)) / 2)); }
.eyebrow { color: var(--sweat-yellow); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; }
.hero h1, .entry-hero h1 {
	font-family: var(--sweat-serif); font-weight: 800; line-height: 1.04;
	font-size: clamp(2.3rem, 6vw, 4rem); margin: 10px 0 16px;
}
.hero p { font-size: 1.1rem; color: #e3e9f2; margin: 0 0 26px; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Sections */
.section { padding: 44px 0; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.section__head h2 { font-family: var(--sweat-serif); font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin: 0; }
.section__head p { margin: 4px 0 0; color: var(--sweat-muted); }
.section__link { font-weight: 700; font-size: .9rem; text-decoration: none; }
.section__link:hover { color: var(--sweat-yellow); }

.section--paper { background: var(--sweat-paper); color: var(--sweat-ink); border-radius: var(--sweat-radius); padding: 36px 0; margin: 20px 0; }
.section--paper .section__head p { color: var(--sweat-ink-muted); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.chip { display: inline-block; padding: 7px 14px; border-radius: 999px; font-size: .85rem; font-weight: 600; text-decoration: none; border: 1px solid rgba(0,0,0,.15); }
.chip:hover { border-color: var(--sweat-ink); }

/* Cards */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: #fff; color: var(--sweat-ink); border: 1px solid rgba(0,0,0,.1); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.card a { text-decoration: none; display: flex; flex-direction: column; height: 100%; }
.card__img { aspect-ratio: 16 / 10; background: #dfe3ea; overflow: hidden; }
.card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card__body { padding: 14px 16px 18px; }
.card__cat { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #8a5a00; }
.card__title { font-family: var(--sweat-serif); font-size: 1.2rem; line-height: 1.2; margin: 6px 0; }
.card__excerpt { margin: 0; color: var(--sweat-ink-muted); font-size: .92rem; }
.card:hover .card__title { text-decoration: underline; }

.tile { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--sweat-line); background: var(--sweat-panel); aspect-ratio: 4 / 3; display: flex; align-items: flex-end; text-decoration: none; }
.tile__name { position: relative; z-index: 1; padding: 16px; font-family: var(--sweat-serif); font-weight: 800; font-size: 1.4rem; line-height: 1.1; text-transform: uppercase; }
.tile__name small { display: block; font-family: var(--sweat-sans); font-weight: 500; font-size: .8rem; text-transform: none; color: var(--sweat-muted); margin-top: 6px; }
.tile::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,184,28,.12), rgba(6,13,24,.85)); }
.tile:hover { border-color: var(--sweat-yellow); }

/* CTA banner */
.cta { border: 1px solid rgba(255,184,28,.55); border-radius: var(--sweat-radius); background: var(--sweat-bg-2); padding: 22px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: 20px 0 40px; }
.cta h2 { font-family: var(--sweat-serif); margin: 0 0 4px; font-size: 1.6rem; }
.cta p { margin: 0; color: var(--sweat-muted); }

/* Story (single) */
.entry-hero { position: relative; background: var(--sweat-bg-2); overflow: hidden; }
.entry-hero__media { position: absolute; inset: 0; }
.entry-hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 20%; display: block; }
.entry-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6,13,24,.95) 0%, rgba(6,13,24,.7) 45%, rgba(6,13,24,.1) 80%); }
.entry-hero__inner { position: relative; z-index: 1; padding: 36px 20px 40px; max-width: 700px; margin-left: max(0px, calc((100vw - var(--sweat-wrap)) / 2)); }
.breadcrumbs { font-size: .8rem; color: var(--sweat-muted); margin-bottom: 40px; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { color: var(--sweat-yellow); }
.entry-hero .dek { font-size: 1.15rem; color: #e3e9f2; margin: 0 0 18px; }
.byline { font-size: .85rem; color: var(--sweat-muted); margin-bottom: 18px; }
.byline strong { color: var(--sweat-text); }

.story-body { background: var(--sweat-paper); color: var(--sweat-ink); }
.story-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; padding: 44px 20px 60px; max-width: var(--sweat-wrap); margin: 0 auto; }
.entry-content { font-family: var(--sweat-serif); font-size: 1.2rem; line-height: 1.7; max-width: 720px; }
.entry-content > * { margin-top: 0; margin-bottom: 1.2em; }
.entry-content h2 { font-size: 1.9rem; line-height: 1.2; margin-top: 1.8em; }
.entry-content h3 { font-size: 1.4rem; }
.entry-content a { color: #8a5a00; }
.entry-content blockquote { border-left: 4px solid var(--sweat-yellow); margin-left: 0; padding: 4px 0 4px 20px; font-style: italic; }
.entry-content figure, .entry-content .wp-block-embed { margin-left: 0; margin-right: 0; }
.entry-content .wp-block-embed__wrapper { position: relative; }
.entry-content iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 12px; display: block; }
.entry-content img { border-radius: 12px; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }

.sidebar { display: flex; flex-direction: column; gap: 22px; font-family: var(--sweat-sans); }
.side-box { border: 1px solid rgba(0,0,0,.12); border-radius: 12px; padding: 20px; background: #fff; }
.side-box--dark { background: var(--sweat-bg-2); color: var(--sweat-text); border-color: var(--sweat-line); }
.side-box h2 { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 14px; }
.related { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.related a { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center; text-decoration: none; font-weight: 700; font-size: .9rem; line-height: 1.25; }
.related img { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; display: block; background: #dfe3ea; }
.related a:hover span { text-decoration: underline; }
.side-box p { margin: 0 0 14px; font-size: .92rem; color: var(--sweat-ink-muted); }
.side-box--dark p { color: var(--sweat-muted); }

/* Archive / page */
.page-head { padding: 56px 0 8px; }
.page-head h1 { font-family: var(--sweat-serif); font-size: clamp(2rem, 5vw, 3.2rem); margin: 8px 0 8px; }
.page-head p { color: var(--sweat-muted); max-width: 640px; margin: 0; }
.page-body { padding: 36px 0 60px; }
.page-body .entry-content { margin: 0 auto; color: var(--sweat-text); }
.pagination { display: flex; gap: 10px; justify-content: center; padding: 30px 0; }
.pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--sweat-line); border-radius: 8px; text-decoration: none; }
.pagination .current { background: var(--sweat-yellow); color: var(--sweat-yellow-ink); border-color: var(--sweat-yellow); }
.empty { color: var(--sweat-muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--sweat-line); padding: 40px 0 28px; background: var(--sweat-bg); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer__tag { color: var(--sweat-muted); margin: 10px 0 0; }
.site-footer h2 { font-size: .85rem; margin: 0 0 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; color: var(--sweat-muted); font-size: .92rem; }
.site-footer a:hover { color: var(--sweat-yellow); }
.footer__legal { margin-top: 28px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--sweat-muted); font-size: .85rem; }

/* Tablet / mobile */
@media (max-width: 1024px) {
	.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.story-layout { grid-template-columns: 1fr; gap: 32px; }
	.site-header__tag { display: none; }
}
@media (max-width: 860px) {
	.nav-toggle { display: block; }
	.site-header__cta { display: none; }
	.primary-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--sweat-bg); border-bottom: 1px solid var(--sweat-line); display: none; padding: 8px 20px 20px; }
	.primary-nav.is-open { display: block; }
	.primary-nav ul { flex-direction: column; gap: 0; }
	.primary-nav a { display: block; padding: 14px 0; border-bottom: 1px solid var(--sweat-line); font-size: 1rem; }
	.primary-nav .mobile-cta { display: block; margin-top: 16px; }
	.site-logo img { height: 38px; }
	.hero::after, .entry-hero::after { background: linear-gradient(180deg, rgba(6,13,24,.15) 0%, rgba(6,13,24,.92) 62%); }
	.hero__inner { padding-top: 220px; padding-bottom: 36px; }
	.entry-hero__inner { padding-top: 24px; }
	.breadcrumbs { margin-bottom: 170px; }
	.footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 861px) { .primary-nav .mobile-cta { display: none; } }
@media (max-width: 600px) {
	.grid, .grid--3 { grid-template-columns: 1fr; }
	.entry-content { font-size: 1.1rem; }
	.cta { padding: 20px; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
