/*
 * Layouts for the seeded pages (seed/*.php), the automation marketplace,
 * the glossary, the blog article and the cookie bar.
 *
 * Two visual generations exist on the reference site and both are kept:
 *  - the current one (Golos Text, light headings) lives in landing.css;
 *  - the older "v1" template (Noto Sans bold headings, #3182ce buttons,
 *    140px section rhythm) is scoped under .gl-v1 here. Measurements are in
 *    docs/design-system.md.
 */

:root {
	--gl-v1-ink: #1a202c;
	--gl-v1-text: #2d3748;
	--gl-v1-muted: #4a5568;
	--gl-v1-btn: #3182ce;
	--gl-v1-btn-hover: #2b6cb0;
	--gl-v1-tint: rgba(219, 231, 255, 0.3);
	--gl-v1-soft: #f7fafc;
	--gl-v1-dark: #212429;
	--gl-v1-card-shadow: 0 3px 12px rgba(70, 115, 152, 0.1);
	--gl-container: 1140px;
	--gl-container-wide: 1250px;
	--gl-gutter: 24px;
}

/* ---------- shared section scaffolding ---------- */

.gl-main > .wp-block-post-content > * + * {
	margin-block-start: 0;
}

.gl-section {
	padding: 80px var(--gl-gutter);
}

.gl-section > .gl-container {
	max-width: var(--gl-container);
	margin-inline: auto;
}

/* Components set their own spacing; drop core's flow-layout gaps inside them. */
.gl-section :where(.is-layout-flow, .is-layout-constrained) > *,
.gl-section .wp-block-column > * {
	margin-block-start: 0;
}

.gl-section .wp-block-columns {
	margin-block: 0;
}

.gl-section.is-wide > .gl-container {
	max-width: var(--gl-container-wide);
}

.gl-section.is-narrow > .gl-container {
	max-width: 720px;
}

.gl-section.is-pad-xl {
	padding-block: 140px;
}

.gl-section.is-pad-top-xl {
	padding-top: 140px;
}

.gl-section.is-pad-bottom-xl {
	padding-bottom: 140px;
}

.gl-section.is-tint {
	background: var(--gl-v1-tint);
}

.gl-section.is-soft {
	background: var(--gl-v1-soft);
}

.gl-section.is-dark {
	background: var(--gl-v1-dark);
	color: #fff;
}

.gl-center {
	text-align: center;
}

.gl-center .wp-block-buttons {
	justify-content: center;
}

/* ---------- v1 typography and buttons ---------- */

.gl-v1 {
	font-family: var(--wp--preset--font-family--noto);
	color: var(--gl-v1-text);
	font-size: 16px;
	line-height: 1.5;
}

.gl-v1 :is(h1, h2, h3) {
	font-family: var(--wp--preset--font-family--noto);
	font-weight: 700;
	letter-spacing: normal;
	color: var(--gl-v1-ink);
	margin: 0 0 16px;
}

.gl-v1 h1 {
	font-size: 42px;
	line-height: 46px;
	margin-bottom: 24px;
}

.gl-v1 h2 {
	font-size: 32px;
	line-height: 48px;
}

.gl-v1 h3 {
	font-size: 21px;
	line-height: 31.5px;
}

.gl-v1.is-dark h2 {
	color: #fff;
}

.gl-v1 p {
	margin: 0 0 32px;
}

.gl-v1 .wp-block-buttons {
	gap: 12px;
}

.gl-v1 .wp-block-button__link {
	min-width: 140px;
	padding: 7.2px 18px;
	border-radius: 8px;
	border: 0;
	background: var(--gl-v1-btn);
	color: #f7fafc;
	font-family: var(--wp--preset--font-family--noto);
	font-size: 18px;
	font-weight: 400;
	line-height: 28.8px;
	text-align: center;
	transition: background-color 0.2s ease;
}

.gl-v1 .wp-block-button__link:hover,
.gl-v1 .wp-block-button__link:focus-visible {
	background: var(--gl-v1-btn-hover);
	color: #fff;
}

