/* ==========================================================================
   Arabic Lab — design tokens, layer 1 of 3
   The front end's single palette: colour, type family, layout, elevation and
   motion, plus the `.al-*` primitive classes the marketing sheet does not
   define. Every other stylesheet reads these values; none of them writes a
   brand hex of its own.

   Values measured from https://www.arabiclab.io at 1440x900 and cross-checked
   against the live stylesheet /_next/static/css/47a1994c43e779b8.css, which
   the site still serves unchanged.

   Print order, measured on a front-end page (`includes/Assets.php`):
     theme fonts -> theme style.css -> theme Bootstrap -> theme bootstrap-theme.css
     -> arabiclab-fonts -> arabiclab-tokens (this file) -> arabiclab-public.css
     -> vendored bootstrap.min.css (wpappsdev-scms)
     -> arabiclab-bootstrap-bridge.css -> arabiclab-base.css (last)
   The last two are enqueued on `wp_enqueue_scripts` at priority 99, so they
   print after the theme's stylesheets and after every other plugin's.

   Two layers:
     1. RAW TOKENS      — the values the brand ships.
     2. APP EXTENSIONS  — tokens the app added on top of them, plus the alias
													block that keeps the older names in
													arabiclab-public.css resolving without an edit.
   ========================================================================== */

/* ---------- 1. RAW TOKENS ------------------------------------------------ */
:root {
	/* brand core ----------------------------------------------------------- */
	--forest: #15453a;          /* primary ink-green: headings, primary surfaces */
	--forest-deep: #0c2f26;     /* dark bands, footer, header, CTA label colour */
	--forest-mid: #1c5446;      /* app extension: wordmark gradient mid-stop */
	--teal: #2c746e;            /* secondary accent: eyebrows, focus ring */
	--emerald: #17785f;         /* eyebrow on hero, checkmarks, inline links */
	--gold: #c9a24b;            /* the illumination: rules, seals, badges */
	--gold-deep: #b6892f;       /* gold shading, gradient bottom stop */
	--gold-soft: #e8ce86;       /* gold on dark surfaces only */
	--sun: #f2b53a;             /* the CTA light: warm button fill */
	--sun-deep: #e39e1c;        /* warm button gradient bottom */
	--leaf: #a6e3cb;            /* links on forest-deep */

	/* surfaces ------------------------------------------------------------- */
	--paper: #fffdf8;           /* default page ground (never pure white) */
	--ivory: #f7f3ea;           /* recessed ground */
	--ivory-warm: #eee8d8;      /* app extension */
	--mint: #e8f6ef;            /* band 2: calm section ground */
	--honey: #fff4dc;           /* band 3: offer / closing section ground */
	--gold-pale: #f5edd0;       /* app extension */

	/* text ---------------------------------------------------------------- */
	--ink: #1b2a24;             /* body text on paper */
	--muted: #4d5d56;           /* secondary text on paper */
	--on-dark: #fffdf8;         /* text on forest / forest-deep */
	--on-dark-muted: rgba(255, 253, 248, 0.88);

	/* lines --------------------------------------------------------------- */
	--line: rgba(21, 69, 58, 0.16);        /* hairline on paper */
	--line-strong: rgba(27, 42, 36, 0.22); /* app extension: input borders */
	--line-dark: rgba(232, 206, 134, 0.22);/* hairline on forest */

	/* state --------------------------------------------------------------- */
	--danger: #9b2c1f;
	--ok: #1f6b4f;

	/* type ---------------------------------------------------------------- */
	--f-display: "Fraunces", Georgia, "Times New Roman", serif;
	--f-body: "Commissioner", "Segoe UI", Tahoma, sans-serif;
	--f-ar: "Amiri", "Noto Naskh Arabic", "Times New Roman", serif;
	--f-ar-body: "Noto Naskh Arabic", "Amiri", Tahoma, serif;
	--f-bn-d: "Noto Serif Bengali", "Hind Siliguri", serif;
	--f-bn: "Hind Siliguri", "Noto Sans Bengali", sans-serif;

	/* layout -------------------------------------------------------------- */
	--maxw: 1180px;
	--r: 14px;
	--r-lg: 24px;               /* app extension: large card radius */
	--hdr: 64px;

	/* elevation — forest-tinted, never neutral grey ----------------------- */
	--shadow: 0 1px 2px rgba(12, 47, 38, 0.04), 0 8px 28px rgba(12, 47, 38, 0.07);
	--shadow-lg: 0 2px 6px rgba(12, 47, 38, 0.06), 0 24px 60px rgba(12, 47, 38, 0.14);
	--shadow-gold: inset 0 1px 0 rgba(255, 255, 255, 0.65),
                 0 14px 30px -12px rgba(238, 157, 25, 0.85);
	--shadow-launcher: 0 12px 30px -8px rgba(12, 47, 38, 0.5);

	/* motion -------------------------------------------------------------- */
	--ease-brand: cubic-bezier(0.2, 0.7, 0.2, 1);
	--dur-tap: 180ms;   /* hover / press on every interactive element */
	--dur-ui: 200ms;    /* background, border, colour swaps */
	--dur-enter: 700ms; /* reveal, seal, drawn headings */
	--rise: 14px;       /* the reveal distance; nothing travels further */

	color-scheme: light;
}

