/* =========================================================
   Jamal Blocksy — grunge landing styles
   Used on the front end and inside the block editor.
   ========================================================= */

.jb-page {
	--jb-accent: #FF3B2B;
	--jb-ink: #0B0B0A;
	--jb-bone: #E9E4D8;
	--jb-white: #F6F3EC;
	--jb-text: #CFC9BC;
	--jb-muted: #A9A396;
	--jb-line: #3A3832;
	--jb-card: #121210;
	--jb-display: 'Lalezar', sans-serif;
	--jb-mono: 'Special Elite', monospace;
	position: relative;
	background: var(--jb-ink);
	color: var(--jb-bone);
	font-family: 'IBM Plex Sans Arabic', system-ui, sans-serif;
	font-size: 18px;
	line-height: 1.7;
	overflow: hidden;
}
.jb-en .jb-page,
.jb-page:lang(en) { --jb-display: 'Anton', 'Lalezar', sans-serif; }

/* Reset block spacing inside the page; spacing below is explicit. */
.jb-page .is-layout-flow > *,
.jb-page .is-layout-constrained > * { margin-block-start: 0; margin-block-end: 0; }
.jb-page p { margin: 0; }
.jb-page h1, .jb-page h2, .jb-page h3 { margin: 0; color: var(--jb-white); font-weight: 400; letter-spacing: 0; }
.jb-page a { color: var(--jb-bone); text-decoration: none; }
.jb-page a:hover { color: var(--jb-accent); }
.jb-page mark.has-inline-color { padding: 0; }
/* keep mixed Arabic / English / numbers in the right order */
.jb-page mark.has-inline-color, .jb-page h3 strong { unicode-bidi: isolate; }

.jb-sec { max-width: 1200px; margin-inline: auto !important; padding-inline: 24px; box-sizing: border-box; }

/* ---------- Type ---------- */
.jb-page .jb-h1,
.jb-page .jb-h2,
.jb-page h3,
.jb-page .jb-audit-h,
.jb-page .jb-about-h,
.jb-page .jb-contact-h,
.jb-page .jb-stat-n,
.jb-page .jb-word,
.jb-page .jb-num,
.jb-page .wp-block-button__link { font-family: var(--jb-display); font-weight: 400; }

.jb-page .jb-tag,
.jb-page .jb-eyebrow,
.jb-page .jb-kicker,
.jb-page .jb-meta,
.jb-page .jb-extra,
.jb-page .jb-price,
.jb-page .jb-badge,
.jb-page .jb-stat-l { font-family: var(--jb-mono); }

