/*
Theme Name: Papas v1
Theme URI: https://papasangels.org/
Description: Standalone classic theme for Papa’s Angels in Hanford, CA. The homepage layout and content are built into the theme; pages, event posts, archives and search keep normal WordPress rendering. Site images load from their existing hosted URLs and are not bundled.
Version: 1.0.0
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: papas-v1
*/

/* ==========================================================================
   1. Tokens
   ========================================================================== */

:root {
	--ink: #1d2740;
	--dusk: #2e4a7d;
	--dusk-deep: #223a63;
	--sky: #e6eef7;
	--sky-line: #c9d7e8;
	--paper: #fbfcfe;
	--white: #ffffff;
	--gold: #d4a23c;
	--gold-deep: #b9882a;
	--muted: #4a5672;
	--footer-text: #d3dbe8;

	--serif: "Iowan Old Style", Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
	--sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	--wrap: 70rem;
	--prose: 42rem;
	--gutter: clamp(1.25rem, 4vw, 2.5rem);
	--section: clamp(3.5rem, 8vw, 6rem);
	--radius: 14px;
}

/* ==========================================================================
   2. Base
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 1.125rem;
	line-height: 1.6;
}

img,
svg,
video,
iframe {
	max-width: 100%;
}

img,
video {
	height: auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 0.5em;
	color: var(--ink);
	font-family: var(--serif);
	font-weight: 600;
	line-height: 1.15;
	text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5,
h6 { font-size: 1.125rem; }

p {
	margin: 0 0 1em;
}

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

a:hover {
	color: var(--dusk-deep);
	text-decoration-thickness: 2px;
}

:focus-visible {
	outline: 3px solid var(--dusk);
	outline-offset: 3px;
	border-radius: 4px;
}

.site-footer :focus-visible {
	outline-color: var(--gold);
}

.site-main:focus {
	outline: none;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
	word-wrap: normal !important;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: 1rem;
	z-index: 1000;
	padding: 0.75rem 1.25rem;
	background: var(--ink);
	color: var(--white);
	border-radius: 8px;
	font-weight: 600;
	text-decoration: none;
}

.skip-link:focus {
	top: 1rem;
	color: var(--white);
	outline-color: var(--gold);
}

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

.wrap--prose {
	max-width: calc(var(--prose) + 2 * var(--gutter));
}

.icon {
	width: 1.25em;
	height: 1.25em;
	flex: none;
}

.notice {
	padding: 1.25rem 1.5rem;
	background: var(--sky);
	border-radius: 10px;
	color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}

/* ==========================================================================
   3. Buttons
   ========================================================================== */

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 2.875rem;
	padding: 0.7rem 1.5rem;
	border: 2px solid transparent;
	border-radius: 999px;
	font-family: var(--sans);
	font-size: 1rem;
	font-weight: 650;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.button--gold {
	background: var(--gold);
	color: var(--ink);
}

.button--gold:hover {
	background: var(--gold-deep);
	color: var(--ink);
}

.button--outline {
	background: transparent;
	border-color: var(--dusk);
	color: var(--dusk);
}

.button--outline:hover {
	background: var(--dusk);
	color: var(--white);
}

/* ==========================================================================
   4. Header and navigation
   ========================================================================== */

.site-header {
	position: relative;
	z-index: 20;
	background: var(--paper);
	border-bottom: 1px solid var(--sky-line);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 4.5rem;
	padding-block: 0.75rem;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	min-width: 0;
	color: var(--ink);
	font-family: var(--serif);
	font-size: 1.375rem;
	font-weight: 600;
	line-height: 1.1;
	text-decoration: none;
}

.brand:hover {
	color: var(--ink);
}

.brand__logo {
	display: block;
	width: auto;
	height: 2.75rem;
	max-width: 8rem;
	object-fit: contain;
}

.nav-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 2.75rem;
	padding: 0.5rem 1rem;
	background: var(--white);
	border: 2px solid var(--sky-line);
	border-radius: 999px;
	color: var(--ink);
	font: inherit;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
}

.nav-toggle .icon--close,
.nav-toggle[aria-expanded="true"] .icon--menu {
	display: none;
}

.nav-toggle[aria-expanded="true"] .icon--close {
	display: block;
}

.site-nav__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav__list a {
	display: block;
	padding: 0.85rem 0;
	border-bottom: 1px solid var(--sky-line);
	color: var(--ink);
	font-weight: 600;
	text-decoration: none;
}

.site-nav__list a:hover {
	color: var(--dusk);
}

.site-nav__list a[aria-current="page"] {
	color: var(--dusk);
	text-decoration: underline;
	text-decoration-color: var(--gold);
	text-decoration-thickness: 3px;
	text-underline-offset: 0.4em;
}