/* app aliases kept so existing rules in arabiclab-public.css keep resolving */
:root {
	--green: var(--forest);
	--green-deep: var(--forest-deep);
	--green-mid: var(--forest-mid);
	--green-light: #1e5c4e;
	--teal-deep: #235e59;
	--fr: var(--f-display);
	--body: var(--f-body);
	--amiri: var(--f-ar);
	--naskh: var(--f-ar-body);
	--ben-d: var(--f-bn-d);
	--ben-b: var(--f-bn);
}

/* ---------- 2. PRIMITIVES ------------------------------------------------ */
/* The `al-` building blocks the marketing sheet does not define: band, wrap,
   eyebrow, display headings, lede, gloss, close-line, button with its arrow
   chip, field, chip and its four variants, card, grid, callout, stat, price
   and FAQ row. Each matches a row of docs/design-system/README.md section 5,
   and none of them is a component of a specific page. */

.al-wrap { max-width: var(--maxw); margin-inline: auto; }

.al-band {
	padding-inline: max(16px, env(safe-area-inset-left, 0px));
	padding-block: 64px;
}
.al-band--tight { padding-block: 40px; }
.al-band--paper { background: var(--paper); color: var(--ink); }
.al-band--mint { background: var(--mint); color: var(--ink); }
.al-band--honey { background: var(--honey); color: var(--ink); }
.al-band--forest { background: var(--forest); color: var(--on-dark); }
.al-band--night { background: var(--forest-deep); color: var(--on-dark); }
.al-band--radial {
	background: radial-gradient(80% 120% at 50% 0, #1e7a66, var(--forest-deep) 75%);
	color: #fff;
	text-align: center;
}

.al-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--teal);
}
.al-eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; }
.al-band--forest .al-eyebrow,
.al-band--night .al-eyebrow { color: var(--gold-soft); }

.al-h1 {
	font-family: var(--f-display);
	font-weight: 500;
	font-size: clamp(2.2rem, 7vw, 4.1rem);
	line-height: 1.12;
	letter-spacing: -0.01em;
	text-wrap: balance;
	color: var(--forest);
	max-width: 17ch;
	margin: 0;
}
.al-h2 {
	font-family: var(--f-display);
	font-weight: 500;
	font-size: clamp(1.75rem, 4.6vw, 2.7rem);
	line-height: 1.12;
	letter-spacing: -0.01em;
	text-wrap: balance;
	margin: 0;
}
.al-lede {
	margin-top: 14px;
	max-width: 62ch;
	font-size: 1.08rem;
	line-height: 1.6;
	color: var(--muted);
}
.al-band--forest .al-lede,
.al-band--night .al-lede { color: var(--on-dark-muted); }

.al-gloss {
	font-family: var(--f-ar);
	direction: rtl;
	font-size: clamp(2.6rem, 9vw, 4.6rem);
	line-height: 1;
	color: var(--gold);
	opacity: 0.9;
	margin-bottom: 8px;
}
.al-band--forest .al-gloss,
.al-band--night .al-gloss { color: var(--gold-soft); opacity: 0.85; }

.al-close-line {
	margin-top: 30px;
	text-align: center;
	font-family: var(--f-display);
	font-style: italic;
	font-size: clamp(1.3rem, 3.4vw, 1.7rem);
	color: var(--forest);
}
/* Gold text only exists on forest (2.3). On the night grounds the close-line
   takes gold-soft; on paper and mint it stays forest. */
