/*
 * Ageless Edits: child theme styles.
 * Global colors and fonts are set in Customizer (Blocksy palette + typography);
 * this file holds the brand tokens and component styles.
 */

:root {
	--ae-ivory: #FAF7F2;
	--ae-charcoal: #252525;
	--ae-text: #3B3633;
	--ae-muted: #5E5853;
	--ae-rose: #B87982;         /* decorative only: fails contrast as text */
	--ae-rose-deep: #8E4F59;    /* buttons, text accents */
	--ae-rose-hover: #74404A;
	--ae-sage-deep: #56614F;    /* category labels, focus */
	--ae-beige: #DCCFC3;
	--ae-linen: #F2ECE5;
	--ae-serif: "Playfair Display", Georgia, serif;
	--ae-sans: Lato, "Helvetica Neue", Arial, sans-serif;
	--ae-radius: 4px;
	--ae-gutter: 40px;
}

@media (max-width: 999px) { :root { --ae-gutter: 24px; } }
@media (max-width: 689px) { :root { --ae-gutter: 16px; } }

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible {
	outline: 3px solid var(--ae-sage-deep);
	outline-offset: 3px;
}

/* ---------- Shared pieces ---------- */

.ae-wrap {
	max-width: 1280px;
	margin: 0 auto;
	padding-inline: var(--ae-gutter);
	box-sizing: border-box;
}

.ae-eyebrow {
	margin: 0;
	font-family: var(--ae-sans);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	line-height: 1.4;
	text-transform: uppercase;
	color: var(--ae-sage-deep);
}

.ae-eyebrow--rose { color: var(--ae-rose-deep); }

.ae-meta {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--ae-muted);
}

.ae-h2 {
	margin: 0;
	font-size: 32px;
	line-height: 1.2;
}

.ae-h2--lg { font-size: 36px; margin-top: 12px; }

.ae-lede {
	margin: 16px 0 22px;
	font-size: 17px;
	color: var(--ae-text);
}

.ae-btn {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 22px;
	border-radius: var(--ae-radius);
	background: var(--ae-rose-deep);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
}

.ae-btn:hover { background: var(--ae-rose-hover); color: #fff; }

.ae-link {
	font-size: 15px;
	font-weight: 700;
	color: var(--ae-charcoal);
	text-decoration: none;
	border-bottom: 2px solid var(--ae-rose);
	padding-bottom: 2px;
}

.ae-link:hover { color: var(--ae-rose-deep); }

.ae-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	border-radius: var(--ae-radius);
	transition: transform .4s ease;
}

.ae-img--empty { background: var(--ae-beige); }

.ae-sec-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 28px;
	padding-top: 18px;
	border-top: 1px solid var(--ae-charcoal);
}

.ae-grid { display: grid; gap: 32px; }
.ae-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ae-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.ae-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }

.ae-section { padding-bottom: 80px; }
.ae-band { padding: 64px 0; }
.ae-band--linen { background: var(--ae-linen); margin-bottom: 80px; padding: 72px 0; }

/* ---------- Cards ---------- */

.ae-card__media {
	display: block;
	overflow: hidden;
	border-radius: var(--ae-radius);
	aspect-ratio: 4 / 5;
}

.ae-card__media:hover .ae-img,
.ae-tile:hover .ae-img { transform: scale(1.03); }

.ae-card__title {
	margin: 6px 0 0;
	font-size: 22px;
	line-height: 1.3;
}

.ae-card__title a {
	color: var(--ae-charcoal);
	text-decoration: none;
}

.ae-card__title a:hover {
	color: var(--ae-charcoal);
	text-decoration: underline;
	text-decoration-color: var(--ae-rose);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}

.ae-card__body { padding-top: 16px; }
.ae-card .ae-meta { margin-top: 8px; }

