/*
Theme Name: Penguin Shoe Polish
Description: Full Site Editing theme for Penguin Shoe Polish Ltd, a Kenyan manufacturer of shoe/leather care, household and medical products. Built from the Twenty Twenty-Five scaffolding conventions.
Requires at least: 6.7
Requires PHP: 7.2
Version: 1.3.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: penguin-shoe-polish
Tags: full-site-editing, block-patterns, custom-colors, custom-logo, editor-style, featured-images, wide-blocks, block-styles
*/

/* ------------------------------------------------------------------
   Base (transcribed from the legacy <style> blocks + inline styles)
   ------------------------------------------------------------------ */
:root {
	--penguin-icon-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
	--penguin-icon-arrow-up: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19V5M6 11l6-6 6 6'/%3E%3C/svg%3E");
	--penguin-icon-phone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3h4l2 5-2.5 1.5a11 11 0 0 0 6 6L16 13l5 2v4a2 2 0 0 1-2 2A17 17 0 0 1 3 5a2 2 0 0 1 2-2z'/%3E%3C/svg%3E");
	--penguin-icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l4 4L19 7'/%3E%3C/svg%3E");
}

html {
	scroll-behavior: smooth;
}

body {
	-webkit-font-smoothing: antialiased;
	min-width: 0;
}

:focus-visible {
	outline: 2px solid #E85858;
	outline-offset: 3px;
}

input::placeholder,
textarea::placeholder {
	color: #7A7A7A;
}

h1, h2 {
	text-wrap: balance;
}

p {
	text-wrap: pretty;
}

/* The legacy sections butt directly against each other; WordPress would
   otherwise insert the global blockGap between template parts and between
   the sections inside <main>. Since 1.3.0 those sections are page content, inside the Landing
   templates' post-content block (.penguin-sections), so the same reset applies there. */
.wp-site-blocks > * + * {
	margin-block-start: 0 !important;
}

main.wp-block-group > * + *,
.penguin-sections > * + * {
	margin-block-start: 0 !important;
}

/* Utility: max-widths the legacy site used on text columns. Apply these to
   heading/paragraph children of a vertical flex Group (not to a direct child
   of a constrained Group, which WordPress would centre). */
.penguin-maxw-280 { max-width: 280px; }
.penguin-maxw-520 { max-width: 520px; }
.penguin-maxw-540 { max-width: 540px; }
.penguin-maxw-620 { max-width: 620px; }
.penguin-maxw-640 { max-width: 640px; }
.penguin-maxw-680 { max-width: 680px; }
.penguin-maxw-720 { max-width: 720px; }
.penguin-maxw-760 { max-width: 760px; }
.penguin-maxw-820 { max-width: 820px; }

/* Legacy line-heights for body copy variants. */
.penguin-lh-16 { line-height: 1.6; }
.penguin-lh-165 { line-height: 1.65; }

/* ------------------------------------------------------------------
   Motion (legacy keyframes: rise / hero-in / reveal)
   ------------------------------------------------------------------ */
@keyframes penguin-rise {
	from { opacity: 0; transform: translateY(22px); }
	to   { opacity: 1; transform: none; }
}

