/* ==========================================================================
   IAAO Property Taxes — base styles
   Colors/type are close estimates from PDF exports; confirm exact values
   against the Figma inspector before final QA.
   ========================================================================== */

:root {
	--navy: #004981;
	--orange: #fd8442;
	--light-gray: #d9d9d9;
	--white: #ffffff;
	--dark-text: var(--navy);
	--font-heading: 'Poppins', system-ui, sans-serif;
	--font-body: 'Open Sans', system-ui, sans-serif;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: var(--font-body);
	color: var(--dark-text);
	line-height: 1.6;
}

h1, h2, h3 {
	font-family: var(--font-heading);
	font-weight: 700;
	line-height: 1.2;
	margin: 0 0 0.5em;
}

h2 {
	font-size: 2rem;
}

p {
	margin: 0 0 1em;
}

a {
	color: inherit;
}

.wrap {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 1.5rem;
}

/* Header
   ========================================================================== */

.site-header {
	background: var(--navy);
	color: var(--white);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	padding-top: 1rem;
	padding-bottom: 1rem;
	gap: 1rem;
}

.site-logo {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	text-decoration: none;
	color: var(--white);
}

.site-logo__icon {
	flex-shrink: 0;
	line-height: 0;
}

.site-logo__text {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}

.site-logo__title {
	display: block;
	font-family: var(--font-heading);
	font-weight: 400;
	font-size: 1.1rem;
	line-height: 1;
	letter-spacing: 0.04em;
	margin-bottom: 0.15em;
}

.site-logo__title strong {
	font-weight: 800;
}

.site-logo__tagline {
	font-size: 10px;
	font-style: italic;
	opacity: 0.8;
}

.site-nav__list {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav__list a {
	text-decoration: none;
	font-weight: 700;
	font-size: 0.85rem;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

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

.site-nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 1.25rem;
	height: 2.5rem;
	padding: 0;
	background: none;
	border: none;
	cursor: pointer;
}

.site-nav-toggle__bar {
	display: block;
	width: 100%;
	height: 2px;
	background: var(--white);
	border-radius: 1px;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-nav-toggle[aria-expanded="true"] .site-nav-toggle__bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.site-nav-toggle[aria-expanded="true"] .site-nav-toggle__bar:nth-child(2) {
	opacity: 0;
}

.site-nav-toggle[aria-expanded="true"] .site-nav-toggle__bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

/* Hero
   ========================================================================== */

/* Hero uses the core Cover block — .wp-block-cover__background is the dim
   overlay and .wp-block-cover__inner-container holds the heading/paragraph.
   Width-matched to the same content size the rest of the page's sections use
   (theme.json contentSize). On non-home pages, height is content-driven with
   equal padding above and below the headline. The homepage hero is taller
   and bottom-anchors its text instead (see .hero--home overrides below). */
.hero.wp-block-cover {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

/* Core's block-library CSS sets a 430px min-height fallback on
   .wp-block-cover/.wp-block-cover-image when no explicit minHeight attribute
   is set — override it here so non-home heroes can actually shrink. */
.hero.wp-block-cover:not(.hero--home),
.hero.wp-block-cover-image:not(.hero--home) {
	min-height: 230px;
}

.hero .wp-block-cover__inner-container {
	width: 100%;
	max-width: var(--wp--style--global--content-size, 1100px);
	margin: 0 auto;
	padding: 1rem 1.5rem;
	box-sizing: border-box;
}

.hero--home.wp-block-cover {
	min-height: 630px;
	justify-content: flex-end;
}

.hero--home .wp-block-cover__inner-container {
	padding: 0 1.5rem 3rem;
}

.hero .wp-block-cover__background {
	background-color: var(--navy) !important;
}

.hero__title {
	font-size: 2.5rem;
	max-width: 800px;
}

.hero__subtitle {
	font-size: 1.1rem;
}

.text-orange {
	color: var(--orange);
}

/* Sections
   ========================================================================== */

.section {
	padding: 4rem 1.5rem;
}

.section--orange {
	background: var(--orange);
	color: var(--white);
}

.section--navy {
	background: var(--navy);
	color: var(--white);
}

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

.section__lede {
	font-size: 1.1rem;
	margin-bottom: 1.5rem;
}

.section__intro {
	font-size: 1.1rem;
	max-width: 900px;
}

/* Match the left edge of the other (1100px-wide, auto-centered) elements in
   this section instead of re-centering this narrower 900px paragraph on its
   own — margin-left:0 would anchor it to the full-bleed section edge, not
   the content area's left edge. */
.section.section--navy > .section__intro {
	margin-left: calc((100% - min(100%, var(--wp--style--global--content-size, 1100px))) / 2) !important;
	margin-right: auto !important;
}

/* Override core's default .wp-block-columns bottom margin. */
:where(.wp-block-columns) {
	margin-bottom: 0;
}

/* Split sections use a core Columns block for the two-up layout (it already
   handles the responsive stack-on-mobile behavior) — this just adds spacing
   and vertical centering. */
.section--split .wp-block-columns {
	gap: 3rem;
	align-items: center;
}

/* Rows with a real photo (.section--split__media) stretch instead, so the
   image column's height matches the text column and the img can cover it
   edge-to-edge with no letterboxing. */
.section--split .wp-block-columns:has(.section--split__media) {
	align-items: stretch;
}

.section--split--reverse .wp-block-columns {
	flex-direction: row-reverse;
}

/* .section--split__media is the <figure> wrapper; object-fit only affects the
   actual <img> inside it, so the figure needs to stretch to fill its column
   (height:100%, requires the row to be align-items:stretch — see below) and
   the img fills+crops to match. */
.section--split__media {
	display: block;
	width: 100%;
	/* Grow past the column's own height by exactly .section's top+bottom
	   padding (4rem each) and pull back up/left by the same amount, so the
	   image ignores the section's vertical padding and fills full height. */
	height: calc(100% + 8rem);
	margin: -4rem 0;
}

.section--split__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Bleed only the outer edge (away from the text column) past the 1100px
   content area to the section's true outer edge — the inner edge next to
   the text stays put. */
.section--split .wp-block-columns:has(.section--split__media) > .wp-block-column:first-child .section--split__media {
	width: calc(100% + max(0px, (100vw - 1100px) / 2));
	margin-left: calc(-1 * max(0px, (100vw - 1100px) / 2));
}

.section--split .wp-block-columns:has(.section--split__media) > .wp-block-column:last-child .section--split__media {
	width: calc(100% + max(0px, (100vw - 1100px) / 2));
	margin-right: calc(-1 * max(0px, (100vw - 1100px) / 2));
}

.columns-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2rem;
}

.columns-3 {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
}

/* Image grid (homepage "How Property Taxes Support You")
   ========================================================================== */

/* .image-grid is a Group block whose direct children are core/image blocks
   (each figure has its own figcaption for the caption text). */
.image-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
	margin: 2rem 0;
}

.image-grid .wp-block-image {
	margin: 0;
}

.image-grid .wp-block-image img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	background-color: var(--light-gray);
	border-radius: 4px;
	margin-bottom: 0.75rem;
}

