/*
Theme Name:   Fenway Missing Link (Astra Child)
Description:  Child theme of Astra for the Fenway Missing Link Coalition site. Put custom CSS and template overrides here so Astra can update safely.
Author:       LivableStreets Alliance
Author URI:   https://www.livablestreets.info
Template:     astra
Version:      1.0.0
Text Domain:  fenway-missing-link-astra-child
*/

/* Custom styles go below this line. */

/* Palette from the coalition's map and flyer. */
:root {
	--fml-pink: #d31b87;
	--fml-pink-dark: #b0156f;
	--fml-yellow: #f8c208;
	--fml-green: #5ea055;
	--fml-green-dark: #3f7a3a;
	--fml-gray: #6a6a69;
	--fml-brown: #ad6e34;
	--fml-blue: #96b4ce;
	--fml-ink: #222222;
	--fml-soft: #f6f5f2;
}

body,
.entry-content p,
.entry-content li {
	font-family: 'Libre Franklin', Helvetica, Arial, sans-serif;
	color: var(--fml-ink);
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.site-title,
.main-header-menu .menu-link {
	font-family: 'Montserrat', Helvetica, Arial, sans-serif;
}

html {
	scroll-behavior: smooth;
}

.fml-section {
	scroll-margin-top: 90px;
}

/* Header: stripe of the three route colors across the top, then a text logo. */
.site-header {
	border-top: 0;
	position: relative;
}

.site-header::before {
	content: "";
	display: block;
	height: 9px;
	background: linear-gradient(to bottom,
		var(--fml-pink) 0 33.34%, var(--fml-yellow) 33.34% 66.67%, var(--fml-green) 66.67% 100%);
}

.site-title a,
.site-title a:hover {
	color: var(--fml-ink);
	font-weight: 800;
	font-size: 1.15rem;
	letter-spacing: 0.2px;
}

.main-header-menu .menu-link {
	font-weight: 600;
	font-size: 0.95rem;
}

.main-header-menu .fml-menu-cta > .menu-link {
	background: var(--fml-pink);
	color: #fff;
	border-radius: 15px;
	padding: 0.55em 1.2em;
	margin-left: 0.5em;
	text-transform: uppercase;
	font-weight: 700;
	letter-spacing: 1px;
	font-size: 0.85rem;
	line-height: 1.6;
}

.main-header-menu .fml-menu-cta > .menu-link:hover {
	background: var(--fml-pink-dark);
	color: #fff;
}

/* Sections */
.entry-content .fml-section {
	padding: 72px 20px;
	margin-top: 0;
	margin-bottom: 0;
}

.entry-content .fml-section.fml-soft {
	background: var(--fml-soft);
}

.entry-content .fml-section h2 {
	font-weight: 800;
	font-size: clamp(1.9rem, 3.5vw, 2.6rem);
	line-height: 1.15;
	margin-bottom: 0.6em;
}

.entry-content .fml-section h3 {
	font-weight: 700;
	font-size: 1.3rem;
}

.entry-content .fml-section p {
	font-size: 1.08rem;
	line-height: 1.65;
}

/* Hero */
.entry-content .fml-hero {
	padding: 80px 20px 72px;
	margin: 0;
}

.entry-content .fml-hero h1 {
	font-weight: 800;
	font-size: clamp(2.6rem, 6vw, 4.6rem);
	line-height: 1.02;
	letter-spacing: -1px;
	text-transform: none;
	margin-bottom: 0.4em;
}

.fml-highlight {
	background: linear-gradient(transparent 58%, var(--fml-yellow) 58% 92%, transparent 92%);
	padding: 0 0.08em;
}

.entry-content .fml-hero .fml-lead {
	font-size: clamp(1.1rem, 1.6vw, 1.3rem);
	line-height: 1.55;
	max-width: 34em;
}

.fml-hero .wp-block-image img {
	border-radius: 15px;
}

/* Buttons */
.entry-content .wp-block-button__link {
	font-family: 'Montserrat', Helvetica, Arial, sans-serif;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	font-size: 0.9rem;
	border-radius: 15px;
	padding: 1em 1.6em;
	border: 2px solid transparent;
}

.fml-btn-pink .wp-block-button__link {
	background: var(--fml-pink);
	color: #fff;
}

.fml-btn-pink .wp-block-button__link:hover {
	background: var(--fml-pink-dark);
	color: #fff;
}

.fml-btn-outline .wp-block-button__link {
	background: #fff;
	color: var(--fml-ink);
	border-color: var(--fml-ink);
}

.fml-btn-outline .wp-block-button__link:hover {
	background: var(--fml-ink);
	color: #fff;
}

.fml-btn-dark .wp-block-button__link {
	background: var(--fml-ink);
	color: #fff;
}

/* Map legend */
.fml-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 14px 36px;
	list-style: none;
	margin: 18px 0 0;
	padding: 0;
	font-weight: 600;
}

