/* ==========================================================================
   AHL-E-KALMA — theme design (v2.0, immersive 3D)
   Rang aur font theme.json se aate hain. Yahan sirf woh cheezein hain
   jo block editor khud nahi bana sakta + 3D / motion.
   ========================================================================== */

:root {
	--ak-hairline: rgba(232, 180, 76, 0.32);
	--ak-hairline-soft: rgba(232, 180, 76, 0.16);
	--ak-panel: rgba(11, 59, 47, 0.55);
	--ak-panel-glass: rgba(6, 20, 15, 0.62);
	--ak-radius: 16px;
	--ak-gold: #E8B44C;
	--ak-gold-soft: #F2D488;
}

body {
	-webkit-font-smoothing: antialiased;
	background-color: #04100C;
	background-image:
		radial-gradient(ellipse 80% 55% at 50% 0%, rgba(18, 75, 60, 0.55) 0%, transparent 70%),
		radial-gradient(ellipse 60% 50% at 100% 100%, rgba(232, 180, 76, 0.06) 0%, transparent 60%);
	background-attachment: fixed;
	overflow-x: hidden;
}

/* --- Particle starfield canvas ------------------------------------------- */
.ak-stars {
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	opacity: 0.9;
}

/* content ko canvas ke upar rakho */
.wp-site-blocks {
	position: relative;
	z-index: 1;
}

/* --- Eyebrow: chhota sunehri label section ke upar ------------------------ */
.ak-eyebrow {
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--ak-gold);
	margin-bottom: 0.75rem;
}

/* --- Divider: laqeer ke beech sunehri heera ------------------------------ */
.ak-divider {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.9rem;
	margin: 1.5rem auto 2.5rem;
	max-width: 620px;
}
.ak-divider::before,
.ak-divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--ak-hairline), transparent);
}
.ak-divider__gem {
	width: 9px;
	height: 9px;
	background: var(--ak-gold);
	transform: rotate(45deg);
	flex: none;
	box-shadow: 0 0 12px rgba(232, 180, 76, 0.7);
	animation: ak-gem 3.5s ease-in-out infinite;
}
@keyframes ak-gem {
	0%, 100% { box-shadow: 0 0 10px rgba(232,180,76,0.5); }
	50%      { box-shadow: 0 0 20px rgba(232,180,76,0.95); }
}

/* --- Verified pill -------------------------------------------------------- */
.ak-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	background: linear-gradient(135deg, var(--ak-gold-soft), var(--ak-gold));
	color: var(--wp--preset--color--ink);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	padding: 0.7rem 1.6rem;
	border-radius: 999px;
	box-shadow: 0 8px 24px rgba(232, 180, 76, 0.22);
}

/* --- Date bar (shortcode [ak_date]) -------------------------------------- */
.ak-datebar {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	border: 1px solid var(--ak-hairline);
	border-radius: var(--ak-radius);
	overflow: hidden;
	max-width: 620px;
	margin-inline: auto;
	background: rgba(6, 18, 14, 0.55);
	backdrop-filter: blur(6px);
}
.ak-datebar__col {
	flex: 1 1 220px;
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	padding: 0.95rem 1.4rem;
}
.ak-datebar__col + .ak-datebar__col {
	border-inline-start: 1px solid var(--ak-hairline-soft);
}
.ak-datebar__label {
	font-size: 0.65rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--ak-gold);
}
.ak-datebar__value {
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--wp--preset--color--cream);
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.15rem 0.6rem;
}
.ak-datebar__time {
	color: var(--ak-gold);
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	letter-spacing: 0.02em;
}

/* --- Card: sunehri hairline wala 3D box ---------------------------------- */
.ak-card {
	position: relative;
	border: 1px solid var(--ak-hairline);
	border-radius: var(--ak-radius);
	background: var(--ak-panel);
	padding: 2rem 1.75rem;
	height: 100%;
	transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
	transform-style: preserve-3d;
	will-change: transform;
	overflow: hidden;
}
/* pointer ke peeche chalta hua halka noor */
.ak-card.ak-tilt::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(220px circle at var(--ak-mx, 50%) var(--ak-my, 50%),
		rgba(232, 180, 76, 0.14), transparent 60%);
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}
.ak-card.ak-tilt:hover::before { opacity: 1; }
.ak-card:hover {
	border-color: var(--ak-gold);
	box-shadow: 0 18px 42px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(232, 180, 76, 0.25);
}
.ak-card h3,
.ak-card h4 { margin-top: 0; }

/* Icon ka gol daira */
.ak-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 54px;
	border: 1px solid var(--ak-gold);
	border-radius: 50%;
	color: var(--ak-gold);
	font-size: 1.35rem;
	margin-bottom: 1.1rem;
	box-shadow: inset 0 0 14px rgba(232, 180, 76, 0.18);
}
.ak-icon--square {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	font-size: 1.15rem;
}

