/*
Theme Name: CULTR Front
Author: CULTR Front
Description: Custom block theme for CULTR Front: strategy, partnerships and impact. The homepage is built from the agency overview and can be edited in Appearance > Editor.
Requires at least: 6.6
Requires PHP: 7.4
Version: 1.4.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cultr-front
*/

/* ---------- Tokens ---------- */
:root {
	--cf-ink: #121214;
	--cf-ink-2: #1F1F25;
	--cf-ink-line: #2B2B33;
	--cf-paper: #F7F7F5;
	--cf-surface: #EDEEF4;
	--cf-card: #FCFCFD;
	--cf-accent: #2B4CD6;
	--cf-accent-fill: #3D63F5;
	--cf-accent-dark: #2443C4;
	--cf-accent-light: #F0D63E;
	--cf-muted: #45454F;
	--cf-on-dark: #DADAE2;
	--cf-line: #DCDEE6;
	--cf-max: 1160px;
	--cf-gutter: clamp(1.25rem, 5vw, 3rem);
	--cf-section-pad: clamp(3rem, 6vw, 5rem);
	--cf-font-head: "Inter Display", Inter, "Helvetica Neue", Arial, sans-serif;
	--cf-font-body: Inter, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	margin: 0;
	background: var(--cf-paper);
	color: var(--cf-ink);
	font-family: var(--cf-font-body);
	font-size: 1.125rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

h1, h2, h3 {
	font-family: var(--cf-font-head);
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -0.02em;
	font-optical-sizing: auto;
}

a:focus-visible,
.wp-element-button:focus-visible {
	outline: 3px solid var(--cf-accent);
	outline-offset: 3px;
}

:where(.cf-main) :where(h1, h2, h3, p, ul) { margin: 0; }

/* ---------- Header ---------- */
.cf-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--cf-paper);
	border-bottom: 1px solid var(--cf-line);
	padding: 1.1rem var(--cf-gutter);
}
.admin-bar .cf-header { top: var(--wp-admin--admin-bar--height, 0); }

.cf-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	max-width: var(--cf-max);
	margin-inline: auto;
}
.cf-header__inner > * { margin: 0; }

.cf-wordmark {
	margin: 0;
	font-family: var(--cf-font-head);
	font-size: 1.375rem;
	font-weight: 800;
	letter-spacing: -0.01em;
	line-height: 1;
}
.cf-wordmark a { color: inherit; text-decoration: none; }

.cf-nav .wp-block-navigation__container { gap: 2rem; }
.cf-nav a {
	color: var(--cf-ink);
	font-size: 1rem;
	font-weight: 500;
	text-decoration: none;
}
.cf-nav a:hover { color: var(--cf-accent); }

/* ---------- Sections ---------- */
.cf-section {
	position: relative;
	padding: var(--cf-section-pad) var(--cf-gutter);
	scroll-margin-top: 4.5rem;
}
.cf-section > * {
	max-width: var(--cf-max);
	margin-inline: auto;
}
.cf-section > * + * { margin-top: clamp(2rem, 4vw, 2.75rem); }

.cf-section--surface { background: var(--cf-surface); }
.cf-section--dark { background: var(--cf-ink); color: var(--cf-paper); }
.cf-section--accent { background: var(--cf-accent-fill); color: var(--cf-paper); }

.cf-eyebrow,
.cf-label {
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--cf-accent);
}
.cf-label { color: var(--cf-muted); }
.cf-section--dark .cf-eyebrow { color: var(--cf-accent-light); }

.cf-section-head > * + * { margin-top: 1rem; }
.cf-section-head h2 {
	font-size: clamp(2rem, 4vw, 3.25rem);
	max-width: 18ch;
}

/* ---------- Hero ---------- */
.cf-hero {
	padding-top: clamp(2.25rem, 4vw, 3.25rem);
}
.cf-hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
	gap: clamp(2rem, 4vw, 4rem);
	align-items: center;
}
.cf-hero__content > * + * { margin-top: 1.25rem; }

.cf-hero__title {
	font-size: clamp(2.25rem, 3.9vw, 3.5rem);
	max-width: 17ch;
}
.cf-hero__title em {
	font-style: normal;
	color: var(--cf-accent);
}
.cf-lead {
	font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
	line-height: 1.5;
	max-width: 42rem;
}
.cf-hero .cf-supporting {
	max-width: 42rem;
	color: var(--cf-muted);
}
.cf-hero .wp-block-buttons { margin-top: 1.75rem; }

/* Hero mark: one rust disc inside two thin rings. Decorative only. */
.cf-hero__mark {
	position: relative;
	width: 100%;
	max-width: 320px;
	aspect-ratio: 1;
	justify-self: end;
	border-radius: 50%;
	border: 1.5px solid rgba(61, 99, 245, 0.35);
}
.cf-hero__mark::before {
	content: "";
	position: absolute;
	inset: 16%;
	border-radius: 50%;
	border: 1.5px solid rgba(61, 99, 245, 0.55);
}
.cf-hero__mark::after {
	content: "";
	position: absolute;
	inset: 32%;
	border-radius: 50%;
	background: var(--cf-accent-fill);
}