.fml-legend li {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
}

.fml-legend li::before {
	content: "";
	flex: none;
	width: 44px;
	height: 0;
	border-top: 7px solid var(--fml-yellow);
	border-radius: 4px;
}

.fml-legend .fml-planned::before {
	border-top-style: dashed;
	border-top-color: var(--fml-pink);
}

.fml-legend .fml-existing::before {
	border-top-color: var(--fml-green);
}

/* Keep the three short key items on one line on phones. */
@media (max-width: 640px) {
	.fml-legend {
		gap: 10px 18px;
		font-size: 14px;
	}

	.fml-legend li {
		gap: 8px;
	}

	.fml-legend li::before {
		width: 28px;
	}
}

.fml-map img {
	border-radius: 15px;
}

/* Photo pair: rounded corners to match the other images */
.fml-photo img {
	border-radius: 15px;
	width: 100%;
	/* Slightly wider than the photos and anchored to the top, which trims the black line along their bottom edge. */
	aspect-ratio: 20 / 17;
	object-fit: cover;
	object-position: center top;
}

.fml-photo figcaption {
	font-family: 'Montserrat', Helvetica, Arial, sans-serif;
	font-weight: 700;
	text-transform: uppercase;
	text-align: center;
	font-size: 1rem;
	color: var(--fml-ink);
}

/* Cards: equal heights, with room between them */
.entry-content .wp-block-columns.fml-cards {
	gap: 40px;
	align-items: stretch;
}

.fml-cards > .wp-block-column {
	display: flex;
}

.fml-cards > .wp-block-column > .fml-card {
	flex: 1;
}

.entry-content .fml-card {
	border-radius: 15px;
	padding: 32px 28px;
	color: #fff;
	margin: 0;
}

.entry-content .fml-card h3,
.entry-content .fml-card p {
	color: inherit;
}

.fml-card-pink { background: var(--fml-pink); }
.fml-card-green { background: var(--fml-green-dark); }
.fml-card-yellow { background: var(--fml-yellow); color: var(--fml-ink) !important; }

/* Stats */
.fml-stats {
	gap: 24px;
	margin-top: 28px;
}

.entry-content .fml-stat {
	border-left: 7px solid var(--fml-yellow);
	padding: 4px 0 4px 18px;
	margin: 0;
}

.entry-content .fml-stat .fml-stat-num {
	font-family: 'Montserrat', Helvetica, Arial, sans-serif;
	font-weight: 800;
	font-size: 2.4rem;
	line-height: 1.1;
	margin: 0;
}

.entry-content .fml-stat p:last-child {
	margin: 4px 0 0;
	font-size: 1rem;
}

/* Take action */
.entry-content .fml-action {
	background: #fff;
	border-radius: 15px;
	padding: 32px 28px;
	border-top: 8px solid var(--fml-pink);
	margin: 0;
}

.entry-content .fml-action.fml-action-email {
	border-top-color: var(--fml-green);
}

.entry-content .fml-message {
	background: var(--fml-soft);
	border-left: 5px solid var(--fml-yellow);
	padding: 18px 20px;
	font-size: 1rem;
	font-style: normal;
	margin: 16px 0;
}

.entry-content .fml-message p {
	font-size: 1rem;
	margin: 0;
}

/* Coalition list */
.fml-members {
	list-style: none;
	margin: 24px 0 0;
	padding: 0;
	columns: 3 220px;
	column-gap: 36px;
}

.fml-members li {
	break-inside: avoid;
	padding: 9px 0 9px 22px;
	border-bottom: 1px solid #e4e2dc;
	position: relative;
	font-weight: 600;
}

.fml-members li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	width: 10px;
	height: 10px;
	margin-top: -5px;
	border-radius: 50%;
	background: var(--fml-green);
}

/* Join band */
.entry-content .fml-join {
	background: var(--fml-yellow);
}

/* Learn more */
.fml-links {
	list-style: none;
	margin: 0;
	padding: 0;
}

.fml-links li {
	margin: 0 0 12px;
}

.fml-links a {
	color: var(--fml-pink-dark);
	font-weight: 600;
}

.entry-content a {
	color: var(--fml-pink-dark);
}

@media (max-width: 781px) {
	.entry-content .fml-section {
		padding: 52px 18px;
	}

	.entry-content .fml-hero {
		padding: 48px 18px;
	}
}

