/*
 * PLM 2027 consumer campaign — /plm-2027 and /plm-2027-entry
 * (resources/views/frontend/layouts/plm-2027*.blade.php).
 *
 * Values come straight from the Figma file (23-1206 IPC 2024 Web Redesign, page
 * "UI Design - 10.14 PLM 2027", read through the REST API): a 1440 frame with a
 * 1180 content column (130px sides), 96px section padding, and these text styles:
 *
 *   display   Alkaline Caps Bold   56/67.2 (section titles), 56/48 (rules title, entry H1),
 *                                  80/64 ("Create it"), 36/43.2 ("enter now!" button)
 *   subhead   Dunbar Text Bold     32/37 (challenge name), 24/37 (form legends),
 *                                  16/37 (card titles), 16/20.7 (social bar)
 *   list      Dunbar Text Medium   24/31
 *   body      Elza Text Regular    16/19.2; Semibold 16 for pill buttons
 *   rules h3  Minion Pro Semibold  24/28
 *
 * Alkaline Caps and Dunbar Text come from the site's Adobe Fonts project
 * (use.typekit.net/kwr2mns.css, linked in partials/_header), like every other face. Layout is Tailwind
 * utilities in the templates; this file holds type, colour and the few drawn parts.
 */

:root {
	--plm-brown: #482928;        /* hero, entry page, "Create it" band */
	--plm-brown-mid: #583433;    /* "Create it" section, card titles, social bar text */
	--plm-brown-deep: #2E1317;   /* Recent Entries, section rule */
	--plm-orange: #F26522;       /* gradient start, "enter now!" button */
	--plm-orange-light: #F7901E; /* gradient end */
	--plm-gold: #FAA61A;         /* social bar, "Create it" title, check icons, form legends */
	--plm-gold-line: #FAA21B;    /* card and H1 underlines */
	--plm-yellow: #FADB33;       /* "Follow Us", "Submit Entry", radio/checkbox marks */
	--plm-cream: #FAF6EE;        /* light text and inputs */
	--plm-ink: #2C1B15;

	--plm-font-display: "alkaline-caps", "alkaline", "aktiv-grotesk", sans-serif;
	--plm-font-subhead: "dunbar-text", elza-text, sans-serif;
	--plm-font-body: elza-text, sans-serif;
	--plm-font-serif: "minion-pro", serif;
}

/* ---------- type ---------- */

/* Figma sets these in lowercase: Alkaline Caps draws lowercase as its smaller cap forms,
   which is what gives the design's widths (e.g. "Recipe Inspiration" = 376px at 56px). */
.plm-display {
	font-family: var(--plm-font-display);
	font-weight: 700;
	text-transform: lowercase;
	letter-spacing: 0;
}

.plm-title {               /* section titles: 56/67.2 (56px at the 1440 design width) */
	font-size: clamp(30px, 3.89vw, 56px);
	line-height: 1.2;
	color: var(--plm-cream);
}

.plm-title-tight {         /* rules title and entry H1: 56/48 */
	font-size: clamp(30px, 3.89vw, 56px);
	line-height: 0.86;
	color: var(--plm-cream);
}

.plm-title-xl {            /* "Create it. Share it. Enter to win.": 80/64 */
	font-size: clamp(36px, 5.56vw, 80px);
	line-height: 0.8;
	color: var(--plm-gold);
}

.plm-subhead {
	font-family: var(--plm-font-subhead);
	font-weight: 700;
	line-height: 1.16;
}

.plm-list-text {           /* Dunbar Text Medium 24/31 */
	font-family: var(--plm-font-subhead);
	font-weight: 500;
	font-size: clamp(18px, 1.67vw, 24px);
	line-height: 1.29;
	color: var(--plm-cream);
}

.plm-list-text a {
	text-underline-offset: 3px;
}

/* Every underlined text link on the two pages loses its underline on hover and keyboard focus. */
.plm-list-text a:hover,
.plm-list-text a:focus-visible,
.plm-social a:hover,
.plm-social a:focus-visible,
.plm-rules a:hover,
.plm-rules a:focus-visible,
.plm-notice a:hover,
.plm-notice a:focus-visible,
.plm-intro a:hover,
.plm-intro a:focus-visible {
	text-decoration: none;
}