.site-nav__list a.button {
	display: flex;
	margin-top: 1rem;
	padding: 0.7rem 1.5rem;
	border: 2px solid transparent;
	color: var(--ink);
}

/* Without JavaScript the menu stays visible and wraps under the brand. */
.no-js .nav-toggle {
	display: none;
}

.no-js .site-header__inner {
	flex-wrap: wrap;
}

.no-js .site-nav {
	flex-basis: 100%;
}

/* With JavaScript, narrow screens get a collapsible panel. */
.js .site-nav {
	display: none;
	position: absolute;
	top: 100%;
	right: 0;
	left: 0;
	background: var(--paper);
	border-bottom: 1px solid var(--sky-line);
	box-shadow: 0 16px 24px rgba(29, 39, 64, 0.08);
}

.js .site-nav.is-open {
	display: block;
}

.js .site-nav__list {
	padding: 0.25rem var(--gutter) 1.25rem;
}

@media (min-width: 60em) {
	.nav-toggle,
	.no-js .nav-toggle {
		display: none;
	}

	.site-nav,
	.js .site-nav,
	.no-js .site-nav {
		display: block;
		position: static;
		flex-basis: auto;
		background: none;
		border: 0;
		box-shadow: none;
	}

	.site-nav__list,
	.js .site-nav__list {
		display: flex;
		align-items: center;
		gap: 1.75rem;
		padding: 0;
	}

	.site-nav__list a {
		padding: 0.5rem 0;
		border: 0;
	}

	.site-nav__list a.button {
		display: inline-flex;
		margin: 0;
		padding: 0.6rem 1.35rem;
		min-height: 2.75rem;
	}
}

/* ==========================================================================
   5. Homepage
   ========================================================================== */

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

.section--sky {
	background: var(--sky);
}

.section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5rem 2rem;
	margin-bottom: 1.5rem;
}

.section-head h2 {
	margin: 0;
}

.section-head__link {
	font-weight: 650;
}

/* Hero */

.hero {
	overflow: hidden;
	padding-block: clamp(3rem, 8vw, 6.5rem);
	background: var(--sky);
}

.hero__inner {
	display: grid;
	gap: clamp(2.5rem, 6vw, 5rem);
	align-items: center;
}

.hero__title {
	margin: 0 0 1.5rem;
}

.hero__name {
	display: block;
	font-size: clamp(2.875rem, 8vw, 5rem);
	line-height: 1.02;
	letter-spacing: -0.01em;
}

.hero__sub {
	display: block;
	margin-top: 0.85rem;
	color: var(--dusk);
	font-family: var(--sans);
	font-size: clamp(1.125rem, 2.2vw, 1.375rem);
	font-weight: 600;
	line-height: 1.35;
}

.hero__lead {
	max-width: 34em;
	margin-bottom: 2rem;
	font-size: clamp(1.125rem, 1.8vw, 1.25rem);
	line-height: 1.65;
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1rem;
}

/* The halo: the logo in a white disc, with a gold ring lifted just above it. */

.halo {
	position: relative;
	justify-self: center;
	width: min(62vw, 15rem);
	margin-top: 1.5rem;
	order: -1;
}

.halo::before {
	content: "";
	position: absolute;
	inset: -9%;
	border: 3px solid var(--gold);
	border-radius: 50%;
	transform: translateY(-6%);
	pointer-events: none;
}

.halo__disc {
	display: grid;
	place-items: center;
	aspect-ratio: 1 / 1;
	padding: 16%;
	background: var(--white);
	border-radius: 50%;
}

.halo__disc img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

@media (min-width: 52em) {
	.hero__inner {
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	}

	.halo {
		order: 0;
		width: min(100%, 22rem);
		margin-top: 0;
	}
}

/* Events list (also used on archives and search) */

.event-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.event {
	display: grid;
	gap: 1.25rem 2.5rem;
	padding-block: 2rem;
	border-top: 1px solid var(--sky-line);
}

.event:last-child {
	border-bottom: 1px solid var(--sky-line);
}

.event__media img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 10px;
}

.event__title {
	margin-bottom: 0.35rem;
	font-size: clamp(1.375rem, 2.6vw, 1.75rem);
}

.event__title a {
	color: var(--ink);
	text-decoration: none;
}

.event__title a:hover {
	text-decoration: underline;
	text-decoration-color: var(--gold);
	text-decoration-thickness: 2px;
}

.event__meta {
	margin-bottom: 1rem;
	color: var(--muted);
	font-size: 0.9375rem;
}

.event__excerpt p {
	max-width: 38em;
	margin-bottom: 1rem;
}

.event__more {
	font-weight: 650;
}

@media (min-width: 45em) {
	.event--has-media {
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
		align-items: start;
	}
}

/* Donate */