/* Hero over the path photo: dark fade on the left keeps the text readable. */
.entry-content .fml-hero.wp-block-cover {
	padding: 80px 20px;
}

.fml-hero.wp-block-cover::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(20, 20, 20, 0.6) 0%, rgba(20, 20, 20, 0.35) 45%, rgba(20, 20, 20, 0) 75%);
	z-index: 0;
	pointer-events: none;
}

/* Static so the photo credit can sit in the cover's own corner; children stay above the fade. */
.fml-hero .wp-block-cover__inner-container {
	position: static;
}

.fml-hero .wp-block-cover__inner-container > * {
	position: relative;
	z-index: 1;
}

.entry-content .fml-hero.wp-block-cover p.fml-credit {
	position: absolute;
	right: 16px;
	bottom: 12px;
	z-index: 2;
	margin: 0;
	max-width: none;
	font-size: 12px;
	color: #fff;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

/* In the Why Now figure the credit lives in the caption but is lifted onto the photo's lower-right corner. */
.fml-figure figcaption {
	position: relative;
}

.entry-content .fml-figure .fml-credit {
	position: absolute;
	right: 12px;
	bottom: calc(100% + 7px + 10px);
	font-size: 12px;
	font-weight: 400;
	line-height: 1.3;
	color: #fff;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.entry-content .fml-credit a {
	color: #fff;
	text-decoration: none;
}

.entry-content .fml-credit a:hover {
	color: #fff;
	text-decoration: underline;
}

.entry-content .fml-hero.wp-block-cover h1,
.entry-content .fml-hero.wp-block-cover .fml-lead {
	color: #fff;
	max-width: 640px;
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}

/* Wide enough that "Help connect the" fits on one line, leaving "Fenway paths" as the second. */
.entry-content .fml-hero.wp-block-cover h1 {
	max-width: 780px;
}

.fml-hero-noimg {
	background: var(--fml-soft);
}

.fml-hero-accent {
	color: var(--fml-yellow);
	white-space: nowrap;
}

.fml-hero-noimg .fml-hero-accent {
	color: inherit;
	background: linear-gradient(transparent 58%, var(--fml-yellow) 58% 92%, transparent 92%);
}

.fml-btn-light .wp-block-button__link {
	background: #fff;
	color: var(--fml-ink);
}

.fml-btn-light .wp-block-button__link:hover {
	background: var(--fml-yellow);
	color: var(--fml-ink);
}

.fml-subhead {
	display: block;
	font-size: 0.5em;
	font-weight: 600;
	margin-top: 0.3em;
	color: var(--fml-gray);
}

/* Current vs planned comparison beside the intro text */
.fml-compare {
	display: grid;
	gap: 22px;
}

.entry-content .fml-stat.fml-stat-pink {
	border-left-color: var(--fml-pink);
}

.fml-photos {
	margin-top: 40px;
	gap: 48px;
}

.fml-figure img {
	border-radius: 15px;
}

.fml-figure figcaption {
	font-weight: 600;
	color: var(--fml-gray);
}

.fml-img-missing {
	border: 2px dashed #ccc;
	padding: 40px 20px;
	text-align: center;
	color: #999;
	border-radius: 15px;
}

/* Keep the header Take Action button pill-sized instead of full header height. */
.main-header-menu .fml-menu-cta {
	display: flex;
	align-items: center;
}

.ast-builder-menu .main-header-menu .fml-menu-cta > .menu-link {
	height: auto;
	line-height: 1.6;
	display: inline-block;
}

/* On phones the text spans the full photo, so darken it evenly. */
@media (max-width: 781px) {
	.fml-hero.wp-block-cover::after {
		background: rgba(20, 20, 20, 0.42);
	}
}

/* Menu hover: pink text with a pink underline. */
.ast-builder-menu .main-header-menu .menu-item > .menu-link {
	transition: color 0.15s ease;
	text-decoration: none;
	position: relative;
}

.ast-builder-menu .main-header-menu .menu-item > .menu-link:hover,
.ast-builder-menu .main-header-menu .menu-item > .menu-link:focus {
	color: var(--fml-pink);
}

.ast-builder-menu .main-header-menu .menu-item > .menu-link::after {
	content: "";
	position: absolute;
	left: 1em;
	right: 1em;
	bottom: 22%;
	height: 3px;
	border-radius: 2px;
	background: var(--fml-pink);
	transform: scaleX(0);
	transition: transform 0.15s ease;
}

.ast-builder-menu .main-header-menu .menu-item > .menu-link:hover::after,
.ast-builder-menu .main-header-menu .menu-item > .menu-link:focus::after {
	transform: scaleX(1);
}

/* The mobile menu stacks links, so skip the underline there. */
.ast-mobile-popup-drawer .main-header-menu .menu-item > .menu-link::after,
.ast-header-break-point .main-header-menu .menu-item > .menu-link::after {
	display: none;
}

/* Space out the salutation, body and sign-off in the sample letter. */
.entry-content .fml-message p + p {
	margin-top: 0.8em;
}

/* Action Network petition embed, restyled to match the site. The card already has its own heading. */
.fml-petition-embed #can_embed_form h2,
.fml-petition-embed #can_embed_form h3,
.fml-petition-embed #can_embed_form h4 {
	display: none;
}

