/*
Theme Name: Africa Baby Names
Theme URI: https://africababynames.com
Author: Le Marquis
Author URI: https://lemarquis.blog
Description: A warm, joyful, accessibility-first theme for africababynames.com — the most comprehensive African baby names resource. Pairs with the "Africa Baby Names Core" plugin which provides the data layer.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: abnt
Tags: custom-colors, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
	/* Palette */
	--abn-primary: #FF6B35;       /* warm orange — African sunset */
	--abn-primary-dark: #E2551F;
	--abn-secondary: #4ECDC4;     /* turquoise — freshness, youth */
	--abn-secondary-dark: #36B3AA;
	--abn-accent: #FFE66D;        /* sunny yellow — childhood */
	--abn-dark: #2C3E50;          /* deep navy — professionalism */
	--abn-light-bg: #FFF9F0;      /* warm white */
	--abn-text: #333333;
	--abn-muted: #6b7785;
	--abn-white: #ffffff;
	--abn-border: #efe6d8;

	/* Gender accents */
	--abn-boy: #4ECDC4;
	--abn-girl: #FF8FB1;
	--abn-unisex: #B095E8;

	/* Typography */
	--abn-font-heading: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
	--abn-font-body: "Lato", "Open Sans", system-ui, -apple-system, sans-serif;
	--abn-font-display: "Playfair Display", Georgia, serif;

	/* Rhythm */
	--abn-radius: 14px;
	--abn-radius-lg: 24px;
	--abn-radius-pill: 999px;
	--abn-gap: 1.5rem;
	--abn-shadow: 0 6px 24px rgba(44, 62, 80, 0.08);
	--abn-shadow-hover: 0 12px 32px rgba(255, 107, 53, 0.18);
	--abn-maxw: 1180px;
	--abn-transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Reset-ish base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	font-family: var(--abn-font-body);
	color: var(--abn-text);
	background: var(--abn-light-bg);
	line-height: 1.65;
	font-size: 17px;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--abn-font-heading);
	color: var(--abn-dark);
	line-height: 1.2;
	font-weight: 800;
	margin: 0 0 0.6em;
}

a { color: var(--abn-primary-dark); text-decoration: none; transition: color var(--abn-transition); }
a:hover { color: var(--abn-primary); }
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
	outline: 3px solid var(--abn-secondary);
	outline-offset: 2px;
	border-radius: 4px;
}

img { max-width: 100%; height: auto; display: block; }

.abn-container { max-width: var(--abn-maxw); margin-inline: auto; padding-inline: 1.25rem; }
.abn-section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.abn-section--tint { background: var(--abn-white); }

