/*
 * Oahu Local theme: layout, chrome and editorial typography.
 * Colors, type scale and spacing come from theme.json; component styles for the
 * dynamic sections live in the Oahu Local Core plugin (assets/css/core.css).
 * No JavaScript: the mobile menu is the core Navigation block overlay.
 */

/* Base ------------------------------------------------------------------- */
html { scroll-padding-top: 1rem; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-wrap: break-word; }
img { max-width: 100%; height: auto; }
a { text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

/* Visible focus everywhere (3px, ≥3:1 against white, sand and navy). */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--orange-ink);
	outline-offset: 2px;
	border-radius: 2px;
}
.has-navy-background-color :focus-visible,
.ol-topbar :focus-visible { outline-color: #fff; }

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}
/* Core's skip link ("Skip to content") — make it obvious when focused. */
.skip-link.screen-reader-text:focus {
	clip-path: none;
	width: auto;
	height: auto;
	margin: 0;
	top: 0.5rem;
	left: 0.5rem;
	z-index: 100000;
	padding: 0.75rem 1rem;
	background: var(--wp--preset--color--navy);
	color: #fff;
	font-weight: 700;
	text-decoration: none;
	border-radius: 4px;
	outline: 3px solid var(--wp--preset--color--orange);
}

/* Header ----------------------------------------------------------------- */
.ol-topbar { font-size: var(--wp--preset--font-size--x-small); }
.ol-topbar__inner { padding-block: 0.4rem; gap: 1rem; }
.ol-topbar p { margin: 0; }
.ol-topbar a { color: #fff; text-decoration: none; }
.ol-topbar a:hover { text-decoration: underline; }
.ol-topbar__links { display: flex; gap: 1.1rem; font-weight: 600; white-space: nowrap; }
@media (max-width: 599px) {
	.ol-topbar__tagline { display: none; }
	.ol-topbar__inner { justify-content: flex-end !important; }
}

.ol-masthead { background: var(--wp--preset--color--base); border-bottom: 1px solid var(--wp--preset--color--line); }
.ol-masthead__inner { padding-block: 0.85rem; gap: 1.25rem; }
.ol-logo { flex: none; margin: 0; }
.ol-logo img { width: clamp(140px, 22vw, 200px) !important; height: auto; }
.ol-primary-nav { font-weight: 700; font-size: var(--wp--preset--font-size--small); }
.ol-primary-nav .wp-block-navigation-item__content { color: var(--wp--preset--color--navy); text-decoration: none; padding-block: 0.35rem; }
.ol-primary-nav .wp-block-navigation-item__content:hover,
.ol-primary-nav .current-menu-item > .wp-block-navigation-item__content,
.ol-primary-nav [aria-current="page"] {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--orange);
	text-decoration-thickness: 3px;
	text-underline-offset: 0.45em;
}
.ol-primary-nav .wp-block-navigation__container { gap: 1.35rem; }
.ol-header-cta { flex: none; margin: 0; }
.ol-subscribe-btn .wp-block-button__link { padding: 0.6em 1.15em; white-space: nowrap; }

/* Desktop: the header button replaces the nav's Subscribe item. */
@media (min-width: 600px) {
	.ol-primary-nav .ol-nav-subscribe { display: none; }
}
/* Tablet: logo + button on the first row, menu below. */
@media (min-width: 600px) and (max-width: 1079px) {
	.ol-masthead__inner { flex-wrap: wrap !important; row-gap: 0.5rem; }
	.ol-primary-nav { order: 3; flex-basis: 100%; }
	.ol-primary-nav .wp-block-navigation__container { justify-content: flex-start; flex-wrap: wrap; gap: 0.35rem 1.25rem; }
	.ol-masthead .ol-logo { margin-right: auto; }
}
/* Phone: hamburger + compact button. */
@media (max-width: 599px) {
	.ol-masthead__inner { gap: 0.6rem; }
	.ol-masthead .ol-logo { margin-right: auto; }
	.ol-primary-nav { order: 3; }
	.ol-subscribe-btn .wp-block-button__link { font-size: 0.875rem; padding: 0.55em 0.9em; }
	.ol-primary-nav .wp-block-navigation__responsive-container-open { padding: 0.6rem; min-width: 44px; min-height: 44px; color: var(--wp--preset--color--navy); }
}
/* Overlay (mobile menu) */
.ol-primary-nav .wp-block-navigation__responsive-container.is-menu-open { padding: 1.25rem; }
.ol-primary-nav .is-menu-open .wp-block-navigation__container { gap: 0.25rem !important; font-size: var(--wp--preset--font-size--large); font-family: var(--wp--preset--font-family--serif); }
.ol-primary-nav .is-menu-open .wp-block-navigation-item__content { padding-block: 0.5rem !important; }
.ol-primary-nav .wp-block-navigation__responsive-container-close { min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; }

