/*
Theme Name:     Inspiring Arabs
Theme URI:      https://inspiringarab.com
Author:         Riman Agency
Author URI:     https://rimanagency.com
Description:    Editorial dark-canvas theme built to host full-HTML pages imported via the AI Page Builder plugin. The plugin bypasses the theme for raw-mode imports, so this theme's templates render only on non-raw contexts (blog posts, archives, search, 404, and admin-created pages). All styling is scoped accordingly. Loads Inter, Fraunces italic, and JetBrains Mono from Google Fonts globally. Palette and typography exposed to the block editor via theme.json.
Version:        1.1.0
Requires at least: 6.0
Tested up to:   6.5
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:    inspiring-arabs
Tags:           dark, editorial, full-width, blank-canvas, custom-colors, custom-menu, custom-logo, featured-images, one-column, translation-ready, threaded-comments, block-styles, wide-blocks
*/

/* =========================================================
   DESIGN TOKENS
   Shared with the imported raw pages — if you change colors
   here, mirror the change in each raw page's inlined <style>
   or re-export via the AI Page Builder plugin.
   ========================================================= */

:root {
	--black:              #000000;
	--surface-0:          #1C1C20;
	--surface-1:          #232328;
	--surface-2:          #2B2B30;
	--hairline:           rgba(245, 245, 247, 0.08);
	--hairline-strong:    rgba(245, 245, 247, 0.16);

	--fg:                 #F5F5F7;
	--fg-muted:           #86868B;
	--fg-dim:             #555559;

	--accent:             #E8B04B;
	--accent-soft:        rgba(232, 176, 75, 0.14);
	--accent-glow:        rgba(232, 176, 75, 0.38);

	--sand:               #D4B896;
	--indigo:             #2A2F4A;

	--r-sm: 8px;
	--r-md: 14px;
	--r-lg: 24px;
	--r-pill: 980px;

	--ease:     cubic-bezier(0.22, 1, 0.36, 1);
	--ease-out: cubic-bezier(0.16, 1, 0.3, 1);

	--sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--serif: "Fraunces", "Times New Roman", Georgia, serif;
	--mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

	--gutter: clamp(1.25rem, 0.8rem + 2vw, 3rem);
	--max-w:  1360px;
	--measure: 68ch;
}

/* =========================================================
   GLOBALS
   ========================================================= */

html, body {
	margin: 0;
	padding: 0;
	background: var(--surface-0);
	color: var(--fg);
	font-family: var(--sans);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

*, *::before, *::after { box-sizing: border-box; }

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

a { color: var(--accent); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: #F5C56A; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

h1, h2, h3, h4, h5 {
	margin: 0;
	font-weight: 500;
	letter-spacing: -0.02em;
	line-height: 1.08;
	color: var(--fg);
}

p { margin: 0; }

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 4px;
}

.skip-link { position: absolute; left: -9999px; top: 0; }
.skip-link:focus {
	left: 1rem; top: 1rem; z-index: 1000;
	background: var(--fg); color: var(--black);
	padding: .5rem 1rem; border-radius: var(--r-pill);
	font-size: .9rem;
}

.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 !important; width: 1px; word-wrap: normal !important;
}

.site-shell { min-height: 100vh; position: relative; display: flex; flex-direction: column; }

/* =========================================================
   SITE HEADER (non-raw pages only)
   ========================================================= */

.site-header {
	position: sticky; top: 0; z-index: 40;
	background: rgba(28, 28, 32, 0.85);
	backdrop-filter: saturate(180%) blur(20px);
	-webkit-backdrop-filter: saturate(180%) blur(20px);
	border-bottom: 1px solid var(--hairline);
}
.site-header__inner {
	max-width: var(--max-w); margin: 0 auto;
	padding: 0 var(--gutter); height: 64px;
	display: flex; align-items: center; justify-content: space-between;
	gap: var(--gutter);
}
.site-brand {
	display: inline-flex; align-items: center; gap: .75rem;
	color: var(--fg); font-weight: 500; font-size: .98rem;
	letter-spacing: -0.01em;
}
.site-brand:hover { color: var(--fg); }
.site-brand__mark {
	display: inline-grid; place-items: center;
	width: 32px; height: 32px;
	border: 1.5px solid var(--accent); border-radius: 6px;
	color: var(--accent);
	font-family: var(--serif); font-weight: 700;
	font-size: .85rem; letter-spacing: -0.02em;
}
.site-brand .custom-logo { width: 32px; height: 32px; object-fit: contain; }

