/*
 * Site chrome (inc/site-chrome.php): linen masthead, slim scrolled bar, phone row + navy menu sheet, navy footer.
 * Loaded only while the new chrome is on. Colours come from the --op-* tokens in style.css.
 */

/* Divi hides overflow on #page-container, which would stop the sticky phone header; clip sideways only. */
.op-chrome #page-container { padding-top: 0 !important; margin-top: 0 !important; overflow: visible !important; overflow-x: clip !important; }
.op-chrome .et_pb_scroll_top { display: none !important; }

.op-ico { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.op-ico .op-ico-fill, .op-ico-fill { fill: currentColor; stroke: none; }

.op-skip {
	position: absolute; left: 12px; top: -80px; z-index: 100001;
	background: var(--op-deep); color: #fff !important; padding: 12px 18px; border-radius: var(--op-radius);
	font-weight: 600; text-decoration: none;
}
.op-skip:focus { top: calc(12px + var(--wp-admin--admin-bar--height, 0px)); }
#main-content:focus { outline: none; } /* the skip link's target; the page itself needs no ring */
.op-frame-focus { outline: 2px solid var(--op-focus) !important; outline-offset: 3px; } /* set by chrome.js while an embedded frame has keyboard focus */

/* Shared buttons. */
.op-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 48px; padding: 0 22px; border-radius: var(--op-radius);
	font: 600 16px/1.2 'Jost', sans-serif; text-decoration: none !important; white-space: nowrap;
	transition: background-color .25s cubic-bezier(.16, 1, .3, 1), box-shadow .25s cubic-bezier(.16, 1, .3, 1);
}
.op-btn--navy { background: var(--op-cta); color: var(--op-on-cta) !important; }
.op-btn--navy:hover { background: var(--op-cta-hover); }
.op-btn--linen { background: var(--op-on-deep); color: var(--op-deep) !important; }
.op-btn--linen:hover { background: #fff; }
.op-btn--ghost { background: transparent; color: var(--op-on-deep) !important; box-shadow: inset 0 0 0 1px var(--op-on-deep-muted); }
.op-btn--ghost:hover { box-shadow: inset 0 0 0 2px var(--op-on-deep); }

/* Brand lockup. */
.op-brand { display: flex; align-items: center; gap: 18px; text-decoration: none; color: inherit; }
.op-brand .op-logo { width: 84px; height: auto; display: block; }
.op-brand__word { display: grid; line-height: 1; }
.op-brand__name { font: 700 46px/1 'Alegreya', Georgia, serif; color: var(--op-deep); letter-spacing: -.01em; }
.op-brand__line { font: italic 500 19px/1.3 'Alegreya', Georgia, serif; color: var(--op-ink-soft); margin-top: 6px; }

/* Masthead lockup, "justified": the name and the tagline share one measure (the tagline's tracking is tuned so
   it spans the name exactly), split by a gold rule, with the text block centred on the badge. */
.op-head .op-brand { align-items: center; gap: 20px; }
.op-head .op-brand__word { display: inline-grid; justify-items: stretch; padding-top: 6px; line-height: 1; }
.op-head .op-brand__name { line-height: .92; letter-spacing: -.012em; margin-left: -.04em; }
.op-head .op-brand__line {
	font: 600 13px/1 'Jost', sans-serif; text-transform: uppercase; color: var(--op-accent);
	letter-spacing: .21em; margin: 12px -.21em 0 0; padding-top: 10px; border-top: 1px solid var(--op-trim); white-space: nowrap;
}

/*------------------------------------------------*/
/* Masthead                                        */
/*------------------------------------------------*/
.op-head {
	position: relative; z-index: 50;
	background: var(--op-tex-linen), var(--op-surface);
	border-bottom: 1px solid var(--op-rule);
	font-family: 'Jost', sans-serif;
}
.op-head__strip {
	display: flex; justify-content: space-between; align-items: center; gap: 16px;
	padding: 0 clamp(16px, 4vw, 56px);
	font-size: 15px; line-height: 1.3;
}
.op-head__reach { display: flex; gap: 24px; }
.op-head__strip a {
	display: inline-flex; align-items: center; gap: 8px; min-height: 40px;
	color: var(--op-ink); font-weight: 500; text-decoration: none;
}
.op-head__strip .op-ico { color: var(--op-accent); }
.op-head__strip a:hover { color: var(--op-deep); text-decoration: underline; text-decoration-color: var(--op-trim); text-underline-offset: 5px; }

.op-head__row {
	display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
	padding: 4px clamp(16px, 4vw, 56px) 0;
}
.op-head__row > .op-brand { grid-column: 2; }
.op-head__cta { grid-column: 3; justify-self: end; }
.op-head__toggle { display: none; }

/* The menu reads like the course list on a printed menu: centred, small gold diamonds, double trim rule above. */
.op-head__nav { margin: 18px clamp(16px, 4vw, 56px) 0; border-top: 1px solid var(--op-trim); position: relative; }
.op-head__nav::before { content: ""; position: absolute; inset: 3px 0 auto; border-top: 1px solid var(--op-trim); }
.op-head__nav ul { list-style: none; margin: 0; padding: 4px 0 !important; display: flex; justify-content: center; flex-wrap: wrap; }
.op-head__nav li { display: flex; align-items: center; padding: 0 !important; }
.op-head__nav li + li::before { content: ""; width: 5px; height: 5px; background: var(--op-trim); transform: rotate(45deg); margin: 0 4px; }
.op-head__nav a {
	position: relative; display: block; padding: 12px 14px;
	font: 500 21px/1.2 'Alegreya', Georgia, serif !important; color: var(--op-deep); text-decoration: none;
}
.op-head__nav a::after {
	content: ""; position: absolute; left: 14px; right: 14px; bottom: 7px; height: 2px; background: var(--op-accent);
	transform: scaleX(0); transition: transform .35s cubic-bezier(.16, 1, .3, 1);
}
.op-head__nav a:hover::after, .op-head__nav a[aria-current]::after { transform: scaleX(1); }

@media (max-width: 1240px) {
	.op-head__nav a { font-size: 19px !important; padding: 12px 10px; }
	.op-head__nav a::after { left: 10px; right: 10px; }
}

/*------------------------------------------------*/
/* Slim bar once the masthead has scrolled away    */
/*------------------------------------------------*/
.op-mini {
	position: fixed; left: 0; right: 0; top: var(--wp-admin--admin-bar--height, 0px); z-index: 9990;
	display: flex; align-items: center; gap: 24px; height: 64px; padding: 0 clamp(16px, 4vw, 56px);
	background: var(--op-tex-linen), var(--op-surface);
	border-bottom: 1px solid var(--op-rule);
	box-shadow: 0 14px 30px -24px rgba(28, 36, 64, .45);
	transform: translateY(-110%); visibility: hidden;
	transition: transform .4s cubic-bezier(.16, 1, .3, 1), visibility 0s .4s;
	font-family: 'Jost', sans-serif;
}
.op-mini.is-on { transform: none; visibility: visible; transition-delay: 0s; }
.op-mini__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.op-mini__brand .op-logo { width: 40px; height: auto; }
.op-mini__brand span { font: 700 22px/1 'Alegreya', Georgia, serif; color: var(--op-deep); }
.op-mini__nav { display: flex; flex-wrap: nowrap; gap: 2px; margin: 0 auto; }
.op-mini__nav a {
	display: inline-flex; align-items: center; height: 44px; padding: 0 10px;
	font: 500 17px/1 'Alegreya', Georgia, serif !important; color: var(--op-deep); text-decoration: none; white-space: nowrap;
}
.op-mini__nav a:hover, .op-mini__nav a[aria-current] { box-shadow: inset 0 -2px 0 var(--op-accent); }
.op-mini__tel { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--op-deep); text-decoration: none; white-space: nowrap; }
.op-mini__tel .op-ico { color: var(--op-accent); }
.op-mini__tel:hover { text-decoration: underline; text-decoration-color: var(--op-trim); text-underline-offset: 5px; }
@media (max-width: 1320px) { .op-mini__tel { display: none; } }
@media (max-width: 1160px) { .op-mini__nav { display: none; } .op-mini__tel { display: inline-flex; margin-left: auto; } }