.hero-in { animation: penguin-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.d1 { animation-delay: 0.05s; }
.d2 { animation-delay: 0.15s; }
.d3 { animation-delay: 0.25s; }
.d4 { animation-delay: 0.35s; }
.d5 { animation-delay: 0.45s; }
.hero-art { animation: penguin-rise 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.25s both; }

@supports (animation-timeline: view()) {
	.reveal {
		animation: penguin-rise 1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
		animation-timeline: view();
		animation-range: entry 0% entry 30%;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
}

/* ------------------------------------------------------------------
   Eyebrow label + red section rule
   ------------------------------------------------------------------ */
.penguin-eyebrow {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #E85858;
}

.penguin-eyebrow::before {
	content: "";
	width: 28px;
	height: 2px;
	background: #E02020;
	flex: 0 0 auto;
}

/* 40x3 red rule above section headings (legacy <span aria-hidden>). Used on
   vertical flex Groups, where the pseudo-element is a flex item and the
   Group's gap provides the spacing. */
.penguin-rule::before {
	content: "";
	display: block;
	width: 40px;
	height: 3px;
	border-radius: 2px;
	background: #E02020;
	flex: 0 0 auto;
}

/* Links that should take the surrounding text colour (muted email links). */
.penguin-link-inherit a {
	color: inherit;
}

.penguin-link-inherit a:hover {
	color: #FFFFFF;
}

/* Hero feature checks. */
.penguin-checks {
	font-size: 14px;
	font-weight: 600;
	color: #A8A8A8;
}

.penguin-check {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
}

.penguin-check::before {
	content: "";
	width: 16px;
	height: 16px;
	flex: 0 0 auto;
	background-color: #E85858;
	-webkit-mask: var(--penguin-icon-check) no-repeat center / contain;
	mask: var(--penguin-icon-check) no-repeat center / contain;
}

/* ------------------------------------------------------------------
   Announcement bar + header
   ------------------------------------------------------------------ */
.penguin-topbar {
	font-size: 13px;
	font-weight: 500;
}

.penguin-topbar__note {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
}

.penguin-topbar__note::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #E02020;
	flex: 0 0 auto;
}

.penguin-header .wp-block-button__link {
	height: 48px;
	padding: 0 22px;
}

/* Legacy hero <section> clips its 140%-wide radial glow. */
.penguin-hero {
	overflow: hidden;
}

.penguin-logo img {
	display: block;
	height: 44px;
	width: auto;
}

.penguin-nav .wp-block-navigation__container {
	gap: 8px 32px;
}

.penguin-nav .wp-block-navigation-item__content {
	position: relative;
	color: #A8A8A8;
	text-decoration: none;
	transition: color 0.2s ease;
}

.penguin-nav .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -6px;
	height: 2px;
	background: #E02020;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.25s ease;
}

.penguin-nav .wp-block-navigation-item__content:hover,
.page-slug-home .penguin-nav .nav-home .wp-block-navigation-item__content,
.page-slug-products .penguin-nav .nav-products .wp-block-navigation-item__content,
.page-slug-about .penguin-nav .nav-about .wp-block-navigation-item__content,
.page-slug-request-a-quote .penguin-nav .nav-contact .wp-block-navigation-item__content {
	color: #FFFFFF;
}

.penguin-nav .wp-block-navigation-item__content:hover::after,
.page-slug-home .penguin-nav .nav-home .wp-block-navigation-item__content::after,
.page-slug-products .penguin-nav .nav-products .wp-block-navigation-item__content::after,
.page-slug-about .penguin-nav .nav-about .wp-block-navigation-item__content::after,
.page-slug-request-a-quote .penguin-nav .nav-contact .wp-block-navigation-item__content::after {
	transform: scaleX(1);
}

/* ------------------------------------------------------------------
   Mobile menu (ADR-0011)
   ------------------------------------------------------------------
   The legacy site had no hamburger: below ~750px its header simply wrapped
   onto three lines. Here the header becomes a two-column grid — logo left,
   toggle hard right on the same row — and the navigation and the header's
   call-to-action button drop into full-width rows beneath it, shown only
   while penguin/nav-toggle has set data-menu-open on the header.

   No wrapper element is introduced: grid places the existing siblings into
   rows directly, so the desktop markup and layout are untouched and the
   whole of this section lives behind one media query.

   `.is-enhanced` is added by the block's view script, so with JavaScript off
   the header keeps its original wrapping layout, where every link and the
   button are visible without a toggle at all. */