.site-nav__list {
	list-style: none; margin: 0; padding: 0;
	display: flex; gap: clamp(1.25rem, 1rem + 1.2vw, 2.5rem);
}
.site-nav__list a {
	color: var(--fg-muted); font-size: .92rem;
	transition: color .25s var(--ease);
}
.site-nav__list a:hover,
.site-nav__list .current-menu-item a { color: var(--fg); }

/* =========================================================
   MAIN LAYOUT
   ========================================================= */

.site-main {
	max-width: var(--max-w); margin: 0 auto;
	padding: clamp(3rem, 5vw, 6rem) var(--gutter) clamp(4rem, 7vw, 8rem);
	min-height: 60vh; width: 100%; flex: 1;
}

/* =========================================================
   SITE FOOTER (non-raw pages only)
   ========================================================= */

.site-footer {
	background: var(--surface-1);
	border-top: 1px solid var(--hairline);
	padding: clamp(3rem, 5vw, 5rem) 0 clamp(2rem, 3vw, 3rem);
}
.site-footer__inner {
	max-width: var(--max-w); margin: 0 auto;
	padding: 0 var(--gutter);
	display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center;
}
@media (min-width: 900px) { .site-footer__inner { grid-template-columns: 1fr auto 1fr; } }

.site-footer__brand {
	display: inline-flex; align-items: center; gap: .6rem;
	color: var(--fg); font-weight: 500; font-size: .95rem;
}
.site-footer__mark {
	font-family: var(--serif); font-weight: 700;
	color: var(--accent); font-size: 1.1rem; letter-spacing: -0.02em;
}
.site-footer__list {
	list-style: none; margin: 0; padding: 0;
	display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: center;
}
.site-footer__list a { color: var(--fg-muted); font-size: .88rem; }
.site-footer__list a:hover { color: var(--fg); }
.site-footer__copy {
	color: var(--fg-dim); font-size: .82rem; text-align: center;
}
@media (min-width: 900px) { .site-footer__copy { text-align: right; } }

/* =========================================================
   SINGLE POST (single.php)
   ========================================================= */

.post-single { max-width: var(--measure); margin: 0 auto; font-size: 1.1rem; line-height: 1.7; }
.post-single__header { margin-bottom: 2.5rem; }
.post-single__meta {
	display: flex; gap: .65rem; align-items: center;
	font-family: var(--mono); font-size: .75rem;
	letter-spacing: .12em; text-transform: uppercase;
	color: var(--accent); margin-bottom: 1rem;
}
.post-single__sep { color: var(--fg-dim); }
.post-single__cat { color: var(--fg-muted); }
.post-single__title {
	font-size: clamp(2.25rem, 1.75rem + 2.4vw, 3.4rem);
	margin-bottom: 1.25rem; max-width: 22ch;
}
.post-single__lead {
	font-family: var(--serif); font-style: italic;
	font-size: 1.3rem; color: var(--fg-muted);
	max-width: 46ch; line-height: 1.45;
}
.post-single__hero { margin: 2.5rem 0; border-radius: var(--r-md); overflow: hidden; }
.post-single__hero img { width: 100%; height: auto; }

.post-single__content > * + * { margin-top: 1.25rem; }
.post-single__content h2 {
	font-size: clamp(1.65rem, 1.4rem + 0.8vw, 2rem);
	margin-top: 2.75rem; margin-bottom: 0.5rem;
}
.post-single__content h3 {
	font-size: clamp(1.3rem, 1.15rem + 0.5vw, 1.55rem);
	margin-top: 2rem; margin-bottom: 0.25rem;
}
.post-single__content p { color: rgba(245, 245, 247, 0.88); }
.post-single__content a { text-decoration: underline; text-underline-offset: 3px; }
.post-single__content blockquote {
	border-left: 3px solid var(--accent);
	padding: .25rem 0 .25rem 1.5rem;
	font-family: var(--serif); font-style: italic;
	font-size: 1.3rem; color: var(--fg); margin: 2rem 0;
}
.post-single__content code {
	font-family: var(--mono); background: var(--surface-2);
	padding: .15em .45em; border-radius: 5px; font-size: .88em;
}
.post-single__content pre {
	font-family: var(--mono); background: var(--surface-2);
	padding: 1.25rem; border-radius: var(--r-md);
	overflow-x: auto; font-size: .88rem;
}
.post-single__content pre code { background: transparent; padding: 0; }
.post-single__content img { border-radius: var(--r-md); margin: 1.5rem 0; }
.post-single__content ul, .post-single__content ol {
	padding-left: 1.25rem; color: rgba(245, 245, 247, 0.88);
}
.post-single__content li + li { margin-top: .35rem; }

