/* ============================================================
   Attai — About Us Page Styles
   Loaded only on is_page('about-us') via attai_about_page_assets().
   All values reference tokens from tokens.css (priority 20).
   ============================================================ */

/* ── Page-scoped token aliases ─────────────────────────────── */
:root {
	--about-dark:     var(--text-primary);
	--about-accent:   var(--color-indigo);
	--about-accent2:  var(--color-purple);
	--about-muted:    var(--text-secondary);
	--about-pale:     var(--color-pale);
	--about-white:    var(--color-white);
	--about-radius:   var(--r-lg);
	--about-shadow:   var(--s-md);
}

/* ────────────────────────────────────────────────────────────
   HERO A — Featured Image (has_post_thumbnail())
   ──────────────────────────────────────────────────────────── */
.attai-about-hero {
	position: relative;
	width: 100%;
	max-height: 520px;
	overflow: hidden;
	border-radius: var(--r-md);      /* token: r-md */
	box-shadow: var(--s-md);         /* token: s-md */
	/* sits flush under the navbar */
	margin-bottom: 0;
}

.attai-about-hero__img {
	display: block;
	width: 100%;
	height: 520px;
	object-fit: cover;
	object-position: center top;
	border-radius: var(--r-md);
	transition: transform var(--t-slow);
}

.attai-about-hero:hover .attai-about-hero__img {
	transform: scale(1.02);
}

/* Dark gradient overlay so title text is always readable */
.attai-about-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to bottom,
		rgba(57, 57, 104, 0.25) 0%,
		rgba(57, 57, 104, 0.75) 100%
	);
	display: flex;
	align-items: flex-end;
	padding: 3rem var(--container-pad);
}

.attai-about-hero__text {
	max-width: var(--container-max);
	margin: 0 auto;
	width: 100%;
}

/* ────────────────────────────────────────────────────────────
   HERO B — Navy banner fallback (no featured image)
   ──────────────────────────────────────────────────────────── */
.attai-about__hero {
	background-color: var(--about-dark);
	padding: 4.5rem var(--container-pad) 3.75rem;
	text-align: center;
	position: relative;
	overflow: hidden;
}

/* Decorative circles — matches the home hero pattern */
.attai-about__hero::before {
	content: '';
	position: absolute;
	top: -80px;
	right: -80px;
	width: 340px;
	height: 340px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.04);
	pointer-events: none;
}

.attai-about__hero::after {
	content: '';
	position: absolute;
	bottom: -60px;
	left: -60px;
	width: 260px;
	height: 260px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.04);
	pointer-events: none;
}

.attai-about__hero-inner {
	position: relative;
	z-index: 1;
	max-width: var(--container-max);
	margin: 0 auto;
}

/* Shared hero title + tagline — used in BOTH hero variants */
.attai-about__hero-title {
	color: var(--about-white);
	font-size: clamp(2rem, 5vw, 3.25rem);
	font-weight: 700;
	margin: 0 0 .6rem;
	letter-spacing: -.02em;
	line-height: 1.15;
}

.attai-about__hero-tagline {
	color: var(--about-pale);
	font-size: 1.05rem;
	margin: 0;
	opacity: .85;
	letter-spacing: .02em;
}

/* ────────────────────────────────────────────────────────────
   CONTENT SECTION
   Supports both naming conventions:
     New:  .attai-about-content  > .attai-container
     Old:  .attai-about__content > .attai-about__container
   ──────────────────────────────────────────────────────────── */
.attai-about-content,
.attai-about__content {
	background: var(--about-white);
	padding: 4rem var(--container-pad) 5rem;
}

/* Narrow reading container — intentional 820 px prose width */
.attai-about-content > .attai-container,
.attai-about__container {
	max-width: 820px;
	margin: 0 auto;
}

/* ────────────────────────────────────────────────────────────
   PROSE — the_content() output
   ──────────────────────────────────────────────────────────── */
.attai-about__prose {
	display: flex;
	flex-direction: column;
	gap: 1.6rem;
	margin-bottom: 3rem;
}

/* Generic paragraph reset */
.attai-about__prose p {
	font-size: 1.05rem;
	line-height: 1.9;
	color: var(--about-dark);
	margin: 0;
}

/* Headings inside content */
.attai-about__prose h2,
.attai-about__prose h3,
.attai-about__prose h4 {
	color: var(--about-dark);
	margin: .5rem 0 0;
	line-height: 1.3;
}

