/* Brasiliving editorial styles. Tokens live in theme.json; this file holds only
   what theme.json cannot express. Grouped by purpose, mobile-first. */

/* ---------- Layout tokens ----------
   Defined in theme.json (settings.custom) so blocks and the editor share them;
   aliased here for brevity. Breakpoints used throughout this file:
   600px  small tablet / large phone landscape
   900px  tablet landscape and up: two-dimensional layouts begin
   1200px desktop: full editorial width, 1100-1240px usable
   1440px large desktop: gutters grow, width stays capped            */
:root {
	--bl-gutter: var(--wp--custom--gutter);
	--bl-gap: var(--wp--custom--gap);
	--bl-gap-lg: var(--wp--custom--gap-lg);
	--bl-content: var(--wp--custom--content-width);
	--bl-wide: var(--wp--custom--wide-width);
	--bl-rail: var(--wp--custom--rail);
	/* Distance from the viewport edge to the wide container's edge. */
	--bl-edge: max(var(--bl-gutter), (100vw - var(--bl-wide)) / 2);
}

/* Nothing overflows sideways, whatever the content. */
img, video, figure, table, pre { max-width: 100%; }
.wp-block-query, .wp-block-columns, .wp-block-column, .wp-block-group { min-width: 0; }
.bl-notes-list .wp-block-post-title, .bl-index .bl-entry h3 { overflow-wrap: break-word; }

/* ---------- Language-scoped fragments ---------- */
html:lang(de) .bl-en,
html:lang(en) .bl-de { display: none !important; }

/* ---------- Header ---------- */
.bl-brand .wp-block-site-logo img { display: block; height: auto; }
.bl-brand:has(.wp-block-site-logo img) .wp-block-site-title { display: none; }
.bl-brand .wp-block-site-title a { color: inherit; }
.bl-header { border-bottom: 2px solid var(--wp--preset--color--ink); }

.bl-nav .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
	padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
}
.bl-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 700;
	letter-spacing: -0.015em;
}
.bl-nav .bl-lang-switch .wp-block-navigation-item__content {
	font-weight: 600;
	letter-spacing: 0.08em;
	padding-left: 0.5rem;
}

/* ---------- Kickers: uppercase label above a heading ---------- */
.bl-kicker {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	margin: 0 0 0.75rem 0;
}

/* ---------- Hero ---------- */
/* Mobile: image first, then the yellow text block, no dead space.
   Desktop: text panel overlaps the image, so the composition is one piece. */
.bl-hero { position: relative; }
.bl-hero .bl-hero-media img {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	display: block;
}
.bl-hero .bl-hero-panel {
	padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
}
.bl-hero .bl-hero-panel h1 { margin: 0; }
.bl-hero .bl-hero-standfirst { margin-top: var(--wp--preset--spacing--30); max-width: 34ch; }
.bl-hero .bl-hero-meta {
	margin-top: var(--wp--preset--spacing--40);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* Tablet: the composition becomes two-dimensional, panel overlapping image. */
@media (min-width: 600px) {
	.bl-hero { display: grid; grid-template-columns: repeat(12, 1fr); align-items: end; }
	.bl-hero .bl-hero-media { grid-column: 3 / -1; grid-row: 1; }
	.bl-hero .bl-hero-media img { aspect-ratio: 3 / 2; }
	.bl-hero .bl-hero-panel {
		grid-column: 1 / 9;
		grid-row: 1;
		z-index: 2;
		margin-bottom: calc(-1 * var(--wp--preset--spacing--50));
		padding: var(--wp--preset--spacing--50);
	}
	.bl-hero .bl-hero-panel h1 { font-size: clamp(2rem, 4.4vw, 3.5rem); line-height: 1; }
	.bl-hero .bl-hero-standfirst { max-width: 38ch; }
}

/* Desktop: wider image, panel text aligned to the editorial left edge. */
@media (min-width: 900px) {
	.bl-hero .bl-hero-media { grid-column: 4 / -1; }
	.bl-hero .bl-hero-media img { aspect-ratio: 12 / 5; }
	.bl-hero .bl-hero-panel {
		grid-column: 1 / 8;
		padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--50);
		padding-left: var(--bl-edge);
		margin-bottom: calc(-1 * var(--wp--preset--spacing--60));
	}
}
@media (min-width: 1200px) {
	.bl-hero .bl-hero-media { grid-column: 5 / -1; }
	.bl-hero .bl-hero-panel { grid-column: 1 / 8; padding-right: var(--wp--preset--spacing--60); }
	.bl-hero .bl-hero-standfirst { max-width: 42ch; }
}