.post-single__footer {
	margin-top: 4rem; padding-top: 2.5rem;
	border-top: 1px solid var(--hairline);
}
.post-single__tags { margin-bottom: 2.5rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.tag-pill {
	display: inline-block; padding: .35rem .85rem;
	background: var(--surface-2); border: 1px solid var(--hairline);
	border-radius: var(--r-pill); font-size: .78rem;
	color: var(--fg-muted); letter-spacing: .02em;
}
.tag-pill:hover { color: var(--accent); border-color: var(--accent); }

.post-single__pagination { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; }
.post-nav {
	display: flex; flex-direction: column; gap: .3rem;
	padding: 1.25rem; background: var(--surface-1);
	border: 1px solid var(--hairline); border-radius: var(--r-md);
	transition: border-color .3s var(--ease);
}
.post-nav:hover { border-color: var(--accent); }
.post-nav--next { text-align: right; }
.post-nav__label {
	font-family: var(--mono); font-size: .7rem;
	letter-spacing: .14em; text-transform: uppercase;
	color: var(--fg-muted);
}
.post-nav__title a { color: var(--fg); font-weight: 500; }
.post-nav__title a:hover { color: var(--accent); }

/* =========================================================
   ARCHIVE + SEARCH
   ========================================================= */

.archive__header, .search-results .archive__header {
	margin-bottom: clamp(2.5rem, 4vw, 4rem); max-width: 42rem;
}
.archive__eyebrow {
	display: block; font-family: var(--mono);
	font-size: .75rem; letter-spacing: .14em; text-transform: uppercase;
	color: var(--accent); margin-bottom: .8rem;
}
.archive__title { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); margin-bottom: 1rem; }
.archive__title em { font-family: var(--serif); font-style: italic; color: var(--accent); }
.archive__description, .search-results__form {
	color: var(--fg-muted); font-size: 1.05rem; margin-top: 1rem;
}

.archive__list {
	display: grid; grid-template-columns: 1fr; gap: 2.5rem;
}
@media (min-width: 720px)  { .archive__list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .archive__list { grid-template-columns: repeat(3, 1fr); } }

