/**
 * Bismika Allahuma: kapitan.css
 *
 * The ornament of the Masjid Kapitan Keling, George Town, carried into the
 * theme. The mosque's lime-washed walls give the ivory page; its dark domes
 * answer to the navy; its gilded finials and the gold eight-point stars of
 * the minaret base give the gold; its roof tiles give the terracotta.
 * Motifs: the eight-point star (section rules, section numbers, the star
 * lattice of the navy bands), the scalloped dome drum (under the menu),
 * the pointed crown of the parapet (top of the footer), the pointed arch
 * of the portal (the editor's portrait, gold inner frames), and the
 * onion dome (back to top).
 *
 * Source drawings: assets/images/motifs/*.svg. They are inlined below so
 * no extra request is made; shapes used as masks take the scheme colours.
 *
 * @package Bismika_Allahuma
 * @since   3.0.1
 */

:root {
	--bm-gold: #b8913a;
	--bm-gold-soft: #c9a24a;
	--bm-ivory: #fbf9f3;
	--bm-terracotta: #a9482a;
	--bm-terracotta-tint: #f6e7df;
	--bm-motif-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0.5L15.37 3.87L20.13 3.87L20.13 8.63L23.5 12L20.13 15.37L20.13 20.13L15.37 20.13L12 23.5L8.63 20.13L3.87 20.13L3.87 15.37L0.5 12L3.87 8.63L3.87 3.87L8.63 3.87Z'/%3E%3C/svg%3E");
	--bm-motif-star-gold: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23c9a24a' d='M12 0.5L15.37 3.87L20.13 3.87L20.13 8.63L23.5 12L20.13 15.37L20.13 20.13L15.37 20.13L12 23.5L8.63 20.13L3.87 20.13L3.87 15.37L0.5 12L3.87 8.63L3.87 3.87L8.63 3.87Z'/%3E%3C/svg%3E");
	--bm-motif-scallop: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 7' preserveAspectRatio='none'%3E%3Cpath d='M0 0H18A9 7 0 0 1 0 0Z'/%3E%3C/svg%3E");
	--bm-motif-crown: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 18' preserveAspectRatio='none'%3E%3Cpath d='M0 18V14C7 14 12 10.5 13.8 4.5L15 0L16.2 4.5C18 10.5 23 14 30 14V18Z'/%3E%3C/svg%3E");
	--bm-motif-dome: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11.4 0h1.2v3.4c.3.7.9 1.3 1.8 1.9C18.6 8 20.5 11.6 20.5 14.6c0 2.3-1.3 3.7-3.5 3.7h-10c-2.2 0-3.5-1.4-3.5-3.7 0-3 1.9-6.6 6.1-9.3.9-.6 1.5-1.2 1.8-1.9zM5 19.6h14V24H5z'/%3E%3C/svg%3E");
	--bm-motif-arch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 30' preserveAspectRatio='none'%3E%3Cpath d='M0 30V13C0 6 6 2.2 12 0C18 2.2 24 6 24 13V30Z'/%3E%3C/svg%3E");
	--bm-motif-lattice: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23c9a24a' stroke-width='.9' opacity='.22'%3E%3Cpath d='M28 19L30.64 21.64L34.36 21.64L34.36 25.36L37 28L34.36 30.64L34.36 34.36L30.64 34.36L28 37L25.36 34.36L21.64 34.36L21.64 30.64L19 28L21.64 25.36L21.64 21.64L25.36 21.64Z'/%3E%3C/g%3E%3Cg fill='%23c9a24a' opacity='.22'%3E%3Ccircle cx='0' cy='0' r='1.4'/%3E%3Ccircle cx='56' cy='0' r='1.4'/%3E%3Ccircle cx='0' cy='56' r='1.4'/%3E%3Ccircle cx='56' cy='56' r='1.4'/%3E%3C/g%3E%3C/svg%3E");
}

/* Lime-wash: the page sits on ivory; cards and panels stay white. */
body { background: var(--bm-ivory); }

/* ---------------------------------------------------------------
   Dome drum: a scalloped fringe under the menu band
   --------------------------------------------------------------- */
.bismika-site-header::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -7px;
	height: 7px;
	background: var(--bm-navy);
	-webkit-mask: var(--bm-motif-scallop) repeat-x 0 0 / 18px 7px;
	mask: var(--bm-motif-scallop) repeat-x 0 0 / 18px 7px;
	pointer-events: none;
}