/* ---------- Which Brazil: editorial index, not buttons ---------- */
.bl-index { border-top: 2px solid currentColor; }
.bl-index .bl-entry {
	border-bottom: 1px solid color-mix(in srgb, currentColor 25%, transparent);
	padding: var(--wp--preset--spacing--30) 0;
	display: grid;
	grid-template-columns: 2.5rem 1fr;
	gap: 0 var(--wp--preset--spacing--30);
	align-items: baseline;
}
.bl-index .bl-entry-num {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	opacity: 0.6;
	margin: 0;
}
.bl-index .bl-entry h3 {
	margin: 0;
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
	letter-spacing: -0.01em;
}
.bl-index .bl-entry p:not(.bl-entry-num) {
	grid-column: 2;
	margin: 0.25rem 0 0 0;
	font-size: var(--wp--preset--font-size--medium);
	opacity: 0.75;
	max-width: 52ch;
}
/* Intro rail plus a 2x3 index. The WordPress columns block is overridden
   so the intro keeps a fixed rail and the index gets everything else. */
@media (min-width: 900px) {
	.bl-which {
		display: grid !important;
		grid-template-columns: minmax(14rem, var(--bl-rail)) minmax(0, 1fr);
		gap: var(--bl-gap-lg);
		align-items: start;
	}
	.bl-which > .wp-block-column { flex-basis: auto !important; width: auto; min-width: 0; }
	.bl-index {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: var(--bl-gap-lg);
	}
	.bl-index .bl-entry { padding: var(--wp--preset--spacing--40) 0; }
}
@media (min-width: 1200px) {
	.bl-which { gap: calc(var(--bl-gap-lg) * 1.25); }
	.bl-index .bl-entry { grid-template-columns: 3rem 1fr; }
	.bl-index .bl-entry h3 { font-size: clamp(1.375rem, 1.6vw, 1.75rem); }
	.bl-index .bl-entry p:not(.bl-entry-num) { max-width: 38ch; }
}

/* ---------- Places preview: one lead, two secondary ---------- */
.bl-places-preview .bl-lead .wp-block-post-featured-image img { aspect-ratio: 3 / 2; }
.bl-places-preview .bl-rest .wp-block-post-featured-image img { aspect-ratio: 4 / 3; }
@media (min-width: 900px) {
	.bl-places-preview { display: grid; grid-template-columns: 7fr 5fr; gap: var(--bl-gap-lg); align-items: start; }
	.bl-places-preview .bl-rest .wp-block-post-template { grid-template-columns: 1fr !important; gap: var(--bl-gap-lg); }
	.bl-places-preview .bl-lead .wp-block-post-title { font-size: clamp(1.75rem, 2.8vw, 2.75rem); line-height: 1.05; }
	.bl-places-preview .bl-lead .wp-block-post-excerpt { max-width: 44ch; }
}
@media (min-width: 1200px) {
	.bl-places-preview { grid-template-columns: 8fr 4fr; }
	.bl-places-preview .bl-rest .wp-block-post-featured-image img { aspect-ratio: 3 / 2; }
}

