/*
 * WOW Paradise Philippines base: typography, layout primitives, section
 * headings, category colours, buttons, media frames and breadcrumbs.
 * Tokens live in tokens.css.
 */

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

body {
	background: var(--wpp-cream);
	color: var(--wpp-ink);
	font-family: var(--wpp-font-text);
	font-size: var(--wpp-step-0);
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

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

a {
	color: var(--wpp-blue);
	text-underline-offset: 0.18em;
	text-decoration-thickness: 1px;
}

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

::selection {
	background: var(--wpp-yellow);
	color: var(--wpp-night);
}

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

.wpp-main {
	display: block;
}

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

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

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

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

.wpp-band {
	background: var(--wpp-night);
	color: var(--wpp-ink-on-dark);
}

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

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

/* A short multicolour bunting rule under section titles */
.wpp-section__title::after {
	content: "";
	display: block;
	width: 96px;
	height: 6px;
	margin-top: 0.35rem;
	border-radius: 3px;
	background: var(--wpp-stripe);
}

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

/* "More …" links are yellow fiesta pills */
.wpp-section__more {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0 18px;
	border-radius: var(--wpp-radius-pill);
	background: var(--wpp-yellow);
	color: var(--wpp-night);
	font-family: var(--wpp-font-display);
	font-weight: 700;
	font-size: var(--wpp-step--1);
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.wpp-section__more:hover {
	background: var(--wpp-red);
	color: var(--wpp-white);
}

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

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

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

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

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

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

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

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

/* ---------- Category colours ----------
 * One accent per editorial section, from the fiesta palette, with a text
 * colour that passes 4.5:1 on it. Shared by the category pill (.wpp-cat--),
 * the section archive header (.wpp-section-) and the homepage trio columns.
 */

.wpp-cat,
.wpp-archive__header--section,
.wpp-trio__col {
	--wpp-accent: var(--wpp-sand);
	--wpp-accent-ink: var(--wpp-red-dark);
}

.wpp-cat--travel-distinations,
.wpp-section-travel-distinations {
	--wpp-accent: var(--wpp-blue);
	--wpp-accent-ink: var(--wpp-white);
}

.wpp-cat--festivals-and-events,
.wpp-section-festivals-and-events {
	--wpp-accent: var(--wpp-red);
	--wpp-accent-ink: var(--wpp-white);
}

.wpp-cat--filipino-food,
.wpp-section-filipino-food {
	--wpp-accent: var(--wpp-orange);
	--wpp-accent-ink: var(--wpp-night);
}

.wpp-cat--traditions,
.wpp-section-traditions,
.wpp-trio__col--traditions {
	--wpp-accent: var(--wpp-yellow);
	--wpp-accent-ink: var(--wpp-night);
}

.wpp-cat--folklore,
.wpp-section-folklore,
.wpp-trio__col--folklore {
	--wpp-accent: var(--wpp-purple);
	--wpp-accent-ink: var(--wpp-white);
}

.wpp-cat--cities,
.wpp-section-cities,
.wpp-trio__col--cities {
	--wpp-accent: var(--wpp-sky);
	--wpp-accent-ink: var(--wpp-night);
}

/* ---------- Category labels: coloured pills ---------- */

.wpp-cat {
	display: inline-block;
	padding: 0.15em 0.75em;
	border-radius: var(--wpp-radius-pill);
	background: var(--wpp-accent);
	color: var(--wpp-accent-ink);
	font-family: var(--wpp-font-display);
	font-weight: 700;
	font-size: var(--wpp-step--1);
	line-height: 1.5;
	letter-spacing: 0.01em;
	text-decoration: none;
}

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

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

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

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

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

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

/* No photo yet: a plain flag-blue panel with the emblem, never filler stock. */
.wpp-media--empty {
	background:
		url("../img/emblem.svg") center / 34% no-repeat,
		var(--wpp-blue);
}

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

/* ---------- Buttons: yellow fiesta pills ---------- */

.wpp-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(--wpp-radius-pill);
	background: var(--wpp-yellow);
	color: var(--wpp-night);
	font-family: var(--wpp-font-display);
	font-weight: 700;
	font-size: var(--wpp-step-0);
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.wpp-button:hover,
.wp-block-button__link:hover,
.wp-element-button:hover {
	background: var(--wpp-red);
	color: var(--wpp-white);
}

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

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

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

.wpp-breadcrumbs p {
	margin: 0;
}

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

.wpp-breadcrumbs a:hover {
	color: var(--wpp-red-dark);
	text-decoration: underline;
}

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

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