.jb-page .jb-eyebrow { margin-bottom: 14px; color: var(--jb-accent); font-size: 15px; letter-spacing: .12em; }
.jb-page .jb-h2 { margin-bottom: 18px; font-size: clamp(40px, 6vw, 76px); line-height: 1.2; filter: url(#jb-scratched); }
.jb-page .jb-h2-gap { margin-bottom: 56px; }
.jb-page .jb-lead { max-width: 620px; margin-bottom: 56px; color: var(--jb-muted); }

/* ---------- Grain over the whole landing page ---------- */
.page-template-page-landing::after {
	content: '';
	position: fixed;
	inset: 0;
	z-index: 9999;
	pointer-events: none;
	opacity: .1;
	mix-blend-mode: screen;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Buttons ---------- */
.jb-page .jb-btns { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 44px; }
.jb-page .wp-block-button__link {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 56px; padding: 0 30px; border-radius: 0; font-size: 22px; line-height: 1.2;
	filter: url(#jb-rough); box-sizing: border-box; transition: opacity .2s;
}
.jb-page .jb-btn-fill .wp-block-button__link { background: var(--jb-accent); color: var(--jb-ink); border: 0; }
.jb-page .jb-btn-fill .wp-block-button__link:hover { color: var(--jb-ink); opacity: .9; }
.jb-page .jb-btn-line .wp-block-button__link { background: transparent; color: var(--jb-bone); border: 2px solid var(--jb-bone); }
.jb-page .jb-btn-line .wp-block-button__link:hover { color: var(--jb-accent); border-color: var(--jb-accent); }
.jb-page .jb-btn-dark .wp-block-button__link { width: 100%; background: var(--jb-ink); color: var(--jb-bone); border: 0; min-height: 58px; }
.jb-page .jb-btn-dark .wp-block-button__link:hover { color: #fff; }
.jb-page .jb-btn-dline .wp-block-button__link { width: 100%; background: transparent; color: var(--jb-ink); border: 2px solid var(--jb-ink); min-height: 58px; }
.jb-page .jb-btn-dline .wp-block-button__link:hover { color: var(--jb-ink); background: rgba(0, 0, 0, .08); }

/* ---------- Hero ---------- */
.jb-page .jb-hero { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding-top: 56px; padding-bottom: 88px; }
.jb-page .jb-hero-text { position: relative; flex: 999 1 500px; min-width: 0; }
.jb-page .jb-tag {
	display: inline-block; margin-bottom: 28px; padding: 6px 16px;
	background: var(--jb-bone); color: var(--jb-ink); font-size: 15px; letter-spacing: .12em;
	transform: rotate(-2deg); filter: url(#jb-rough);
}
.jb-page .jb-h1 {
	position: relative; padding-bottom: 34px;
	font-size: clamp(48px, 6.4vw, 104px); line-height: 1.15; color: var(--jb-white);
	filter: url(#jb-scratched);
}
.jb-en .jb-page .jb-h1, .jb-page:lang(en) .jb-h1 { line-height: 1.08; }
/* knife scratches across the headline */
.jb-page .jb-h1::before {
	content: ''; position: absolute; inset: 0 0 34px 0; pointer-events: none;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 300' preserveAspectRatio='none'%3E%3Cg stroke='%230B0B0A' fill='none' stroke-linecap='round'%3E%3Cpath d='M40 62 L420 48' stroke-width='2.5'/%3E%3Cpath d='M560 30 L930 92' stroke-width='1.6'/%3E%3Cpath d='M120 190 L610 168' stroke-width='2'/%3E%3Cpath d='M700 150 L980 210' stroke-width='3'/%3E%3Cpath d='M260 240 L520 262' stroke-width='1.4'/%3E%3Cpath d='M610 70 L760 40' stroke-width='1.2'/%3E%3Cpath d='M20 140 L230 128' stroke-width='1.8'/%3E%3Cpath d='M820 260 L960 236' stroke-width='1.5'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
/* hand-drawn red underline */
.jb-page .jb-h1::after {
	content: ''; position: absolute; bottom: 4px; inset-inline-start: 0;
	width: min(560px, 80%); height: 22px; pointer-events: none;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 30' preserveAspectRatio='none'%3E%3Cpath d='M4 18 C120 6, 220 26, 330 12 S520 8, 596 16' stroke='%23FF3B2B' stroke-width='7' fill='none' stroke-linecap='round'/%3E%3Cpath d='M30 24 C160 16, 300 28, 470 20' stroke='%23FF3B2B' stroke-width='2.5' fill='none' stroke-linecap='round' opacity='0.7'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.jb-page .jb-sub { max-width: 660px; margin-top: 28px; font-size: 21px; color: var(--jb-text); }

.jb-page .jb-hero-photo { position: relative; flex: 1 1 460px; max-width: 520px; margin: 0 auto !important; }
.jb-page .jb-hero-photo img {
	display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover;
	-webkit-mask-image: radial-gradient(circle closest-side, #000 72%, transparent 99%);
	mask-image: radial-gradient(circle closest-side, #000 72%, transparent 99%);
}
.jb-page .jb-hero-photo::after {
	content: 'JAMAL ALMOUSSA'; position: absolute; bottom: 9%; left: 0;
	padding: 4px 14px; border: 3px solid var(--jb-accent); color: var(--jb-accent);
	font-family: var(--jb-mono); font-size: 17px; letter-spacing: .1em;
	transform: rotate(-8deg); filter: url(#jb-distress); pointer-events: none;
}

/* ---------- Numbers band (torn paper) ---------- */
.jb-page .jb-stats { position: relative; margin-block: 34px !important; background: var(--jb-bone); color: var(--jb-ink); }
.jb-page .jb-stats::before,
.jb-page .jb-stats::after { content: ''; position: absolute; left: 0; right: 0; height: 34px; pointer-events: none; background-size: 100% 100%; }
.jb-page .jb-stats::before {
	bottom: calc(100% - 1px);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40 L0 22 L40 26 L72 14 L118 24 L160 10 L205 22 L250 16 L300 28 L338 12 L390 20 L430 8 L480 24 L530 14 L575 26 L620 10 L668 22 L712 16 L760 28 L805 12 L850 22 L900 8 L950 24 L995 14 L1040 26 L1088 12 L1130 22 L1180 16 L1225 28 L1270 10 L1320 22 L1365 14 L1405 24 L1440 18 L1440 40 Z' fill='%23E9E4D8'/%3E%3C/svg%3E");
}
.jb-page .jb-stats::after {
	top: calc(100% - 1px);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath d='M0 0 L0 16 L48 22 L90 10 L140 26 L185 14 L230 24 L282 8 L325 20 L372 12 L420 28 L465 16 L512 24 L560 10 L605 22 L652 14 L700 26 L748 12 L795 20 L840 8 L890 24 L935 16 L985 28 L1030 12 L1078 22 L1122 10 L1170 24 L1215 14 L1262 26 L1310 12 L1355 20 L1400 10 L1440 18 L1440 0 Z' fill='%23E9E4D8'/%3E%3C/svg%3E");
}
.jb-page .jb-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 36px; padding-top: 40px; padding-bottom: 48px; }
.jb-page .jb-stat-n { font-size: 64px; line-height: 1.1; color: var(--jb-ink); filter: url(#jb-distress); }
.jb-page .jb-stat:first-child .jb-stat-n { color: #B3241A; }
.jb-page .jb-stat-n { direction: ltr; text-align: right; }
.jb-en .jb-page .jb-stat-n, .jb-page:lang(en) .jb-stat-n { text-align: left; }
.jb-page .jb-stat-l { font-size: 15px; color: #3A3832; }

/* ---------- Sections ---------- */
.jb-page .jb-block { padding-top: 104px; padding-bottom: 40px; }
.jb-page .jb-block-end { padding-bottom: 104px; }
.jb-page .jb-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 32px; }
.jb-page .jb-grid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 32px; margin-top: 32px !important; }
.jb-page #services .jb-grid3 { margin-top: 0 !important; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 28px; }

/* tape strips */
.jb-page .jb-panel::before,
.jb-page .jb-card:not(.jb-feat):not(.jb-own)::before {
	content: ''; position: absolute; top: -12px; inset-inline-end: 30px; z-index: 1;
	width: 92px; height: 25px; background: rgba(233, 228, 216, .82); transform: rotate(4deg); pointer-events: none;
}
.jb-page .jb-grid2 > :nth-child(2)::before,
.jb-page .jb-grid3 > :nth-child(even)::before { inset-inline-end: auto; inset-inline-start: 30px; transform: rotate(-5deg); }

.jb-page .jb-panel {
	position: relative; padding: 44px 36px 36px; border: 2px solid var(--jb-line);
	background-image: radial-gradient(#1C1B19 1px, transparent 1.2px); background-size: 7px 7px;
}
.jb-page .jb-kicker { margin-bottom: 6px; font-size: 14px; color: var(--jb-muted); }
.jb-page .jb-panel h3 { margin-bottom: 24px; font-size: 38px; line-height: 1.25; }
.jb-page .jb-list { margin: 0; padding: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 12px; color: var(--jb-text); }
.jb-page .jb-list li { margin: 0; }
.jb-page .jb-list strong { color: var(--jb-bone); }

/* ---------- Cards ---------- */
.jb-page .jb-card { position: relative; display: flex; flex-direction: column; border: 2px solid var(--jb-line); background: var(--jb-card); }
.jb-page .jb-feat { flex-direction: row; flex-wrap: wrap; }
.jb-page .jb-media {
	aspect-ratio: 16 / 9; overflow: hidden; display: flex; align-items: center; justify-content: center;
	background-color: #1A1916; background-image: radial-gradient(#2E2C28 1.2px, transparent 1.4px); background-size: 6px 6px;
}
.jb-page .jb-feat .jb-media { flex: 1 1 360px; min-height: 300px; aspect-ratio: auto; }
.jb-page .jb-media figure { margin: 0 !important; height: 100%; display: flex; align-items: center; justify-content: center; }
.jb-page .jb-media img { display: block; height: 100%; width: auto; max-width: 100%; object-fit: contain; filter: url(#jb-rough); }
.jb-page .jb-word {
	padding: 0 16px; text-align: center; font-size: clamp(40px, 4.4vw, 60px); line-height: 1;
	color: transparent; -webkit-text-stroke: 1.5px var(--jb-bone); filter: url(#jb-rough);
}
.jb-page .jb-feat .jb-word { font-size: clamp(90px, 12vw, 150px); -webkit-text-stroke-width: 2px; }
.jb-page .jb-body { display: flex; flex-direction: column; gap: 14px; padding: 32px; }
.jb-page .jb-feat .jb-body { flex: 1 1 420px; gap: 16px; padding: 40px; }
.jb-page .jb-meta { font-size: 14px; color: var(--jb-muted); }
.jb-page .jb-card h3 { font-size: 32px; line-height: 1.25; }
.jb-page .jb-feat h3 { font-size: 42px; line-height: 1.2; }
.jb-page .jb-desc { color: var(--jb-text); }
.jb-page .jb-extra { color: var(--jb-accent); }
.jb-page .jb-feat::after {
	content: 'CLIENT'; position: absolute; top: 18px; left: 18px; padding: 4px 14px;
	border: 3px solid var(--jb-accent); color: var(--jb-accent); font-family: var(--jb-mono); font-size: 18px; letter-spacing: .1em;
	transform: rotate(-8deg); filter: url(#jb-distress); pointer-events: none;
}
.jb-page .jb-own { gap: 14px; padding: 32px; border-style: dashed; border-color: #4A4740; background: none; }
.jb-page .jb-own .jb-list { gap: 8px; }
.jb-page .jb-note { font-size: 16px; color: var(--jb-muted); }

/* ---------- Services ---------- */
.jb-page .jb-svc { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 36px; border: 2px solid var(--jb-line); }
.jb-page .jb-svc::before { display: none; }
.jb-page .jb-hot { border-color: var(--jb-accent); background-image: radial-gradient(#221816 1px, transparent 1.2px); background-size: 7px 7px; }
.jb-page .jb-num { font-size: 56px; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px var(--jb-bone); filter: url(#jb-rough); }
.jb-page .jb-hot .jb-num { -webkit-text-stroke-color: var(--jb-accent); }
.jb-page .jb-svc h3 { font-size: 30px; line-height: 1.3; }
.jb-page .jb-svc .jb-desc { font-size: 16px; color: var(--jb-muted); }
.jb-page .jb-price { margin-top: auto !important; padding-top: 16px; font-size: 15px; color: #8F8A80; }
.jb-page .jb-badge {
	position: absolute; top: 18px; inset-inline-end: 18px; padding: 2px 10px;
	border: 2px solid var(--jb-accent); color: var(--jb-accent); font-size: 13px;
	transform: rotate(-6deg); filter: url(#jb-distress);
}

/* ---------- Free audit (red band) ---------- */
.jb-page .jb-audit { background: var(--jb-accent); color: var(--jb-ink); }
.jb-page .jb-audit-in { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; justify-content: space-between; padding-top: 88px; padding-bottom: 88px; }
.jb-page .jb-audit-text { flex: 999 1 480px; min-width: 0; }
.jb-page .jb-audit .jb-eyebrow { color: var(--jb-ink); }
.jb-page .jb-audit-h { margin-bottom: 18px; font-size: clamp(44px, 6.5vw, 84px); line-height: 1.1; color: var(--jb-white); filter: url(#jb-scratched); }
.jb-page .jb-audit-p { max-width: 560px; font-size: 20px; font-weight: 500; }
.jb-page .jb-audit-acts { flex: 1 1 320px; display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
.jb-page .jb-audit-acts .wp-block-button { width: 100%; }
.jb-page .jb-audit-acts .wp-block-button__link { padding: 0 20px; white-space: nowrap; font-size: 20px; }

/* ---------- About ---------- */
.jb-page .jb-about { padding-top: 104px; padding-bottom: 104px; }
.jb-page .jb-about > * { max-width: 820px; }
.jb-page .jb-about-h { margin-bottom: 24px; font-size: clamp(44px, 6vw, 80px); line-height: 1.1; filter: url(#jb-scratched); }
.jb-page .jb-about-p { margin-bottom: 20px !important; font-size: 20px; color: var(--jb-text); }
.jb-page .jb-strong { margin-bottom: 0 !important; color: var(--jb-bone); font-weight: 500; }

/* ---------- Blog strip ---------- */
.jb-page .jb-posts .wp-block-post-template {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 32px;
	margin: 0; padding: 0; list-style: none;
}
.jb-page .jb-post { position: relative; height: 100%; display: flex; flex-direction: column; border: 2px solid var(--jb-line); background: var(--jb-card); transition: border-color .2s; }
.jb-page .jb-post:hover, .jb-page .jb-post:focus-within { border-color: var(--jb-accent); }
.jb-page .jb-post .wp-block-post-featured-image { margin: 0; background: #1A1916; }
.jb-page .jb-post .wp-block-post-featured-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.jb-page .jb-post-body { display: flex; flex-direction: column; gap: 12px; padding: 28px; }
.jb-page .jb-post .wp-block-post-title { font-family: var(--jb-display); font-size: 28px; line-height: 1.35; }
.jb-page .jb-post .wp-block-post-title a::after { content: ''; position: absolute; inset: 0; }
.jb-page .jb-post .wp-block-post-title a:hover { color: var(--jb-bone); }
.jb-page .jb-post .wp-block-post-excerpt { margin: 0; color: var(--jb-text); }
.jb-page .jb-post .wp-block-post-excerpt__more-text { display: none; }

/* ---------- Contact ---------- */
.jb-page .jb-contact { border-top: 2px solid #2C2B27; padding-top: 104px; padding-bottom: 96px; text-align: center; }
.jb-page .jb-contact-h { max-width: 960px; margin: 0 auto !important; font-size: clamp(44px, 7vw, 96px); line-height: 1.15; filter: url(#jb-scratched); }
.jb-page .jb-contact .jb-btns { justify-content: center; }

/* ---------- Blog post: free-audit box ---------- */
.jb-post-cta { margin: 64px 0 24px; padding: 40px; background: #FF3B2B; color: #0B0B0A; }
.jb-post-cta h2 { margin: 0 0 12px; font-family: 'Lalezar', sans-serif; font-weight: 400; font-size: clamp(30px, 4vw, 44px); line-height: 1.2; color: #F6F3EC; }
.jb-post-cta p { margin: 0 0 24px; font-size: 19px; font-weight: 500; color: #0B0B0A; }
.jb-post-cta .jb-cta-link {
	display: inline-flex; align-items: center; min-height: 56px; padding: 0 30px;
	background: #0B0B0A; color: #E9E4D8; font-family: 'Lalezar', sans-serif; font-size: 22px; text-decoration: none;
}
.jb-post-cta .jb-cta-link:hover { color: #fff; }

/* ---------- Phones ---------- */
@media (max-width: 600px) {
	.jb-page .jb-hero { padding-top: 32px; padding-bottom: 64px; }
	.jb-page .jb-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
	.jb-page .jb-stat-n { font-size: 44px; }
	.jb-page .jb-panel { padding: 40px 24px 28px; }
	.jb-page .jb-panel h3 { font-size: 32px; }
	.jb-page .jb-body, .jb-page .jb-feat .jb-body { padding: 28px 24px; }
	.jb-page .jb-feat h3 { font-size: 34px; }
	.jb-page .jb-block { padding-top: 80px; }
	.jb-page .jb-about { padding-top: 80px; padding-bottom: 80px; }
	.jb-page .jb-post-body { padding: 24px; }
	.jb-post-cta { padding: 28px 24px; }
}
