@font-face {
	font-family: "Storyland Archive";
	src: url("../fonts/SourceHanSerifTW-VF.woff2") format("woff2");
	font-style: normal;
	font-weight: 200 900;
	font-display: swap;
}

:root {
	--hg-paper: #f6efe1;
	--hg-paper-soft: #faf6ed;
	--hg-ink: #24201b;
	--hg-muted: #675e52;
	--hg-rule: rgba(45, 38, 31, .63);
	--hg-rule-soft: rgba(45, 38, 31, .24);
	--hg-red: #a23d2e;
	--hg-red-dark: #873126;
	--hg-serif: "Storyland Archive", "Noto Serif TC", serif;
	--hg-header-max: 1240px;
	--hg-max: 1500px;
}

html { scroll-behavior: smooth; }

body.harbour-gazette-site {
	margin: 0;
	background-color: var(--hg-paper);
	background-image: linear-gradient(rgba(255,255,255,.72), rgba(255,255,255,.72)), url("../plates/paper-texture.png");
	background-repeat: repeat;
	background-size: auto, 860px 96px;
	color: var(--hg-ink);
	font-family: var(--hg-serif);
	-webkit-font-smoothing: antialiased;
}

body.harbour-gazette-site * { box-sizing: border-box; }
body.harbour-gazette-site a { color: inherit; text-decoration: none; }
body.harbour-gazette-site button { color: inherit; font: inherit; }
body.harbour-gazette-site ::selection { background: rgba(162,61,46,.22); color: var(--hg-ink); }

.hg-header {
	width: min(calc(100% - 40px), var(--hg-header-max));
	margin-inline: auto;
}

.hg-main,
.hg-footer {
	width: min(calc(100% - 56px), var(--hg-max));
	margin-inline: auto;
}

.hg-issue-line {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 44px;
	border-bottom: 1px solid var(--hg-rule);
}
.hg-issue-line p { margin: 0; font-size: 11px; font-weight: 680; letter-spacing: .11em; text-transform: uppercase; }
.hg-issue-line p:first-child { display: flex; gap: 17px; }
.hg-issue-line p:first-child span { padding-left: 17px; border-left: 1px solid var(--hg-rule-soft); }

.hg-masthead {
	display: grid;
	grid-template-columns: auto auto 1fr;
	align-items: center;
	gap: 24px;
	min-height: 112px;
	border-bottom: 1px solid var(--hg-rule);
}
.hg-wordmark {
	max-inline-size: 620px;
	font-size: clamp(60px, 6.2vw, 92px);
	font-weight: 760;
	letter-spacing: -.04em;
	line-height: .82;
	white-space: nowrap;
}
.hg-seal {
	display: grid;
	place-content: center;
	width: clamp(64px, 5.5vw, 80px);
	aspect-ratio: 1;
	padding: 7px;
	border: 2px solid rgba(246,239,225,.7);
	outline: 1px solid var(--hg-red);
	outline-offset: -5px;
	background: var(--hg-red);
	color: var(--hg-paper-soft);
	font-size: clamp(17px, 1.45vw, 23px);
	font-weight: 620;
	letter-spacing: .08em;
	line-height: 1.12;
	text-align: center;
	transform: rotate(-.5deg);
}
.hg-seal span { display: block; }
.hg-navigation { display: flex; justify-content: flex-end; gap: clamp(28px, 3vw, 48px); }
.hg-navigation a { position: relative; padding: 27px 0; font-size: 13px; font-weight: 730; letter-spacing: .08em; text-transform: uppercase; }
.hg-navigation a::after {
	position: absolute;
	right: 0;
	bottom: 18px;
	left: 0;
	height: 1px;
	background: var(--hg-red);
	content: "";
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 180ms ease;
}
.hg-navigation a:hover::after,
.hg-navigation a:focus-visible::after { transform: scaleX(1); }
.hg-menu-toggle { display: none; }

