/*
Theme Name: EN Member
Description: The Empower Network member blog theme and the base for the restored 2014-2016 design library. Mobile-first, no JavaScript. Structure and palette both come from the selected design.
Author: Empower Network
Version: 2.0.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: en-member
Tags: blog, one-column, two-columns, right-sidebar, custom-menu, featured-images, translation-ready
*/

/* ==========================================================================
   Tokens. Skins override these; every value below is a fallback.
   ========================================================================== */

:root {
	--accent: #1465c0;
	--accent-hover: #0f4f97;
	--on-accent: #ffffff;
	--band: #1c2733;
	--on-band: #ffffff;
	--ink: #1c2733;
	--muted: #5b6b77;
	--rule: #e6ebf0;
	--bg: #ffffff;
	--bg-alt: #f6f7f9;

	--font-head: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	--font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	--head-weight: 700;
	--head-tracking: -0.015em;
	--head-transform: none;
	--scale: 1;

	--container: 68rem;
	--measure: 38rem;
	--gap: clamp(1rem, 3vw, 2rem);
	--radius: 0;
	--block-space: clamp(2rem, 5vw, 3rem);

	/* Legacy names kept so anything still referencing the v1 palette keeps working. */
	--m-bg: var(--bg);
	--m-text: var(--ink);
	--m-muted: var(--muted);
	--m-accent: var(--accent);
	--m-rule: var(--rule);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.65;
	overflow-x: hidden;
}

img, video, iframe, embed, object { max-width: 100%; height: auto; }
img { display: block; }