/*------------------------------------------------*/
/* Phones and small tablets                        */
/*------------------------------------------------*/
@media (max-width: 980px) {
	.op-mini { display: none; }
	.op-head { position: sticky; top: var(--wp-admin--admin-bar--height, 0px); box-shadow: 0 10px 24px -22px rgba(28, 36, 64, .5); }
	.op-head__strip, .op-head__nav, .op-head__cta { display: none; }
	.op-head__row { grid-template-columns: 1fr auto; gap: 12px; padding: 8px 16px; min-height: 64px; }
	.op-head__row > .op-brand { grid-column: 1; }
	.op-brand { gap: 10px; }
	.op-brand .op-logo { width: 46px; }
	.op-brand__name { font-size: 24px; }
	.op-brand__line { font-size: 14px; margin-top: 3px; }
	/* Phones: too narrow to stretch the tagline to the name, so it keeps light tracking under the rule. */
	.op-head .op-brand { gap: 12px; }
	.op-head .op-brand__word { padding-top: 2px; justify-items: start; }
	.op-head .op-brand__name { font-size: 26px; }
	.op-head .op-brand__line { font-size: 11px; letter-spacing: .05em; margin: 5px 0 0; padding-top: 5px; }
	.op-head__toggle {
		display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px;
		background: var(--op-cta); color: var(--op-on-cta); border: 0; border-radius: var(--op-radius);
		font: 600 16px/1 'Jost', sans-serif; cursor: pointer;
	}
	.op-head__toggle:hover { background: var(--op-cta-hover); }
}
/* The smallest phones can't fit the tagline beside the Menu button; the name stands alone. */
@media (max-width: 374px) {
	.op-head .op-brand__line { display: none; }
	.op-head .op-brand__word { padding-top: 0; }
}
/* WordPress drops the admin bar to static positioning on narrow phones. */
@media (max-width: 600px) { .admin-bar .op-head { top: 0; } }