.ae-card--lead .ae-card__media { aspect-ratio: 16 / 9; }
.ae-card--lead .ae-card__body { padding-top: 22px; max-width: 760px; }
.ae-card--lead .ae-card__title { margin-top: 10px; font-size: 44px; line-height: 1.15; }
.ae-card__dek { margin: 14px 0 12px; font-size: 18px; color: var(--ae-text); }

.ae-card--tall .ae-card__media { aspect-ratio: 3 / 4; }
.ae-card--tall .ae-card__title { font-size: 20px; }

.ae-card--compact,
.ae-card--list {
	display: grid;
	grid-template-columns: 112px minmax(0, 1fr);
	gap: 16px;
	align-items: start;
}

.ae-card--compact .ae-card__media,
.ae-card--list .ae-card__media { aspect-ratio: 1 / 1; }
.ae-card--compact .ae-card__body,
.ae-card--list .ae-card__body { padding-top: 0; }
.ae-card--compact .ae-card__title { font-size: 19px; }

.ae-card--list { grid-template-columns: 200px minmax(0, 1fr); gap: 24px; align-items: center; }
.ae-card--list .ae-card__title { font-size: 24px; line-height: 1.25; }

/* ---------- Homepage ---------- */

.ae-home { padding-top: 40px; }

.ae-hero {
	display: grid;
	grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
	gap: 40px;
	padding-bottom: 64px;
}

.ae-hero__side { display: flex; flex-direction: column; gap: 24px; }
.ae-hero__side .ae-card--compact + .ae-card--compact { border-top: 1px solid var(--ae-beige); padding-top: 24px; }

.ae-welcome {
	padding: 30px 28px;
	border-radius: var(--ae-radius);
	background: var(--ae-linen);
}

.ae-welcome__title { margin: 10px 0 0; font-size: 30px; line-height: 1.2; }
.ae-welcome__text { margin: 12px 0 20px; font-size: 16px; color: var(--ae-text); }

.ae-about {
	background: #fff;
	border-block: 1px solid var(--ae-beige);
}

.ae-about__grid {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: 56px;
	align-items: start;
}

.ae-about .ae-h2 { margin-top: 12px; font-size: 36px; }

.ae-pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.ae-pillar { border-top: 1px solid var(--ae-beige); padding-top: 18px; }
.ae-pillar__num { margin: 0; font-family: var(--ae-serif); font-size: 30px; font-weight: 700; line-height: 1; color: var(--ae-rose-deep); }
.ae-pillar__title { margin: 12px 0 0; font-size: 20px; line-height: 1.3; }
.ae-pillar__text { margin: 8px 0 0; font-size: 15px; color: var(--ae-muted); }

.ae-founder {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: 64px;
	align-items: center;
	padding-top: 80px;
	padding-bottom: 88px;
}

.ae-founder__photo { margin: 0; }
.ae-founder__photo .ae-img { aspect-ratio: 4 / 5; height: auto; object-position: center 20%; }
.ae-founder__photo figcaption { margin-top: 10px; }
.ae-founder__title { margin: 12px 0 0; font-size: 42px; line-height: 1.15; }
.ae-founder__intro { margin: 16px 0 32px; font-size: 19px; color: var(--ae-text); }

.ae-story { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.ae-story__title { margin: 0; font-size: 20px; line-height: 1.3; }
.ae-story__text { margin: 8px 0 0; font-size: 15px; color: var(--ae-muted); }

.ae-quote {
	margin: 36px 0 0;
	padding: 24px 0 0;
	border: 0;
	border-top: 2px solid var(--ae-rose);
}

.ae-quote p {
	margin: 0;
	font-family: var(--ae-serif);
	font-size: 26px;
	font-style: italic;
	font-weight: 600;
	line-height: 1.35;
	color: var(--ae-charcoal);
}

.ae-quote footer { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; margin-top: 14px; }
.ae-quote__name { font-size: 15px; font-weight: 700; }

.ae-tile { display: block; color: var(--ae-charcoal); text-decoration: none; }
.ae-tile__media { display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--ae-radius); }
.ae-tile__title { display: block; margin-top: 14px; font-family: var(--ae-serif); font-size: 22px; font-weight: 700; }
.ae-tile__desc { display: block; margin-top: 4px; font-size: 14px; color: var(--ae-muted); }
.ae-tile:hover .ae-tile__title { color: var(--ae-rose-deep); }

