/*
 * css/components.css — Norml Studio design system (Layer 2)
 *
 * Site-wide reusable components. Enqueued globally on every page.
 * Every new block on this site styles its inner pieces via these classes.
 * Per-block CSS files are LAYOUT ONLY (grid/flex/positioning).
 *
 * Convention:
 *   .norml-*          → reusable site-wide visual primitives (this file)
 *   .{block-slug}__*  → block-specific layout (per-block files)
 *
 * Token source of truth:
 *   --header-color-dark | --header-color-accent | --header-color-white
 *   are defined in css/header.css :root and inherited globally.
 *
 * Extended tokens below are scoped to :root here so the visual system stays
 * coherent across blocks. Do NOT add per-page palettes ever.
 *
 * Audit / promotion policy:
 *   - Before adding a new --norml-* token: confirm no existing token covers it.
 *   - Before adding a new .norml-{component}: confirm no existing component matches.
 *   - If you find yourself writing color/font/spacing inside a block layout file,
 *     stop — promote it to this file or use existing tokens.
 */

/* ===========================================================================
 * Tokens — extensions to the base site palette
 * ========================================================================= */

:root {
	/* Neutrals (extensions to dark/white) */
	--norml-light:     #f7f8f9;   /* alt section background */
	--norml-border:    #e2e2e2;   /* card borders, separators */
	--norml-muted:     #4e4e4e;   /* secondary text */
	--norml-gray:      #868686;   /* tertiary text, eyebrows over light */

	/* Accent shades */
	--norml-accent-dark: #b89f1f; /* darker gold for type contrast on light bg */

	/* Status */
	--norml-danger:    #a32d2d;
	--norml-danger-bg: #fbe5e5;

	/* Type families */
	--norml-font-display: 'DIN Condensed', Helvetica, Arial, sans-serif;
	--norml-font-body:    'Inter', Helvetica, Arial, sans-serif;
}

/* ===========================================================================
 * Body-level scoping utilities
 *
 * Any block that prints its own H1 / hero should add a body class via
 * its bootstrap PHP (see inc/blocks/_bootstrap.php). The `has-custom-hero`
 * class then suppresses Divi's auto-printed page title across the whole
 * site, with no hardcoded page IDs.
 * ========================================================================= */

body.has-custom-hero .entry-title.main_title,
body.has-custom-hero h1.entry-title {
	display: none !important;
}
body.has-custom-hero #main-content > .container {
	padding: 0;
	max-width: none;
}
body.has-custom-hero #main-content .post,
body.has-custom-hero #main-content .page,
body.has-custom-hero #main-content article {
	padding: 0;
}

/* ===========================================================================
 * Utilities
 * ========================================================================= */

/* Container — site standard width wrapper. Use inside full-bleed sections. */
.norml-container {
	max-width: 1240px;
	margin: 0 auto;
	padding: 0;
	position: relative;
}
.norml-container--narrow { max-width: 1080px; }

/* Display font utility — apply DIN Condensed without uppercasing. */
.norml-display {
	font-family: var(--norml-font-display);
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: normal;
	text-transform: none;
}

/* Eyebrow — small gold uppercase tag text used above section H2s. */
.norml-eyebrow {
	display: inline-block;
	color: var(--norml-accent-dark);
	font-family: var(--norml-font-body);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	margin-bottom: 12px;
}

/* Alignfull bleed — for any Gutenberg block that wants edge-to-edge inside
 * Divi's wrapper. Apply to the wrapping .wp-block-* element. */
.alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

/* ===========================================================================
 * .norml-section — the standard content section
 *
 * Variants: --white | --alt | --dark
 * Sub-elements: __tag (use .norml-eyebrow), __h2, __h3, __body
 * ========================================================================= */

.norml-section {
	padding: 70px 24px;
	font-family: var(--norml-font-body);
	box-sizing: border-box;
}
.norml-section--white { background: var(--header-color-white); color: var(--header-color-dark); }
.norml-section--alt   { background: var(--norml-light);         color: var(--header-color-dark); }
.norml-section--dark  { background: var(--header-color-dark);   color: var(--header-color-white); }

