/*
Theme Name: Afro Atlantic STL
Theme URI: https://afroatlanticstl.com
Author: Afro Atlantic STL
Author URI: https://afroatlanticstl.com
Description: Community hub theme for Afro Atlantic STL, the 314/618 home for African, Caribbean and Afro-Latin communities. Pairs with the Afro Atlantic Core plugin.
Version: 1.0.1
Requires at least: 6.2
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: afro-atlantic
Tags: custom-logo, custom-menu, featured-images, one-column, translation-ready
*/

/* ---------- Brand tokens ---------- */
:root {
	--aa-navy: #072231;
	--aa-deep: #0e4250;
	--aa-teal: #3c7478;
	--aa-sea: #45a3af;
	--aa-gold: #f2a944;
	--aa-sun: #f3c452;
	--aa-green: #28764c;
	--aa-sand: #f4ebd8;
	--aa-paper: #fffdf8;
	--aa-ink: #14232b;
	--aa-muted: #5b6b72;
	--aa-line: #e4dccb;
	--aa-radius: 14px;
	--aa-shadow: 0 6px 24px rgba(7, 34, 49, .10);
	--aa-head: "Oswald", "Arial Narrow", Arial, sans-serif;
	--aa-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--aa-wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--aa-body);
	font-size: 17px;
	line-height: 1.6;
	color: var(--aa-ink);
	background: var(--aa-paper);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--aa-deep); text-underline-offset: 3px; }
a:hover { color: var(--aa-green); }
h1, h2, h3, h4 {
	font-family: var(--aa-head);
	font-weight: 600;
	line-height: 1.15;
	color: var(--aa-navy);
	letter-spacing: .3px;
	margin: 1.4em 0 .5em;
}
h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); text-transform: uppercase; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.1em; }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
	position: fixed; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto; clip: auto;
	background: var(--aa-gold); color: var(--aa-navy); padding: 10px 16px; border-radius: 8px;
}
:focus-visible { outline: 3px solid var(--aa-gold); outline-offset: 2px; }

.aa-wrap { width: min(var(--aa-wrap), 100% - 40px); margin-inline: auto; }
.aa-narrow { width: min(820px, 100% - 40px); margin-inline: auto; }

/* Kente-inspired band used as a divider */
.aa-band {
	height: 8px;
	background: repeating-linear-gradient(90deg,
		var(--aa-gold) 0 28px, var(--aa-green) 28px 40px, var(--aa-navy) 40px 46px,
		var(--aa-sea) 46px 70px, var(--aa-navy) 70px 76px, var(--aa-green) 76px 88px);
}

/* ---------- Buttons ---------- */
.aa-btn, .wp-block-button__link, button.aa-btn, input[type="submit"].aa-btn {
	display: inline-flex; align-items: center; gap: .45em;
	font-family: var(--aa-head); font-size: 1rem; letter-spacing: .6px; text-transform: uppercase;
	padding: .75em 1.35em; border-radius: 999px; border: 2px solid transparent;
	background: var(--aa-gold); color: var(--aa-navy); text-decoration: none; cursor: pointer;
	transition: transform .15s ease, background .15s ease;
}
.aa-btn:hover { background: var(--aa-sun); color: var(--aa-navy); transform: translateY(-1px); }
.aa-btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.aa-btn--ghost:hover { background: #fff; color: var(--aa-navy); }
.aa-btn--dark { background: var(--aa-navy); color: #fff; }
.aa-btn--dark:hover { background: var(--aa-deep); color: #fff; }
.aa-btn--small { font-size: .85rem; padding: .5em 1em; }

/* ---------- Header ---------- */
.aa-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(255, 253, 248, .96);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--aa-line);
}
.admin-bar .aa-header { top: 32px; }
.aa-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; }
.aa-brand { display: flex; align-items: center; text-decoration: none; }
.aa-brand img { height: 56px; width: auto; display: block; }
.aa-brand__text { font-family: var(--aa-head); font-size: 1.5rem; color: var(--aa-navy); text-transform: uppercase; }
.aa-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.aa-nav li { position: relative; }
.aa-nav a {
	display: block; padding: 10px 12px; border-radius: 8px;
	font-family: var(--aa-head); text-transform: uppercase; letter-spacing: .6px; font-size: .98rem;
	color: var(--aa-navy); text-decoration: none;
}
.aa-nav a:hover, .aa-nav .current-menu-item > a, .aa-nav .current-menu-ancestor > a { background: var(--aa-sand); }
.aa-nav .sub-menu {
	position: absolute; left: 0; top: 100%; min-width: 230px; display: none; flex-direction: column; align-items: stretch;
	background: #fff; border: 1px solid var(--aa-line); border-radius: 12px; padding: 8px; box-shadow: var(--aa-shadow);
}
.aa-nav .sub-menu a { text-transform: none; font-family: var(--aa-body); font-size: .95rem; letter-spacing: 0; }
.aa-nav li:hover > .sub-menu, .aa-nav li:focus-within > .sub-menu { display: flex; }
.aa-header__cta { white-space: nowrap; }
.aa-menu-toggle {
	display: none; background: var(--aa-navy); color: #fff; border: 0; border-radius: 10px;
	padding: 10px 14px; font-family: var(--aa-head); text-transform: uppercase; cursor: pointer;
}