.donate__grid {
	display: grid;
	gap: 1.5rem;
	margin-top: 2rem;
}

.give {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: clamp(1.5rem, 3vw, 2.25rem);
	background: var(--white);
	border: 1px solid var(--sky-line);
	border-radius: var(--radius);
}

.give__name {
	margin-bottom: 0.25rem;
	font-size: 1.5rem;
}

.give__handle {
	margin-bottom: 1.25rem;
	color: var(--dusk);
	font-size: 1.25rem;
	font-weight: 600;
	overflow-wrap: anywhere;
}

.give__image {
	width: 100%;
	max-width: 20rem;
	margin: 1.75rem 0 0;
}

.give__image img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid var(--sky-line);
	border-radius: 10px;
}

@media (min-width: 45em) {
	.donate__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Volunteer and contact */

.involve {
	display: grid;
	gap: 3rem;
}

.involve__item h2 {
	margin-bottom: 0.75rem;
}

.involve__item p {
	max-width: 30em;
}

.phone-link {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	color: var(--ink);
	font-family: var(--serif);
	font-size: clamp(1.75rem, 4vw, 2.25rem);
	font-weight: 600;
	text-decoration: none;
}

.phone-link .icon {
	width: 0.75em;
	height: 0.75em;
	color: var(--gold-deep);
}

.phone-link:hover {
	color: var(--dusk);
	text-decoration: underline;
	text-decoration-color: var(--gold);
	text-decoration-thickness: 2px;
}

.contact-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.contact-list li + li {
	margin-top: 0.75rem;
}

.contact-list a {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 600;
}

.contact-list .icon {
	width: 1em;
	height: 1em;
}

@media (min-width: 45em) {
	.involve {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 4rem;
	}
}

/* ==========================================================================
   6. Inner pages, posts, archives
   ========================================================================== */

.page-hero {
	padding-block: clamp(2.5rem, 6vw, 4.5rem);
	background: var(--sky);
}

.page-hero__title {
	max-width: 22ch;
	margin: 0;
	font-size: clamp(2.25rem, 5.5vw, 3.5rem);
}

.page-hero__meta {
	margin: 0.85rem 0 0;
	color: var(--muted);
	font-size: 1rem;
}

.page-hero__intro {
	max-width: 40em;
	margin-top: 1rem;
}

.page-hero .search-form {
	margin-top: 1.5rem;
}

.page-body {
	padding-block: clamp(2.5rem, 6vw, 4rem) var(--section);
}

.post-feature {
	max-width: calc(56rem + 2 * var(--gutter));
	margin: 0 auto 2.5rem;
	padding-inline: var(--gutter);
}

.post-feature img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 80vh;
	margin-inline: auto;
	border-radius: var(--radius);
}

.post-nav {
	max-width: calc(var(--prose) + 2 * var(--gutter));
	margin: 3.5rem auto 0;
	padding-inline: var(--gutter);
}

.post-nav .nav-links {
	display: grid;
	gap: 1rem;
	padding-top: 2rem;
	border-top: 1px solid var(--sky-line);
}

.post-nav a {
	display: block;
	text-decoration: none;
}

.post-nav__label {
	display: block;
	color: var(--muted);
	font-size: 0.9375rem;
}

.post-nav__title {
	font-family: var(--serif);
	font-size: 1.25rem;
	font-weight: 600;
}

@media (min-width: 45em) {
	.post-nav .nav-links {
		grid-template-columns: 1fr 1fr;
	}

	.post-nav .nav-next {
		grid-column: 2;
		text-align: right;
	}
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 2.5rem;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding: 0 0.9rem;
	background: var(--white);
	border: 1px solid var(--sky-line);
	border-radius: 999px;
	color: var(--ink);
	text-decoration: none;
}

.pagination .page-numbers.current {
	background: var(--dusk);
	border-color: var(--dusk);
	color: var(--white);
}

.search-form {
	display: flex;
	gap: 0.5rem;
	max-width: 30rem;
}

.search-form__input {
	flex: 1;
	min-width: 0;
	min-height: 2.875rem;
	padding: 0.6rem 1.1rem;
	background: var(--white);
	border: 2px solid var(--sky-line);
	border-radius: 999px;
	color: var(--ink);
	font: inherit;
	font-size: 1rem;
}

.search-form__input:focus-visible {
	border-color: var(--dusk);
}

/* ==========================================================================
   7. Post and page content (the_content)
   ========================================================================== */

.entry-content {
	padding-inline: var(--gutter);
}

.entry-content::after {
	content: "";
	display: table;
	clear: both;
}

.entry-content > * {
	max-width: var(--prose);
	margin-inline: auto;
	margin-block: 0 1.25rem;
}

.entry-content > .alignwide {
	max-width: var(--wrap);
}