/* --- Shajrah chain — is site ka signature (3D animated) ------------------ */
.ak-chain {
	position: relative;
	max-width: 540px;
	margin-inline: auto;
	padding: 0.5rem 0;
	list-style: none;
	perspective: 1200px;
}
/* Beech mein guzarti sunehri laqeer — scroll par "ban" ti hui */
.ak-chain::before {
	content: "";
	position: absolute;
	inset-block: 0;
	inset-inline-start: 50%;
	width: 2px;
	transform: translateX(-50%);
	background: linear-gradient(180deg, transparent, var(--ak-gold) 8%, var(--ak-gold) 92%, transparent);
	box-shadow: 0 0 14px rgba(232, 180, 76, 0.5);
	opacity: 0.75;
}
.ak-chain__link {
	position: relative;
	border: 1px solid var(--ak-gold);
	border-radius: 14px;
	background: linear-gradient(180deg, #124B3C 0%, #0B3B2F 100%);
	padding: 1.1rem 1.5rem;
	margin-block: 1.5rem;
	text-align: center;
	box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
	transform-style: preserve-3d;
	transition: box-shadow 0.3s ease, transform 0.2s ease, border-color 0.3s ease;
}
.ak-chain__link:hover {
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 26px rgba(232, 180, 76, 0.4);
}
/* Har kari ke beech ka heera */
.ak-chain__link::after {
	content: "";
	position: absolute;
	bottom: -1.1rem;
	inset-inline-start: 50%;
	width: 12px;
	height: 12px;
	background: var(--ak-gold);
	transform: translateX(-50%) rotate(45deg);
	z-index: 1;
	box-shadow: 0 0 12px rgba(232, 180, 76, 0.8);
}
.ak-chain__link:last-child::after { display: none; }
.ak-chain__name {
	display: block;
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.2rem;
	font-weight: 600;
	color: var(--ak-gold-soft);
}
.ak-chain__meta {
	display: block;
	font-size: 0.85rem;
	color: var(--wp--preset--color--muted);
	margin-top: 0.2rem;
}
/* Pehli kari — Sayyiduna Muhammad ﷺ */
.ak-chain__link--first {
	background: linear-gradient(180deg, #0B3B2F 0%, #04100C 100%);
	border-width: 1.5px;
	box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45), 0 0 30px rgba(232, 180, 76, 0.25);
}
.ak-chain__link--first .ak-chain__name { font-size: 1.4rem; }

/* --- Mission / quote block ----------------------------------------------- */
.ak-quote {
	max-width: 760px;
	margin-inline: auto;
	text-align: center;
	position: relative;
	padding: 2.5rem 1.5rem;
}
.ak-quote::before {
	content: "\201C";
	font-family: var(--wp--preset--font-family--display);
	font-size: 6rem;
	line-height: 0.6;
	color: var(--ak-gold);
	opacity: 0.35;
	display: block;
	margin-bottom: 0.5rem;
}
.ak-quote__text {
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(1.35rem, 3.4vw, 2rem);
	font-style: italic;
	line-height: 1.5;
	color: var(--wp--preset--color--cream);
}
.ak-quote__cite {
	display: block;
	margin-top: 1.2rem;
	font-size: 0.85rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ak-gold);
}