.image-grid figcaption {
	font-weight: 700;
	color: var(--navy);
	text-align: left;
}

/* Icon blocks (About "Continuing the Mission Today")
   ========================================================================== */

.icon-block {
	text-align: left;
}

.icon-block__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 8rem;
	height: 8rem;
	border-radius: 50%;
	color: var(--navy);
	font-size: 1.25rem;
	margin-bottom: 1rem;
}

/* Stat circles (About "Our History")
   ========================================================================== */

.stat-circles {
	position: relative;
	height: 320px;
}

.stat-circle {
	position: absolute;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	color: var(--white);
	text-align: center;
	line-height: 1.1;
}

.stat-circle__number {
	font-family: var(--font-heading);
	font-weight: 800;
	font-size: 1.5rem;
}

.stat-circle__label {
	font-size: 0.75rem;
}

.stat-circle--lg {
	width: 220px;
	height: 220px;
	background: var(--orange);
	top: 0;
	left: 40px;
}

.stat-circle--md {
	width: 150px;
	height: 150px;
	background: #2f5a91;
	top: 40px;
	right: 20px;
}

.stat-circle--sm {
	width: 110px;
	height: 110px;
	background: var(--white);
	color: var(--navy);
	bottom: 0;
	left: 10px;
}

/* Illustrations
   ========================================================================== */

.illustration {
	max-width: 100%;
	height: auto;
	display: block;
	margin: 0;
}

/* The houses illustration closes out the homepage's orange section — sit it
   flush on the section's bottom edge with no trailing padding beneath it. */
.section:has(.illustration--houses) {
	padding-bottom: 0;
}

/* Navy bar overlaid across the very bottom of the homepage's blue-band
   section, on top of its orange background/illustration. */
.section--blue-band {
	position: relative;
}

.section--blue-band::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 40px;
	background: var(--navy);
	z-index: 1;
}

.section--blue-band .illustration--houses {
	position: relative;
	z-index: 2;
}

/* The houses illustration stays flush where it was; extend the section 20px
   past it so the bottom 20px of the 40px bar peeks out below the image
   (the top 20px stays hidden behind the image, same as before). */
.section.section--blue-band {
	padding-bottom: 20px;
}