.ae-season__grid {
	display: grid;
	grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
	gap: 48px;
	align-items: start;
}

/* ---------- Header (Blocksy) ---------- */

#header { border-bottom: 1px solid var(--ae-beige); }

#header .site-title {
	font-family: var(--ae-serif);
	font-size: 40px;
	font-weight: 700;
	letter-spacing: -.01em;
	line-height: 1;
}

#header .site-title a { color: var(--ae-charcoal); }
#header .ct-menu-link { font-size: 15px; font-weight: 700; }

/* ---------- Articles ---------- */

.ae-breadcrumbs {
	margin-bottom: 14px;
	font-size: 13px;
	color: var(--ae-muted);
}

.ae-breadcrumbs a { color: var(--ae-muted); }

.single-post .entry-content {
	font-size: 18px;
	line-height: 1.7;
	color: var(--ae-text);
}

.single-post .entry-content h2 {
	margin: 2.2em 0 .7em;
	font-size: 32px;
	line-height: 1.25;
	scroll-margin-top: 24px;
}

.single-post .entry-content h3 { font-size: 23px; line-height: 1.3; }

.single-post .entry-content img { border-radius: var(--ae-radius); }

.single-post .entry-content .wp-caption-text,
.single-post .entry-content figcaption {
	margin-top: 8px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--ae-muted);
}

.single-post .ct-featured-image img {
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: var(--ae-radius);
}

.single-post .ct-featured-image figcaption {
	margin-top: 8px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--ae-muted);
}

/* Existing "Quick Tip" boxes in post content (inline-styled) */
.entry-content div[style*="border-left"] {
	border-left: 0 !important;
	border-radius: var(--ae-radius) !important;
	background: var(--ae-linen) !important;
	padding: 18px 20px !important;
}

.entry-content div[style*="border-left"] > p:first-child {
	color: var(--ae-rose-deep) !important;
	font-size: 13px !important;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.ae-toc {
	margin: 8px 0 32px;
	padding: 4px 18px;
	border: 1px solid var(--ae-beige);
	border-radius: var(--ae-radius);
	background: #fff;
}

.ae-toc summary {
	padding: 12px 0;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
}

.ae-toc ul { margin: 0 0 10px; padding: 0; list-style: none; }

.ae-toc li a {
	display: block;
	padding: 9px 0;
	border-top: 1px solid var(--ae-beige);
	font-size: 15px;
	line-height: 1.4;
	color: var(--ae-charcoal);
	text-decoration: none;
}

.ae-toc li a:hover { color: var(--ae-rose-deep); }

/* Related posts (Blocksy) */
.ct-related-posts .ct-media-container,
.ct-related-posts .ct-media-container img { aspect-ratio: 4 / 5 !important; }
.ct-related-posts .ct-media-container img { object-fit: cover; border-radius: var(--ae-radius); }
.ct-related-posts .related-entry-title { font-size: 19px; line-height: 1.3; }

/* ---------- Archives (Blocksy cards) ---------- */

.ae-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	max-width: 1280px;
	margin: 0 auto 32px;
	padding-inline: var(--ae-gutter);
	box-sizing: border-box;
	justify-content: center;
}

.ae-chip {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0 16px;
	border: 1px solid var(--ae-beige);
	border-radius: 999px;
	background: #fff;
	color: var(--ae-charcoal);
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
}

.ae-chip:hover { border-color: var(--ae-rose-deep); color: var(--ae-rose-deep); }

.entries .entry-card {
	background: transparent;
	box-shadow: none;
	border: 0;
}