/* ---------------------------------------------------------------
   Section rules: a gold star set on the navy line, like the stars
   on the minaret base
   --------------------------------------------------------------- */
.bismika-section { position: relative; }
.bismika-section::before,
.bismika-section::after {
	content: "";
	position: absolute;
	top: -1px;
	left: 50%;
	transform: translate(-50%, -50%);
	pointer-events: none;
}
.bismika-section::after { width: 44px; height: 6px; background: var(--bm-ivory); }
.bismika-section::before {
	z-index: 1;
	width: 18px;
	height: 18px;
	background: var(--bm-gold);
	-webkit-mask: var(--bm-motif-star) center / contain no-repeat;
	mask: var(--bm-motif-star) center / contain no-repeat;
}

/* Sections that open without a rule carry no star. */
.bismika-trending + .bismika-section::before,
.bismika-trending + .bismika-section::after,
.bismika-picks::before,
.bismika-picks::after,
.bismika-follow::before,
.bismika-follow::after { display: none; }


/* ---------------------------------------------------------------
   Navy bands carry the star lattice of the minaret base
   --------------------------------------------------------------- */
.bismika-picks__band,
.bismika-closing,
.bismika-editor,
.bismika-footer__legal {
	background-image: var(--bm-motif-lattice);
	background-size: 56px 56px;
	background-position: center top;
}

/* Gold inner frame, after the gilded border of the portal */
.bismika-editor,
.bismika-picks__band {
	box-shadow: inset 0 0 0 1px rgba(201, 162, 74, .45), inset 0 0 0 7px rgba(255, 255, 255, 0), var(--bm-shadow);
}
.bismika-featured-large { position: relative; }
.bismika-featured-large::after {
	content: "";
	position: absolute;
	inset: 12px;
	border: 1px solid rgba(201, 162, 74, .55);
	border-radius: calc(var(--bm-r-panel) - 6px);
	pointer-events: none;
}

/* The editor's portrait in a pointed arch, after the mosque's portal */
.bismika-editor__photo img {
	border: 0 !important;
	border-radius: 0 !important;
	height: 74px !important;
	-webkit-mask: var(--bm-motif-arch) center / 100% 100% no-repeat;
	mask: var(--bm-motif-arch) center / 100% 100% no-repeat;
}

/* ---------------------------------------------------------------
   Terracotta, after the roof tiles: subject pills and the live dot
   --------------------------------------------------------------- */
.wp-block-post-terms.is-style-primary a { background: var(--bm-terracotta-tint); color: var(--bm-terracotta); }
.wp-block-post-terms.is-style-primary a:hover { background: var(--bm-terracotta); color: #fff; }
.bismika-trending__label::before { background: var(--bm-terracotta); }

/* ---------------------------------------------------------------
   Footer: the pointed crown of the parapet, and an onion dome to
   climb back up
   --------------------------------------------------------------- */
.bismika-footer { position: relative; }
.bismika-footer::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -17px;
	height: 18px;
	background: var(--bm-accent);
	-webkit-mask: var(--bm-motif-crown) repeat-x center bottom / 30px 18px;
	mask: var(--bm-motif-crown) repeat-x center bottom / 30px 18px;
	pointer-events: none;
}
.bismika-totop {
	width: 40px;
	height: 44px;
	padding-top: 12px;
	border: 0;
	border-radius: 0;
	background: #fff;
	color: var(--bm-navy);
	box-sizing: border-box;
	-webkit-mask: var(--bm-motif-dome) center / contain no-repeat;
	mask: var(--bm-motif-dome) center / contain no-repeat;
}
.bismika-totop svg { width: 14px; height: 14px; }
.bismika-totop:hover { background: var(--bm-gold-soft); color: var(--bm-navy); }

/* ---------------------------------------------------------------
   Article text: separators become a single gold star
   --------------------------------------------------------------- */
.bismika-prose hr,
.bismika-prose .wp-block-separator {
	height: 16px;
	margin: 2.2em auto;
	border: 0;
	background:
		var(--bm-motif-star-gold) center / 16px 16px no-repeat,
		linear-gradient(var(--bm-border), var(--bm-border)) center / 38% 1px no-repeat;
	opacity: 1;
}

@media (max-width: 699px) {
	.bismika-section::before { width: 14px; height: 14px; }
	.bismika-featured-large::after { inset: 8px; }
}

@media print {
	body { background: #fff; }
	.bismika-site-header::after,
	.bismika-section::before,
	.bismika-section::after,
	.bismika-footer::before { display: none; }
}