.gl-v1 .wp-block-button__link:focus-visible {
	outline: 2px solid var(--gl-v1-btn);
	outline-offset: 3px;
}

/* ---------- v1 two-column rows ---------- */

.gl-v1 .gl-row {
	gap: 32px;
	margin: 0;
}

.gl-v1 .gl-row > .wp-block-column {
	flex-basis: 50%;
}

.gl-v1 .gl-hero .gl-row > .wp-block-column:first-child {
	padding: 32px;
}

.gl-v1 .gl-row .wp-block-image {
	margin: 0;
	text-align: center;
}

.gl-v1 .gl-row .wp-block-image img {
	width: 100%;
	max-width: 550px;
	height: auto;
}

.gl-v1 .gl-hero .wp-block-image img {
	max-width: 475px;
}

/* ---------- pills ---------- */

.gl-pill {
	display: inline-block;
	margin: 0 0 16px !important;
	padding: 6px 14px;
	border: 2px solid var(--gl-pill, #8b5cf6);
	border-radius: 20px;
	background: #fff;
	color: var(--gl-v1-ink);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.4;
}

.gl-pill.is-purple { --gl-pill: #8b5cf6; }
.gl-pill.is-green { --gl-pill: #4ade80; }
.gl-pill.is-orange { --gl-pill: #fb923c; }
.gl-pill.is-teal { --gl-pill: #5eead4; }
.gl-pill.is-blue { --gl-pill: #60a5fa; }

/* ---------- v1 cards ---------- */

.gl-cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

.gl-card {
	padding: 32px 40px;
	border-radius: 15px;
	background: #fff;
	box-shadow: var(--gl-v1-card-shadow);
}

.gl-card .wp-block-image {
	margin: 0 0 16px;
}

.gl-card .wp-block-image img {
	width: 60px;
	height: 60px;
}

.gl-v1 .gl-card h3 {
	margin-bottom: 12px;
}

.gl-v1 .gl-card p {
	margin: 0;
	color: var(--gl-v1-muted);
}

/* ---------- highlight statement (quote card) ---------- */

.gl-section.is-quote > .gl-container {
	max-width: 1200px;
}

.gl-quote {
	padding: 40px 70px;
	border-radius: 32px;
	background: #f3f7fd;
}

.gl-quote .wp-block-image {
	margin: 0 0 4px;
}

.gl-quote .wp-block-image img {
	width: 43px;
	height: auto;
}

.gl-v1 .gl-quote p {
	margin: 0;
	color: var(--gl-v1-text);
	font-size: 20px;
	font-weight: 700;
	line-height: 24px;
}

.gl-quote a {
	color: var(--wp--preset--color--primary);
	text-decoration: none;
}

/* ---------- dark CTA band ---------- */

.gl-v1.is-dark h2 {
	padding-bottom: 16px;
	margin: 0;
}

/* ---------- explore other platforms ---------- */

.gl-explore {
	padding-block: 104px;
}

.gl-v1 .gl-explore-title {
	margin: 0 0 32px;
	font-size: 32px;
	font-weight: 700;
	line-height: 1.35;
	text-align: center;
}

.gl-chips {
	display: grid;
	grid-template-columns: repeat(4, 180px);
	justify-content: center;
	gap: 16px 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gl-chips a {
	display: block;
	padding: 4.76px 13.4px;
	border: 1px solid rgba(113, 128, 150, 0.6);
	border-radius: 10px;
	background: var(--gl-v1-soft);
	color: var(--gl-v1-ink);
	font-size: 14.4px;
	font-weight: 700;
	line-height: 23px;
	text-align: center;
	text-decoration: none;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.gl-chips a:hover,
.gl-chips a:focus-visible {
	border-color: var(--gl-v1-btn);
	color: var(--gl-v1-btn);
}

/* ---------- plain FAQ (headings + answers, all expanded) ---------- */

.gl-v1 .gl-faq-plain h2 {
	margin-bottom: 16px;
	text-align: center;
}

.gl-v1 .gl-faq-plain h3 {
	margin: 32px 0 16px;
	font-size: 24px;
	line-height: 36px;
}

.gl-v1 .gl-faq-plain p {
	margin: 0 0 24px;
}

.gl-v1 .gl-faq-plain ul {
	margin: 0 0 24px;
	padding-left: 32px;
}

.gl-v1 .gl-faq-plain li {
	margin-bottom: 8px;
}

/* ---------- responsive (reference keeps 2 columns down to 768px) ---------- */

@media (max-width: 1024px) {
	.gl-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 781px) {
	.gl-section.is-pad-xl,
	.gl-section.is-pad-top-xl {
		padding-top: 80px;
	}

	.gl-section.is-pad-xl,
	.gl-section.is-pad-bottom-xl {
		padding-bottom: 80px;
	}

	.gl-v1 .gl-row {
		flex-wrap: wrap !important;
	}

	.gl-v1 .gl-row > .wp-block-column {
		flex-basis: 100% !important;
	}

	.gl-v1 .gl-hero .gl-row > .wp-block-column:first-child {
		padding: 0;
	}

	.gl-cards {
		grid-template-columns: 1fr;
	}

	.gl-quote {
		padding: 32px 24px;
	}

	.gl-chips {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* ---------- cookie consent bar ---------- */

.gl-consent {
	position: fixed;
	inset: auto 0 0;
	z-index: 9999;
	background: #fff;
	box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.12);
	font-family: var(--wp--preset--font-family--noto);
	color: #212121;
}

.gl-consent[hidden] {
	display: none;
}

.gl-consent__bar {
	display: flex;
	align-items: center;
	gap: 24px;
	max-width: 1440px;
	margin: 0 auto;
	padding: 16px 24px;
}

.gl-consent__text {
	flex: 1;
	font-size: 12px;
	line-height: 1.5;
}

.gl-consent__text p {
	margin: 0;
}

.gl-consent__title {
	margin-bottom: 8px !important;
	font-size: 14px;
	font-weight: 700;
}

.gl-consent__text a {
	color: #1863dc;
}

.gl-consent__actions {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
}

.gl-consent__btn {
	min-width: 96px;
	padding: 8px 14px;
	border: 2px solid #1863dc;
	border-radius: 2px;
	background: #1863dc;
	color: #fff;
	font: 500 12px/1.2 var(--wp--preset--font-family--noto);
	cursor: pointer;
}

.gl-consent__btn.is-outline {
	background: transparent;
	color: #1863dc;
}

.gl-consent__btn:focus-visible {
	outline: 2px solid #1a202c;
	outline-offset: 2px;
}

.gl-consent__panel {
	display: grid;
	gap: 12px;
	max-width: 1440px;
	margin: 0 auto;
	padding: 0 24px 16px;
	font-size: 13px;
}

.gl-consent__panel[hidden] {
	display: none;
}

.gl-consent__cat {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

.gl-consent__panel .gl-consent__btn {
	justify-self: start;
}

@media (max-width: 781px) {
	.gl-consent__bar {
		flex-direction: column;
		align-items: stretch;
	}

	.gl-consent__actions {
		flex-wrap: wrap;
	}

	.gl-consent__btn {
		flex: 1;
		padding-block: 12px;
	}

	/* Accept first and full width on phones, as on the reference */
	.gl-consent__btn[data-consent="accept"] {
		order: -1;
		flex-basis: 100%;
	}
}

/* ---------- automation marketplace grid ---------- */

.gl-market__chips {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-bottom: 32px;
}

.gl-chip {
	padding: 6px 16px;
	border: 1px solid #d5dce8;
	border-radius: 999px;
	background: #fff;
	color: var(--gl-v1-text);
	font: 500 14px/1.4 var(--wp--preset--font-family--noto);
	cursor: pointer;
}

.gl-chip.is-active,
.gl-chip:hover {
	border-color: var(--wp--preset--color--button);
	background: var(--wp--preset--color--button);
	color: #fff;
}

.gl-chip:focus-visible {
	outline: 2px solid var(--wp--preset--color--button);
	outline-offset: 2px;
}

.gl-market__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gl-market__item[hidden] {
	display: none;
}

.gl-market__card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	height: 100%;
	padding: 24px;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	background: #fff;
	color: var(--gl-v1-text);
	text-decoration: none;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.gl-market__card:hover,
.gl-market__card:focus-visible {
	box-shadow: var(--gl-v1-card-shadow);
	transform: translateY(-2px);
}

.gl-market__name {
	color: var(--gl-v1-ink);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.35;
}

.gl-market__summary {
	font-size: 14px;
	line-height: 1.55;
}

.gl-platform-icon {
	width: 56px;
	height: 56px;
	border-radius: 14px;
}

@media (max-width: 1024px) {
	.gl-market__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.gl-market__grid {
		grid-template-columns: 1fr;
	}
}

/* ---------- automation template card (single template hero) ---------- */

.gl-auto-card {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px 20px;
	border-radius: 12px;
	background: #f4f8fe;
}

.gl-auto-card__body {
	flex: 1;
}

.gl-auto-card__title {
	margin: 0 0 8px !important;
	color: var(--gl-v1-ink);
	font-size: 24px;
	font-weight: 700;
	line-height: 1.3;
}

.gl-auto-card__summary {
	margin: 0 !important;
	font-size: 14px;
	line-height: 1.6;
}

.gl-btn {
	display: inline-block;
	padding: 10px 22px;
	border-radius: 4px;
	background: var(--wp--preset--color--button);
	color: #fff;
	font-weight: 500;
	text-decoration: none;
}

.gl-btn--sm {
	padding: 4px 10px;
	font-size: 13px;
	box-shadow: 0 2px 6px rgba(3, 110, 253, 0.35);
}

.gl-btn:hover,
.gl-btn:focus-visible {
	background: var(--wp--preset--color--primary-hover);
	color: #fff;
}

@media (max-width: 600px) {
	.gl-auto-card {
		flex-wrap: wrap;
	}
}

/* ---------- glossary A–Z index ---------- */

.gl-az {
	position: sticky;
	top: 80px;
	z-index: 2;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	padding: 12px 0;
	background: #fff;
}

.gl-az a,
.gl-az span {
	display: inline-grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 8px;
	font-weight: 600;
}

.gl-az a {
	background: var(--wp--preset--color--tint);
	color: var(--wp--preset--color--button);
	text-decoration: none;
}

.gl-az a:hover,
.gl-az a:focus-visible {
	background: var(--wp--preset--color--button);
	color: #fff;
}

.gl-az span {
	color: #cbd5e0;
}

.gl-az-group {
	scroll-margin-top: 150px;
	padding: 24px 0;
	border-bottom: 1px solid #edf2f7;
}

.gl-az-group h2 {
	margin: 0 0 12px;
	font-size: 28px;
}

.gl-az-group ul {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 8px 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gl-az-group a {
	color: var(--gl-v1-text);
	text-decoration: none;
}

.gl-az-group a:hover,
.gl-az-group a:focus-visible {
	color: var(--wp--preset--color--button);
	text-decoration: underline;
}

/* ---------- forms ---------- */

/* Honeypot field from inc/forms.php: off-screen, not display:none, so bots still fill it. */
.gl-hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---------- footer bottom bar (copyright left, legal links right) ---------- */

.geelark-footer-bottom {
	max-width: var(--wp--style--global--wide-size);
	margin: 24px auto 0;
	padding-top: 12px;
	border-top: 1px solid #edf2f7;
}

.geelark-footer-bottom p {
	margin: 0;
}

.geelark-footer-legal a {
	margin-left: 16px;
	color: #777;
	font-size: 12px;
	text-decoration: none;
}

.geelark-footer-legal a:hover,
.geelark-footer-legal a:focus-visible {
	color: var(--wp--preset--color--primary);
	text-decoration: underline;
}

/* Desktop header is 80px tall on the reference (block padding sets 0.75rem for all widths). */
@media (min-width: 1240px) {
	header.geelark-header {
		padding-block: 21.5px !important;
	}
}
