/*
 * Wow Manila base: design tokens, typography, layout primitives,
 * section headings, category colours, buttons and media frames.
 */

:root {
	/* Palette, taken from the emblem: Manila Bay at dusk. */
	--wm-dusk: #1b1538;
	--wm-dusk-2: #2a2350;
	--wm-capiz: #fbf7f1;
	--wm-capiz-2: #f4ede2;
	--wm-white: #ffffff;
	--wm-coral: #ff5b3a;
	--wm-coral-ink: #c2381d;
	--wm-mango: #ffb627;
	--wm-ink: #1b1538;
	--wm-ink-soft: #4f4a66;
	--wm-ink-on-dark: #fbf7f1;
	--wm-muted-on-dark: #b9b2cf;
	--wm-line: #e6ded2;
	--wm-line-dark: #3a3263;

	/* Section colours: label text only. All pass 4.5:1 on capiz. */
	--wm-cat-city: #c2381d;
	--wm-cat-food: #8a5a00;
	--wm-cat-travel: #0b6e69;
	--wm-cat-entertainment: #a8226a;
	--wm-cat-culture: #7a4519;
	--wm-cat-lifestyle: #4a3fb0;

	--wm-font-display: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
	--wm-font-text: "Newsreader", "Iowan Old Style", Georgia, serif;

	/* Type scale, ratio 1.25 from a 17px interface base. */
	--wm-step--1: 0.85rem;
	--wm-step-0: 1.0625rem;
	--wm-step-1: 1.33rem;
	--wm-step-2: 1.66rem;
	--wm-step-3: clamp(1.75rem, 1.4rem + 1.4vw, 2.6rem);
	--wm-step-4: clamp(2.1rem, 1.5rem + 2.6vw, 3.6rem);
	--wm-step-5: clamp(2.4rem, 1.4rem + 4.2vw, 4.6rem);

	--wm-wrap: 1240px;
	--wm-gutter: clamp(16px, 4vw, 40px);
	--wm-gap: clamp(20px, 2.6vw, 36px);
	--wm-section-space: clamp(48px, 7vw, 96px);
	--wm-radius: 2px;
}

/* ---------- Page ---------- */

body {
	background: var(--wm-capiz);
	color: var(--wm-ink);
	font-family: var(--wm-font-display);
	font-size: var(--wm-step-0);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--wm-font-display);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.1;
	color: var(--wm-ink);
	text-wrap: balance;
}

a {
	color: var(--wm-coral-ink);
	text-underline-offset: 0.18em;
	text-decoration-thickness: 1px;
}

:focus-visible {
	outline: 3px solid var(--wm-coral);
	outline-offset: 2px;
}

::selection {
	background: var(--wm-mango);
	color: var(--wm-dusk);
}

.wm-wrap {
	width: 100%;
	max-width: calc(var(--wm-wrap) + 2 * var(--wm-gutter));
	margin-inline: auto;
	padding-inline: var(--wm-gutter);
}

.wm-main {
	display: block;
}

/* ---------- Sections ---------- */

.wm-section {
	padding-block: var(--wm-section-space);
}

.wm-section + .wm-section:not(.wm-band) {
	border-top: 1px solid var(--wm-line);
}

.wm-band + .wm-section {
	border-top: 0;
}

.wm-band {
	background: var(--wm-dusk);
	color: var(--wm-ink-on-dark);
}

.wm-section__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 24px;
	margin-bottom: clamp(20px, 3vw, 36px);
}

.wm-section__title {
	margin: 0;
	font-size: var(--wm-step-3);
}

.wm-band .wm-section__title {
	color: var(--wm-ink-on-dark);
}

.wm-section__more {
	font-weight: 700;
	font-size: var(--wm-step--1);
	color: var(--wm-ink);
	text-decoration: underline;
	text-decoration-color: var(--wm-coral);
	text-decoration-thickness: 2px;
}

