/*
 * Stuaim: layout.
 * The header, the footer, the page templates (default, wide, landing, minimal),
 * the section box with its bands, and the two column arrangements
 * ("Split, media right" and "Steps"). Layout switches at 782px, the width at
 * which WordPress's own Columns block stacks.
 */

/* ---------- Header ---------- */

.site-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-block: clamp(20px, calc(20px + 6 * ((100vw - 390px) / 850)), 26px);
	padding-inline: var(--stuaim-pad);
}

.site-header .stuaim-wordmark {
	font-size: clamp(1.125rem, calc(1.125rem + 2 * ((100vw - 390px) / 850)), 1.25rem);
	text-decoration: none;
	color: var(--stuaim-ink);
}

.site-header .stuaim-wordmark__stroke {
	width: clamp(2.5px, calc(2.5px + 0.5 * ((100vw - 390px) / 850)), 3px);
	height: 0.67em; /* capital height, standing on the baseline (22 Nov 2026) */
	border-radius: clamp(1px, calc(1px + 0.5 * ((100vw - 390px) / 850)), 1.5px);
	margin-inline-start: clamp(4px, calc(4px + 1 * ((100vw - 390px) / 850)), 5px);
	margin-bottom: 0;
	/* Cut once as the page opens, from its top right end down to its foot, like a stroke written by hand. */
	animation: stuaim-cut-stroke 800ms cubic-bezier(0.15, 0.45, 0.6, 0.85) 500ms both;
}

@keyframes stuaim-cut-stroke {
	from {
		transform: rotate(24deg) translateY(-50%) scaleY(0);
	}
	to {
		transform: rotate(24deg) translateY(0) scaleY(1);
	}
}

@media (prefers-reduced-motion: reduce) {
	.site-header .stuaim-wordmark__stroke {
		animation: none;
	}
}

.site-header__end {
	display: flex;
	align-items: center;
	gap: 28px;
	min-width: 0;
}

.site-note {
	margin: 0;
	font-size: var(--stuaim-fs-note);
	line-height: normal;
	color: var(--stuaim-text-note);
	text-align: end;
}

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

.site-footer__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	max-width: var(--stuaim-box);
	margin-inline: auto;
	padding-block: clamp(32px, calc(32px + 12 * ((100vw - 390px) / 850)), 44px) clamp(40px, calc(40px + 16 * ((100vw - 390px) / 850)), 56px);
	padding-inline: var(--stuaim-pad);
}

.site-footer__start {
	display: flex;
	align-items: center;
	gap: clamp(12px, calc(12px + 2 * ((100vw - 390px) / 850)), 14px);
	min-width: 0;
}

.site-footer__icon {
	display: block;
	flex: none;
	width: clamp(40px, calc(40px + 4 * ((100vw - 390px) / 850)), 44px);
	height: auto;
	aspect-ratio: 1;
}

.site-footer__title {
	margin: 0;
	font-family: var(--stuaim-serif);
	font-weight: 600;
	font-size: clamp(0.9375rem, calc(0.9375rem + 1 * ((100vw - 390px) / 850)), 1rem);
	line-height: 1.2;
	color: var(--stuaim-ink);
}

.site-footer__tagline {
	margin: 2px 0 0;
	font-size: clamp(0.75rem, calc(0.75rem + 0.5 * ((100vw - 390px) / 850)), 0.78125rem);
	line-height: normal;
	color: var(--stuaim-ink-66);
}

.site-footer__end {
	text-align: end;
	font-size: clamp(0.78125rem, calc(0.78125rem + 0.5 * ((100vw - 390px) / 850)), 0.8125rem);
	line-height: 1.7;
	color: var(--stuaim-ink-66);
}

.site-footer__end p {
	margin: 0;
}

/* The legal line (Customizer; empty by default). It sits under the footer row,
   24px below it at 390 and 32px at 1240, by pulling up into the row's bottom
   padding, and repeats that padding beneath itself. */
.site-footer__legal {
	max-width: var(--stuaim-box);
	margin-block: clamp(-24px, calc(-16px - 8 * ((100vw - 390px) / 850)), -16px) 0;
	margin-inline: auto;
	padding-block: 0 clamp(40px, calc(40px + 16 * ((100vw - 390px) / 850)), 56px);
	padding-inline: var(--stuaim-pad);
	font-size: clamp(0.71875rem, calc(0.71875rem + 0.5 * ((100vw - 390px) / 850)), 0.75rem);
	line-height: 1.6;
	color: var(--stuaim-ink-66);
}

/* ---------- Main and page templates ---------- */

.site-main {
	display: block;
}

.site-main:focus {
	outline: none;
}

/* Default and wide templates: the title, then content at the reading width. */
.entry,
.page-intro,
.posts-list,
.no-results,
.not-found,
.comments-area,
.post-navigation,
.pagination {
	padding-inline: var(--stuaim-pad);
}

.entry {
	padding-block: var(--stuaim-page-top) var(--stuaim-page-bottom);
}

.entry-header,
.entry-content > *,
.entry-footer,
.page-intro > *,
.posts-list > *,
.no-results > *,
.not-found > *,
.comments-area > *,
.post-navigation > *,
.pagination > * {
	max-width: var(--stuaim-reading);
	margin-inline: auto;
}

.entry-content > .alignwide,
.stuaim-template-wide .entry-header,
.stuaim-template-wide .entry-content > *:not(.alignfull) {
	max-width: var(--stuaim-wide);
}

.entry-content > .alignfull {
	max-width: none;
	margin-inline: calc(var(--stuaim-pad) * -1);
}