.hg-lead {
	display: grid;
	grid-template-columns: minmax(0, 3fr) minmax(420px, 2fr);
	border-bottom: 1px solid var(--hg-rule);
}
.hg-lead__image {
	grid-column: 1;
	grid-row: 1;
	display: block;
	height: 400px;
	max-height: 400px;
	border-right: 1px solid var(--hg-rule);
	overflow: hidden;
}
.hg-lead__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: sepia(.17) saturate(.82) contrast(.98);
	transition: transform 650ms cubic-bezier(.2,.7,.2,1), filter 250ms ease;
}
.hg-lead__image:hover img { transform: scale(1.015); filter: sepia(.08) saturate(.94) contrast(1); }
.hg-lead__editorial { display: contents; }
.hg-lead__copy {
	grid-column: 2;
	grid-row: 1;
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 400px;
	padding: clamp(24px, 2vw, 30px) clamp(28px, 2.8vw, 44px) 25px;
}
.hg-story-meta {
	margin: 0;
	color: var(--hg-muted);
	font-size: 11px;
	font-weight: 670;
	letter-spacing: .08em;
	line-height: 1.5;
	text-transform: uppercase;
}
.hg-story-meta span { color: var(--hg-red); }
.hg-lead h1 {
	margin: 12px 0 0;
	font-size: clamp(36px, 3.2vw, 50px);
	font-weight: 610;
	letter-spacing: -.035em;
	line-height: 1.07;
}
.hg-lead h1 a { transition: color 160ms ease; }
.hg-lead h1 a:hover { color: var(--hg-red); }
.hg-lead__deck { display: -webkit-box; max-width: 48ch; margin: 14px 0 0; overflow: hidden; color: #4d463d; font-size: 15px; line-height: 1.62; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.hg-primary-action {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: min(100%, 260px);
	min-height: 50px;
	margin-top: auto;
	padding: 0 18px 0 21px;
	background: var(--hg-red);
	color: var(--hg-paper-soft) !important;
	font-size: 12px;
	font-weight: 760;
	letter-spacing: .13em;
	text-transform: uppercase;
	transition: background 160ms ease, padding 160ms ease;
}
.hg-primary-action:hover,
.hg-primary-action:focus-visible { padding-right: 14px; background: var(--hg-red-dark); }
.hg-primary-action span:last-child { font-size: 21px; font-weight: 400; }

.hg-regions {
	grid-column: 1 / -1;
	grid-row: 2;
	display: grid;
	grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
	gap: 24px;
	margin: 0;
	padding: 14px 0 16px;
	border-top: 1px solid var(--hg-rule);
}
.hg-regions__heading { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 7px; padding: 0 0 0 2px; }
.hg-regions__heading h2,
.hg-regions__heading a { margin: 0; font-size: 11px; font-weight: 690; letter-spacing: .08em; text-transform: uppercase; }
.hg-regions__heading a { color: var(--hg-muted); }
.hg-region-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.hg-region-tab {
	position: relative;
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr) auto;
	align-items: center;
	min-width: 0;
	min-height: 68px;
	padding: 0;
	border: 1px solid var(--hg-rule-soft);
	background: rgba(250,246,237,.4);
	cursor: pointer;
	text-align: left;
}
.hg-region-tab img { display: block; width: 96px; height: 68px; object-fit: cover; filter: sepia(.42) saturate(.58) contrast(.96); mix-blend-mode: multiply; }
.hg-region-tab span { display: block; margin: 0 8px 0 12px; font-size: 10px; font-weight: 730; letter-spacing: .07em; text-transform: uppercase; }
.hg-region-tab b { margin: 0 10px 0 0; color: var(--hg-red); font-size: 17px; font-weight: 420; }
.hg-region-tab::after { position: absolute; right: 9px; bottom: -1px; left: 9px; height: 2px; background: var(--hg-red); content: ""; transform: scaleX(0); transform-origin: left; transition: transform 180ms ease; }
.hg-region-tab.is-selected::after,
.hg-region-tab:hover::after,
.hg-region-tab:focus-visible::after { transform: scaleX(1); }
.hg-region-tab:focus-visible { outline: 2px solid var(--hg-red); outline-offset: 2px; }

.hg-story-shelf { padding: clamp(48px, 6vw, 86px) 0 clamp(60px, 7vw, 104px); border-bottom: 1px solid var(--hg-rule); }
.hg-story-shelf__heading { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(260px, 1.2fr); align-items: end; gap: 30px; margin-bottom: 32px; }
.hg-story-shelf__heading h2 { margin: 0; font-size: clamp(38px, 4.4vw, 66px); font-weight: 610; letter-spacing: -.03em; line-height: 1; }
.hg-story-shelf__heading p { width: min(100%, 55ch); margin: 0 0 4px auto; color: var(--hg-muted); font-size: 13px; line-height: 1.65; text-align: right; }
.hg-story-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--hg-rule); }
.hg-story-grid[hidden] { display: none; }
.hg-story-card { display: grid; grid-template-columns: minmax(220px, 47%) minmax(0, 1fr); min-height: 310px; border-right: 1px solid var(--hg-rule); }
.hg-story-card:last-child { border-right: 0; }
.hg-story-card__image { overflow: hidden; }
.hg-story-card__image img,
.hg-story-card__image .story-image-placeholder { display: block; width: 100%; height: 100%; object-fit: cover; filter: sepia(.15) saturate(.85); transition: transform 500ms ease; }
.hg-story-card:hover .hg-story-card__image img { transform: scale(1.02); }
.hg-story-card > div { display: flex; flex-direction: column; min-width: 0; padding: 30px 28px 25px; }
.hg-story-card h3 { margin: 12px 0 0; font-size: clamp(25px, 2.2vw, 35px); font-weight: 610; letter-spacing: -.02em; line-height: 1.24; }
.hg-story-card h3 + p { margin: 17px 0 0; color: var(--hg-muted); font-size: 14px; line-height: 1.7; }
.hg-text-link { align-self: flex-start; margin-top: auto; padding-bottom: 3px; border-bottom: 1px solid var(--hg-red); color: var(--hg-red) !important; font-size: 12px; font-weight: 720; letter-spacing: .05em; }
.hg-text-link span { margin-left: 8px; }