.wm-section__more:hover {
	color: var(--wm-coral-ink);
}

.wm-band .wm-section__more {
	color: var(--wm-ink-on-dark);
}

/* ---------- Grids ---------- */

.wm-grid {
	display: grid;
	gap: var(--wm-gap);
	grid-template-columns: 1fr;
}

@media (min-width: 640px) {
	.wm-grid--3,
	.wm-grid--4 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 960px) {
	.wm-grid--3 {
		grid-template-columns: repeat(3, 1fr);
	}

	.wm-grid--4 {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* On phones a row of cards becomes a swipeable strip. */
@media (max-width: 639px) {
	.wm-scroller {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		margin-inline: calc(-1 * var(--wm-gutter));
		padding-inline: var(--wm-gutter);
		scroll-padding-inline: var(--wm-gutter);
		scrollbar-width: none;
	}

	.wm-scroller::-webkit-scrollbar {
		display: none;
	}

	.wm-scroller > * {
		flex: 0 0 78%;
		scroll-snap-align: start;
	}
}

/* ---------- Category labels ---------- */

.wm-cat {
	font-family: var(--wm-font-display);
	font-weight: 700;
	font-size: var(--wm-step--1);
	letter-spacing: 0.01em;
	text-decoration: none;
	color: var(--wm-ink-soft);
}

a.wm-cat:hover {
	text-decoration: underline;
}

.wm-cat--manila-city-life { color: var(--wm-cat-city); }
.wm-cat--food-restaurants { color: var(--wm-cat-food); }
.wm-cat--travel-destinations { color: var(--wm-cat-travel); }
.wm-cat--entertainment-pop-culture { color: var(--wm-cat-entertainment); }
.wm-cat--filipino-culture-stories { color: var(--wm-cat-culture); }
.wm-cat--lifestyle-shopping { color: var(--wm-cat-lifestyle); }

/* On dark bands every section label is mango: the colours above are tuned for light backgrounds. */
.wm-band .wm-cat {
	color: var(--wm-mango);
}

/* ---------- Media frames: fixed ratios per role ---------- */

.wm-media {
	position: relative;
	overflow: hidden;
	background: var(--wm-dusk-2);
	aspect-ratio: 3 / 2;
}

.wm-media--wm-thumb,
.wm-media--wm-square {
	aspect-ratio: 1;
}

.wm-media--wm-portrait {
	aspect-ratio: 4 / 5;
}

.wm-media__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* No photo yet: a quiet brand panel with the skyline, never filler stock. */
.wm-media--empty {
	background:
		url("../img/emblem.svg") center / 34% no-repeat,
		var(--wm-dusk);
}

.wm-media--wm-thumb.wm-media--empty {
	background-size: 60%;
}

/* ---------- Buttons ---------- */

.wm-button,
.wp-block-button__link,
.wp-element-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 24px;
	border: 0;
	border-radius: var(--wm-radius);
	background: var(--wm-coral);
	color: var(--wm-dusk);
	font-family: var(--wm-font-display);
	font-weight: 800;
	font-size: var(--wm-step-0);
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.wm-button:hover,
.wp-block-button__link:hover,
.wp-element-button:hover {
	background: var(--wm-mango);
	color: var(--wm-dusk);
}

.wm-button:disabled {
	opacity: 0.6;
	cursor: progress;
}

/* ---------- Breadcrumbs (Rank Math) ---------- */

.wm-breadcrumbs {
	margin-bottom: 20px;
	font-size: var(--wm-step--1);
	color: var(--wm-ink-soft);
}

.wm-breadcrumbs p {
	margin: 0;
}

.wm-breadcrumbs a {
	color: var(--wm-ink-soft);
	text-decoration: none;
}

.wm-breadcrumbs a:hover {
	color: var(--wm-coral-ink);
	text-decoration: underline;
}

.wm-breadcrumbs .separator {
	margin-inline: 6px;
	color: var(--wm-line-dark);
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