.plm-body {
	font-family: var(--plm-font-body);
	font-size: 16px;
	line-height: 1.2;
}

/* ---------- shared layout ---------- */

.plm-section {
	padding-top: 56px;
	padding-bottom: 56px;
}

@media (min-width: 768px) {
	.plm-section {
		padding-top: 96px;
		padding-bottom: 96px;
	}
}

.plm-gradient-orange {
	background-image: linear-gradient(180deg, var(--plm-orange) 0%, var(--plm-orange-light) 100%);
}


/* ---------- buttons ---------- */

.plm-btn-enter {           /* 214x75, r15, pad 16/32, Alkaline 36/43.2 */
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 16px 32px;
	border-radius: 15px;
	background-color: var(--plm-orange);
	color: #fff;
	font-family: var(--plm-font-display);
	font-weight: 700;
	font-size: clamp(26px, 2.5vw, 36px);
	line-height: 1.2;
	text-transform: lowercase;
	transition: filter .15s ease, transform .15s ease;
}

.plm-btn-enter:hover,
.plm-btn-enter:focus-visible {
	filter: brightness(1.08);
	transform: translateY(-1px);
	color: #fff;
}

.plm-btn-pill {            /* r50, pad 16/24, Elza Semibold 16, black on #FADB33 */
	display: inline-flex;
	align-items: center;
	padding: 16px 24px;
	border-radius: 50px;
	border: 0;
	background-color: var(--plm-yellow);
	color: #000;
	font-family: var(--plm-font-body);
	font-weight: 600;
	font-size: 16px;
	line-height: 1.2;
	cursor: pointer;
	transition: filter .15s ease, transform .15s ease;
}

.plm-btn-pill:hover,
.plm-btn-pill:focus-visible {
	filter: brightness(1.05);
	transform: translateY(-1px);
	color: #000;
}

/* ---------- Recipe Inspiration cards: 277 wide, image 277x203, caption pad 24 ---------- */

.plm-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background-color: #fff;
	color: var(--plm-brown-mid);
	box-shadow: 0 4px 16px rgb(46 19 23 / 25%);
	transition: transform .15s ease, box-shadow .15s ease;
}

.plm-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 24px rgb(46 19 23 / 30%);
}

.plm-card img {
	width: 100%;
	aspect-ratio: 277 / 203;
	object-fit: cover;
}

.plm-card-body {
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	flex: 1;
}

.plm-card-title {
	font-family: var(--plm-font-subhead);
	font-weight: 700;
	font-size: 16px;
	line-height: 37px;
	margin: 0;
}

.plm-card-rule {
	display: block;
	height: 2px;
	background-color: var(--plm-gold-line);
	margin-top: auto;
}

/* ---------- "Create it" section: #583433 with a darker band rotated 17° on the right ---------- */

.plm-band {
	position: relative;
	overflow: hidden;
	background-color: var(--plm-brown-mid);
}

.plm-band::before {
	content: "";
	position: absolute;
	left: calc(100% - 198px);
	top: -250px;
	width: 1339px;
	height: 1256px;
	background-color: var(--plm-brown);
	transform: rotate(17deg);
	transform-origin: top left;
	pointer-events: none;
}

.plm-band > * {
	position: relative;
}

.plm-bullets li {
	position: relative;
	padding-left: 1.1em;
}

.plm-bullets li::before {   /* drawn square: sized in em so it scales with the text */
	content: "";
	position: absolute;
	left: 0.1em;
	top: 0.60em;             /* about (1.29em line - 0.15em square) / 2, nudged down a touch */
	width: 0.15em;
	height: 0.15em;
	background-color: currentColor;
}

.plm-checks li {
	display: flex;
	align-items: center;
	gap: 12px;
}

/* One line per item, as designed (Dunbar Medium 24/31); a wider fallback face may
   run a little into the 40px gap before the camera rather than wrap. */
@media (min-width: 768px) {
	.plm-checks li,
	.plm-bullets li {
		white-space: nowrap;
	}
}

.plm-checks li::before {
	content: "";
	flex: 0 0 24px;
	width: 24px;
	height: 24px;
	background: url('../img/placeholder/plm-2027-check.svg') center / 24px 24px no-repeat;
}