.hg-empty { display: grid; place-items: center; min-height: 480px; border-bottom: 1px solid var(--hg-rule); text-align: center; }
.hg-empty h1 { margin: 0; font-size: 44px; }
.hg-empty a { margin-top: 15px; color: var(--hg-red); text-decoration: underline; text-underline-offset: 4px; }

.hg-footer {
	display: grid;
	grid-template-columns: auto 1fr auto auto;
	align-items: center;
	gap: 34px;
	min-height: 116px;
	font-size: 12px;
}
.hg-footer p { margin: 0; color: var(--hg-muted); }
.hg-footer__mark { display: flex; align-items: center; gap: 13px; }
.hg-footer__mark strong { font-size: 19px; letter-spacing: .08em; }
.hg-footer__mark span { padding-left: 13px; border-left: 1px solid var(--hg-rule-soft); color: var(--hg-red); }
.hg-footer nav { display: flex; gap: 22px; }
.hg-footer nav a { padding-bottom: 2px; border-bottom: 1px solid var(--hg-rule-soft); }

body.harbour-gazette-site a:focus-visible,
body.harbour-gazette-site button:focus-visible { outline-color: var(--hg-red); outline-offset: 3px; }

@media (max-width: 1060px) {
	.hg-masthead { grid-template-columns: auto auto 1fr; min-height: 104px; }
	.hg-wordmark { max-inline-size: 520px; font-size: clamp(54px, 6.8vw, 74px); }
	.hg-seal { width: clamp(62px, 6.4vw, 72px); font-size: clamp(16px, 1.8vw, 20px); }
	.hg-navigation { gap: clamp(18px, 2.4vw, 30px); }
	.hg-lead { grid-template-columns: minmax(0, 1.35fr) minmax(380px, 1fr); }
	.hg-lead__copy { padding-inline: 28px; }
	.hg-regions { grid-template-columns: 170px minmax(0, 1fr); gap: 16px; }
	.hg-region-tab { grid-template-columns: 74px minmax(0, 1fr) auto; }
	.hg-region-tab img { width: 74px; }
	.hg-story-card { grid-template-columns: 42% 1fr; }
}

