/*
Theme Name: Pizza Mansion
Theme URI: https://www.merisign.com/
Author: Merisign
Author URI: https://www.merisign.com/
Description: Lightweight landing-page theme for Pizza Mansion. Pulls the next drop and store links from the Pizza Mansion - Ordering plugin when it is active. Editable copy via Secure Custom Fields (optional).
Version: 1.1.4
Requires at least: 6.4
Requires PHP: 8.1
License: GPL-2.0-or-later
Text Domain: pizza-mansion
*/

/* ---------- Fonts (self-hosted, SIL OFL) ---------- */
@font-face {
	font-family: "Fraunces";
	src: url("assets/fonts/fraunces-latin-full-normal.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "DM Sans";
	src: url("assets/fonts/dm-sans-latin-400-normal.woff2") format("woff2");
	font-weight: 400;
	font-display: swap;
}
@font-face {
	font-family: "DM Sans";
	src: url("assets/fonts/dm-sans-latin-500-normal.woff2") format("woff2");
	font-weight: 500;
	font-display: swap;
}
@font-face {
	font-family: "DM Sans";
	src: url("assets/fonts/dm-sans-latin-700-normal.woff2") format("woff2");
	font-weight: 700;
	font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
	--pm-sauce: #B93C26;
	--pm-crust: #E3A23B;
	--pm-crust-dark: #B86E1F;
	--pm-cheese: #F6D78A;
	--pm-basil: #4E6B3A;
	--pm-flour: #FBF3E4;
	--pm-espresso: #2A1D17;
	--pm-muted: #6B5A50;
	--pm-muted-dark: #C2B2A2;
	--pm-line: #E6D9C2;
	--pm-wrap: 1180px;
	--pm-display: "Fraunces", Georgia, serif;
	--pm-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
	margin: 0;
	font-family: var(--pm-body);
	color: var(--pm-espresso);
	background: var(--pm-flour);
	-webkit-font-smoothing: antialiased;
	line-height: 1.5;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--pm-espresso); }