a { color: var(--accent); text-underline-offset: 2px; }
a:hover, a:focus { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1, h2, h3, h4 {
	font-family: var(--font-head);
	font-weight: var(--head-weight);
	letter-spacing: var(--head-tracking);
	text-transform: var(--head-transform);
	line-height: 1.15;
	margin: 0 0 0.5em;
	overflow-wrap: break-word;
}
h1 { font-size: calc(clamp(1.8rem, 1.2rem + 3vw, 2.1rem) * var(--scale)); }
h2 { font-size: calc(clamp(1.35rem, 1.05rem + 1.6vw, 1.55rem) * var(--scale)); }
h3 { font-size: calc(clamp(1.15rem, 1rem + 0.8vw, 1.25rem) * var(--scale)); }

.screen-reader-text {
	border: 0; clip-path: inset(50%); height: 1px; width: 1px;
	margin: -1px; overflow: hidden; padding: 0; position: absolute; white-space: nowrap;
}

.m-skip { position: absolute; left: -9999px; background: var(--bg); color: var(--ink); padding: 0.7rem 1rem; z-index: 100; }
.m-skip:focus { left: 1rem; top: 1rem; }

/* ==========================================================================
   Shell
   ========================================================================== */

.m-wrap { max-width: var(--container); margin: 0 auto; padding: 0 var(--gap); }

.m-main { display: block; }
.m-primary { min-width: 0; }

/* Sidebar: only when the design asks for it, and only from tablet up. */
body.has-sidebar .m-main {
	display: grid;
	gap: clamp(2rem, 5vw, 3rem);
	grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 60rem) {
	body.has-sidebar .m-main { grid-template-columns: minmax(0, 1fr) 18rem; }
}
.m-sidebar { font-size: 0.94rem; min-width: 0; }
.m-sidebar .widget { margin-bottom: 2rem; }
.m-sidebar .widget-title {
	font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.09em;
	color: var(--muted); margin: 0 0 0.6rem;
}
.m-sidebar ul { list-style: none; margin: 0; padding: 0; }
.m-sidebar li { padding: 0.35rem 0; border-bottom: 1px solid var(--rule); }

/* ==========================================================================
   Navigation bar  (dna-nav-*)
   ========================================================================== */

.m-navbar { border-bottom: 1px solid var(--rule); }
.m-navbar-inner {
	display: flex; flex-wrap: wrap; align-items: center;
	gap: 0.5rem clamp(1rem, 3vw, 2rem);
	min-height: 3.25rem;
}
.m-navbar-brand { font-family: var(--font-head); font-weight: 700; font-size: 1rem; letter-spacing: 0.02em; }
.m-navbar-brand a { color: inherit; text-decoration: none; }
.m-nav { flex: 1 1 auto; }
.m-nav ul {
	list-style: none; margin: 0; padding: 0;
	display: flex; flex-wrap: wrap; gap: 0.3rem clamp(0.85rem, 2vw, 1.4rem);
}
.m-nav a {
	color: inherit; text-decoration: none;
	font-size: 0.85rem; letter-spacing: 0.03em; text-transform: uppercase;
	padding: 0.35rem 0; border-bottom: 2px solid transparent; display: inline-block;
}
.m-nav a:hover, .m-nav .current-menu-item > a { border-bottom-color: currentColor; }

/* Dark bar — the Kalatu house style. */
body.dna-nav-dark .m-navbar { background: #1a1d21; color: #fff; border-bottom-color: transparent; }
body.dna-nav-dark .m-navbar a { color: #fff; }
body.dna-nav-dark .m-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* Accent bar. */
body.dna-nav-accent .m-navbar { background: var(--band); color: var(--on-band); border-bottom-color: transparent; }
body.dna-nav-accent .m-navbar a { color: var(--on-band); }

body.dna-nav-none .m-navbar { display: none; }

/* On a dark or accent bar the brand is the logo, so the masthead below repeats
   it. Suppress the duplicate unless the design is explicitly masthead-led. */
body.dna-nav-dark.dna-masthead-compact .m-head,
body.dna-nav-accent.dna-masthead-compact .m-head { display: none; }

/* ==========================================================================
   Masthead  (dna-masthead-*)
   ========================================================================== */

.m-head { padding: clamp(1.4rem, 4vw, 2.4rem) 0; border-bottom: 1px solid var(--rule); }
.m-head-inner { display: flex; flex-direction: column; gap: 0.25rem; }
.m-site-title { font-family: var(--font-head); font-weight: var(--head-weight); font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2rem); margin: 0; line-height: 1.15; }
.m-site-title a { color: inherit; text-decoration: none; }
.m-tagline { margin: 0; color: var(--muted); font-size: 0.95rem; }

body.dna-masthead-center .m-head-inner { align-items: center; text-align: center; }
body.dna-masthead-compact .m-head { padding: clamp(0.9rem, 2vw, 1.2rem) 0; }
body.dna-masthead-compact .m-site-title { font-size: 1.2rem; }

/* Script masthead — Anna Z, Laura Parrish. */
body.dna-masthead-script .m-head-inner { align-items: center; text-align: center; }
body.dna-masthead-script .m-site-title {
	font-family: var(--font-script, Georgia, "Times New Roman", serif);
	font-weight: 400; font-style: italic;
	font-size: clamp(2rem, 1.4rem + 3vw, 3rem);
	color: var(--accent); letter-spacing: 0;
}

/* ==========================================================================
   Hero  (dna-hero-*)
   ========================================================================== */

.m-hero { display: none; }
.m-hero-inner { padding: clamp(2.5rem, 8vw, 5rem) 0; text-align: center; }
.m-hero-title {
	font-family: var(--font-head); font-weight: var(--head-weight);
	text-transform: var(--head-transform); letter-spacing: var(--head-tracking);
	font-size: clamp(1.8rem, 1.2rem + 4vw, 3rem); margin: 0 0 0.4rem; line-height: 1.1;
}
.m-hero-sub { margin: 0; font-size: clamp(1rem, 0.95rem + 0.4vw, 1.15rem);  }

body.dna-hero-band .m-hero { display: block; background: var(--band); color: var(--on-band); }
body.dna-hero-band .m-hero a { color: var(--on-band); }

body.dna-hero-image .m-hero {
	display: block; background: var(--band) center/cover no-repeat; color: var(--on-band);
	position: relative;
}
body.dna-hero-image .m-hero::before {
	content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.42);
}
body.dna-hero-image .m-hero-inner { position: relative; }

body.dna-hero-cta .m-hero { display: block; background: var(--band); color: var(--on-band); }
body.dna-hero-cta .m-hero .m-optin { max-width: 34rem; margin: 1.6rem auto 0; }

/* ==========================================================================
   Post list  (dna-list-*)
   ========================================================================== */

.m-list { margin: var(--block-space) 0; }
.m-item { margin: 0 0 var(--block-space); min-width: 0; }
.m-item-title { margin: 0 0 0.3rem; }
.m-item-title a { color: inherit; text-decoration: none; }
.m-item-title a:hover, .m-item-title a:focus { color: var(--accent); text-decoration: underline; }
.m-meta { color: var(--muted); font-size: 0.82rem; letter-spacing: 0.02em; margin: 0 0 0.6rem; }
.m-meta-sep { margin: 0 0.35rem; }
.m-excerpt { margin: 0 0 0.6rem; }
.m-more a { font-size: 0.86rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; text-decoration: none; }
.m-more a:hover { text-decoration: underline; }
.m-thumb { display: block; overflow: hidden; border-radius: var(--radius); margin: 0 0 0.9rem; }
.m-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.m-thumb:hover img { transform: scale(1.03); }

/* Thumbnail beside the text, from a comfortable width up. */
@media (min-width: 34rem) {
	body.dna-list-thumb-left .m-item {
		display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1.25rem; align-items: start;
	}
	body.dna-list-thumb-left .m-thumb { margin: 0; }
	body.dna-list-thumb-left .m-thumb img { aspect-ratio: 4 / 3; }
}

/* Card grids. auto-fit keeps them honest at every width. */
body.dna-list-cards-2 .m-list,
body.dna-list-cards-3 .m-list {
	display: grid; gap: clamp(1.25rem, 3vw, 2rem);
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}
body.dna-list-cards-2 .m-item,
body.dna-list-cards-3 .m-item {
	margin: 0; display: flex; flex-direction: column;
	background: var(--bg); border-radius: var(--radius);
}
body.dna-list-cards-2 .m-thumb img,
body.dna-list-cards-3 .m-thumb img { aspect-ratio: 16 / 10; }
@media (min-width: 62rem) {
	body.dna-list-cards-2 .m-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	body.dna-list-cards-3 .m-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* A sidebar plus three columns is one column too many. */
@media (min-width: 62rem) {
	body.has-sidebar.dna-list-cards-3 .m-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

body.dna-list-bare .m-excerpt { max-width: var(--measure); }

/* ==========================================================================
   Ornament  (dna-ornament-*)
   ========================================================================== */

body.dna-ornament-rounded { --radius: 6px; }
body.dna-ornament-bordered .m-item,
body.dna-ornament-shadow .m-item,
body.dna-ornament-rounded .m-item { }

body.dna-ornament-bordered.dna-list-cards-2 .m-item,
body.dna-ornament-bordered.dna-list-cards-3 .m-item {
	border: 1px solid var(--rule); overflow: hidden;
}
body.dna-ornament-bordered.dna-list-cards-2 .m-item-body,
body.dna-ornament-bordered.dna-list-cards-3 .m-item-body { padding: 1rem 1.15rem 1.3rem; }

body.dna-ornament-shadow { --radius: 4px; }
body.dna-ornament-shadow.dna-list-cards-2 .m-item,
body.dna-ornament-shadow.dna-list-cards-3 .m-item {
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 6px 18px rgba(0, 0, 0, 0.06);
	overflow: hidden;
}
body.dna-ornament-shadow.dna-list-cards-2 .m-item-body,
body.dna-ornament-shadow.dna-list-cards-3 .m-item-body { padding: 1rem 1.15rem 1.3rem; }

/* ==========================================================================
   Density  (dna-density-*)
   ========================================================================== */

body.dna-density-tight { --block-space: clamp(1.25rem, 3vw, 1.75rem); line-height: 1.55; }
body.dna-density-airy  { --block-space: clamp(3rem, 7vw, 4.5rem); line-height: 1.75; }

/* ==========================================================================
   Type  (dna-type-*)  — the family itself comes from the skin.
   ========================================================================== */

body.dna-type-serif { --head-tracking: 0; --head-weight: 600; }
body.dna-type-slab  { --head-tracking: -0.01em; }
body.dna-type-condensed { --head-tracking: 0.01em; --head-transform: uppercase; }

/* ==========================================================================
   Single post / pages
   ========================================================================== */

.m-archive-head { padding: var(--block-space) 0 0; }
.m-post { margin: var(--block-space) 0; }
.m-post-title { margin-bottom: 0.35rem; }
.m-featured { margin: 0 0 1.4rem; }
.m-featured img { width: 100%; border-radius: var(--radius); }

/* Full-bleed hero image on designs built around one. */
@media (min-width: 60rem) {
	body.dna-hero-band .m-featured,
	body.dna-hero-image .m-featured {
		width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
	}
	body.dna-hero-band .m-featured img,
	body.dna-hero-image .m-featured img { border-radius: 0; aspect-ratio: 21 / 8; object-fit: cover; }
}

.m-content { max-width: var(--measure); overflow-wrap: break-word; }
body.has-sidebar .m-content { max-width: none; }
.m-content > * { margin-top: 0; margin-bottom: 1.25em; }
.m-content h2, .m-content h3 { margin-top: 1.8em; }
.m-content a { overflow-wrap: anywhere; }
.m-content blockquote {
	margin: 1.6em 0; padding: 0.2em 0 0.2em 1.2em;
	border-left: 3px solid var(--accent); color: var(--muted); font-style: italic;
}
.m-content pre { overflow-x: auto; padding: 1rem; background: var(--bg-alt); border-radius: 4px; font-size: 0.9rem; }
.m-content :is(img, figure) { margin-left: auto; margin-right: auto; }
.m-content figcaption { font-size: 0.85rem; color: var(--muted); text-align: center; margin-top: 0.5rem; }
.m-content :is(table, .wp-block-table) { display: block; overflow-x: auto; max-width: 100%; }

.m-tags { font-size: 0.85rem; color: var(--muted); }
.m-tags a { color: var(--muted); }

.m-pagenav {
	display: flex; justify-content: space-between; gap: 1rem;
	border-top: 1px solid var(--rule); padding-top: 1.2rem; margin: 2.5rem 0; font-size: 0.92rem;
}

.m-foot {
	border-top: 1px solid var(--rule); margin-top: 3rem; padding: 2rem 0 3rem;
	color: var(--muted); font-size: 0.9rem;
}

/* ==========================================================================
   Forms: subscribe + opt-in
   ========================================================================== */

.en-m-subscribe {
	display: flex; flex-wrap: wrap; gap: 0.6rem;
	background: var(--bg-alt); border: 1px solid var(--rule); border-radius: var(--radius);
	padding: clamp(1.1rem, 3vw, 1.6rem); margin: var(--block-space) 0; max-width: var(--measure);
}
.en-m-subscribe input[type="email"], .en-m-subscribe input[type="text"]:not([tabindex="-1"]) {
	flex: 1 1 14rem; min-width: 0; padding: 0.7rem 0.85rem; font: inherit; font-size: 1rem;
	border: 1px solid var(--rule); border-radius: 4px; background: #fff; color: var(--ink);
}
.en-m-subscribe button {
	flex: 0 0 auto; padding: 0.7rem 1.3rem; font: inherit; font-weight: 700; font-size: 1rem;
	background: var(--accent); color: var(--on-accent); border: 0; border-radius: 4px; cursor: pointer;
}
.en-m-subscribe button:hover { background: var(--accent-hover); }
.en-m-sub-note { flex: 1 1 100%; font-size: 0.86rem; color: var(--muted); }

.m-optin { background: var(--bg-alt); border-radius: var(--radius); padding: clamp(1.25rem, 4vw, 2rem); }
.m-optin-title { margin: 0 0 0.8rem; font-size: clamp(1.2rem, 1rem + 1vw, 1.5rem); }
.m-optin .en-m-subscribe { background: transparent; border: 0; padding: 0; margin: 0; max-width: none; }
.m-optin-note { margin: 0.7rem 0 0; font-size: 0.8rem; color: var(--muted); }
body.dna-hero-cta .m-hero .m-optin { background: rgba(255, 255, 255, 0.12); }
body.dna-hero-cta .m-hero .m-optin-title,
body.dna-hero-cta .m-hero .m-optin-note { color: var(--on-band); }

.m-searchform { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.m-searchform input { flex: 1 1 12rem; min-width: 0; padding: 0.6rem 0.75rem; font: inherit; border: 1px solid var(--rule); border-radius: 4px; }
.m-searchform button { padding: 0.6rem 1.1rem; font: inherit; font-weight: 600; background: var(--accent); color: var(--on-accent); border: 0; border-radius: 4px; cursor: pointer; }

/* ==========================================================================
   Funnel page types
   ========================================================================== */

.m-funnel { max-width: 44rem; margin: 0 auto; padding: var(--block-space) 0; text-align: center; }
.m-funnel .m-content { max-width: none; text-align: left; }
.m-funnel-title { font-size: clamp(1.8rem, 1.3rem + 3vw, 2.6rem); }
.m-funnel-sales { max-width: 40rem; text-align: left; }
.m-funnel-sales .m-funnel-title { text-align: center; }
/* A capture page has one job; chrome would only leak attention. */
body.page-template-template-optin .m-navbar,
body.page-template-template-optin .m-foot,
body.page-template-template-thankyou .m-navbar { display: none; }

/* ==========================================================================
   Comments
   ========================================================================== */

.m-comments { margin: var(--block-space) 0; max-width: var(--measure); }
body.has-sidebar .m-comments { max-width: none; }
.m-comments ol { list-style: none; margin: 0; padding: 0; }
.m-comments .comment-body { border-bottom: 1px solid var(--rule); padding: 1.2rem 0; }
.m-comments input:not([type="submit"]), .m-comments textarea {
	width: 100%; max-width: 100%; padding: 0.6rem 0.75rem; font: inherit;
	border: 1px solid var(--rule); border-radius: 4px;
}
.m-comments input[type="submit"], .m-comments .submit {
	width: auto; padding: 0.65rem 1.25rem; font: inherit; font-weight: 600;
	background: var(--accent); color: var(--on-accent); border: 0; border-radius: 4px; cursor: pointer;
}

/* Preview banner, shown while auditioning a design. */
body.en-previewing { padding-top: 40px; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