.al-band--forest .al-close-line,
.al-band--night .al-close-line,
.al-card--featured .al-close-line,
.al-callout--dark .al-close-line {
	color: var(--gold-soft);
}

/* buttons: pill, 48px min, one arrow chip --------------------------------- */
.al-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 48px;
	padding: 12px 22px;
	border: 1.5px solid transparent;
	border-radius: 999px;
	font: inherit;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: transform var(--dur-tap) ease, box-shadow var(--dur-tap) ease,
							background var(--dur-tap) ease, border-color var(--dur-tap) ease;
}
.al-btn--gold {
	background: linear-gradient(135deg, #ffd873, #f7b93e 45%, #ee9d19);
	color: var(--forest-deep);
	box-shadow: var(--shadow-gold);
	font-weight: 700;
}
.al-btn--gold:hover { transform: translateY(-2px); }
.al-btn--forest { background: var(--forest); color: var(--on-dark); }
.al-btn--forest:hover { transform: translateY(-2px); }
.al-btn--line { border-color: currentColor; border-width: 2px; background: transparent; color: inherit; }
.al-btn--line:hover { background: var(--forest); color: #fff; border-color: var(--forest); }
.al-band--forest .al-btn--line,
.al-band--night .al-btn--line {
	border-color: rgba(255, 255, 255, 0.8);
	color: #fff;
}
.al-btn:active { transform: translateY(1px); }
.al-btn[disabled] { opacity: 0.55; pointer-events: none; }

/* The arrow chip the design system puts on every button: a 16px arrow in a
   36px circular well. The arrow itself is markup (`<span class="al-btn__arrow"
   aria-hidden="true">…</span>`), so the label stays a single text node and the
   language switcher can swap it without wiping an svg child. */
.al-btn__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 36px;
	height: 36px;
	margin-inline-start: 2px;
	border-radius: 50%;
	background: var(--forest-deep);
	color: #ffd873;
	font-size: 16px;
	line-height: 1;
	transition: transform var(--dur-tap) var(--ease-brand);
}
.al-btn:hover .al-btn__arrow { transform: translateX(4px); }
[dir="rtl"] .al-btn:hover .al-btn__arrow { transform: translateX(-4px); }
.al-btn--forest .al-btn__arrow { background: var(--sun); color: var(--forest-deep); }
.al-btn--line .al-btn__arrow { background: var(--forest); color: var(--sun); }
.al-btn--line:hover .al-btn__arrow { background: var(--sun); color: var(--forest-deep); }
.al-band--forest .al-btn--line .al-btn__arrow,
.al-band--night .al-btn--line .al-btn__arrow { background: var(--gold-soft); color: var(--forest-deep); }

.al-field { display: grid; gap: 6px; }
.al-field > label { font-size: 0.94rem; font-weight: 600; color: var(--ink); }
.al-field input,
.al-field select,
.al-field textarea {
	width: 100%;
	min-height: 48px;
	padding: 10px 14px;
	border: 1.5px solid rgba(21, 69, 58, 0.3);
	border-radius: 10px;
	background: #fff;
	color: var(--ink);
	font: inherit;
	font-size: 1rem;
}
.al-field textarea { min-height: 130px; resize: vertical; }
.al-field input:focus,
.al-field select:focus,
.al-field textarea:focus {
	border-color: var(--teal);
	outline: 3px solid rgba(44, 116, 110, 0.25);
	outline-offset: 0;
}
.al-field .al-hint { font-size: 0.82rem; color: var(--muted); }

.al-chip {
	display: inline-flex;
	align-items: center;
	min-height: 30px;
	padding: 2px 12px;
	border-radius: 999px;
	background: rgba(44, 116, 110, 0.1);
	color: var(--teal);
	font-size: 0.84rem;
	font-weight: 600;
}
/* The four other chips the design system allows, each with the job it does. */
.al-chip--free {
	min-height: 0;
	padding: 2px 8px;
	background: var(--mint);
	color: var(--emerald);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.04em;
}
.al-chip--offer {
	min-height: 0;
	padding: 4px 12px;
	background: var(--sun);
	color: var(--forest-deep);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.02em;
}
.al-chip--plan {
	min-height: 0;
	padding: 4px 12px;
	background: var(--gold);
	color: var(--forest-deep);
	font-size: 0.78rem;
	font-weight: 700;
}
.al-chip--dark {
	min-height: 0;
	padding: 4px 12px;
	background: rgba(255, 255, 255, 0.15);
	color: #ffe2a0;
	font-size: 0.78rem;
	font-weight: 700;
}
/* A chip is a label, not a target, so it stays compact. The moment a chip is
   itself clickable the 44px target size from 10 applies, so the interactive
   forms are the ones that grow. */
a.al-chip,
button.al-chip {
	min-height: 44px;
}

.al-card {
	border: 1px solid var(--line);
	border-radius: 18px;
	padding: 26px;
	background: var(--paper);
	box-shadow: var(--shadow);
}
/* The featured plan card: the one dark card on a light band, lifted at 900px. */
.al-card--featured {
	border-color: transparent;
	background: var(--forest-deep);
	color: var(--on-dark);
}
/* A light band can hold the night card, so the dark-surface text colours have
   to come from the card, not only from the band. */
.al-card--featured .al-lede,
.al-callout--dark .al-lede { color: var(--on-dark-muted); }
.al-card--featured h1,
.al-card--featured h2,
.al-card--featured h3,
.al-card--featured h4 { color: var(--on-dark); }
@media (min-width: 900px) {
	.al-card--featured { transform: translateY(-10px); }
}
/* Card grids: 3-up at 900px, 4-up at 760px, with the design system's gaps.
   The 4-up rule comes last on purpose: it shares specificity with the 3-up
   rule, so at 900px and wider the later declaration is the one that applies. */
.al-grid {
	display: grid;
	gap: 18px;
}
@media (min-width: 900px) {
	.al-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 760px) {
	.al-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px; }
}