.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 { position: absolute; left: -9999px; top: 0; background: var(--abn-dark); color: #fff; padding: 0.75rem 1rem; z-index: 1000; }
.skip-link:focus { left: 1rem; top: 1rem; border-radius: 8px; color: #fff; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.abn-btn {
	display: inline-flex; align-items: center; gap: 0.5rem;
	font-family: var(--abn-font-heading); font-weight: 800; font-size: 1rem;
	padding: 0.85rem 1.6rem; border-radius: var(--abn-radius-pill);
	border: 2px solid transparent; cursor: pointer; transition: transform var(--abn-transition), box-shadow var(--abn-transition), background var(--abn-transition);
	background: var(--abn-primary); color: #fff; line-height: 1;
}
.abn-btn:hover { color: #fff; transform: translateY(-2px); box-shadow: var(--abn-shadow-hover); }
.abn-btn--secondary { background: var(--abn-secondary); }
.abn-btn--ghost { background: transparent; border-color: var(--abn-primary); color: var(--abn-primary-dark); }
.abn-btn--ghost:hover { background: var(--abn-primary); color: #fff; }
.abn-btn--lg { font-size: 1.15rem; padding: 1.05rem 2.1rem; }
.abn-btn--block { width: 100%; justify-content: center; }

/* ==========================================================================
   Header / nav
   ========================================================================== */
.abn-header {
	position: sticky; top: 0; z-index: 200;
	background: rgba(255, 249, 240, 0.92);
	backdrop-filter: saturate(140%) blur(8px);
	border-bottom: 1px solid var(--abn-border);
}
.abn-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.8rem; }
.abn-logo { display: flex; align-items: center; gap: 0.6rem; font-family: var(--abn-font-heading); font-weight: 900; font-size: 1.4rem; color: var(--abn-dark); }
.abn-logo__mark { width: 38px; height: 38px; }
.abn-logo b { color: var(--abn-primary); }
.abn-nav { display: flex; align-items: center; gap: 1.4rem; }
.abn-nav a { font-family: var(--abn-font-heading); font-weight: 700; color: var(--abn-dark); }
.abn-nav a:hover { color: var(--abn-primary); }
.abn-nav__cta { }
.abn-nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 0.4rem; }
.abn-nav-toggle span { display: block; width: 26px; height: 3px; background: var(--abn-dark); border-radius: 3px; margin: 5px 0; transition: var(--abn-transition); }

@media (max-width: 880px) {
	.abn-nav-toggle { display: block; }
	.abn-nav {
		position: fixed; inset: 64px 0 auto 0; flex-direction: column; align-items: stretch;
		background: var(--abn-white); padding: 1rem 1.25rem 1.5rem; gap: 0.25rem;
		box-shadow: var(--abn-shadow); transform: translateY(-120%); transition: transform var(--abn-transition);
		max-height: calc(100vh - 64px); overflow-y: auto;
	}
	.abn-nav[data-open="true"] { transform: translateY(0); }
	.abn-nav a { padding: 0.75rem 0.25rem; border-bottom: 1px solid var(--abn-border); }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.abn-footer { background: var(--abn-dark); color: #cfd8e0; margin-top: 3rem; }
.abn-footer a { color: #fff; }
.abn-footer a:hover { color: var(--abn-accent); }
.abn-footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; padding-block: 3rem; }
.abn-footer h4 { color: #fff; font-size: 1.05rem; }
.abn-footer ul { list-style: none; margin: 0; padding: 0; }
.abn-footer li { margin-bottom: 0.5rem; }
.abn-footer__bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-block: 1.25rem; font-size: 0.9rem; text-align: center; }
@media (max-width: 760px) { .abn-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .abn-footer__grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   African pattern divider (Adinkra/Kente-inspired, pure CSS/SVG)
   ========================================================================== */
.abn-pattern-divider {
	height: 16px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='16' viewBox='0 0 60 16'%3E%3Cg fill='none' stroke='%23FF6B35' stroke-width='2'%3E%3Cpath d='M0 8 L15 0 L30 8 L45 0 L60 8'/%3E%3C/g%3E%3Cg fill='%234ECDC4'%3E%3Ccircle cx='15' cy='8' r='2'/%3E%3Ccircle cx='45' cy='8' r='2'/%3E%3C/g%3E%3C/svg%3E");
	background-repeat: repeat-x;
	opacity: 0.8;
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.abn-breadcrumbs { font-size: 0.9rem; color: var(--abn-muted); margin-bottom: 1.25rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.abn-breadcrumbs .sep { color: var(--abn-border); }
.abn-breadcrumbs [aria-current="page"] { color: var(--abn-dark); font-weight: 700; }

/* ==========================================================================
   Hero
   ========================================================================== */
.abn-hero { position: relative; padding-block: clamp(3rem, 8vw, 6rem); text-align: center; overflow: hidden; }
.abn-hero::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background:
		radial-gradient(circle at 15% 20%, rgba(255,230,109,0.5), transparent 45%),
		radial-gradient(circle at 85% 15%, rgba(78,205,196,0.4), transparent 45%),
		radial-gradient(circle at 50% 100%, rgba(255,107,53,0.18), transparent 60%);
}
.abn-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); max-width: 16ch; margin-inline: auto; }
.abn-hero h1 .accent { color: var(--abn-primary); }
.abn-hero p.lead { font-size: clamp(1.1rem, 2.2vw, 1.35rem); color: var(--abn-muted); max-width: 50ch; margin: 0 auto 2rem; }
.abn-hero__cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ==========================================================================
   Search box
   ========================================================================== */
.abn-search { position: relative; max-width: 620px; margin: 2.25rem auto 0; }
.abn-search input[type="search"] {
	width: 100%; font-size: 1.1rem; padding: 1.05rem 3.4rem 1.05rem 1.4rem;
	border: 2px solid var(--abn-border); border-radius: var(--abn-radius-pill);
	background: #fff; box-shadow: var(--abn-shadow); font-family: var(--abn-font-body);
}
.abn-search input:focus { border-color: var(--abn-secondary); outline: none; }
.abn-search__icon { position: absolute; right: 1.2rem; top: 50%; transform: translateY(-50%); color: var(--abn-primary); pointer-events: none; }
.abn-search__results {
	position: absolute; top: calc(100% + 0.5rem); left: 0; right: 0; background: #fff;
	border-radius: var(--abn-radius); box-shadow: var(--abn-shadow); overflow: hidden;
	z-index: 50; display: none; text-align: left; max-height: 60vh; overflow-y: auto;
}
.abn-search__results[data-open="true"] { display: block; }
.abn-search__results a { display: flex; align-items: center; gap: 0.7rem; padding: 0.8rem 1.2rem; border-bottom: 1px solid var(--abn-border); color: var(--abn-text); }
.abn-search__results a:hover, .abn-search__results a[aria-selected="true"] { background: var(--abn-light-bg); }
.abn-search__results .flag { font-size: 1.2rem; }
.abn-search__results .meaning { color: var(--abn-muted); font-size: 0.9rem; margin-left: auto; }
.abn-search__empty { padding: 1rem 1.2rem; color: var(--abn-muted); }

/* ==========================================================================
   Section headings
   ========================================================================== */
.abn-section__head { text-align: center; margin-bottom: 2.25rem; }
.abn-section__head h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
.abn-section__head p { color: var(--abn-muted); max-width: 52ch; margin-inline: auto; }
.abn-eyebrow { display: inline-block; font-family: var(--abn-font-heading); font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; color: var(--abn-primary); background: rgba(255,107,53,0.1); padding: 0.3rem 0.8rem; border-radius: var(--abn-radius-pill); margin-bottom: 0.75rem; }

/* ==========================================================================
   Browse-by icon grid
   ========================================================================== */
.abn-browse-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--abn-gap); }
.abn-browse-card {
	background: #fff; border: 1px solid var(--abn-border); border-radius: var(--abn-radius-lg);
	padding: 1.8rem 1.25rem; text-align: center; transition: transform var(--abn-transition), box-shadow var(--abn-transition);
	display: block;
}
.abn-browse-card:hover { transform: translateY(-4px); box-shadow: var(--abn-shadow); }
.abn-browse-card .emoji { font-size: 2.4rem; display: block; margin-bottom: 0.6rem; }
.abn-browse-card h3 { margin: 0 0 0.2rem; font-size: 1.2rem; }
.abn-browse-card p { margin: 0; color: var(--abn-muted); font-size: 0.92rem; }
@media (max-width: 880px) { .abn-browse-grid { grid-template-columns: repeat(2, 1fr); } }

/* ==========================================================================
   Horizontal scroll row (trending)
   ========================================================================== */
.abn-scroll-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: var(--abn-gap); overflow-x: auto; padding-bottom: 1rem; scroll-snap-type: x mandatory; }
.abn-scroll-row > * { scroll-snap-align: start; }