/* The petition area's id outranks Action Network's two-column float rule, which loads after this sheet. */
#can-petition-area-complete-the-fenway-path-missing-link #can_embed_form #form_col1,
#can-petition-area-complete-the-fenway-path-missing-link #can_embed_form #form_col2 {
	float: none;
	width: 100%;
}

.fml-petition-embed #can_embed_form input[type="text"],
.fml-petition-embed #can_embed_form input[type="email"],
.fml-petition-embed #can_embed_form textarea {
	border: 1px solid #ccc;
	border-radius: 8px;
	padding: 10px 12px;
	font-family: "Libre Franklin", Helvetica, Arial, sans-serif;
	color: var(--fml-ink);
}

.fml-petition-embed #can_embed_form input[type="text"]:focus,
.fml-petition-embed #can_embed_form input[type="email"]:focus,
.fml-petition-embed #can_embed_form textarea:focus {
	border-color: var(--fml-pink);
	outline: none;
}

.fml-petition-embed #can_embed_form label,
.fml-petition-embed #can_embed_form .control-label {
	color: var(--fml-ink);
}

.fml-petition-embed #can_embed_form input[type="submit"] {
	width: 100%;
	background: var(--fml-pink);
	color: #fff;
	border: 0;
	border-radius: 15px;
	padding: 14px 24px;
	font-family: "Montserrat", sans-serif;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
}

.fml-petition-embed #can_embed_form input[type="submit"]:hover {
	background: var(--fml-pink-dark);
}

.fml-petition-embed #can_embed_form a {
	color: var(--fml-pink);
}

/* The full embed brings Action Network's whole page; keep only the signature tracker, the form, and the privacy note (moved below the form). */
.fml-petition-embed #can_embed_form > .clearfix {
	display: flex;
	flex-direction: column;
}

.fml-petition-embed #can_sidebar {
	order: 1;
}

.fml-petition-embed #can_main_col {
	order: 2;
}

.fml-petition-embed #can_main_col > *:not(#donate_disclaimer) {
	display: none;
}

#can-petition-area-complete-the-fenway-path-missing-link #can_embed_form .action_status_tracker {
	padding: 0 0 24px;
}

#can-petition-area-complete-the-fenway-path-missing-link #can_embed_form .action_status_tracker .centertext {
	text-align: left;
}

#can-petition-area-complete-the-fenway-path-missing-link #can_embed_form .action-widget--toggle.action_status_tracker .action_status_running_total {
	font-family: "Montserrat", sans-serif;
	font-size: 22px;
	font-weight: 800;
	color: var(--fml-pink);
}

#can-petition-area-complete-the-fenway-path-missing-link #can_embed_form .action-widget--toggle.action_status_tracker .action_status_status_bar {
	height: 12px;
	margin: 8px 0;
	border-radius: 6px;
	background: #e6e6e6;
	overflow: hidden;
}

#can-petition-area-complete-the-fenway-path-missing-link #can_embed_form .action-widget--toggle.action_status_tracker .action_status_status_bar > span {
	display: block;
	height: 100%;
	min-width: 12px;
	border-radius: 6px;
	background: var(--fml-pink);
}

#can-petition-area-complete-the-fenway-path-missing-link #can_embed_form .action-widget--toggle.action_status_tracker .action_status_status_bar-grow {
	display: none;
}

#can-petition-area-complete-the-fenway-path-missing-link #can_embed_form .action-widget--toggle.action_status_tracker .action_status_goal {
	font-size: 14px;
	color: var(--fml-gray);
}

/* Privacy disclaimer at the same small size as the opt-in note above it. */
#can-petition-area-complete-the-fenway-path-missing-link #can_embed_form #donate_disclaimer p {
	font-size: 12px;
	line-height: 1.35;
}

/* Pink is too faint on the yellow Join band. */
.entry-content .fml-join .fml-join-note a {
	color: var(--fml-ink);
	font-weight: 600;
}
