/* Agent Mama – WordPress additions on top of base.css (which is verbatim from the original site).
   Everything here is either a global the original had on <body>, or styling for things the
   original did not have: header menu links, editor-written pages, news. */

/* ---------- Globals the original set on body / everywhere ---------- */
* { border-color: hsl(240 10% 88%); }
body {
	background-color: hsl(240 14% 96%);
	color: hsl(244 26% 28%);
	font-family: Inter, system-ui, sans-serif;
}
*:focus-visible,
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
	outline: 2px solid transparent;
	outline-offset: 2px;
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px hsl(244 26% 28%);
}
.screen-reader-text {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0;
}

/* ---------- Header menu (only rendered when the menu has links) ---------- */
.am-nav__links { display: contents; }
.am-nav__toggle { display: none; }
.am-nav__link[aria-current="page"] { border-bottom: 1px solid var(--ink); padding-bottom: 2px; }

@media (max-width: 860px) {
	.am-nav__links {
		display: none;
		position: absolute; top: 84px; left: 0; right: 0;
		flex-direction: column;
		padding: 8px var(--pad) 18px;
		background: rgba(244, 245, 247, 0.98);
		border-bottom: 1px solid var(--line);
		font-size: 17px;
	}
	.am-nav__links.is-open { display: flex; }
	.am-nav__links a { padding: 14px 0; border-bottom: 1px solid var(--line); }
	.am-nav__links a:last-child { border-bottom: 0; }
	.am-nav__link[aria-current="page"] { padding-bottom: 14px; }
	.am-nav__toggle {
		display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
		width: 44px; height: 44px; padding: 0 11px;
		border: 1px solid var(--line); border-radius: 4px; background: var(--panel);
	}
	.am-nav__toggle span { display: block; height: 2px; background: var(--navy); border-radius: 1px; transition: transform .15s ease, opacity .15s ease; }
	.am-nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
	.am-nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
	.am-nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Page head used by editor pages and news (same measures as the Contact/Legal pages) ---------- */
.am-page { background: var(--panel); border-bottom: 1px solid var(--line); }
.am-page__inner { max-width: 1000px; margin: 0 auto; padding: clamp(56px, 7vw, 88px) var(--pad) clamp(56px, 7vw, 96px); }
.am-kicker { font-size: 14px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--navy); margin-bottom: 18px; }
.am-page__title { font-size: clamp(32px, 4.2vw, 48px); line-height: 1.12; margin-bottom: 22px; max-width: 760px; }
.am-page__lead { font-size: 18px; line-height: 1.65; color: var(--body); max-width: 600px; margin-bottom: 44px; }
.am-page__meta { font-size: 14px; color: var(--muted); padding-bottom: 28px; margin-bottom: 40px; border-bottom: 1px solid var(--line); }
.am-page__image { margin-bottom: 40px; border-radius: 6px; overflow: hidden; }
.am-page__image img { width: 100%; height: auto; }
.am-backlink { display: inline-block; margin-top: 48px; font-size: 15px; font-weight: 500; color: var(--navy); border-bottom: 1px solid var(--navy); padding-bottom: 2px; }

/* ---------- Article text (content written in the editor or through the API) ---------- */
.am-prose { max-width: 720px; font-size: 17px; line-height: 1.7; color: var(--body); }
.am-prose > * + * { margin-top: 18px; }
.am-prose h2 { font-size: var(--h3); line-height: 1.25; color: var(--ink); margin-top: 48px; }
.am-prose h3 { font-size: 20px; line-height: 1.3; color: var(--ink); margin-top: 36px; }
.am-prose h4 { font-size: 17px; line-height: 1.4; color: var(--ink); margin-top: 28px; }
.am-prose > :first-child { margin-top: 0; }
.am-prose a { color: var(--ink); border-bottom: 1px solid var(--muted); padding-bottom: 1px; }
.am-prose strong, .am-prose b { color: var(--ink); font-weight: 600; }
.am-prose ul, .am-prose ol { padding-left: 1.3em; display: flex; flex-direction: column; gap: 8px; }
.am-prose ul { list-style: disc; }
.am-prose ol { list-style: decimal; }
.am-prose li > ul, .am-prose li > ol { margin-top: 8px; }
.am-prose blockquote { border-left: 3px solid var(--peach); padding: 4px 0 4px 22px; font-size: 19px; line-height: 1.6; color: var(--ink); }
.am-prose blockquote cite { display: block; margin-top: 10px; font-size: 14px; font-style: normal; color: var(--muted); }
.am-prose figure { margin-top: 32px; margin-bottom: 32px; }
.am-prose img { border-radius: 6px; height: auto; }
.am-prose figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); text-align: left; }
.am-prose hr { margin: 40px 0; border-top: 1px solid var(--line); }
.am-prose code { font-size: .92em; background: var(--bg); padding: 2px 6px; border-radius: 4px; }
.am-prose pre { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 18px 20px; overflow-x: auto; font-size: 14px; line-height: 1.6; }
.am-prose pre code { background: none; padding: 0; }
.am-prose table { width: 100%; border: 1px solid var(--line); font-size: 15px; line-height: 1.5; }
.am-prose th, .am-prose td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.am-prose th { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.am-prose tr:last-child td { border-bottom: 0; }
.am-prose .wp-block-table { overflow-x: auto; }
.am-prose .wp-block-button__link, .am-prose .wp-element-button {
	display: inline-block; font-size: 16px; font-weight: 500; color: #fff; background: var(--navy);
	padding: 15px 30px; border-radius: 4px; border: 0; text-decoration: none;
}
.am-prose .wp-block-buttons { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 28px; }
.am-prose .alignwide, .am-prose .alignfull { max-width: none; }

/* ---------- News list ---------- */
.am-news { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.am-news__item { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px 32px; background: var(--panel); padding: 30px 32px; }
.am-news__date { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding-top: 6px; }
.am-news__title { font-size: var(--h3); line-height: 1.25; margin-bottom: 10px; }
.am-news__excerpt { font-size: 16px; line-height: 1.65; color: var(--body); max-width: 620px; margin-bottom: 16px; }
.am-news__more { font-size: 15px; font-weight: 500; border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.am-news__empty { background: var(--panel); padding: 30px 32px; font-size: 16px; color: var(--muted); }
.am-pagination { display: flex; justify-content: space-between; gap: 24px; margin-top: 32px; font-size: 15px; font-weight: 500; }
@media (max-width: 700px) {
	.am-news__item { grid-template-columns: minmax(0, 1fr); padding: 24px 22px; }
	.am-news__date { padding-top: 0; }
}

/* ---------- 404 ---------- */
.am-404 { background: var(--bg); }
.am-404__inner { max-width: 1440px; margin: 0 auto; padding: clamp(96px, 14vw, 180px) var(--pad); text-align: center; }
.am-404__title { font-size: clamp(32px, 4.2vw, 48px); line-height: 1.12; margin-bottom: 14px; }
.am-404__text { font-size: 18px; line-height: 1.65; color: var(--body); margin-bottom: 28px; }

/* ---------- Demo form states ---------- */
.am-form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.am-form__error { font-size: 15px; line-height: 1.6; color: #B3261E; }