/* About's "What IAAO Members Do?" section: the neighborhood illustration sits
   in the second column and should sit flush on the section's bottom edge,
   while the text column keeps its own bottom padding. */
.section:has(.illustration--neighborhood) {
	padding-bottom: 0;
}

.section:has(.illustration--neighborhood) .wp-block-column:first-child {
	padding-bottom: 4rem;
}

.illustration--neighborhood {
	max-width: 150%;
	margin-left: -120px;
}

/* Full-width navy divider bar sitting directly above the section. */
.section:has(.illustration--neighborhood) {
	position: relative;
}

.section:has(.illustration--neighborhood)::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 30px;
	background: var(--navy);
	transform: translateY(-100%);
}

.section:has(.illustration--neighborhood) .wp-block-columns {
	align-items: flex-end !important;
}

/* FAQ accordion (native <details>/<summary>)
   ========================================================================== */

.faq-list {
	margin-top: 2rem;
}

/* .faq-item is applied as a custom class on the core/details block. */
.faq-item {
	background: var(--light-gray);
	border-radius: 4px;
	margin-bottom: 0.75rem;
	padding: 0;
}

.faq-item > summary {
	list-style: none;
	cursor: pointer;
	padding: 1.1rem 1.5rem;
	font-weight: 700;
	color: var(--navy);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.faq-item > summary::-webkit-details-marker {
	display: none;
}

.faq-item > summary::after {
	content: '\2193';
	font-size: 1.5rem;
	font-weight: 200;
	margin-left: 1rem;
	transition: transform 0.2s ease;
}

.faq-item[open] > summary::after {
	transform: rotate(180deg);
}

.faq-item > p {
	padding: 0 1.5rem 1.25rem;
	margin: 0;
	color: var(--navy);
}

/* Footer
   ========================================================================== */

.site-footer {
	background: var(--orange);
	color: var(--white);
	padding: 2.5rem 0;
}

.site-footer__inner {
	display: grid;
	grid-template-columns: 1.5fr 2fr 1fr;
	gap: 2rem;
}

.site-footer__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.site-footer__list a {
	text-decoration: none;
	font-weight: 700;
	font-size: 0.85rem;
	text-transform: uppercase;
}

.site-footer__contact {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.site-footer__contact-label {
	font-weight: 700;
	font-size: 0.85rem;
}

.site-footer__contact a {
	text-decoration: none;
}

/* Responsive
   ========================================================================== */

@media (max-width: 782px) {
	.section--split__inner,
	.columns-2,
	.columns-3,
	.image-grid {
		grid-template-columns: 1fr;
	}

	.site-footer__inner {
		grid-template-columns: 1fr;
	}

	.site-nav-toggle {
		display: flex;
	}

	.site-nav {
		display: none;
		width: 100%;
		order: 3;
	}

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

	.site-nav__list {
		flex-direction: column;
		gap: 1rem;
		padding: 1rem 0;
	}
}

/* Animated clouds above the homepage's houses illustration
   ========================================================================== */

.cloud-layer {
	position: relative;
	max-width: 1000px;
	height: 160px;
	margin: 0 auto 1.5rem;
	overflow: hidden;
}

.cloud {
	position: absolute;
	left: 0;
	opacity: 0;
	transform: translateX(-50%);
	animation-name: cloud-drift;
	animation-timing-function: linear;
	animation-iteration-count: infinite;
}

/* Each cloud drifts left-to-right across the full width of .cloud-layer,
   fading in from the left edge and fading out at the right edge. A negative
   animation-delay of exactly half the duration starts every cloud at the
   50% keyframe (dead center, fully visible) on page load, then continues
   forward from there — so they all begin "static" in the middle without
   needing any JS. Sizes/speeds are varied (bigger + closer drifts faster,
   smaller + distant drifts slower) to read as more natural/parallaxed. */
@keyframes cloud-drift {
	0% {
		left: 0%;
		opacity: 0;
	}
	8% {
		opacity: 1;
	}
	50% {
		left: 50%;
		opacity: 1;
	}
	92% {
		opacity: 1;
	}
	100% {
		left: 100%;
		opacity: 0;
	}
}

.cloud--1 {
	top: 10px;
	width: 110px;
	animation-duration: 24s;
	animation-delay: -2.63s;
}

.cloud--2 {
	top: 70px;
	width: 78px;
	animation-duration: 36s;
	animation-delay: -9.95s;
}

.cloud--3 {
	top: 30px;
	width: 91px;
	animation-duration: 30s;
	animation-delay: -16.58s;
}

.cloud--4 {
	top: 50px;
	width: 103px;
	animation-duration: 21.6s;
	animation-delay: -19.27s;
}

@media (prefers-reduced-motion: reduce) {
	.cloud {
		animation: none;
		left: 50%;
		opacity: 1;
	}
}