a:hover { color: var(--pm-sauce); }
:focus-visible { outline: 3px solid var(--pm-espresso); outline-offset: 3px; border-radius: 6px; }
.pm-disp {
	font-family: var(--pm-display);
	font-variation-settings: "SOFT" 100, "WONK" 1;
}
.pm-wrap { max-width: var(--pm-wrap); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.pm-skip:focus {
	position: fixed; left: 16px; top: 16px; z-index: 100; width: auto; height: auto; clip: auto;
	background: var(--pm-espresso); color: var(--pm-flour); padding: 10px 16px; border-radius: 999px;
}

/* ---------- Textures ---------- */
.pm-paper-color {
	background-image: url("assets/img/paper-color.png");
	background-repeat: repeat;
	background-size: 600px 600px;
}
.pm-paper-light {
	background-image: url("assets/img/paper-light.png");
	background-repeat: repeat;
	background-size: 600px 600px;
}

/* ---------- Page shell ---------- */
.pm-site { min-height: 100vh; display: flex; flex-direction: column; }
.pm-main { flex: 1 0 auto; }

/* ---------- Header ---------- */
.pm-header {
	position: sticky; top: 0; z-index: 50;
	background-color: var(--pm-crust);
	transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s;
}
.pm-header.is-scrolled { box-shadow: 0 6px 18px -12px rgba(42, 29, 23, 0.45); }
.pm-header.is-hidden { transform: translateY(calc(-100% - 24px)); }
.admin-bar .pm-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .pm-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .pm-header { top: 0; } }
.pm-header__inner {
	display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
	padding-top: 5px; padding-bottom: 5px;
}
.pm-header__logo { display: flex; }
.pm-header__logo img { width: 80px; height: 80px; object-fit: contain; }
.pm-nav { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.pm-nav a {
	font-size: 13px; font-weight: 700; text-decoration: none;
	text-transform: uppercase; letter-spacing: 0.1em;
}
.pm-nav a.pm-btn-pill {
	display: inline-flex; align-items: center; height: 44px; padding: 0 20px;
	border-radius: 999px; background: var(--pm-espresso); color: var(--pm-flour);
}
.pm-nav a.pm-btn-pill:hover { color: var(--pm-cheese); }

/* ---------- Hero ---------- */
.pm-hero { background-color: var(--pm-crust); background-position: 0 -90px; }
.pm-hero__inner {
	display: flex; flex-wrap: wrap; align-items: center; gap: 48px;
	padding-top: 48px; padding-bottom: 88px;
}
.pm-hero__copy { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.pm-hero__title { margin: 0; font-size: clamp(44px, 7vw, 84px); font-weight: 900; line-height: 0.95; }
.pm-hero__text { margin: 0; font-size: 19px; line-height: 1.5; max-width: 520px; }
.pm-hero__art { flex: 0 1 440px; min-width: 260px; margin: 0 auto; }

/* Store buttons */
.pm-stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; align-items: center; }
.pm-store {
	display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 22px;
	border-radius: 16px; background: var(--pm-espresso); color: var(--pm-flour);
	text-decoration: none; font-size: 16px; font-weight: 700;
}
.pm-store:hover { color: var(--pm-cheese); }
.pm-store--badge { background: none; padding: 0; height: 56px; }
.pm-store--badge img { height: 56px; width: auto; }
.pm-store--soon {
	background: transparent; color: var(--pm-espresso);
	border: 2px dashed var(--pm-espresso); cursor: default; font-weight: 700;
}
.pm-store--soon small { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; line-height: 1.2; }
.pm-store--soon span { line-height: 1.2; }
.pm-store svg { flex: none; }

/* Pie illustration */
.pm-pie { position: relative; width: 100%; aspect-ratio: 1 / 1; }
.pm-pie span { position: absolute; display: block; }
.pm-pie .crust { inset: 0; border-radius: 50%; background: var(--pm-crust-dark); }
.pm-pie .cheese { inset: 8%; border-radius: 50%; background: var(--pm-flour); }
.pm-pie .blob { background: var(--pm-sauce); }
.pm-pie .b1 { left: 19%; top: 23%; width: 14%; height: 10%; border-radius: 55% 45% 60% 40% / 50% 60% 40% 50%; }
.pm-pie .b2 { left: 69%; top: 29%; width: 10%; height: 13%; border-radius: 40% 60% 45% 55% / 60% 40% 55% 45%; }
.pm-pie .b3 { left: 25%; top: 69%; width: 13%; height: 9%; border-radius: 60% 40% 50% 50% / 45% 55% 45% 55%; }
.pm-pie .b4 { left: 63%; top: 67%; width: 11%; height: 10%; border-radius: 45% 55% 40% 60% / 55% 45% 60% 40%; }
.pm-pie .leaf { background: var(--pm-basil); border-radius: 50%; width: 6%; height: 3.2%; }
.pm-pie .l1 { left: 45%; top: 15%; transform: rotate(30deg); }
.pm-pie .l2 { left: 79%; top: 52%; transform: rotate(-40deg); }
.pm-pie .l3 { left: 15%; top: 49%; transform: rotate(70deg); }
.pm-pie img { position: absolute; left: 16%; top: 16%; width: 68%; height: 68%; object-fit: contain; transform: rotate(-3deg); }

/* ---------- How it works (red band) ---------- */
.pm-how { background-color: var(--pm-sauce); }
.pm-how__inner { display: flex; flex-direction: column; gap: 40px; padding-top: 88px; padding-bottom: 88px; }
.pm-how__title { margin: 0; font-size: clamp(34px, 4.5vw, 52px); font-weight: 800; line-height: 1; color: var(--pm-flour); }
.pm-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.pm-step {
	position: relative; overflow: hidden;
	background-color: var(--pm-flour); border-radius: 28px; padding: 30px;
	display: flex; flex-direction: column; gap: 12px;
}
.pm-step__num {
	width: 64px; height: 64px; border-radius: 50%; background: var(--pm-sauce); color: var(--pm-flour);
	display: flex; align-items: center; justify-content: center;
	font-size: 32px; font-weight: 900; line-height: 1;
}
.pm-step__title { margin: 0; font-size: 26px; font-weight: 700; line-height: 1.15; }
.pm-step__text { margin: 0; font-size: 16px; line-height: 1.55; color: var(--pm-muted); }
.pm-step__art { position: absolute; pointer-events: none; }
.pm-step__art--pie { right: -36px; top: -40px; width: 150px; height: 150px; transform: rotate(14deg); }
.pm-step__art--slices { right: -14px; top: -10px; width: 136px; height: 107px; }
.pm-step__art--box { right: -6px; top: -4px; width: 128px; height: 107px; transform: rotate(-5deg); }

/* Next drop banner */
.pm-drop {
	scroll-margin-top: 24px;
	background: var(--pm-espresso); color: var(--pm-flour); border-radius: 36px;
	padding: 44px clamp(24px, 5vw, 56px);
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px;
}
.pm-drop__copy { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.pm-drop__eyebrow { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--pm-crust); }
.pm-drop__title { margin: 0; font-size: clamp(36px, 5vw, 56px); font-weight: 900; line-height: 1; }
.pm-drop__meta { margin: 0; font-size: 18px; color: var(--pm-muted-dark); }
.pm-drop__cta {
	display: inline-flex; align-items: center; height: 56px; padding: 0 26px; border-radius: 999px;
	background: var(--pm-crust); color: var(--pm-espresso); text-decoration: none; font-size: 17px; font-weight: 700;
}
.pm-drop__cta:hover { color: var(--pm-espresso); background: var(--pm-cheese); }

/* ---------- Footer ---------- */
.pm-footer { background-color: var(--pm-flour); }
.pm-footer__inner {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
	padding-top: 32px; padding-bottom: 40px;
}
.pm-footer__brand { display: flex; align-items: center; gap: 14px; }
.pm-footer__brand img { width: 48px; height: 48px; object-fit: contain; }
.pm-footer__text { margin: 0; font-size: 14px; line-height: 1.5; color: var(--pm-muted); }
.pm-footer__nav { display: flex; gap: 22px; flex-wrap: wrap; font-size: 14px; font-weight: 700; }

/* ---------- Basic pages (privacy, etc.) ---------- */
.pm-page { padding-top: 64px; padding-bottom: 88px; }
.pm-page__inner { max-width: 760px; }
.pm-page h1 { font-family: var(--pm-display); font-variation-settings: "SOFT" 100, "WONK" 1; font-weight: 800; font-size: clamp(36px, 5vw, 56px); line-height: 1.02; margin: 0 0 28px; }
.pm-page h2, .pm-page h3 { font-family: var(--pm-display); font-variation-settings: "SOFT" 100, "WONK" 1; font-weight: 700; line-height: 1.15; margin: 36px 0 12px; }
.pm-page p, .pm-page li { font-size: 17px; line-height: 1.65; }
.pm-page a { color: var(--pm-sauce); }

/* ---------- Desktop ---------- */
@media (min-width: 1024px) {
	.pm-hero__inner { gap: 40px; }
	.pm-hero__copy { flex-basis: 640px; }
	.pm-hero__title { font-size: clamp(84px, 9vw, 124px); line-height: 0.92; letter-spacing: -0.01em; margin-bottom: 10px; }
	.pm-hero__art { flex-basis: 380px; }
	.pm-hero__text { font-size: 23px; line-height: 1.45; max-width: none; }
}

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
	.pm-header__inner { flex-wrap: nowrap; }
	.pm-nav { gap: 16px; flex-wrap: nowrap; }
	.pm-nav a:not(.pm-btn-pill) { display: none; }
	.pm-hero__inner { padding-top: 32px; padding-bottom: 64px; gap: 36px; }
	.pm-how__inner { padding-top: 64px; padding-bottom: 64px; }
	.pm-hero__text { font-size: 17px; }
}