/* Main areas ------------------------------------------------------------- */
.ol-main, .ol-home { padding-block: var(--wp--preset--spacing--50) var(--wp--preset--spacing--70); }
.ol-home > * + * { margin-block-start: var(--wp--preset--spacing--60); }

/* Home */
.ol-home-top { display: grid; gap: var(--wp--preset--spacing--50); }
@media (min-width: 1024px) {
	.ol-home-top { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); align-items: start; }
	.ol-home-top > .ol-section { margin: 0; }
}
.ol-home-intro { padding-block: var(--wp--preset--spacing--60); }
.ol-home-intro__grid { display: grid; gap: var(--wp--preset--spacing--50); align-items: center; }
@media (min-width: 900px) { .ol-home-intro__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } }
.ol-home-intro__copy h2 { margin-block: 0.25rem 1rem; color: var(--wp--preset--color--navy); }
.ol-home-intro__copy p { max-width: 60ch; }
.ol-eyebrow { margin: 0; font-size: var(--wp--preset--font-size--x-small); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wp--preset--color--orange-ink); }
.ol-home-split { display: grid; gap: var(--wp--preset--spacing--60); }
@media (min-width: 1024px) {
	.ol-home-split { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
	.ol-home-aside { position: sticky; top: 1rem; }
}
.ol-home-split > .ol-section, .ol-home-aside > .ol-section { margin-bottom: 0; }

/* Article ---------------------------------------------------------------- */
.ol-article__header { padding-top: var(--wp--preset--spacing--30); }
.ol-article__title {
	margin-block: 0.25rem 0;
	font-size: clamp(2rem, 1.3rem + 3vw, 3.5rem);
	line-height: 1.06;
	letter-spacing: -0.015em;
	color: var(--wp--preset--color--navy);
}
.ol-article__body { margin-top: var(--wp--preset--spacing--40); }
.ol-prose { font-size: var(--wp--preset--font-size--medium); line-height: 1.65; }
/* Measure: post content uses a 40rem column (about 68 characters of 19px Source Sans 3). Set in rem, not ch, so headings line up with body text. */
.ol-prose > * + * { margin-block-start: 1.15em; }
.ol-prose h2 { margin-block-start: 2em; font-size: var(--wp--preset--font-size--x-large); color: var(--wp--preset--color--navy); }
.ol-prose h3 { margin-block-start: 1.75em; font-size: var(--wp--preset--font-size--large); }
.ol-prose a { color: var(--wp--preset--color--navy); text-decoration-color: var(--wp--preset--color--orange-ink); }
.ol-prose a:hover { color: var(--wp--preset--color--orange-ink); }
.ol-prose ul, .ol-prose ol { padding-left: 1.35em; }
.ol-prose li + li { margin-top: 0.4em; }
.ol-prose blockquote, .ol-prose .wp-block-quote { margin-inline: 0; padding-left: 1.25rem; border-left: 4px solid var(--wp--preset--color--orange); font-style: normal; }
.ol-prose figcaption, .ol-prose .wp-element-caption { font-size: var(--wp--preset--font-size--x-small); color: var(--wp--preset--color--muted); }
.ol-prose .wp-block-image img { border-radius: 4px; }
.ol-prose hr { border: 0; border-top: 1px solid var(--wp--preset--color--line); }
.ol-prose table { border-collapse: collapse; width: 100%; font-size: var(--wp--preset--font-size--small); }
.ol-prose th, .ol-prose td { padding: 0.5rem; border-bottom: 1px solid var(--wp--preset--color--line); text-align: left; }
.ol-lede, .ol-prose > p.ol-lede { font-size: var(--wp--preset--font-size--large); line-height: 1.5; }
.ol-pullquote, .ol-prose .ol-pullquote {
	margin-block: 2rem;
	padding: 0;
	border: 0;
	font-family: var(--wp--preset--font-family--serif);
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.25;
	color: var(--wp--preset--color--navy);
}
.ol-pullquote cite { display: block; margin-top: 0.75rem; font-family: var(--wp--preset--font-family--sans); font-size: var(--wp--preset--font-size--small); font-style: normal; color: var(--wp--preset--color--muted); }
.ol-correction, .ol-checked-note { font-size: var(--wp--preset--font-size--small); }

/* Block styles editors can choose */
.is-style-ol-info-box, .ol-info-box {
	padding: 1.25rem 1.5rem !important;
	border: 1px solid var(--wp--preset--color--line);
	border-top: 4px solid var(--wp--preset--color--navy);
	border-radius: 6px;
	background: var(--wp--preset--color--sky);
	font-size: var(--wp--preset--font-size--small);
}
.is-style-ol-info-box > :first-child, .ol-info-box > :first-child { margin-top: 0; }
.ol-info-box__title { font-family: var(--wp--preset--font-family--sans); font-size: var(--wp--preset--font-size--small); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--wp--preset--color--navy); }
.ol-info-list { list-style: none; padding-left: 0 !important; }
.ol-info-list strong { color: var(--wp--preset--color--navy); }
.is-style-ol-note {
	padding: 1rem 1.25rem !important;
	border-left: 4px solid var(--wp--preset--color--orange-ink);
	background: var(--wp--preset--color--tint);
	font-size: var(--wp--preset--font-size--small);
}
.is-style-ol-note > :first-child { margin-top: 0; }
.is-style-ol-numbered-guide { list-style: none; counter-reset: olstep; padding-left: 0 !important; }
.is-style-ol-numbered-guide > li { counter-increment: olstep; position: relative; padding-left: 3rem; min-height: 2.25rem; }
.is-style-ol-numbered-guide > li::before {
	content: counter(olstep);
	position: absolute;
	left: 0;
	top: 0;
	display: grid;
	place-items: center;
	width: 2.1rem;
	height: 2.1rem;
	border-radius: 50%;
	background: var(--wp--preset--color--navy);
	color: #fff;
	font: 700 1rem/1 var(--wp--preset--font-family--sans);
}
.is-style-ol-bordered img { border: 1px solid var(--wp--preset--color--line); padding: 4px; background: #fff; }
.ol-bordered { border: 1px solid var(--wp--preset--color--line); border-radius: 6px; padding: 1.25rem; }
.ol-link-list { list-style: none; padding-left: 0 !important; }
.ol-link-list li { padding-block: 0.4rem; border-bottom: 1px solid var(--wp--preset--color--line); }

/* Archives, search, feed ---------------------------------------------------- */
.ol-archive-header { margin-bottom: var(--wp--preset--spacing--50); padding-bottom: var(--wp--preset--spacing--30); border-bottom: 3px solid var(--wp--preset--color--navy); }
.ol-archive-title { margin: 0; font-size: var(--wp--preset--font-size--xx-large); color: var(--wp--preset--color--navy); }
.ol-archive-description { max-width: 65ch; margin-top: 0.5rem; color: var(--wp--preset--color--muted); }
.ol-feed__list { display: grid; gap: var(--wp--preset--spacing--40); margin: 0; padding: 0; list-style: none; }
.ol-feed__list > li { margin: 0; }
.ol-feed-card { display: grid; gap: 1rem; padding-bottom: var(--wp--preset--spacing--40); border-bottom: 1px solid var(--wp--preset--color--line); }
.ol-feed-card__media { margin: 0; }
.ol-feed-card__media img { border-radius: 6px; }
.ol-feed-card__title { margin: 0 0 0.4rem; font-size: var(--wp--preset--font-size--large); line-height: 1.2; }
.ol-feed-card__title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.ol-feed-card__title a:hover, .ol-feed-card__title a:focus-visible { color: var(--wp--preset--color--navy); text-decoration: underline; text-decoration-color: var(--wp--preset--color--orange); }
.ol-feed-card .wp-block-post-excerpt { margin: 0 0 0.4rem; }
.ol-feed-card .wp-block-post-excerpt__excerpt { margin: 0; }
@media (min-width: 700px) {
	.ol-feed-card:has(.ol-feed-card__media) { grid-template-columns: 15rem minmax(0, 1fr); align-items: start; }
}
.ol-search-form { max-width: 40rem; margin-block: 1rem; }
.ol-search-form .wp-block-search__input { min-height: 3rem; border: 2px solid var(--wp--preset--color--muted); border-radius: 6px; padding-inline: 0.85rem; font-size: 1.0625rem; }
.ol-search-form .wp-block-search__button { margin-left: 0.5rem; }

/* Core pagination */
.ol-pagination.wp-block-query-pagination { margin-top: var(--wp--preset--spacing--50); gap: 0.5rem; font-weight: 700; }
.ol-pagination a, .ol-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding: 0 0.75rem;
	border-radius: 999px;
	color: var(--wp--preset--color--navy);
	text-decoration: none;
}
.ol-pagination a { border: 1px solid var(--wp--preset--color--line); }
.ol-pagination a:hover { border-color: var(--wp--preset--color--navy); }
.ol-pagination .page-numbers.current { background: var(--wp--preset--color--navy); color: #fff; }
.ol-pagination .page-numbers.dots { border: 0; }

.ol-empty, .ol-404 { max-width: 44rem; }
.ol-empty { padding: 1.5rem; border: 2px dashed var(--wp--preset--color--line); border-radius: 6px; background: var(--wp--preset--color--sand); }
.ol-empty > :first-child { margin-top: 0; }

/* Events ----------------------------------------------------------------- */
.ol-events-layout, .ol-event__layout { display: grid; gap: var(--wp--preset--spacing--60); }
@media (min-width: 960px) {
	.ol-events-layout { grid-template-columns: minmax(0, 2.2fr) minmax(16rem, 1fr); align-items: start; }
	.ol-event__layout { grid-template-columns: minmax(0, 1.8fr) minmax(16rem, 1fr); align-items: start; }
	.ol-event__aside, .ol-events-aside { position: sticky; top: 1rem; }
}
.ol-event__layout { margin-top: var(--wp--preset--spacing--40); }
.ol-event__more { margin-top: var(--wp--preset--spacing--60); }
.ol-event__more > * + * { margin-top: var(--wp--preset--spacing--50); }
.ol-event__disclaimer { color: var(--wp--preset--color--muted); }
.ol-cta-card { padding: 1.25rem 1.5rem; border-radius: 8px; }
.ol-cta-card h2 { margin-top: 0; color: var(--wp--preset--color--navy); }

/* Pages ------------------------------------------------------------------ */
.ol-page__header { margin-bottom: var(--wp--preset--spacing--40); }
.ol-page__header h1 { color: var(--wp--preset--color--navy); }

/* Footer ----------------------------------------------------------------- */
.ol-site-footer { margin-top: 0; }
.ol-footer { padding-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--40); border-top: 1px solid var(--wp--preset--color--line); }
.ol-footer__grid { display: grid; gap: var(--wp--preset--spacing--50); }
@media (min-width: 700px) { .ol-footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ol-footer__brand { grid-column: 1 / -1; } }
@media (min-width: 1024px) { .ol-footer__grid { grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); } .ol-footer__brand { grid-column: auto; } }
.ol-footer__brand p { max-width: 40ch; color: var(--wp--preset--color--ink); }
.ol-footer .ol-logo img { width: 170px !important; }
.ol-footer__heading { margin: 0 0 0.75rem; font-family: var(--wp--preset--font-family--sans); font-size: var(--wp--preset--font-size--x-small); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wp--preset--color--navy); }
.ol-footer__nav ul { margin: 0; padding: 0; list-style: none; }
.ol-footer__nav li + li { margin-top: 0.15rem; }
.ol-footer__nav a { display: inline-block; padding-block: 0.3rem; color: var(--wp--preset--color--ink); text-decoration: none; }
.ol-footer__nav a:hover, .ol-footer__nav a:focus-visible { color: var(--wp--preset--color--navy); text-decoration: underline; }
.ol-footer__legal { margin-top: var(--wp--preset--spacing--50); padding-top: var(--wp--preset--spacing--30); border-top: 1px solid var(--wp--preset--color--line); color: var(--wp--preset--color--muted); }
.ol-footer__legal p { margin: 0; }
.ol-footer__policies { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; }
.ol-footer__policies a { color: var(--wp--preset--color--muted); }

/* Motion & print ----------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media print {
	.ol-topbar, .ol-primary-nav, .ol-header-cta, .ol-site-footer, .ol-nl, .ol-sponsor, .ol-section--related, .ol-event__more, .ol-breadcrumbs, .ol-preview-banner, #wpadminbar { display: none !important; }
	body { color: #000; background: #fff; font-size: 12pt; }
	.ol-prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
	.ol-figure, img { break-inside: avoid; }
}