/* ---------- Field Notes preview: index list with thumbnails ---------- */
.bl-notes-list .wp-block-post-template { display: block !important; }
.bl-notes-list .wp-block-post {
	display: grid;
	grid-template-columns: 5.5rem 1fr;
	gap: var(--wp--preset--spacing--30);
	align-items: start;
	padding: var(--wp--preset--spacing--40) 0;
	border-bottom: 1px solid color-mix(in srgb, currentColor 20%, transparent);
}
.bl-notes-list .wp-block-post:first-child { border-top: 2px solid currentColor; }
.bl-notes-list .wp-block-post-featured-image { grid-row: span 3; margin: 0; }
.bl-notes-list .wp-block-post-featured-image img { aspect-ratio: 1 / 1; object-fit: cover; }
.bl-notes-list .wp-block-post-terms,
.bl-notes-list .wp-block-post-date { font-size: var(--wp--preset--font-size--small); opacity: 0.7; }
.bl-notes-list .wp-block-post-title { margin: 0.2rem 0; max-width: 40ch; }
.bl-notes-list .wp-block-post-excerpt { display: none; }
@media (min-width: 782px) {
	.bl-notes-list .wp-block-post { grid-template-columns: 9rem 1fr 12rem; column-gap: var(--wp--preset--spacing--40); }
	.bl-notes-list .wp-block-post-excerpt {
		display: block;
		grid-column: 3;
		grid-row: 1 / span 3;
		font-size: var(--wp--preset--font-size--small);
		opacity: 0.75;
		margin: 0;
	}
	.bl-notes-list .wp-block-post-excerpt__more-text { display: none; }
}
@media (min-width: 900px) {
	.bl-notes-list .wp-block-post { grid-template-columns: 11rem minmax(0, 1fr) minmax(14rem, 20rem); column-gap: var(--bl-gap-lg); }
	.bl-notes-list .wp-block-post-title { font-size: clamp(1.25rem, 1.9vw, 1.75rem); max-width: 28ch; }
}
@media (min-width: 1200px) {
	.bl-notes-list .wp-block-post { grid-template-columns: 13rem minmax(0, 1fr) 22rem; padding: var(--wp--preset--spacing--50) 0; }
	.bl-notes-list .wp-block-post-title { max-width: 34ch; }
	.bl-notes-list .wp-block-post-excerpt { font-size: var(--wp--preset--font-size--medium); max-width: 34ch; }
}

/* ---------- Status label ---------- */
.bl-status .wp-block-post-terms__separator { display: none; }
.bl-status a {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	pointer-events: none;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.bl-status a::before {
	content: "";
	display: inline-block;
	width: 0.6em;
	height: 0.6em;
	background: var(--wp--preset--color--amarelo);
	flex: none;
}

/* ---------- Related Places pills ---------- */
.bl-place-refs .wp-block-post-terms__separator { display: none; }
.bl-place-refs a {
	display: inline-block;
	margin: 0 0.5rem 0.5rem 0;
	padding: 0.35em 0.8em;
	background: var(--wp--preset--color--sand);
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}
.bl-place-refs a:hover { background: var(--wp--preset--color--amarelo); }
.bl-related:not(:has(.wp-block-post-template)) { display: none; }

/* ---------- Standfirst / subline ---------- */
.bl-subline p,
.bl-standfirst {
	font-size: var(--wp--preset--font-size--large);
	font-weight: 300;
	line-height: 1.32;
	max-width: 46ch;
}

/* ---------- Card grids (archives) ---------- */
.bl-grid .wp-block-post-template.is-layout-grid {
	grid-template-columns: repeat(auto-fill, minmax(min(19rem, 100%), 1fr)) !important;
	gap: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
}
.bl-grid .wp-block-post { display: flex; flex-direction: column; gap: 0.5rem; }
.bl-grid .wp-block-post-featured-image { margin-bottom: 0.3rem; }
.bl-grid .wp-block-post-featured-image img { aspect-ratio: 3 / 2; object-fit: cover; }
.bl-grid .wp-block-post-title { margin: 0; }
.bl-grid .wp-block-post-excerpt { margin: 0; opacity: 0.8; }
.bl-grid .wp-block-post-excerpt__more-text { display: none; }

/* Places archive: first card runs full width on desktop. */
@media (min-width: 900px) {
	.bl-places-archive .wp-block-post-template > li:first-child {
		grid-column: 1 / -1;
		display: grid;
		grid-template-columns: 7fr 5fr;
		gap: var(--wp--preset--spacing--40);
		align-items: center;
	}
	.bl-places-archive .wp-block-post-template > li:first-child .wp-block-post-featured-image {
		grid-row: 1 / span 4;
	}
	.bl-places-archive .wp-block-post-template > li:first-child .wp-block-post-featured-image img { aspect-ratio: 3 / 2; }
	.bl-places-archive .wp-block-post-template > li:first-child .wp-block-post-title { font-size: var(--wp--preset--font-size--x-large); }
}

/* ---------- Single article furniture ---------- */
.bl-article-head { max-width: 52rem; }
.bl-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.25rem;
	align-items: baseline;
	font-size: var(--wp--preset--font-size--small);
	opacity: 0.75;
}
.bl-meta .wp-block-post-terms a { text-decoration: none; font-weight: 600; }
.bl-verdict { border: 0; }
.bl-single .wp-block-post-content > h2,
.bl-single-place .wp-block-post-content > h2 {
	margin-top: var(--wp--preset--spacing--50);
	font-size: var(--wp--preset--font-size--large);
}
.bl-single .wp-block-post-content > p,
.bl-single-place .wp-block-post-content > p,
.bl-single .wp-block-post-content > ul,
.bl-single-place .wp-block-post-content > ul { max-width: var(--wp--custom--measure); }
.wp-block-pullquote {
	margin: var(--wp--preset--spacing--50) 0;
	border-left: 6px solid var(--wp--preset--color--amarelo);
	padding-left: var(--wp--preset--spacing--30);
	text-align: left;
}
.wp-block-pullquote blockquote { margin: 0; }