.entries .entry-card .ct-media-container,
.entries .entry-card .ct-media-container img { aspect-ratio: 4 / 5 !important; }
.entries .entry-card .ct-media-container img { object-fit: cover; border-radius: var(--ae-radius); }
.entries .entry-card .entry-title { font-size: 22px; line-height: 1.3; }

.entry-card .meta-categories a,
.hero-section .meta-categories a {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ae-sage-deep);
}

/* ---------- Footer ---------- */

.ae-footer {
	padding: 64px 0 8px;
	background: var(--ae-charcoal);
	color: #F2ECE5;
}

.ae-footer__grid {
	display: grid;
	grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
	gap: 40px;
}

.ae-footer__brand { margin: 0; font-family: var(--ae-serif); font-size: 30px; font-weight: 700; color: var(--ae-ivory); }
.ae-footer__text { margin: 12px 0 0; max-width: 340px; font-size: 15px; color: #D9D0C7; }
.ae-footer__label { margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ae-ivory); }
.ae-footer__legal { display: flex; flex-wrap: wrap; gap: 6px 24px; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(242, 236, 229, .18); font-size: 14px; }
.ae-footer ul { margin: 0; padding: 0; list-style: none; font-size: 15px; line-height: 2.2; }
.ae-footer a { color: #F2ECE5; text-decoration: none; }
.ae-footer a:hover { color: #fff; text-decoration: underline; }

#footer { background: var(--ae-charcoal); }
#footer, #footer a { color: #CFC6BD; }

/* ---------- Responsive ---------- */

@media (max-width: 999px) {
	.ae-hero,
	.ae-about__grid,
	.ae-founder,
	.ae-season__grid { grid-template-columns: minmax(0, 1fr); }

	.ae-founder { gap: 32px; padding-top: 56px; padding-bottom: 56px; }
	.ae-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
	.ae-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ae-footer__grid > :first-child { grid-column: 1 / -1; }
	#header .site-title { font-size: 26px; }
}

@media (max-width: 689px) {
	.ae-home { padding-top: 24px; }
	.ae-hero { gap: 28px; padding-bottom: 40px; }
	.ae-card--lead .ae-card__title { font-size: 26px; line-height: 1.2; }
	.ae-card__dek { display: none; }
	.ae-card__title { font-size: 17px; }
	.ae-card--compact { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; }
	.ae-card--compact .ae-card__title,
	.ae-card--list .ae-card__title,
	.ae-card--tall .ae-card__title { font-size: 17px; }
	.ae-card--list { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; }
	.ae-card .ae-meta { font-size: 13px; }
	.ae-eyebrow { font-size: 11px; }

	.ae-band { padding: 40px 0; }
	.ae-h2 { font-size: 24px; }
	.ae-h2--lg, .ae-about .ae-h2 { font-size: 26px; }
	.ae-welcome { padding: 24px 20px; }
	.ae-welcome__title { font-size: 26px; }
	.ae-pillars, .ae-story { grid-template-columns: minmax(0, 1fr); gap: 18px; }
	.ae-founder__title { font-size: 30px; }
	.ae-founder__intro { font-size: 17px; margin-bottom: 24px; }
	.ae-quote p { font-size: 21px; }
	.ae-section { padding-bottom: 48px; }
	.ae-band--linen { margin-bottom: 48px; }
	.ae-grid--3, .ae-grid--2 { grid-template-columns: minmax(0, 1fr); gap: 18px; }
	.ae-card--tall { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; }
	.ae-card--tall .ae-card__media { aspect-ratio: 1 / 1; }
	.ae-card--tall .ae-card__body { padding-top: 0; }

	.single-post .entry-content { font-size: 17px; }
	.single-post .entry-content h2 { font-size: 24px; }
	.single-post .entry-content h3 { font-size: 19px; }
	.ae-footer { padding-top: 40px; }
}

@media (prefers-reduced-motion: reduce) {
	.ae-img { transition: none; }
	.ae-card__media:hover .ae-img,
	.ae-tile:hover .ae-img { transform: none; }
}