/* Phone menu: a navy sheet with a photo row for each kind of event. */
.op-sheet {
	position: fixed; inset: 0; z-index: 100000;
	background: var(--op-tex-grain-light), var(--op-cta-hover);
	color: var(--op-on-deep);
	padding: 0 max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
	overflow-y: auto; overscroll-behavior: contain;
	opacity: 0; transition: opacity .3s cubic-bezier(.16, 1, .3, 1);
	font-family: 'Jost', sans-serif;
}
.op-sheet[hidden] { display: none; }
.op-sheet.is-open { opacity: 1; }
.op-sheet__top {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	min-height: 64px; padding: 8px 0; margin-top: env(safe-area-inset-top);
}
.op-brand--sheet .op-logo { width: 46px; }
.op-brand--sheet .op-brand__name { font-size: 24px; color: var(--op-on-deep); }
.op-brand--sheet .op-brand__line { font-size: 14px; color: var(--op-on-deep-muted); margin-top: 3px; }
.op-sheet__close {
	width: 48px; height: 48px; display: grid; place-items: center; flex: none;
	background: rgba(246, 243, 239, .1); color: var(--op-on-deep); border: 0; border-radius: var(--op-radius); cursor: pointer;
}
.op-sheet__close .op-ico { width: 22px; height: 22px; }
.op-sheet__title { font: italic 500 18px/1.3 'Alegreya', Georgia, serif !important; color: var(--op-on-deep-muted); margin: 12px 0 12px; padding: 0; }
.op-sheet ul { list-style: none; margin: 0; padding: 0 !important; }
.op-sheet li { padding: 0 !important; }
.op-sheet__rows { display: grid; gap: 10px; }
.op-row {
	display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center;
	padding: 6px; border-radius: 6px; background: rgba(246, 243, 239, .06);
	color: var(--op-on-deep); text-decoration: none;
	transition: background-color .25s ease-out;
}
.op-row:hover { background: rgba(246, 243, 239, .12); }
.op-row[aria-current] { box-shadow: inset 0 0 0 1px var(--op-trim); }
.op-row__img { width: 96px; height: 72px; object-fit: cover; border-radius: 4px; display: block; }
.op-row__text { display: grid; gap: 2px; }
.op-row__name { font: 700 22px/1.15 'Alegreya', Georgia, serif; }
.op-row__line { font-size: 15px; line-height: 1.35; color: var(--op-on-deep-muted); }
.op-sheet__links { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 20px 0 24px !important; }
.op-sheet__links a {
	display: inline-flex; align-items: center; min-height: 44px;
	font-size: 18px; font-weight: 500; color: var(--op-on-deep); text-decoration: underline;
	text-decoration-color: var(--op-trim); text-underline-offset: 6px;
}
.op-sheet__links a[aria-current] { text-decoration-thickness: 2px; }
.op-sheet__acts { display: grid; gap: 10px; }
.op-sheet :focus-visible, .op-foot :focus-visible { outline-color: var(--op-on-deep); }
html.op-locked, html.op-locked body { overflow: hidden; }