/* ---------- Buttons ---------- */
.wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}
.wp-block-button__link,
.wp-element-button {
	box-sizing: border-box;
	display: inline-block;
	padding: 0.9rem 1.65rem;
	border: 2px solid var(--cf-accent-fill);
	border-radius: 999px;
	background: var(--cf-accent-fill);
	color: var(--cf-paper);
	font-family: var(--cf-font-body);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.wp-block-button__link:hover {
	background: var(--cf-accent-dark);
	border-color: var(--cf-accent-dark);
	color: var(--cf-paper);
}
.cf-main .wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	border-color: var(--cf-ink);
	color: var(--cf-ink);
}
.cf-main .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--cf-ink);
	color: var(--cf-paper);
}

/* ---------- Mission and vision ---------- */
.cf-pair {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
	gap: clamp(2rem, 5vw, 4.5rem);
}
.cf-pair > * > * + * { margin-top: 0.85rem; }
.cf-statement {
	font-family: var(--cf-font-head);
	font-size: clamp(1.5rem, 2.6vw, 2rem);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.015em;
}

/* ---------- Split layout ---------- */
.cf-split {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: clamp(2rem, 6vw, 6rem);
	align-items: start;
}
.cf-split__body > * + * { margin-top: 1.25rem; }
.cf-section--dark .cf-split__body { color: var(--cf-on-dark); }
.cf-pull {
	font-family: var(--cf-font-head);
	font-size: clamp(1.375rem, 2.2vw, 1.75rem);
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.01em;
	color: var(--cf-accent-light);
	padding-top: 0.5rem;
}
.cf-split h2 { font-size: clamp(2rem, 4vw, 3.25rem); }

/* ---------- Grids and cards ---------- */
.cf-grid {
	display: grid;
	gap: clamp(1rem, 2vw, 1.5rem);
}
.cf-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); }
.cf-grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }

.cf-card {
	background: var(--cf-card);
	border: 1px solid var(--cf-line);
	border-radius: 20px;
	padding: clamp(1.25rem, 2.4vw, 2rem);
}
.cf-card > * + * { margin-top: 0.75rem; }
.cf-card h3 { font-size: clamp(1.375rem, 2vw, 1.625rem); line-height: 1.15; }
.cf-card p { font-size: 1rem; color: var(--cf-muted); }

.cf-section--dark .cf-card {
	background: var(--cf-ink-2);
	border-color: var(--cf-ink-line);
}
.cf-section--dark .cf-card p { color: var(--cf-on-dark); }

.cf-number {
	font-family: var(--cf-font-head);
	font-size: 0.9375rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	color: var(--cf-accent);
}
.cf-section--dark .cf-number { color: var(--cf-accent-light); }

.cf-card .cf-tagline {
	font-family: var(--cf-font-head);
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--cf-accent);
}

.cf-card .cf-steps {
	list-style: none;
	padding: 0;
	margin-top: 1.25rem;
	border-top: 1px solid var(--cf-line);
}
.cf-steps li {
	padding: 0.85rem 0;
	border-bottom: 1px solid var(--cf-line);
	font-size: 1rem;
	color: var(--cf-muted);
}
.cf-steps li:last-child { border-bottom: 0; padding-bottom: 0; }
.cf-steps li strong {
	display: block;
	margin-bottom: 0.25rem;
	font-family: var(--cf-font-head);
	font-size: 1.125rem;
	color: var(--cf-ink);
}

.cf-note {
	font-size: 1.125rem;
	color: var(--cf-muted);
	max-width: 46rem;
	padding-left: 1.25rem;
	border-left: 3px solid var(--cf-accent);
}
.cf-section > .cf-note { margin-left: max(0px, calc((100% - var(--cf-max)) / 2)); }

/* Mission and vision inside the dark culture section */
.cf-pair--compact {
	gap: clamp(1.5rem, 4vw, 3rem);
	padding-top: clamp(2rem, 4vw, 3rem);
	border-top: 1px solid var(--cf-ink-line);
}
.cf-pair--compact .cf-label { color: var(--cf-accent-light); }
.cf-pair--compact .cf-statement {
	font-size: clamp(1.1875rem, 1.8vw, 1.4375rem);
	line-height: 1.4;
	color: var(--cf-paper);
}