/* ==========================================================================
   Alphabet nav
   ========================================================================== */
.abn-alphabet { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; }
.abn-alphabet a { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #fff; border: 1px solid var(--abn-border); font-family: var(--abn-font-heading); font-weight: 800; color: var(--abn-dark); }
.abn-alphabet a:hover, .abn-alphabet a.is-active { background: var(--abn-primary); color: #fff; border-color: var(--abn-primary); }

/* ==========================================================================
   Newsletter
   ========================================================================== */
.abn-newsletter { background: linear-gradient(135deg, var(--abn-secondary), var(--abn-primary)); color: #fff; border-radius: var(--abn-radius-lg); padding: clamp(2rem, 5vw, 3.5rem); text-align: center; }
.abn-newsletter h2 { color: #fff; }
.abn-newsletter form { display: flex; gap: 0.6rem; max-width: 480px; margin: 1.5rem auto 0; flex-wrap: wrap; }
.abn-newsletter input[type="email"] { flex: 1 1 240px; padding: 0.95rem 1.2rem; border: 0; border-radius: var(--abn-radius-pill); font-size: 1rem; }
.abn-newsletter .abn-btn { background: var(--abn-dark); }

/* utility */
.abn-grid { display: grid; gap: var(--abn-gap); }
.abn-grid--cards { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }

@media (prefers-reduced-motion: reduce) {
	* { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