/*------------------------------------------------*/
/* Footer: the call to action and the footer as one navy section */
/*------------------------------------------------*/
.op-foot {
	background: var(--op-tex-grain-light), var(--op-deep);
	color: var(--op-on-deep);
	padding: clamp(64px, 9vw, 120px) clamp(16px, 4vw, 56px) 28px;
	font-family: 'Jost', sans-serif;
}
.op-foot__top {
	display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: end;
	max-width: 1200px; margin: 0 auto;
}
.op-foot__title {
	font-size: clamp(2.5rem, 5.4vw, 4.5rem) !important; line-height: 1.02 !important; letter-spacing: -.01em;
	color: var(--op-on-deep) !important; margin: 0 0 18px; padding: 0; text-wrap: balance;
}
/* style.css forces Jost on every <p> through an :is() list that includes an ID; match it to set Alegreya here. */
#page-container .op-foot__name, #page-container .op-sheet__title { font-family: 'Alegreya', Georgia, serif !important; }
.op-foot__name { font: 700 clamp(2rem, 3.6vw, 2.75rem)/1.1 'Alegreya', Georgia, serif !important; color: var(--op-on-deep); margin: 0 0 12px; padding: 0; }
.op-foot__text { color: var(--op-on-deep-muted); font-size: 19px; line-height: 1.6; max-width: 42ch; margin: 0 0 28px; padding: 0; text-wrap: pretty; }
.op-foot--quote .op-foot__text { margin-bottom: 0; }
.op-foot__acts { display: flex; flex-wrap: wrap; gap: 12px; }

.op-ledger { margin: 0; border-top: 1px solid rgba(207, 171, 121, .5); }
.op-ledger div { display: grid; grid-template-columns: 84px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid rgba(207, 171, 121, .5); }
.op-ledger dt { color: var(--op-on-deep-muted); font-size: 15px; padding-top: 4px; margin: 0; }
.op-ledger dd { margin: 0; font: 500 20px/1.35 'Alegreya', Georgia, serif; overflow-wrap: anywhere; }
.op-ledger a { color: var(--op-on-deep); text-decoration: none; }
.op-ledger a:hover { text-decoration: underline; text-decoration-color: var(--op-trim); text-underline-offset: 4px; }

.op-foot__base {
	max-width: 1200px; margin: clamp(56px, 7vw, 96px) auto 0; padding-top: 18px;
	border-top: 1px solid rgba(201, 203, 214, .25);
	display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px;
	font-size: 15px; color: var(--op-on-deep-muted);
}
.op-foot__nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.op-foot__nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--op-on-deep); text-decoration: none; }
.op-foot__nav a:hover, .op-foot__nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--op-trim); text-underline-offset: 5px; }
.op-foot__social { display: flex; gap: 8px; margin-left: auto; }
.op-foot__social a {
	width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
	color: var(--op-on-deep); box-shadow: inset 0 0 0 1px rgba(201, 203, 214, .45);
	transition: box-shadow .25s ease-out;
}
.op-foot__social a:hover { box-shadow: inset 0 0 0 1px var(--op-trim); }
.op-foot__fine { margin: 0; padding: 0; color: var(--op-on-deep-muted); }

@media (max-width: 860px) {
	.op-foot__top { grid-template-columns: 1fr; }
	.op-foot__social { margin-left: 0; }
	.op-foot__acts .op-btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
	.op-mini, .op-sheet, .op-head__nav a::after, .op-btn { transition: none; }
}

@media print {
	.op-head, .op-mini, .op-sheet, .op-foot { display: none !important; }
}