/* Lists inside content */
.attai-about__prose ul,
.attai-about__prose ol {
	padding-inline-start: 1.5rem;
	color: var(--about-dark);
	line-height: 1.9;
}

/* ── Lead paragraph ─────────────────────────────────────────
   Applied automatically to the FIRST <p> via CSS.
   Editors can also apply "attai-about__lead" as a Gutenberg
   Advanced CSS class to control exactly which paragraph gets
   the highlight treatment.
   ─────────────────────────────────────────────────────────── */
.attai-about__prose > p:first-of-type,
.attai-about__prose .attai-about__lead {
	border-left: 4px solid var(--about-accent);
	background: var(--about-pale);
	padding: 1.35rem 1.5rem 1.35rem 1.4rem;
	border-radius: 0 var(--r-md) var(--r-md) 0;
	font-size: 1.1rem;
	font-weight: 500;
}

/* ── Closing line ───────────────────────────────────────────
   Applied automatically to the LAST <p> via CSS.
   Editors can apply "attai-about__closing-line" to override.
   ─────────────────────────────────────────────────────────── */
.attai-about__prose > p:last-of-type,
.attai-about__prose .attai-about__closing-line {
	color: var(--about-accent);
	font-style: italic;
	font-weight: 600;
	position: relative;
	padding-left: 1.2rem;
}

.attai-about__prose > p:last-of-type::before,
.attai-about__prose .attai-about__closing-line::before {
	content: '';
	position: absolute;
	left: 0;
	top: .35em;
	bottom: .35em;
	width: 3px;
	background: var(--about-accent2);
	border-radius: var(--r-full);
}

/* Edge case: if only ONE paragraph exists, avoid applying both
   lead AND closing styles to the same element */
.attai-about__prose > p:only-of-type {
	border-left: 4px solid var(--about-accent);
	background: var(--about-pale);
	padding: 1.35rem 1.5rem 1.35rem 1.4rem;
	border-radius: 0 var(--r-md) var(--r-md) 0;
	font-size: 1.1rem;
	font-weight: 500;
	color: var(--about-dark);
	font-style: normal;
}

.attai-about__prose > p:only-of-type::before {
	display: none;
}

/* ────────────────────────────────────────────────────────────
   SIGNATURE IMAGE
   Supports both naming conventions:
     New:  .attai-about-signature     (on the <img>)
     Old:  .attai-about__signature-img (on the <img>)
   ──────────────────────────────────────────────────────────── */
.attai-about__signature {
	padding-top: 2rem;
	border-top: 1px solid var(--about-pale);
	text-align: left;
}

.attai-about-signature,
.attai-about__signature-img {
	display: block;
	max-width: 280px;
	width: 100%;
	height: auto;
	object-fit: contain;
	border-radius: var(--r-sm);
	box-shadow: var(--s-xs);
}

/* ────────────────────────────────────────────────────────────
   RESPONSIVE — tablet (≤ 1080 px)
   ──────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
	.attai-about__hero {
		padding: 3.5rem 1.5rem 3rem;
	}

	.attai-about-hero__overlay {
		padding: 2rem 1.5rem;
	}

	.attai-about-content,
	.attai-about__content {
		padding: 3rem 1.5rem 4rem;
	}
}

/* ────────────────────────────────────────────────────────────
   RESPONSIVE — mobile (≤ 767 px)
   ──────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
	/* Navy hero */
	.attai-about__hero {
		padding: 2.75rem 1.25rem 2.25rem;
	}

	.attai-about__hero-title {
		font-size: 1.8rem;
	}

	.attai-about__hero-tagline {
		font-size: .95rem;
	}

	/* Featured image hero */
	.attai-about-hero {
		max-height: 320px;
		border-radius: var(--r-sm);
	}

	.attai-about-hero__img {
		height: 320px;
	}

	.attai-about-hero__overlay {
		padding: 1.5rem 1.25rem;
	}

	/* Content section */
	.attai-about-content,
	.attai-about__content {
		padding: 2rem 1.25rem 3rem;
	}

	/* Lead paragraph */
	.attai-about__prose > p:first-of-type,
	.attai-about__prose .attai-about__lead {
		padding: 1rem 1rem 1rem 1.15rem;
		font-size: 1rem;
	}

	.attai-about__prose p {
		font-size: 1rem;
	}

	/* Signature */
	.attai-about-signature,
	.attai-about__signature-img {
		max-width: 200px;
	}
}