@media (max-width: 820px) {
	.hg-header {
		width: min(calc(100% - 28px), var(--hg-header-max));
	}
	.hg-main,
	.hg-footer { width: min(calc(100% - 28px), var(--hg-max)); }
	.hg-issue-line { min-height: 36px; }
	.hg-issue-line p { font-size: 9px; }
	.hg-issue-line p:first-child span { display: none; }
	.hg-masthead { position: relative; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; min-height: 84px; }
	.hg-wordmark { max-inline-size: min(68vw, 420px); font-size: clamp(42px, 10.5vw, 56px); }
	.hg-seal { display: none; }
	.hg-menu-toggle { display: flex; min-height: 44px; align-items: center; gap: 10px; padding: 12px 0; border: 0; background: transparent; cursor: pointer; font-size: 10px; font-weight: 740; letter-spacing: .14em; text-transform: uppercase; }
	.hg-menu-toggle i,
	.hg-menu-toggle i::before { display: block; width: 18px; height: 1px; background: currentColor; content: ""; transition: transform 180ms ease; }
	.hg-menu-toggle i::before { transform: translateY(5px); }
	.hg-menu-toggle[aria-expanded="true"] i { transform: translateY(3px) rotate(45deg); }
	.hg-menu-toggle[aria-expanded="true"] i::before { transform: rotate(-90deg); }
	.hg-navigation { position: absolute; top: 84px; right: 0; left: 0; z-index: 20; display: none; grid-template-columns: repeat(2, 1fr); gap: 0; border: 1px solid var(--hg-rule); background: var(--hg-paper-soft); }
	.hg-navigation.is-open { display: grid; }
	.hg-navigation a { padding: 17px 10px; border-right: 1px solid var(--hg-rule-soft); border-bottom: 1px solid var(--hg-rule-soft); text-align: center; }
	.hg-navigation a:nth-child(even) { border-right: 0; }
	.hg-navigation a:nth-last-child(-n+2) { border-bottom: 0; }
	.hg-navigation a::after { display: none; }

	.hg-lead { display: block; }
	.hg-lead__image { height: auto; min-height: 0; max-height: 400px; aspect-ratio: 4 / 3; border-right: 0; border-bottom: 1px solid var(--hg-rule); }
	.hg-lead__editorial { display: flex; flex-direction: column; min-width: 0; }
	.hg-lead__copy { display: block; min-height: 0; padding: 30px 22px 28px; }
	.hg-lead h1 { margin-top: 11px; font-size: clamp(38px, 11vw, 53px); }
	.hg-lead__deck { display: -webkit-box; margin-top: 16px; overflow: hidden; font-size: 15px; line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
	.hg-primary-action { min-height: 48px; margin-top: 22px; }
	.hg-regions { display: block; padding: 0 0 22px; border-top: 0; }
	.hg-regions__heading { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 2px 10px; border-top: 1px solid var(--hg-rule); }
	.hg-region-tabs { gap: 4px; }
	.hg-region-tab { display: block; min-height: 0; padding: 0 0 10px; }
	.hg-region-tab img { width: 100%; height: auto; aspect-ratio: 1.55; }
	.hg-region-tab span { margin-left: 7px; font-size: 9px; }
	.hg-region-tab b { float: right; margin: 7px 6px 0 0; }

	.hg-story-shelf { padding: 48px 0 58px; }
	.hg-story-shelf__heading { grid-template-columns: 1fr; gap: 13px; margin-bottom: 24px; }
	.hg-story-shelf__heading h2 { font-size: 42px; }
	.hg-story-shelf__heading p { width: auto; margin: 0; text-align: left; }
	.hg-story-grid { grid-template-columns: 1fr; }
	.hg-story-card { grid-template-columns: 42% minmax(0, 1fr); min-height: 260px; border-right: 0; border-bottom: 1px solid var(--hg-rule); }
	.hg-story-card:last-child { border-bottom: 0; }
	.hg-story-card > div { padding: 24px 20px 21px; }
	.hg-story-card h3 { font-size: 25px; }
	.hg-story-card h3 + p { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }

	.hg-footer { grid-template-columns: 1fr auto; gap: 15px 25px; padding: 28px 0; }
	.hg-footer > p:not(.hg-footer__copyright) { grid-column: 1 / -1; }
	.hg-footer__copyright { text-align: right; }
}

@media (max-width: 520px) {
	.hg-issue-line p:last-child { display: none; }
	.hg-masthead { min-height: 76px; }
	.hg-wordmark { max-inline-size: 72vw; font-size: clamp(32px, 10.3vw, 40px); }
	.hg-navigation { top: 76px; }
	.hg-story-meta { font-size: 10px; }
	.hg-region-tab img { aspect-ratio: 1.25; }
	.hg-region-tab span { display: block; min-height: 25px; margin-top: 8px; line-height: 1.3; }
	.hg-region-tab b { position: absolute; right: 0; bottom: 8px; }
	.hg-story-card { display: block; }
	.hg-story-card__image { display: block; aspect-ratio: 16 / 10; }
	.hg-story-card > div { min-height: 260px; }
	.hg-footer { grid-template-columns: 1fr; }
	.hg-footer__copyright { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Story illustration contract: square assets and square boxes at every breakpoint.
   Text height must never stretch an image; contain also protects older non-square assets. */
.hg-lead { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
.hg-lead__image { width: 100%; height: auto; max-height: none; min-height: 0; aspect-ratio: 1 / 1; align-self: start; }
.hg-story-card__image { display: block; width: 100%; height: auto; min-height: 0; aspect-ratio: 1 / 1; align-self: start; }
.hg-lead__image img,
.hg-story-card__image img { width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: contain; }
.hg-region-tab img { aspect-ratio: 1 / 1; height: auto; object-fit: contain; }
.hg-lead__image:hover img,
.hg-story-card:hover .hg-story-card__image img { transform: none; }
body.harbour-gazette-site .mega-menu__story figure,
body.harbour-gazette-site .lead-story__image { aspect-ratio: 1 / 1; }
body.harbour-gazette-site .entry-content .wp-block-image img,
body.harbour-gazette-site .entry-content .storyland-story-row__image img,
body.harbour-gazette-site .article-feature img,
body.harbour-gazette-site .image-frame img { aspect-ratio: 1 / 1; object-fit: contain; }
@media (max-width: 820px) {
  .hg-lead__image { width: min(100%, 400px); margin-inline: auto; }
}
.hg-lead__image { border: 0; }
.hg-lead__copy {
  justify-content: center;
  align-items: flex-start;
  min-height: 0;
  text-align: left;
  font-family: Georgia, "Times New Roman", serif;
}
.hg-lead__copy .hg-primary-action { margin-top: 26px; }
.hg-lead__copy h1,
.hg-lead__copy .hg-lead__deck { width: 100%; text-align: left; }