.al-callout {
	padding: 22px 26px;
	border-radius: 12px;
	background: var(--mint);
	color: var(--ink);
}
.al-callout--honey { background: var(--honey); }
.al-callout--dark {
	background: var(--forest);
	color: var(--on-dark);
	border: 1px solid var(--line-dark);
}
.al-callout > :last-child { margin-bottom: 0; }

/* Tile / stat: the small bordered box with a tabular figure. */
.al-stat {
	padding: 10px 12px;
	border: 1px solid var(--line);
	border-radius: 10px;
}
.al-stat__value {
	display: block;
	font-family: var(--f-display);
	font-size: 1.5rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	line-height: 1.1;
	color: var(--forest);
}
.al-stat__label {
	display: block;
	margin-top: 4px;
	font-size: 0.78rem;
	color: var(--muted);
}

/* Price: Fraunces 3rem, tabular, with a quiet unit. */
.al-price {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	font-family: var(--f-display);
	font-size: 3rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	line-height: 1;
	color: var(--forest);
}
.al-price__unit {
	font-family: var(--f-body);
	font-size: 0.92rem;
	font-weight: 400;
	opacity: 0.85;
}

/* FAQ row: native `details`, a gold chevron drawn with two borders. */
.al-faq {
	border: 1px solid var(--line);
	border-radius: 12px;
	background: var(--paper);
}
.al-faq + .al-faq { margin-top: 10px; }
.al-faq > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 44px;
	padding: 22px 26px;
	font-weight: 600;
	cursor: pointer;
	list-style: none;
}
.al-faq > summary::-webkit-details-marker { display: none; }
.al-faq > summary::after {
	content: "";
	flex: 0 0 auto;
	width: 9px;
	height: 9px;
	margin-top: -5px;
	border-right: 1.5px solid var(--gold);
	border-bottom: 1.5px solid var(--gold);
	transform: rotate(45deg);
	transition: transform var(--dur-tap) var(--ease-brand);
}
.al-faq[open] > summary::after {
	margin-top: 4px;
	transform: rotate(-135deg);
}
.al-faq__body {
	padding: 0 26px 24px;
	color: var(--muted);
}

/* The ring follows the control's own radius. A `border-radius` here would
   change the element, not the ring: a focused 999px pill snapped to 6px, which
   rule 4 forbids ("No 6px-radius buttons anywhere in the product"). */
:focus-visible {
	outline: 3px solid var(--teal);
	outline-offset: 3px;
}
.al-band--forest :focus-visible,
.al-band--night :focus-visible,
footer :focus-visible { outline-color: var(--gold-soft); }

@media (prefers-reduced-motion: reduce) {
	.al-btn, .al-btn:hover, .al-btn:active { transition: none; transform: none; }
}