.norml-section__h2 {
	font-family: var(--norml-font-display);
	font-size: clamp(28px, 4vw, 56px);
	font-weight: 700;
	margin: 0 0 18px;
	color: inherit;
	max-width: 920px;
	letter-spacing: -1px;
	line-height: 1.05;
}
.norml-section__h3 {
	font-family: var(--norml-font-display);
	font-size: clamp(22px, 2.4vw, 32px);
	font-weight: 700;
	color: inherit;
	margin: 32px 0 12px;
	line-height: 1.1;
}
.norml-section__body p {
	font-size: 16px;
	max-width: 880px;
	margin: 0 0 14px;
	line-height: 1.7;
}
.norml-section__body ul,
.norml-section__body ol {
	max-width: 880px;
	margin: 0 0 20px 22px;
	padding: 0;
}
.norml-section__body li {
	font-size: 15px;
	line-height: 1.7;
	margin-bottom: 8px;
	padding-left: 4px;
}
.norml-section__body li::marker { color: var(--norml-accent-dark); }
.norml-section__body a {
	color: var(--header-color-dark);
	text-decoration: underline;
}
.norml-section__body a:hover { color: var(--norml-accent-dark); }

/* ===========================================================================
 * .norml-card-grid — auto-fit card layout
 * ========================================================================= */

.norml-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 16px;
	margin-top: 24px;
}
.norml-card-grid--tight { gap: 14px; }

/* ===========================================================================
 * .norml-card — generic card primitive
 *
 * Variants:
 *   --accent-left   left gold bar
 *   --on-dark       inverts colors for use inside dark sections
 * Sub-elements: __title, __amount (DIN, gold-dark), __desc
 * ========================================================================= */

.norml-card {
	background: var(--header-color-white);
	border: 1px solid var(--norml-border);
	border-radius: 10px;
	padding: 22px;
	box-sizing: border-box;
}
.norml-card--accent-left {
	border-left: 4px solid var(--header-color-accent);
	padding: 20px 22px;
}

.norml-card__title {
	font-family: var(--norml-font-display);
	font-size: 22px;
	font-weight: 700;
	color: var(--header-color-dark);
	margin: 0 0 8px;
	line-height: 1.15;
}
.norml-card__title--sm { font-size: 18px; margin-bottom: 6px; }

.norml-card__amount {
	font-family: var(--norml-font-display);
	font-size: 28px;
	font-weight: 700;
	color: var(--norml-accent-dark);
	margin-bottom: 8px;
	line-height: 1;
}
.norml-card__amount--sm { font-size: 22px; }

.norml-card__desc {
	font-size: 14px;
	color: var(--norml-muted);
	line-height: 1.6;
	margin: 0;
	max-width: none;
}
.norml-card__desc--sm { font-size: 13px; line-height: 1.5; }

/* ===========================================================================
 * .norml-stats-bar — full-width row of big-number stats
 * Sub-elements: __grid, .norml-stat (__num + __lbl)
 * ========================================================================= */

.norml-stats-bar {
	background: var(--header-color-white);
	padding: 80px 24px;
	border-top: 1px solid var(--norml-border);
	border-bottom: 1px solid var(--norml-border);
	font-family: var(--norml-font-body);
	box-sizing: border-box;
}
.norml-stats-bar__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 32px;
	max-width: 1240px;
	margin: 0 auto;
	align-items: end;
}
.norml-stat {
	display: flex;
	align-items: flex-end;
	gap: 14px;
}
.norml-stat__num {
	font-family: var(--norml-font-display);
	font-size: 130px;
	font-weight: 800;
	color: var(--header-color-dark);
	line-height: 0.85;
	letter-spacing: -2px;
}
.norml-stat__lbl {
	font-size: 14px;
	font-weight: 700;
	color: var(--header-color-dark);
	line-height: 1.3;
	padding-bottom: 14px;
	max-width: 110px;
}

/* ===========================================================================
 * .norml-banner — full-width banner with icon + body + CTA
 * Used for urgency strips, announcement bars, deadlines.
 * Sub-elements: __content, __icon, __body, __cta
 * ========================================================================= */