/* ---------- social bar: 55px, Dunbar Bold 16/20.7, underlined ---------- */

.plm-social {
	min-height: 55px;
	padding: 16px 0;
	background-color: var(--plm-gold);
	font-family: var(--plm-font-subhead);
	font-weight: 700;
	font-size: 16px;
	line-height: 1.3;
	color: var(--plm-brown-mid);
}

.plm-social a {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.plm-social .plm-sep {
	font-size: 18px;
}

/* ---------- Recent Entries: 217px tiles ---------- */

.plm-entry-tile {
	display: block;
	background-color: #D9D9D9;
	aspect-ratio: 1 / 1;
	overflow: hidden;
}

.plm-entry-tile img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .3s ease;
}

.plm-entry-tile:hover img {
	transform: scale(1.04);
}

/* Title and "City, ST" under a tile: one line each, cut with an ellipsis at the tile's width. */
.plm-entry-caption > * {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ---------- rules card: pad 80, two 478 columns, 1px divider ---------- */

.plm-rules {
	background-color: #fff;
	color: var(--plm-ink);
	padding: 32px 24px;
}

@media (min-width: 768px) {
	.plm-rules {
		padding: 56px;
	}
}

@media (min-width: 1280px) {
	.plm-rules {
		padding: 80px;
	}
}

.plm-rules h3 {
	font-family: var(--plm-font-serif);
	font-weight: 600;
	font-size: 24px;
	line-height: 28px;
	margin: 0 0 12px;
}

.plm-rules h3 .plm-num {
	margin-right: 0.3em;
}

.plm-rules p,
.plm-rules ul {
	font-family: var(--plm-font-body);
	font-size: 16px;
	line-height: 1.2;
	margin: 0 0 1em;
}

.plm-rules p:last-child,
.plm-rules ul:last-child {
	margin-bottom: 0;
}

.plm-rules ul {
	list-style: disc;
	padding-left: 1.4em;
}

.plm-rules a {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.plm-rules-col > section + section {
	margin-top: 32px;
}

@media (min-width: 768px) {
	.plm-rules-col + .plm-rules-col {
		border-left: 1px solid rgb(0 0 0 / 25%);
	}
}

/* ---------- entry page ---------- */

.plm-entry-bg {
	background-color: var(--plm-brown);
	background-image: var(--plm-entry-bg-image);
	background-size: cover;
	background-position: center top;
}

.plm-h1-rule {               /* Line 8: 80x4 #FAA21B, 32px below the H1 */
	display: block;
	width: 80px;
	height: 4px;
	background-color: var(--plm-gold-line);
	margin: 32px 0;
}

.plm-legend {                /* Dunbar Bold 24/37 in gold */
	font-family: var(--plm-font-subhead);
	font-weight: 700;
	font-size: 24px;
	line-height: 37px;
	color: var(--plm-gold);
}

.plm-form label,
.plm-form .plm-label {
	display: block;
	font-family: var(--plm-font-body);
	font-size: 16px;
	line-height: 1.2;
	color: var(--plm-cream);
	margin-bottom: 8px;
}

.plm-form .plm-req {
	color: #FAA11B;
}

.plm-form input[type="text"],
.plm-form input[type="email"],
.plm-form input[type="tel"],
.plm-form input[type="url"],
.plm-form textarea {
	width: 100%;
	height: 36px;
	background-color: var(--plm-cream);
	color: var(--plm-ink);
	border: 1px solid rgb(2 1 34 / 25%);
	border-radius: 0;
	padding: 0 10px;
	font-family: var(--plm-font-body);
	font-size: 16px;
	line-height: 1.2;
}

.plm-form textarea {
	height: 200px;
	padding: 8px 10px;
	resize: vertical;
}

.plm-form input:focus,
.plm-form textarea:focus {
	outline: 2px solid var(--plm-yellow);
	outline-offset: 1px;
}

.plm-form .plm-help {
	font-family: var(--plm-font-body);
	font-size: 16px;
	line-height: 1.2;
	color: var(--plm-cream);
}

.plm-form .plm-help ul {
	list-style: disc;
	padding-left: 1.4em;
}

.plm-form .plm-help-tall {
	line-height: 22px;
}

/* radios: 17px cream ring, 11px yellow dot; row pad 6, gap 24 */
.plm-form .plm-choices {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	padding: 6px;
}

.plm-form .plm-choice {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	cursor: pointer;
}

.plm-form input[type="radio"],
.plm-form input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	flex: 0 0 17px;
	width: 17px;
	height: 17px;
	margin: 0;
	border: 1px solid var(--plm-cream);
	background: transparent;
	cursor: pointer;
	display: inline-grid;
	place-content: center;
}

.plm-form input[type="radio"] {
	border-radius: 50%;
}

.plm-form input[type="radio"]::before {
	content: "";
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: var(--plm-yellow);
	transform: scale(0);
	transition: transform .1s ease;
}

.plm-form input[type="radio"]:checked::before {
	transform: scale(1);
}

.plm-form input[type="checkbox"] {
	flex-basis: 16px;
	width: 16px;
	height: 16px;
	border-radius: 2px;
}

.plm-form input[type="checkbox"]::before {
	content: "";
	width: 9px;
	height: 7px;
	border-left: 1.5px solid var(--plm-yellow);
	border-bottom: 1.5px solid var(--plm-yellow);
	transform: translateY(-1px) rotate(-45deg) scale(0);
	transition: transform .1s ease;
}

.plm-form input[type="checkbox"]:checked::before {
	transform: translateY(-1px) rotate(-45deg) scale(1);
}

.plm-form input[type="radio"]:focus-visible,
.plm-form input[type="checkbox"]:focus-visible {
	outline: 2px solid var(--plm-yellow);
	outline-offset: 2px;
}

/* file inputs: 117x34 button, r3, #EFEFEF, "No file chosen" in cream */
.plm-form input[type="file"] {
	display: block;
	width: 100%;
	color: var(--plm-cream);
	font-family: var(--plm-font-body);
	font-size: 16px;
	line-height: 34px;
}

.plm-form input[type="file"]::file-selector-button {
	height: 34px;
	padding: 0 11px;
	margin-right: 13px;
	border: 0.5px solid var(--plm-cream);
	border-radius: 3px;
	background-color: #EFEFEF;
	color: var(--plm-ink);
	font-family: var(--plm-font-body);
	font-size: 16px;
	cursor: pointer;
}

.plm-notice {
	background-color: var(--plm-cream);
	color: var(--plm-ink);
	border-left: 6px solid var(--plm-orange);
	padding: 20px 24px;
}

.plm-notice a {
	text-decoration: underline;
}

/* Inline validation (Burbank answers the fetch submission with a 422). */
.plm-notice-error {
	font-family: var(--plm-font-body);
	font-size: 16px;
	line-height: 1.4;
}

.plm-notice-error:focus {
	outline: 2px solid var(--plm-yellow);
	outline-offset: 2px;
}

.plm-form .plm-field-error {
	margin: 6px 0 0;
	font-family: var(--plm-font-body);
	font-size: 14px;
	line-height: 1.4;
	color: var(--plm-yellow);
}

.plm-form input[aria-invalid="true"],
.plm-form textarea[aria-invalid="true"] {
	border: 2px solid var(--plm-yellow);
}

.plm-intro a {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.plm-intro p + p {
	margin-top: 1.2em;
}

/* ---------- parked layered hero (partials/_plm-2027-hero-layered.blade.php) ---------- */
/* Hero: the volcano art as background, live text in layers on top */
.plm-hero {
	background-color: var(--plm-brown);
	background-image: var(--plm-hero-image);
	background-repeat: no-repeat;
	background-position: center bottom;
	background-size: cover;
	color: #fff;
	padding-top: 7rem;
	padding-bottom: 3rem;
}

.plm-hero-grid {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 2rem;
	min-height: 420px;
}

.plm-hero-copy {
	text-align: center;
}

/* Stacked (below lg): headline first, bottles, then the "New!" tag, as on desktop. */
.plm-hero-copy { order: 1; }
.plm-hero-bottles { order: 2; }
.plm-hero-new { order: 3; }

.plm-hero-headline {
	font-family: var(--plm-font-display);
	font-weight: 800;
	font-style: italic;
	text-transform: uppercase;
	line-height: 0.9;
	letter-spacing: 0;
	margin: 0 0 1.25rem;
	text-shadow: 0 0 2px rgb(46 19 23 / 70%), 0 3px 6px rgb(0 0 0 / 45%);
}

.plm-hero-line {
	display: block;
	font-size: clamp(2rem, 1.2rem + 3.2vw, 3.9rem);
}

.plm-hero-erupt {
	position: relative;
	display: inline-block;
	color: var(--plm-orange-light);
	font-size: clamp(2.4rem, 1.3rem + 4.4vw, 5rem);
	padding: 0 0.8em;
}

/* the two little motion dashes either side of "Creativity Erupt" */
.plm-hero-erupt::before,
.plm-hero-erupt::after {
	content: "";
	position: absolute;
	top: 50%;
	width: 0.55em;
	height: 0.1em;
	background: var(--plm-orange-light);
	box-shadow: 0 -0.28em 0 0 var(--plm-orange-light);
	transform: rotate(-14deg);
}

.plm-hero-erupt::before {
	left: 0.05em;
}

.plm-hero-erupt::after {
	right: 0.05em;
	transform: rotate(14deg);
}

.plm-hero-prize {
	display: block;
	color: var(--plm-orange);
	font-size: clamp(4.5rem, 2.2rem + 9.5vw, 10.5rem);
	line-height: 0.85;
	margin-top: 0.05em;
	text-shadow: 0 0 2px rgb(46 19 23 / 70%), 0 5px 10px rgb(0 0 0 / 45%);
}

.plm-hero-winners {
	font-family: var(--plm-font-display);
	font-weight: 700;
	font-style: italic;
	text-transform: uppercase;
	color: var(--plm-orange-light);
	font-size: clamp(2rem, 1.1rem + 3vw, 3.6rem);
	line-height: 0.92;
	margin: 0 0 0.8rem;
	text-shadow: 0 0 2px rgb(46 19 23 / 70%), 0 3px 6px rgb(0 0 0 / 45%);
}

.plm-hero-sub {
	font-family: elza-text, sans-serif;
	font-weight: 700;
	font-size: clamp(1rem, 0.85rem + 0.8vw, 1.4rem);
	line-height: 1.2;
	margin: 0 auto;
	max-width: 22em;
	text-shadow: 0 2px 6px rgb(0 0 0 / 45%);
}

.plm-hero-new {
	font-family: var(--plm-font-display);
	font-weight: 700;
	font-style: italic;
	text-transform: uppercase;
	line-height: 0.95;
	margin: 0;
	text-align: center;
	text-shadow: 0 0 2px rgb(46 19 23 / 70%), 0 3px 6px rgb(0 0 0 / 45%);
}

.plm-hero-new-tag {
	display: inline-block;
	color: var(--plm-cream);
	font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.5rem);
	border-bottom: 0.12em solid var(--plm-cream);
	padding-bottom: 0.05em;
	margin-bottom: 0.45em;
	transform: rotate(-6deg);
}

.plm-hero-new-copy {
	display: block;
	color: #F9A83A;
	font-size: clamp(2rem, 1.2rem + 3vw, 3.5rem);
}

.plm-hero-bottles {
	width: min(60%, 260px);
	height: auto;
	align-self: center;
}

@media (min-width: 1024px) {
	.plm-hero {
		padding-top: 9rem;
		padding-bottom: 4rem;
	}

	.plm-hero-grid {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 300px) minmax(0, 640px);
		grid-template-areas: "new bottles copy";
		align-items: end;
		gap: 2rem;
		min-height: 540px;
	}

	.plm-hero-grid.plm-hero-grid--no-bottles {
		grid-template-columns: minmax(0, 1fr) minmax(0, 660px);
		grid-template-areas: "new copy";
	}

	.plm-hero-new {
		grid-area: new;
		order: 0;
		padding-bottom: 1rem;
	}

	.plm-hero-bottles {
		grid-area: bottles;
		width: 100%;
		max-width: 320px;
		align-self: center;
		justify-self: center;
	}

	.plm-hero-copy {
		grid-area: copy;
		align-self: center;
		transform: rotate(-4deg);
	}

	.plm-hero-line,
	.plm-hero-winners,
	.plm-hero-new-copy {
		white-space: nowrap;
	}
}

