/*
Theme Name: Alex McDonnell
Theme URI: https://alexmcdonnell.com
Author: Alex McDonnell
Description: Author website for Alex McDonnell — The Connected Organisation of the Future. A block theme: every section of the home page can be edited in the WordPress editor.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: alex-mcdonnell
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
.am-main .wp-block-post-content > .alignfull { margin-block-start: 0; margin-block-end: 0; }
.wp-block-heading { margin-top: 0; }
section[id] { scroll-margin-top: 20px; }

/* ---------- Labels, lead text and accents ---------- */
.is-style-label {
	margin: 0 0 22px !important;
	font-size: 0.71rem;
	line-height: 1.2;
	font-weight: 800;
	letter-spacing: 0.19em;
	text-transform: uppercase;
	color: var(--wp--preset--color--label);
}
.am-dark .is-style-label { color: var(--wp--preset--color--label-light); }
.is-style-lead {
	font-family: var(--wp--preset--font-family--serif);
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.47;
}
.am-dark .is-style-lead { color: #d4cdc6; }
.am-principle .is-style-lead { color: #eaded8; }
.am-subtitle {
	font-family: var(--wp--preset--font-family--serif);
	font-style: italic;
	color: var(--wp--preset--color--muted);
	font-size: 1.1rem;
	margin-top: 10px !important;
}

/* ---------- Header and navigation ---------- */
.am-header { padding-top: 0; padding-bottom: 0; }
.am-nav {
	min-height: 92px;
	border-bottom: 1px solid rgba(32, 30, 29, 0.2);
	gap: 24px;
}
.am-brand { gap: 3px; }
.am-brand p { margin: 0; }
.am-brand-name { font-size: 0.9rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; line-height: 1.2; }
.am-brand-name a { text-decoration: none; }
.am-brand-tag { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: #7a7169; line-height: 1.2; }
.am-menu { gap: 28px; font-size: 0.76rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
.am-menu a { text-decoration: none; }
.am-menu a:hover { color: var(--wp--preset--color--wine); }
.am-menu .wp-block-navigation__submenu-container {
	background: var(--wp--preset--color--paper) !important;
	border: 1px solid #d9cec0 !important;
	box-shadow: 0 14px 30px rgba(32, 30, 29, 0.12);
	padding: 8px 0;
	min-width: 210px !important;
}
.am-menu .wp-block-navigation__submenu-container a { padding: 10px 18px !important; }

/* ---------- Hero ---------- */
.am-hero { padding: 0 !important; }
.am-hero-cols { gap: 0 !important; margin: 0 !important; min-height: 808px; align-items: stretch !important; }
.am-hero-copy {
	padding: 80px 60px 80px max(28px, calc((100vw - 1240px) / 2));
}
.am-hero h1 { margin: 0; }
.am-hero .is-style-lead { max-width: 700px; margin-top: 30px; }
.am-hero .wp-block-buttons { margin-top: 37px; }
.am-hero-index {
	margin-top: 45px !important;
	display: flex; align-items: center; gap: 14px;
	font-size: 0.68rem; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase; color: #766e66;
}
.am-hero-index::before { content: ""; flex: 0 0 52px; height: 1px; background: #857b72; }
.am-hero-media { position: relative; min-height: 600px; background: #b8a58f; overflow: hidden; }
.am-portrait { margin: 0 !important; position: absolute; inset: 0; }
.am-portrait img { width: 100%; height: 100% !important; object-fit: cover; object-position: center 30%; display: block; }

/* ---------- Sections ---------- */
.am-section { padding-top: 115px; padding-bottom: 115px; }
.am-split { gap: 90px !important; }
.am-bignum, .am-monogram {
	font-family: var(--wp--preset--font-family--serif);
	line-height: 0.75;
	margin: 0;
}
.am-bignum { font-size: clamp(6rem, 13vw, 12rem); color: #eee8df; }
.am-monogram { font-size: clamp(6rem, 13vw, 13rem); color: #ddd3c6; }
.am-statement {
	margin: 0;
	font-family: var(--wp--preset--font-family--serif);
	font-size: clamp(2rem, 3.7vw, 3.9rem);
	line-height: 1.17;
	letter-spacing: -0.03em;
}
.am-statement + p { margin-top: 35px; max-width: 700px; }

/* Operational debt rows */
.am-rows { margin-top: 75px !important; border-top: 1px solid #5a5551; }
.am-row { margin: 0 !important; padding: 30px 0; border-bottom: 1px solid #5a5551; gap: 30px !important; }
.am-row-num { color: var(--wp--preset--color--label-light); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.15em; margin: 0; }
.am-row-title.wp-block-heading {
	font-family: var(--wp--preset--font-family--sans);
	font-size: 1rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em; line-height: 1.4; margin: 0;
}
.am-row p:not(.am-row-num) { color: #c8c1bb; margin: 0; }

/* Principle */
.am-principle { padding-top: 130px; padding-bottom: 130px; }
.am-principle-quote {
	font-family: var(--wp--preset--font-family--serif);
	font-size: clamp(2.7rem, 5.4vw, 5.8rem);
	line-height: 1.02;
	letter-spacing: -0.045em;
	margin: 0;
}
.am-short-rule.wp-block-separator { width: 80px; margin: 40px 0 30px !important; border: 0; border-top: 1px solid var(--wp--preset--color--label-light); opacity: 1; }
.am-principle .am-short-rule + p { color: #ccbdb8; }

/* Approach */
.am-question {
	margin-top: 26px !important;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.3rem; line-height: 1.4;
	color: var(--wp--preset--color--wine);
}
.am-steps { margin-top: 75px !important; gap: 0 !important; border-top: 1px solid #d9cec0; border-bottom: 1px solid #d9cec0; }
.am-step { padding: 35px 26px 42px; border-right: 1px solid #d9cec0; min-height: 300px; }
.am-step:last-child { border-right: 0; }
.am-step-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--wp--preset--color--wine); margin: 0 0 65px !important; }
.am-step h3 { margin-bottom: 14px; }

/* Business User Manual panel */
.am-panel { padding: 52px; border: 1px solid #d9cec0; box-shadow: 20px 20px 0 var(--wp--preset--color--stone); }
.am-panel h3 { margin-bottom: 30px; }
.am-dash-list { list-style: none; padding: 0; margin: 0; }
.am-dash-list li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid #d9cec0; }
.am-dash-list li::before { content: "—"; color: var(--wp--preset--color--wine); }

/* Books */
.am-book { margin-top: 75px !important; gap: 110px !important; align-items: flex-start; }
.am-cover { margin: 0; }
.am-cover img { width: 100%; max-width: 470px; height: auto; box-shadow: 0 35px 70px rgba(51, 36, 29, 0.2); transform: rotate(-1deg); display: block; }
.am-pullquote {
	margin: 34px 0 !important;
	padding-top: 22px;
	border-top: 1px solid #c8bbaa;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.45rem; line-height: 1.35;
	color: var(--wp--preset--color--wine);
}
.am-parts { margin: 30px 0 24px !important; }
.am-parts > p { margin: 0 !important; padding: 14px 0; border-top: 1px solid #c8bbaa; display: grid; grid-template-columns: 100px 1fr; gap: 20px; }
.am-parts > p strong { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--wp--preset--color--wine); font-weight: 800; padding-top: 3px; }
.am-earlier { margin: 90px max(0px, calc((100% - 1240px) / 2)) 0 auto !important; width: calc(min(100%, 1240px) * 0.76); padding-top: 55px; border-top: 1px solid #c8bbaa; gap: 55px !important; }
.am-cover-small { margin: 0; }
.am-cover-small img { width: 100%; height: auto; box-shadow: 0 20px 42px rgba(51, 36, 29, 0.16); display: block; }
.am-earlier-title.wp-block-heading { font-size: clamp(1.85rem, 2.7vw, 3rem); letter-spacing: -0.03em; line-height: 1.06; }

/* About */
.am-tags { margin-top: 30px !important; font-size: 0.69rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }

/* Contact */
.am-cta { padding-top: 100px; padding-bottom: 100px; }
.am-cta-buttons { justify-content: flex-end; }

/* ---------- Buttons ---------- */
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--ink);
	border: 1px solid #81776d;
	padding: 19px 25px;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--wp--preset--color--ink); color: #fff; border-color: var(--wp--preset--color--ink); }
.am-book .wp-block-button.is-style-outline > .wp-block-button__link,
.am-earlier .wp-block-button.is-style-outline > .wp-block-button__link { color: var(--wp--preset--color--wine); border-color: var(--wp--preset--color--wine); }
.am-book .wp-block-button.is-style-outline > .wp-block-button__link:hover,
.am-earlier .wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--wp--preset--color--wine); color: #fff; }
.wp-block-button.is-style-light > .wp-block-button__link { background: var(--wp--preset--color--stone); border-color: var(--wp--preset--color--stone); color: var(--wp--preset--color--ink); }
.wp-block-button.is-style-light > .wp-block-button__link:hover { background: #fff; border-color: #fff; }

/* ---------- Footer ---------- */
.am-footer { padding-top: 38px; padding-bottom: 38px; font-size: 0.8rem; }
.am-footer p { margin: 0; }
.am-footer a { color: #fff; }

/* ---------- Other pages ---------- */
.am-page { padding-top: 80px; padding-bottom: 100px; }
.am-page-title { margin-bottom: 40px; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
	.am-hero-cols { flex-wrap: wrap !important; min-height: 0; }
	.am-hero-cols > .wp-block-column { flex-basis: 100% !important; }
	.am-hero-copy { padding: 70px 28px; }
	.am-hero-media { min-height: 620px; }
	.am-split, .am-book { gap: 45px !important; }
	.am-steps { flex-wrap: wrap !important; }
	.am-steps > .am-step { flex-basis: 50% !important; border-bottom: 1px solid #d9cec0; }
	.am-steps > .am-step:nth-child(2n) { border-right: 0; }
	.am-earlier { margin-left: auto !important; margin-right: auto !important; width: 100%; }
	.am-cover img { margin: 0 auto; }
	.am-cta-buttons { justify-content: flex-start; }
}
@media (max-width: 781px) {
	.am-section { padding-top: 80px; padding-bottom: 80px; }
	.am-principle { padding-top: 90px; padding-bottom: 90px; }
	.am-hero h1 { font-size: clamp(2.4rem, 10vw, 3.6rem); }
	.am-hero-media { min-height: 520px; }
	.am-row { gap: 10px !important; padding: 24px 0; }
	.am-steps > .am-step { flex-basis: 100% !important; border-right: 0; min-height: 0; }
	.am-step-label { margin-bottom: 24px !important; }
	.am-panel { padding: 30px; box-shadow: 10px 10px 0 var(--wp--preset--color--stone); }
	.am-parts > p { grid-template-columns: 1fr; gap: 4px; }
	.am-earlier { gap: 25px !important; }
	.am-earlier > .wp-block-column:first-child { max-width: 150px; }
	.am-footer .wp-block-group { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