/* ---------- Founder ---------- */
.cf-founder__grid {
	display: grid;
	grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
	gap: clamp(2rem, 6vw, 5.5rem);
	align-items: center;
}
.cf-founder .cf-portrait { margin: 0; }
.cf-founder .cf-portrait img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border-radius: 20px;
}
.cf-founder__text > * + * { margin-top: 1.25rem; }
.cf-founder__text .cf-eyebrow + h2 { margin-top: 0.75rem; }
.cf-founder h2 { font-size: clamp(2.25rem, 4.5vw, 3.75rem); }
.cf-founder__text p:not(.cf-eyebrow) { font-size: 1.1875rem; color: var(--cf-ink); }

/* ---------- Contact ---------- */
.cf-contact { text-align: left; }
.cf-contact h2 {
	font-size: clamp(2.25rem, 5vw, 4.25rem);
	max-width: 16ch;
	color: var(--cf-paper);
}
.cf-contact > * + * { margin-top: 1.5rem; }
.cf-contact p { font-size: 1.25rem; max-width: 36rem; color: var(--cf-paper); }
.cf-contact .wp-block-button__link {
	background: var(--cf-paper);
	border-color: var(--cf-paper);
	color: var(--cf-ink);
}
.cf-contact .wp-block-button__link:hover {
	background: var(--cf-ink);
	border-color: var(--cf-ink);
	color: var(--cf-paper);
}
.cf-contact h2,
.cf-contact > p,
.cf-contact .wp-block-buttons {
	margin-left: max(0px, calc((100% - var(--cf-max)) / 2));
}
.cf-contact .cf-contact-details { font-size: 1.125rem; line-height: 1.8; }
.cf-contact .cf-contact-details a {
	color: var(--cf-paper);
	text-decoration: underline;
	text-underline-offset: 3px;
	overflow-wrap: anywhere;
}
.cf-contact .cf-contact-details a:hover { text-decoration-thickness: 2px; }
.cf-section--accent a:focus-visible,
.cf-contact .wp-element-button:focus-visible { outline-color: var(--cf-paper); }

/* ---------- Footer ---------- */
.cf-footer {
	background: var(--cf-ink);
	color: var(--cf-on-dark);
	padding: 3rem var(--cf-gutter);
}
.cf-footer__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 2rem;
	max-width: var(--cf-max);
	margin-inline: auto;
}
.cf-footer__inner > *,
.cf-footer p { margin: 0; }
.cf-footer .cf-wordmark { color: var(--cf-paper); }
.cf-footer__brand > * + * { margin-top: 0.5rem; }
.cf-footer__tag,
.cf-footer__meta { font-size: 0.9375rem; }
.cf-footer__meta { text-align: right; }
.cf-footer a { color: var(--cf-paper); }
.cf-footer a:hover { color: var(--cf-accent-light); }

/* ---------- Inner pages ---------- */
.cf-page {
	padding: var(--cf-section-pad) var(--cf-gutter);
}
.cf-page > * {
	max-width: 720px;
	margin-inline: auto;
}
.cf-page h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); margin-bottom: 2rem; }
.cf-page .wp-block-post-title a { color: inherit; text-decoration: none; }
.cf-page .wp-block-post-template > li + li { margin-top: 3rem; }

/* ---------- Small screens ---------- */
@media (max-width: 781px) {
	body { font-size: 1.0625rem; line-height: 1.65; }
	.cf-split,
	.cf-hero__inner,
	.cf-founder__grid { grid-template-columns: 1fr; }
	.cf-hero__mark { display: none; }
	.cf-founder .cf-portrait { max-width: 320px; }
	.cf-card p,
	.cf-steps li { font-size: 1.0625rem; }
	.cf-main .wp-block-button__link { min-height: 48px; }
	.cf-footer__meta { text-align: left; }
}

/* ---------- Principles as rows ---------- */
.cf-rows { border-top: 1px solid var(--cf-ink-line); }
.cf-rows > .cf-card {
	display: grid;
	grid-template-columns: 4rem minmax(0, 5fr) minmax(0, 7fr);
	gap: 1.5rem;
	align-items: baseline;
	padding: 1.5rem 0;
	background: none;
	border: 0;
	border-bottom: 1px solid var(--cf-ink-line);
	border-radius: 0;
}
.cf-section--dark .cf-rows > .cf-card { background: none; }
.cf-rows > .cf-card > * + * { margin-top: 0; }
@media (max-width: 781px) {
	.cf-rows > .cf-card { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* ---------- Section intro line ---------- */
.cf-section-intro {
	font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
	color: var(--cf-muted);
	max-width: 36rem;
}

/* ---------- Grid alignment ----------
   WordPress adds a top margin to every block after the first inside a group.
   Inside these grids and columns that margin pushed later items down, so cards
   and columns started at different heights. Reset it for direct children. */
.cf-main .cf-grid > *,
.cf-main .cf-rows > *,
.cf-main .cf-pair > *,
.cf-main .cf-split > *,
.cf-main .cf-hero__inner > *,
.cf-main .cf-founder__grid > *,
.cf-main .wp-block-buttons > * {
	margin-block-start: 0;
	margin-block-end: 0;
}