/* ---------- Photography ---------- */
.wp-block-image.alignfull img,
.wp-block-post-featured-image.alignfull img { width: 100%; height: auto; }
.wp-block-image figcaption,
.wp-block-post-featured-image figcaption {
	text-align: left;
	margin-top: 0.5rem;
	font-size: var(--wp--preset--font-size--small);
	opacity: 0.75;
}
.wp-block-image.alignfull figcaption { padding: 0 var(--wp--preset--spacing--40); }

/* ---------- Signup ---------- */
.bl-signup-field {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: var(--wp--preset--spacing--30);
}
.bl-signup-note { font-size: var(--wp--preset--font-size--small); opacity: 0.85; margin-top: var(--wp--preset--spacing--30); }

/* ---------- Closing section: brand statement 60 / signup 40 ---------- */
@media (min-width: 900px) {
	.bl-closer {
		display: grid !important;
		grid-template-columns: 3fr 2fr;
		gap: var(--bl-gap-lg);
		align-items: end;
	}
	.bl-closer > .wp-block-column { flex-basis: auto !important; width: auto; min-width: 0; }
	.bl-closer h2 { font-size: clamp(2.25rem, 3.6vw, 3.75rem) !important; line-height: 0.98; letter-spacing: -0.01em; hyphens: manual; }
	.bl-closer .bl-signup-note { max-width: 34ch; }
}
@media (min-width: 1200px) {
	.bl-closer { grid-template-columns: 62fr 38fr; gap: calc(var(--bl-gap-lg) * 1.5); }
}

/* ---------- Typography: German hyphenation ---------- */
:lang(de) h1, :lang(de) .has-xx-large-font-size { hyphens: manual; -webkit-hyphens: manual; }
:lang(de) h2, :lang(de) h3, :lang(de) p {
	hyphens: auto;
	-webkit-hyphens: auto;
	hyphenate-limit-chars: 14 6 6;
	-webkit-hyphenate-limit-before: 6;
	-webkit-hyphenate-limit-after: 6;
}
:lang(en) * { hyphens: manual; -webkit-hyphens: manual; }
h1, h2, .bl-index .bl-entry h3 { text-wrap: balance; }

/* ---------- Focus, motion, misc ---------- */
.wp-block-button__link { border-radius: 0; }
:focus-visible { outline: 3px solid var(--wp--preset--color--azul); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Editor parity ---------- */
.editor-styles-wrapper .bl-de,
.editor-styles-wrapper .bl-en { display: block !important; outline: 1px dashed var(--wp--preset--color--azul); }