.norml-banner {
	background: var(--header-color-accent);
	padding: 36px 24px;
	font-family: var(--norml-font-body);
	box-sizing: border-box;
}
.norml-banner__content {
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 24px;
	align-items: center;
	max-width: 1180px;
	margin: 0 auto;
}
.norml-banner__icon {
	font-size: 44px;
	line-height: 1;
}
.norml-banner__body h3 {
	font-family: var(--norml-font-display);
	font-size: 28px;
	font-weight: 700;
	color: var(--header-color-dark);
	margin: 0 0 6px;
	line-height: 1.1;
}
.norml-banner__body p {
	font-size: 14px;
	color: rgba(13, 19, 23, 0.85);
	margin: 0;
	max-width: 640px;
	line-height: 1.5;
}
.norml-banner__cta {
	background: var(--header-color-dark);
	color: var(--header-color-accent);
	padding: 14px 24px;
	border-radius: 6px;
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.15s, color 0.15s;
}
.norml-banner__cta:hover {
	background: var(--header-color-white);
	color: var(--header-color-dark);
}

/* ===========================================================================
 * .norml-accordion — Q/A unit
 * Variants: --open (toggled by JS)
 * Sub-elements: __q (question / trigger), __a (answer)
 * ========================================================================= */

.norml-accordion {
	background: var(--header-color-white);
	border: 1px solid var(--norml-border);
	border-radius: 8px;
	margin-bottom: 10px;
	overflow: hidden;
}
.norml-accordion--open { border-color: var(--header-color-accent); }

.norml-accordion__q {
	padding: 18px 24px;
	font-weight: 600;
	font-size: 16px;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	color: var(--header-color-dark);
	gap: 16px;
	user-select: none;
}
.norml-accordion__q::after {
	content: '+';
	font-size: 26px;
	color: var(--norml-accent-dark);
	font-weight: 400;
	flex-shrink: 0;
	line-height: 1;
}
.norml-accordion--open .norml-accordion__q::after { content: '\2212'; }

.norml-accordion__a {
	padding: 0 24px 20px;
	font-size: 15px;
	color: var(--norml-muted);
	line-height: 1.7;
	display: none;
}
.norml-accordion--open .norml-accordion__a { display: block; }
.norml-accordion__a p {
	margin: 0;
	font-size: 15px;
	color: var(--norml-muted);
	line-height: 1.7;
}
.norml-accordion__a p + p { margin-top: 12px; }

/* ===========================================================================
 * .norml-review-card — testimonial card with stars + quote mark
 * Sub-elements: __stars, __text, __author (+ __author-source span)
 * ========================================================================= */

.norml-review-card {
	background: var(--header-color-white);
	border: 1px solid var(--norml-border);
	border-radius: 10px;
	padding: 24px;
	position: relative;
}
.norml-review-card::before {
	content: '\201C';
	position: absolute;
	top: 16px;
	right: 22px;
	font-family: var(--norml-font-display);
	font-size: 84px;
	font-weight: 700;
	color: var(--header-color-accent);
	line-height: 1;
	opacity: 0.3;
}
.norml-review-card__stars {
	color: var(--header-color-accent);
	font-size: 16px;
	margin-bottom: 12px;
	letter-spacing: 2px;
}
.norml-review-card__text {
	font-size: 14px;
	color: var(--header-color-dark);
	line-height: 1.7;
	margin: 0 0 16px;
	font-style: italic;
	position: relative;
	z-index: 1;
}
.norml-review-card__author {
	font-size: 13px;
	color: var(--norml-muted);
	font-weight: 600;
}
.norml-review-card__author-source {
	color: var(--norml-gray);
	font-weight: 400;
	font-style: italic;
}

/* ===========================================================================
 * Responsive — applies to every Norml component above
 * ========================================================================= */

@media (max-width: 960px) {
	.norml-section      { padding: 50px 20px; }
	.norml-stats-bar    { padding: 50px 20px; }
	.norml-stats-bar__grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 32px 20px;
	}
	.norml-stat__num    { font-size: 80px; }
	.norml-stat__lbl    { font-size: 12px; padding-bottom: 8px; }
}

@media (max-width: 760px) {
	.norml-banner__content { grid-template-columns: 1fr; text-align: center; }
	.norml-banner__icon    { margin: 0 auto; }
}