.entry-content > .alignfull {
	max-width: none;
	margin-inline: calc(-1 * var(--gutter));
}

.entry-content > :last-child {
	margin-bottom: 0;
}

.entry-content > h2 { margin-top: 2.5rem; }
.entry-content > h3 { margin-top: 2rem; }
.entry-content > h4 { margin-top: 1.75rem; }

.entry-content ul,
.entry-content ol {
	padding-left: 1.4em;
}

.entry-content li + li {
	margin-top: 0.35em;
}

.entry-content blockquote {
	padding-left: 1.25rem;
	border-left: 4px solid var(--gold);
	font-family: var(--serif);
	font-size: 1.25rem;
}

.entry-content figcaption,
.entry-content .wp-caption-text {
	margin-top: 0.5rem;
	color: var(--muted);
	font-size: 0.9375rem;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
}

.entry-content th,
.entry-content td {
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--sky-line);
	text-align: left;
}

.entry-content hr {
	border: 0;
	border-top: 1px solid var(--sky-line);
}

.entry-content .wp-block-button__link:not(.has-background) {
	background: var(--dusk);
}

.entry-content .wp-block-button__link:not(.has-text-color) {
	color: var(--white);
}

.entry-content .wp-caption {
	max-width: 100%;
}

/* Floats line up with the prose column, not the page edge. */
.entry-content > .alignleft {
	float: left;
	max-width: 50%;
	margin: 0.25rem 1.5rem 1rem max(0px, calc((100% - var(--prose)) / 2));
}

.entry-content > .alignright {
	float: right;
	max-width: 50%;
	margin: 0.25rem max(0px, calc((100% - var(--prose)) / 2)) 1rem 1.5rem;
}

.entry-content .wp-block-image .alignleft {
	margin-right: 1.5rem;
}

.entry-content .wp-block-image .alignright {
	margin-left: 1.5rem;
}

.aligncenter {
	margin-inline: auto;
}

.entry-content img.aligncenter {
	display: block;
}

/* Classic [gallery] shortcode */
.gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
	gap: 1rem;
}

.gallery-item {
	margin: 0;
}

.gallery-item img {
	display: block;
	width: 100%;
	height: auto;
}

.page-links {
	clear: both;
	margin-top: 2rem;
}

/* ==========================================================================
   8. Comments
   ========================================================================== */

.comments {
	padding-bottom: var(--section);
}

.comment-list {
	margin: 0 0 2rem;
	padding: 0;
	list-style: none;
}

.comment-list .children {
	list-style: none;
	padding-left: 1.5rem;
}

.comment-body {
	padding-block: 1.25rem;
	border-top: 1px solid var(--sky-line);
}

.comment-author .avatar {
	float: left;
	margin-right: 0.75rem;
	border-radius: 50%;
}

.comment-metadata {
	font-size: 0.875rem;
}

.comment-form label {
	display: block;
	font-weight: 600;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 0.6rem 0.8rem;
	border: 2px solid var(--sky-line);
	border-radius: 8px;
	font: inherit;
}

.comment-form .submit {
	min-height: 2.875rem;
	padding: 0.7rem 1.5rem;
	background: var(--dusk);
	border: 0;
	border-radius: 999px;
	color: var(--white);
	font: inherit;
	font-weight: 650;
	cursor: pointer;
}

/* ==========================================================================
   9. Footer
   ========================================================================== */

.site-footer {
	padding-block: 3.5rem 2rem;
	background: var(--ink);
	color: var(--footer-text);
	font-size: 1rem;
}

.site-footer a {
	color: var(--white);
}

.site-footer a:hover {
	color: var(--white);
	text-decoration-color: var(--gold);
}

.site-footer__grid {
	display: grid;
	gap: 2rem;
}

.site-footer__name {
	margin-bottom: 0.5rem;
	color: var(--white);
	font-family: var(--serif);
	font-size: 1.5rem;
	font-weight: 600;
}

.site-footer__tagline {
	max-width: 28em;
	margin: 0;
}

.site-footer__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer__list li + li {
	margin-top: 0.6rem;
}

.site-footer__list a[aria-current="page"] {
	text-decoration-color: var(--gold);
	text-decoration-thickness: 2px;
}

.site-footer__legal {
	margin: 2.5rem 0 0;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(255, 255, 255, 0.16);
	font-size: 0.9375rem;
}

@media (min-width: 48em) {
	.site-footer__grid {
		grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) minmax(0, 1fr);
	}
}

/* ==========================================================================
   10. Print
   ========================================================================== */

@media print {
	.site-header,
	.site-footer,
	.hero__actions,
	.skip-link {
		display: none;
	}

	.hero,
	.page-hero,
	.section--sky {
		background: none;
	}
}