.entry-content > .alignleft {
	float: left;
	max-width: 50%;
	margin-inline: max(0px, calc((100% - var(--stuaim-reading)) / 2)) 1.5em;
}

.entry-content > .alignright {
	float: right;
	max-width: 50%;
	margin-inline: 1.5em max(0px, calc((100% - var(--stuaim-reading)) / 2));
}

.entry-content::after {
	content: "";
	display: block;
	clear: both;
}

/* Space between the title and the content of a text page. */
.entry-header + .entry-content {
	margin-top: clamp(22px, calc(22px + 10 * ((100vw - 390px) / 850)), 32px);
}

/* On a text page, a lead paragraph uses the full reading width. */
.entry-content > p.is-style-lead {
	max-width: var(--stuaim-reading);
}

.stuaim-template-wide .entry-content > p.is-style-lead {
	max-width: var(--stuaim-wide);
}

/* Landing template: no title, content edge to edge; sections bring their own box. */
.entry--landing {
	padding: 0;
}

.entry--landing .entry-content > * {
	max-width: none;
	margin-inline: 0;
}

/* Sections sit flush against each other; their own padding spaces them. */
.entry-content > [class*="is-style-section"],
.entry-content > [class*="is-style-section"] + *,
.is-root-container > [class*="is-style-section"],
.is-root-container > [class*="is-style-section"] + * {
	margin-block: 0;
}

/* A block placed at the top level of a landing page that is not a section
   still lines up with the section box. */
.entry--landing .entry-content > :not(.alignfull):not([class*="is-style-section"]) {
	max-width: calc(min(100%, var(--stuaim-box)) - 2 * var(--stuaim-pad));
	margin-inline: auto;
}

.entry--landing .entry-content > :where(:not(.alignfull):not([class*="is-style-section"])) + * {
	margin-block-start: var(--stuaim-flow);
}

/* Posts: date under the title, a featured image, categories and tags. */
.entry--post .entry-header .entry-meta {
	margin-top: 12px;
}

.entry-thumbnail {
	max-width: var(--stuaim-wide);
	margin: clamp(24px, calc(24px + 12 * ((100vw - 390px) / 850)), 36px) auto 0;
}

.entry-thumbnail img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 10px;
}

.entry-thumbnail + .entry-content {
	margin-top: clamp(28px, calc(28px + 12 * ((100vw - 390px) / 850)), 40px);
}

.entry-footer {
	margin-top: 36px;
	padding-top: 16px;
	border-top: 1px solid var(--stuaim-line);
}

.entry-footer .entry-categories + .entry-tags::before {
	content: "· ";
}

/* Search and "not found". */
.page-intro__search {
	margin-top: 22px;
}

.no-results {
	padding-block: 28px var(--stuaim-page-bottom);
}

.no-results .entry-content > * + *,
.not-found .entry-content > * + * {
	margin-block-start: 22px;
}

/* Minimal template: wordmark only in the header; short content is centred in the window. */
.stuaim-template-minimal .site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100svh;
}

.stuaim-template-minimal .site-main {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.entry--minimal {
	padding: 0;
}

.entry--minimal .entry-content > * {
	max-width: none;
	margin-inline: 0;
}

/* Plain blocks on a minimal page (not in a section) keep a narrow column. */
.entry--minimal .entry-content > :not(.alignfull):not([class*="is-style-section"]) {
	max-width: 560px;
	margin-inline: auto;
	padding-inline: var(--stuaim-pad);
	box-sizing: content-box;
}

/* ---------- The section box ---------- */

/* Each section is one Group with a "Section" style. Its background (if any)
   runs edge to edge; its content sits in the 1128px box. */
[class*="is-style-section"] {
	box-sizing: border-box;
	padding-inline: var(--stuaim-box-inline);
	padding-block: var(--stuaim-section-y);
	color: var(--stuaim-text);
}

.is-style-section-tight {
	padding-block: var(--stuaim-section-y-tight);
}

.is-style-section-roomy {
	padding-block: var(--stuaim-section-y-roomy);
}

/* Two sections on the same Paper ground are divided by a hairline. */
[class*="is-style-section"]:not(.has-background) + [class*="is-style-section"]:not(.has-background) {
	border-top: 1px solid var(--stuaim-line-faint);
}

/* ---------- Columns: "Split, media right" ---------- */

/* Text flexible, media at its natural width, 72px apart, vertically centred.
   Stacked under 782px with the media below. */
.wp-block-columns.is-style-split {
	gap: 30px;
	margin-block: 0;
}

.wp-block-columns.is-style-split:has(.wp-block-stuaim-phone) {
	row-gap: 40px;
}

@media (min-width: 782px) {
	.wp-block-columns.is-style-split {
		gap: 72px;
	}

	.wp-block-columns.is-style-split > .wp-block-column {
		align-self: center;
	}

	.wp-block-columns.is-style-split > .wp-block-column:first-child {
		flex: 1 1 0;
		min-width: 0;
	}

	.wp-block-columns.is-style-split > .wp-block-column:last-child:not(:first-child) {
		flex: 0 0 auto;
		width: auto;
		max-width: 50%;
	}
}

/* ---------- Columns: "Steps" ---------- */

.wp-block-columns.is-style-steps {
	gap: 36px;
	margin-block: 0;
}

@media (min-width: 782px) {
	.wp-block-columns.is-style-steps {
		gap: 48px;
	}

	.wp-block-columns.is-style-steps > .wp-block-column {
		flex: 1 1 0;
	}
}