@media (max-width: 980px) {
	.aa-menu-toggle { display: inline-block; }
	.aa-header__cta { display: none; }
	.aa-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--aa-line); box-shadow: var(--aa-shadow); max-height: 80vh; overflow: auto; }
	.aa-nav.is-open { display: block; }
	.aa-nav ul { flex-direction: column; align-items: stretch; padding: 10px 20px 20px; }
	.aa-nav .sub-menu { position: static; display: flex; box-shadow: none; border: 0; padding: 0 0 0 14px; }
	.aa-brand img { height: 46px; }
}

/* ---------- Hero ---------- */
.aa-hero {
	position: relative; overflow: hidden; color: #fff;
	background:
		radial-gradient(circle at 85% 20%, rgba(242,169,68,.45), transparent 38%),
		linear-gradient(135deg, var(--aa-navy) 0%, var(--aa-deep) 55%, var(--aa-teal) 100%);
	padding: 72px 0 96px;
}
.aa-hero::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 70px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 70' preserveAspectRatio='none'%3E%3Cpath d='M0 40 C 240 0 480 70 720 36 S 1200 0 1440 34 V70 H0Z' fill='%23fffdf8'/%3E%3C/svg%3E") center/100% 100% no-repeat;
}
.aa-hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.aa-hero h1 { color: #fff; margin-top: 0; }
.aa-hero h1 span { color: var(--aa-gold); }
.aa-hero__lead { font-size: 1.2rem; max-width: 36em; opacity: .95; }
.aa-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.aa-hero__emblem { justify-self: center; width: min(340px, 80vw); aspect-ratio: 1; border-radius: 50%; background: #fff; padding: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.aa-hero__emblem img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.aa-hero__eyebrow { font-family: var(--aa-head); letter-spacing: 2px; text-transform: uppercase; color: var(--aa-sun); margin-bottom: 10px; }
@media (max-width: 860px) {
	.aa-hero { padding: 48px 0 80px; }
	.aa-hero__inner { grid-template-columns: 1fr; }
	.aa-hero__emblem { order: -1; width: 180px; }
}

/* ---------- Page layout ---------- */
.aa-main { padding: 20px 0 64px; min-height: 50vh; }
.aa-page-head { background: var(--aa-sand); padding: 44px 0 34px; margin-bottom: 30px; }
.aa-page-head h1 { margin: 0; }
.aa-page-head p { margin: 10px 0 0; color: var(--aa-muted); }
.aa-crumbs { font-size: .9rem; margin-bottom: 8px; }
.aa-crumbs a { color: var(--aa-teal); }
.entry-content > *:first-child { margin-top: 0; }
.entry-content .alignwide { width: min(var(--aa-wrap), 100vw - 40px); margin-left: 50%; transform: translateX(-50%); }
.entry-content .alignfull { width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.entry-content blockquote { border-left: 5px solid var(--aa-gold); margin: 1.5em 0; padding: .4em 1.2em; background: var(--aa-sand); border-radius: 0 10px 10px 0; }
.entry-content table { border-collapse: collapse; width: 100%; }
.entry-content th, .entry-content td { border: 1px solid var(--aa-line); padding: 8px 10px; text-align: left; }

/* Section blocks used inside page content */
.aa-section { margin: 48px 0; }
.aa-section__head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.aa-section__head h2 { margin: 0; }
.aa-section__head a { font-family: var(--aa-head); text-transform: uppercase; letter-spacing: .6px; text-decoration: none; }
.aa-kicker { font-family: var(--aa-head); letter-spacing: 2px; text-transform: uppercase; color: var(--aa-green); font-size: .9rem; }

/* ---------- Cards & grids ---------- */
.aa-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.aa-grid--tight { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.aa-card {
	background: #fff; border: 1px solid var(--aa-line); border-radius: var(--aa-radius);
	padding: 20px; box-shadow: 0 1px 0 rgba(7,34,49,.03); display: flex; flex-direction: column; gap: 8px;
}
.aa-card h3 { margin: 0; font-size: 1.2rem; }
.aa-card h3 a { color: var(--aa-navy); text-decoration: none; }
.aa-card h3 a:hover { color: var(--aa-green); }
.aa-card__meta { font-size: .88rem; color: var(--aa-muted); }
.aa-card__img { margin: -20px -20px 8px; border-radius: var(--aa-radius) var(--aa-radius) 0 0; overflow: hidden; aspect-ratio: 16/10; background: var(--aa-sand); }
.aa-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.aa-card--accent { border-top: 5px solid var(--aa-gold); }
.aa-tile {
	display: flex; flex-direction: column; justify-content: space-between; gap: 6px; min-height: 140px;
	padding: 20px; border-radius: var(--aa-radius); text-decoration: none; color: #fff;
	background: linear-gradient(140deg, var(--aa-deep), var(--aa-teal));
	transition: transform .15s ease, box-shadow .15s ease;
}
.aa-tile:nth-child(3n+2) { background: linear-gradient(140deg, var(--aa-green), var(--aa-teal)); }
.aa-tile:nth-child(3n+3) { background: linear-gradient(140deg, var(--aa-navy), var(--aa-deep)); }
.aa-tile:hover { transform: translateY(-3px); box-shadow: var(--aa-shadow); color: #fff; }
.aa-tile strong { font-family: var(--aa-head); font-size: 1.3rem; text-transform: uppercase; letter-spacing: .5px; }
.aa-tile span { opacity: .9; font-size: .95rem; }

.aa-chip {
	display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
	background: var(--aa-sand); color: var(--aa-navy); font-size: .82rem; text-decoration: none; border: 1px solid var(--aa-line);
}
.aa-chip img { width: 18px; height: 12px; object-fit: cover; border-radius: 2px; }
.aa-chip--gold { background: var(--aa-gold); border-color: var(--aa-gold); }

/* ---------- Posts list ---------- */
.aa-posts { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.aa-pagination { margin-top: 30px; display: flex; gap: 8px; flex-wrap: wrap; }
.aa-pagination .page-numbers { padding: 8px 14px; border-radius: 8px; background: #fff; border: 1px solid var(--aa-line); text-decoration: none; }
.aa-pagination .current { background: var(--aa-navy); color: #fff; }

/* ---------- Forms (theme-level) ---------- */
input[type="text"], input[type="email"], input[type="url"], input[type="tel"], input[type="date"],
input[type="datetime-local"], input[type="search"], input[type="number"], select, textarea {
	width: 100%; font: inherit; padding: 11px 13px; border: 1px solid #cfc5b0; border-radius: 10px; background: #fff; color: var(--aa-ink);
}
textarea { min-height: 120px; }
input:focus, select:focus, textarea:focus { border-color: var(--aa-teal); outline: 3px solid rgba(69,163,175,.25); }
.search-form { display: flex; gap: 8px; }
.search-form label { flex: 1; }
.search-form .search-submit { font-family: var(--aa-head); text-transform: uppercase; background: var(--aa-navy); color: #fff; border: 0; border-radius: 10px; padding: 0 18px; cursor: pointer; }

/* ---------- Comments (Ask the Diaspora answers) ---------- */
.comments-area { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--aa-line); }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { background: #fff; border: 1px solid var(--aa-line); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.comment-list .children { list-style: none; padding-left: 20px; }
.comment-meta { font-size: .88rem; color: var(--aa-muted); }
.comment-form input[type="submit"] { font-family: var(--aa-head); text-transform: uppercase; background: var(--aa-gold); color: var(--aa-navy); border: 0; border-radius: 999px; padding: 12px 22px; cursor: pointer; }

/* ---------- Footer ---------- */
.aa-footer { background: var(--aa-navy); color: #d8e3e6; margin-top: 40px; }
.aa-footer a { color: #fff; }
.aa-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; padding: 52px 0 30px; }
.aa-footer h4 { color: var(--aa-gold); margin-top: 0; text-transform: uppercase; font-size: 1rem; letter-spacing: 1px; }
.aa-footer ul { list-style: none; margin: 0; padding: 0; }
.aa-footer li { margin-bottom: 6px; }
.aa-footer li a { text-decoration: none; }
.aa-footer li a:hover { text-decoration: underline; color: var(--aa-sun); }
.aa-footer__emblem { width: 92px; height: 92px; border-radius: 50%; background: #fff; padding: 6px; margin-bottom: 12px; }
.aa-footer__emblem img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.aa-footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0 26px; font-size: .9rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 860px) { .aa-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .aa-footer__grid { grid-template-columns: 1fr; } }

/* ---------- WordPress core alignment / captions ---------- */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption-text, figcaption { font-size: .88rem; color: var(--aa-muted); }
.sticky .aa-card { border-color: var(--aa-gold); }
.bypostauthor { }
.gallery-caption { }

/* ---------- 404 ---------- */
.aa-404 { text-align: center; padding: 60px 0; }
.aa-404 .aa-hero__emblem { margin: 0 auto 20px; width: 160px; }