/* --- Bay'at form --------------------------------------------------------- */
.ak-form-wrap { max-width: 680px; margin-inline: auto; }
.ak-form__title { margin: 0 0 0.4rem; }
.ak-form__intro { color: var(--wp--preset--color--muted); margin: 0 0 1.5rem; font-size: 0.95rem; }
.ak-form__row { display: flex; gap: 1rem; flex-wrap: wrap; }
.ak-form__row .ak-form__field { flex: 1 1 220px; }
.ak-form__field { display: block; margin-bottom: 1rem; }
.ak-form__field > span {
	display: block;
	font-size: 0.78rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ak-gold);
	margin-bottom: 0.4rem;
}
.ak-form__field em { color: var(--ak-gold); font-style: normal; }
.ak-form input,
.ak-form textarea {
	width: 100%;
	background: rgba(4, 16, 12, 0.7);
	border: 1px solid var(--ak-hairline-soft);
	border-radius: 10px;
	color: var(--wp--preset--color--cream);
	padding: 0.8rem 1rem;
	font-family: inherit;
	font-size: 1rem;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.ak-form input:focus,
.ak-form textarea:focus {
	outline: none;
	border-color: var(--ak-gold);
	box-shadow: 0 0 0 3px rgba(232, 180, 76, 0.18);
}
.ak-form__actions {
	display: flex;
	gap: 0.8rem;
	flex-wrap: wrap;
	align-items: center;
	margin-top: 0.5rem;
}
.ak-form__submit {
	appearance: none;
	border: 0;
	cursor: pointer;
	background: linear-gradient(135deg, var(--ak-gold-soft), var(--ak-gold));
	color: var(--wp--preset--color--ink);
	font-weight: 600;
	font-family: inherit;
	padding: 0.85rem 1.9rem;
	border-radius: 999px;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ak-form__submit:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 26px rgba(232, 180, 76, 0.3);
}
.ak-form__notice {
	border-radius: 10px;
	padding: 0.9rem 1.1rem;
	margin-bottom: 1.2rem;
	font-size: 0.95rem;
}
.ak-form__notice--ok  { background: rgba(18, 75, 60, 0.6); border: 1px solid var(--ak-gold); color: var(--ak-gold-soft); }
.ak-form__notice--err { background: rgba(80, 20, 20, 0.5); border: 1px solid #d98a8a; color: #ffd7d7; }

/* --- WhatsApp button ----------------------------------------------------- */
.ak-wa-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	background: #25D366;
	color: #04100C !important;
	font-weight: 600;
	font-size: 0.9rem;
	padding: 0.8rem 1.5rem;
	border-radius: 999px;
	text-decoration: none !important;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ak-wa-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(37, 211, 102, 0.3); }
.ak-wa-btn--outline {
	background: transparent;
	color: #25D366 !important;
	border: 1px solid #25D366;
}
.ak-wa-btn__icon { font-size: 1.1rem; }

/* --- Section ka faasla --------------------------------------------------- */
.ak-section { padding-block: clamp(3.5rem, 8vw, 6rem); position: relative; }

/* --- Header (glass, sticky, condense) ------------------------------------ */
.ak-header {
	position: sticky;
	top: 0;
	z-index: 50;
	border-bottom: 1px solid var(--ak-hairline-soft);
	background: var(--ak-panel-glass);
	backdrop-filter: blur(12px);
	transition: padding 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.ak-header.is-stuck {
	padding-top: 0.55rem !important;
	padding-bottom: 0.55rem !important;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
	background: rgba(4, 16, 12, 0.85);
}
.ak-header .wp-block-navigation { font-size: 0.95rem; }
.ak-header .wp-block-site-logo img {
	border-radius: 50%;
	border: 1px solid var(--ak-hairline);
	box-shadow: 0 0 16px rgba(232, 180, 76, 0.25);
}

/* --- Footer -------------------------------------------------------------- */
.ak-footer {
	border-top: 1px solid var(--ak-hairline-soft);
	font-size: 0.9rem;
	color: var(--wp--preset--color--muted);
	background:
		radial-gradient(120% 100% at 50% 0%, rgba(18, 75, 60, 0.35), transparent 70%),
		#04100C;
}
.ak-footer .wp-block-navigation { font-size: 0.9rem; }
.ak-footer a { color: var(--wp--preset--color--cream); }
.ak-footer a:hover { color: var(--ak-gold); }
.ak-footer .wp-block-list { list-style: none; padding-inline-start: 0; margin: 0; }
.ak-footer .wp-block-list li { margin-bottom: 0.4rem; }
.ak-footer h4 { margin-bottom: 0.8rem; }

/* --- Reveal animation ---------------------------------------------------- */
.ak-reveal {
	opacity: 0;
	transform: translateY(26px);
	transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
	transition-delay: var(--ak-delay, 0ms);
}
.ak-reveal.is-visible { opacity: 1; transform: none; }

/* --- Urdu / Arabic text -------------------------------------------------- */
.ak-arabic,
[lang="ar"],
[lang="ur"] {
	font-family: var(--wp--preset--font-family--arabic);
	line-height: 2;
}
html[dir="rtl"] body { text-align: right; }

/* --- Editor ke andar canvas na dikhe ------------------------------------- */
.block-editor-page .ak-stars { display: none; }

/* --- Chhoti screen ------------------------------------------------------- */
@media (max-width: 600px) {
	.ak-card { padding: 1.5rem 1.25rem; }
	.ak-datebar__col + .ak-datebar__col {
		border-inline-start: 0;
		border-top: 1px solid var(--ak-hairline-soft);
	}
	.ak-form__row { gap: 0; }
}

/* --- Accessibility ------------------------------------------------------- */
a:focus-visible,
button:focus-visible,
.wp-block-button__link:focus-visible,
.ak-form input:focus-visible,
.ak-form textarea:focus-visible {
	outline: 2px solid var(--ak-gold);
	outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
	.ak-reveal { opacity: 1 !important; transform: none !important; }
	.ak-stars { display: none; }
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}