.archive-card {
	display: flex; flex-direction: column;
	background: var(--surface-1); border: 1px solid var(--hairline);
	border-radius: var(--r-md); overflow: hidden;
	transition: border-color .3s var(--ease), transform .4s var(--ease);
}
.archive-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.archive-card__media { display: block; aspect-ratio: 16/10; overflow: hidden; }
.archive-card__media img {
	width: 100%; height: 100%; object-fit: cover;
	transition: transform .6s var(--ease);
}
.archive-card:hover .archive-card__media img { transform: scale(1.04); }
.archive-card__body {
	padding: 1.5rem 1.5rem 1.75rem;
	display: flex; flex-direction: column; gap: .75rem; flex: 1;
}
.archive-card__meta {
	display: flex; gap: .5rem;
	font-family: var(--mono); font-size: .7rem;
	letter-spacing: .14em; text-transform: uppercase; color: var(--fg-muted);
}
.archive-card__sep { color: var(--fg-dim); }
.archive-card__title { font-size: 1.35rem; line-height: 1.2; }
.archive-card__title a { color: var(--fg); }
.archive-card__title a:hover { color: var(--accent); }
.archive-card__excerpt {
	color: var(--fg-muted); font-size: .95rem;
	line-height: 1.55; flex: 1;
}
.archive-card__link {
	font-family: var(--mono); font-size: .78rem;
	letter-spacing: .1em; text-transform: uppercase;
	color: var(--accent); margin-top: auto;
}
.archive-card__link:hover { color: #F5C56A; }

.archive__pagination {
	margin-top: clamp(3rem, 5vw, 5rem);
	display: flex; justify-content: center;
}
.archive__pagination .page-numbers {
	display: inline-block; padding: .6rem 1rem; margin: 0 .15rem;
	border: 1px solid var(--hairline); border-radius: var(--r-sm);
	color: var(--fg-muted); font-size: .9rem;
	transition: all .2s var(--ease);
}
.archive__pagination .page-numbers:hover,
.archive__pagination .page-numbers.current { border-color: var(--accent); color: var(--accent); }

.archive__empty {
	color: var(--fg-muted); font-style: italic;
	text-align: center; padding: 4rem 0;
}

/* =========================================================
   SEARCH FORM
   ========================================================= */

.search-form {
	display: flex; gap: .5rem; max-width: 500px; margin-top: 1.5rem;
}
.search-form__input {
	flex: 1; padding: .85rem 1rem;
	background: var(--surface-1); border: 1px solid var(--hairline);
	border-radius: var(--r-md); color: var(--fg); font: inherit;
	font-size: .95rem; transition: border-color .2s var(--ease);
}
.search-form__input::placeholder { color: var(--fg-dim); }
.search-form__input:focus { outline: none; border-color: var(--accent); }
.search-form__submit {
	padding: .85rem 1.1rem; background: var(--accent);
	color: var(--black); border-radius: var(--r-md);
	font-weight: 600; transition: background .2s var(--ease);
}
.search-form__submit:hover { background: #F5C56A; }

/* =========================================================
   COMMENTS
   ========================================================= */

.comments {
	max-width: var(--measure); margin: 4rem auto 0;
	padding-top: 3rem; border-top: 1px solid var(--hairline);
}
.comments__title { font-size: 1.5rem; margin-bottom: 2rem; }
.comments__list { list-style: none; padding: 0; margin: 0 0 3rem; }
.comments__list li { margin-bottom: 1.75rem; }
.comment-body {
	background: var(--surface-1); border: 1px solid var(--hairline);
	border-radius: var(--r-md); padding: 1.25rem 1.5rem;
}
.comment-author { font-weight: 500; color: var(--fg); margin-bottom: .35rem; }
.comment-meta {
	font-family: var(--mono); font-size: .72rem;
	color: var(--fg-muted); letter-spacing: .1em;
	text-transform: uppercase; margin-bottom: .75rem;
}
.comment-content { color: rgba(245, 245, 247, 0.88); font-size: .98rem; line-height: 1.6; }

.comment-form {
	background: var(--surface-1); border: 1px solid var(--hairline);
	border-radius: var(--r-md); padding: 1.75rem;
}
.comment-form p { margin-bottom: 1rem; }
.comment-form label {
	display: block; margin-bottom: .4rem;
	font-family: var(--mono); font-size: .75rem;
	letter-spacing: .12em; text-transform: uppercase; color: var(--fg-muted);
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%; padding: .75rem 1rem;
	background: var(--surface-0); border: 1px solid var(--hairline);
	border-radius: var(--r-sm); color: var(--fg);
	font: inherit; font-size: .95rem;
}
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--accent); }
.comment-form .submit {
	background: var(--fg); color: var(--black);
	padding: .85rem 1.6rem; border-radius: var(--r-pill);
	font-weight: 500; transition: background .25s var(--ease);
}
.comment-form .submit:hover { background: var(--accent); }
.comments__closed {
	color: var(--fg-muted); font-style: italic; text-align: center;
	padding: 1.5rem; border: 1px dashed var(--hairline); border-radius: var(--r-sm);
}

/* =========================================================
   WIDGET AREA
   ========================================================= */

.site-sidebar { padding: 2rem; background: var(--surface-1); border-radius: var(--r-md); }
.site-sidebar .widget { margin-bottom: 2.5rem; }
.site-sidebar .widget-title { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; color: var(--fg); }

/* =========================================================
   PRINT
   ========================================================= */

@media print {
	.site-header, .site-footer, .post-single__pagination, .comments { display: none !important; }
	body { background: #fff !important; color: #000 !important; }
	a { color: #000 !important; text-decoration: underline !important; }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