@media (max-width: 781px) {
	.penguin-header.is-enhanced > .wp-block-group {
		display: grid;
		grid-template-columns: 1fr auto;
		align-items: center;
		column-gap: 16px;
		row-gap: 0;
	}

	.penguin-header.is-enhanced > .wp-block-group > .penguin-logo {
		grid-row: 1;
		grid-column: 1;
	}

	.penguin-header.is-enhanced > .wp-block-group > .penguin-nav-toggle {
		display: inline-flex;
		grid-row: 1;
		grid-column: 2;
		justify-self: end;
	}

	.penguin-header.is-enhanced > .wp-block-group > .penguin-nav,
	.penguin-header.is-enhanced > .wp-block-group > .wp-block-buttons {
		grid-column: 1 / -1;
		display: none;
	}

	.penguin-header.is-enhanced[data-menu-open="true"] > .wp-block-group > .penguin-nav {
		display: block;
		margin-top: 8px;
		border-top: 1px solid #2C2C2C;
		animation: penguin-menu-in 0.22s ease both;
	}

	.penguin-header.is-enhanced[data-menu-open="true"] > .wp-block-group > .wp-block-buttons {
		display: flex;
		margin-top: 14px;
		padding-bottom: 4px;
		animation: penguin-menu-in 0.28s ease both;
	}

	/* Links stack and become full-width rows with real tap targets. */
	.penguin-header.is-enhanced[data-menu-open="true"] .penguin-nav .wp-block-navigation__container {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.penguin-header.is-enhanced[data-menu-open="true"] .penguin-nav .wp-block-navigation-item {
		width: 100%;
		border-bottom: 1px solid #1F1F1F;
	}

	/* The CTA below is its own visual break; a divider above it reads as a
	   stray line. */
	.penguin-header.is-enhanced[data-menu-open="true"] .penguin-nav .wp-block-navigation-item:last-child {
		border-bottom: 0;
	}

	.penguin-header.is-enhanced[data-menu-open="true"] .penguin-nav .wp-block-navigation-item__content {
		display: block;
		width: 100%;
		padding: 14px 2px;
		font-size: 16px;
	}

	/* The sliding underline is a desktop hover affordance; in a stacked list it
	   would sit under the row divider. Current page is shown by colour alone. */
	.penguin-header.is-enhanced[data-menu-open="true"] .penguin-nav .wp-block-navigation-item__content::after {
		display: none;
	}

	/* The CTA fills the panel's width rather than sitting as a lone pill. */
	.penguin-header.is-enhanced[data-menu-open="true"] > .wp-block-group > .wp-block-buttons,
	.penguin-header.is-enhanced[data-menu-open="true"] > .wp-block-group > .wp-block-buttons > .wp-block-button {
		width: 100%;
	}

	.penguin-header.is-enhanced[data-menu-open="true"] > .wp-block-group > .wp-block-buttons .wp-block-button__link {
		width: 100%;
		justify-content: center;
	}
}

@keyframes penguin-menu-in {
	from {
		opacity: 0;
		transform: translateY(-6px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.penguin-header.is-enhanced[data-menu-open="true"] > .wp-block-group > .penguin-nav,
	.penguin-header.is-enhanced[data-menu-open="true"] > .wp-block-group > .wp-block-buttons {
		animation: none;
	}
}

/* ------------------------------------------------------------------
   Cards, tiles and placeholder boxes built from core blocks
   ------------------------------------------------------------------ */
/* Card-style Group (bg card, 1px border, radius 18, lift on hover). */
.penguin-card {
	transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}

.penguin-card:hover {
	transform: translateY(-6px);
	border-color: #4A4A4A !important;
	box-shadow: 0 26px 50px rgba(0, 0, 0, 0.55);
}

/* About page "What we make" category cards. */
.penguin-cat-card {
	position: relative;
	overflow: hidden;
}

.penguin-cat-card__media {
	height: 260px;
	background: #242424;
	border-bottom: 1px solid #2C2C2C;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 24px;
	box-sizing: border-box;
	color: #A8A8A8;
	font-size: 13px;
	font-weight: 700;
	text-align: center;
}

.penguin-cat-card__media .wp-block-image,
.penguin-cat-card__media figure {
	margin: 0;
}

.penguin-cat-card__media img {
	display: block;
	height: 212px;
	width: auto;
	max-width: 100%;
	object-fit: contain;
	filter: drop-shadow(0 16px 20px rgba(0, 0, 0, 0.55));
	transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.penguin-cat-card:hover img {
	transform: scale(1.06) translateY(-4px);
}

.penguin-cat-card__media p {
	margin: 0;
}

.penguin-cat-card__foot {
	padding: 18px 22px;
}

.penguin-cat-card__title {
	margin: 0;
	font-family: "Bricolage Grotesque", "Archivo", system-ui, sans-serif;
	font-weight: 700;
	font-size: 20px;
	letter-spacing: -0.02em;
}

.penguin-cat-card__title a {
	color: #FFFFFF;
	text-decoration: none;
}

/* The whole legacy card was a link: stretch the title link over the card. */
.penguin-cat-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.penguin-cat-card__count {
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	color: #A8A8A8;
	white-space: nowrap;
}

/* Dashed "awaiting content" box (factory photo / map). */
.penguin-placeholder {
	aspect-ratio: 4 / 3;
	border-radius: 20px;
	background: #1C1C1C;
	border: 1.5px dashed #4A4A4A;
	color: #A8A8A8;
	text-align: center;
	padding: 32px;
	box-sizing: border-box;
	width: 100%;
}

.penguin-placeholder > * {
	margin: 0;
}

.penguin-placeholder__label {
	font-weight: 800;
	color: #FFFFFF;
	letter-spacing: 0.04em;
}

.penguin-placeholder__sub {
	font-size: 14px;
	max-width: 280px;
	line-height: 1.5;
}

/* "Also manufactured by Penguin" / "Need a product" info bars. */
.penguin-bar p {
	margin: 0;
}

/* Quote page sidebar: big phone number. */
.penguin-phone-xl a {
	display: inline-block;
	font-family: "Bricolage Grotesque", "Archivo", system-ui, sans-serif;
	font-weight: 800;
	font-size: 32px;
	letter-spacing: -0.02em;
	line-height: 1.1;
	color: #FFFFFF;
	text-decoration: none;
}

/* ------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------ */
.penguin-footer {
	font-size: 15px;
}

/* Legacy: flex-wrap row; brand 2 1 280px (max 360), columns 1 1 160/160/220. */
.penguin-footer__cols {
	display: flex;
	flex-wrap: wrap;
	gap: 40px 56px;
}

/* The Group is a flow layout to WordPress, which would add blockGap margins
   between the columns; the flex gap above is the only spacing we want. */
.penguin-footer__cols > * {
	margin-block-start: 0 !important;
}

.penguin-footer__brand {
	flex: 2 1 280px;
	max-width: 360px;
	min-width: 0;
}

.penguin-footer__col {
	flex: 1 1 160px;
	min-width: 0;
}

.penguin-footer__col--contact {
	flex: 1 1 220px;
}

.penguin-footer__col > *,
.penguin-footer__brand > * {
	margin: 0;
}

.penguin-footer__heading {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #FFFFFF;
}

.penguin-footer__brand p {
	line-height: 1.6;
}

.penguin-footer a.penguin-foot-link {
	display: block;
	color: #A8A8A8;
	text-decoration: none;
	transition: color 0.2s ease, padding-left 0.2s ease;
}

.penguin-footer a.penguin-foot-link:hover {
	color: #FFFFFF;
	padding-left: 4px;
}

.penguin-footer a.penguin-foot-phone {
	color: #FFFFFF;
	font-weight: 700;
	text-decoration: none;
}

.penguin-footer__bottom {
	font-size: 13px;
}

.penguin-footer__bottom p {
	margin: 0;
}

/* Back-to-top arrow link (muted, up arrow, matches legacy footer). */
.penguin-footer .is-style-arrow-link .wp-block-button__link {
	color: #A8A8A8;
	font-size: 13px;
	font-weight: 400;
	gap: 6px;
}

.penguin-footer .is-style-arrow-link .wp-block-button__link::after {
	width: 14px;
	height: 14px;
	background-color: currentColor;
	-webkit-mask-image: var(--penguin-icon-arrow-up);
	mask-image: var(--penguin-icon-arrow-up);
}

/* Legacy per-page footer variants: products + quote pages had no "Back to top",
   and the quote page footer carried a top border. */
.page-slug-products .penguin-footer__totop,
.page-slug-request-a-quote .penguin-footer__totop {
	display: none;
}

.page-slug-request-a-quote .penguin-footer {
	border-top: 1px solid #2C2C2C;
}

/* ------------------------------------------------------------------
   "Who we supply" section (Home): intro column + audience panel.
   Reuses the penguin/icon-tile-grid "tile" variant, laid out as an
   even 2-column grid of horizontal tiles with a short description.
   ------------------------------------------------------------------ */
.penguin-audience__label {
	margin: 0;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #A8A8A8;
}

.penguin-audience__label.is-spaced {
	margin-top: 16px !important;
	padding-top: 24px;
	border-top: 1px solid #2C2C2C;
}

.penguin-audience__grid.is-variant-tile {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.penguin-audience__grid.is-variant-tile .penguin-icon-tile {
	flex-direction: row;
	align-items: flex-start;
	gap: 14px;
	padding: 18px;
	background: #0F0F0F;
}

.penguin-audience__grid .penguin-icon-tile__body {
	gap: 4px;
	padding-top: 2px;
}

.penguin-audience__grid .penguin-icon-tile__text {
	font-size: 14px;
	line-height: 1.5;
}

.penguin-audience__note a {
	color: #FFFFFF;
	font-weight: 600;
	text-decoration: none;
	border-bottom: 1px solid #E02020;
}

.penguin-audience__note a:hover {
	color: #E85858;
}

@media (min-width: 782px) {
	.penguin-audience__intro {
		position: sticky;
		top: 120px;
		align-self: flex-start;
	}
}

@media (max-width: 600px) {
	.penguin-audience__panel {
		padding: 20px !important;
	}

	.penguin-audience__grid.is-variant-tile {
		grid-template-columns: minmax(0, 1fr);
	}

	.penguin-audience__grid.is-variant-tile .penguin-icon-tile {
		padding: 16px;
	}
}
