/* Quayside — mobile-first harbor news magazine */

:root {
	--ink: #102a36;
	--ink-soft: #2a4554;
	--muted: #5d7582;
	--foam: #eef5f7;
	--mist: #d9e6eb;
	--surface: #f6fafb;
	--line: rgba(16, 42, 54, 0.12);
	--sea: #0b6e7a;
	--sea-deep: #084f58;
	--buoy: #c45c26;
	--buoy-deep: #9a4518;
	--white: #ffffff;
	--shadow: 0 16px 36px rgba(16, 42, 54, 0.12);
	--radius: 6px;
	--font-sans: "Sora", "Segoe UI", sans-serif;
	--font-serif: "Newsreader", Georgia, serif;
	--container: min(1120px, calc(100% - 1.5rem));
	--header-h: 64px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--font-sans);
	font-size: 1rem;
	line-height: 1.65;
	color: var(--ink);
	background:
		radial-gradient(1000px 420px at 0% -5%, rgba(11, 110, 122, 0.14), transparent 55%),
		radial-gradient(800px 380px at 100% 0%, rgba(196, 92, 38, 0.10), transparent 50%),
		linear-gradient(180deg, var(--foam) 0%, var(--surface) 45%, var(--mist) 100%);
	background-attachment: fixed;
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--sea);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

a:hover {
	color: var(--buoy-deep);
}

h1, h2, h3, h4 {
	font-family: var(--font-serif);
	line-height: 1.15;
	letter-spacing: -0.02em;
	color: var(--ink);
	margin: 0 0 0.55rem;
}

p {
	margin: 0 0 1rem;
}

ul, ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

.container {
	width: var(--container);
	margin-inline: auto;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.text-center {
	text-align: center;
}

.announce-bar {
	background: var(--sea-deep);
	color: var(--white);
	text-align: center;
	font-size: 0.82rem;
	font-weight: 500;
	padding: 0.45rem 0.75rem;
}

.announce-bar a {
	color: var(--white);
	text-decoration: none;
}

.announce-bar a:hover {
	text-decoration: underline;
}

/* Header */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(16, 42, 54, 0.94);
	backdrop-filter: blur(10px);
	color: var(--white);
	transition: box-shadow 0.25s ease;
}

.site-header.is-scrolled {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.header-bar {
	min-height: var(--header-h);
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 0.75rem;
	padding-block: 0.35rem;
}

.site-title {
	margin: 0;
	font-family: var(--font-serif);
	font-size: clamp(1.4rem, 4.5vw, 1.85rem);
	font-weight: 700;
	letter-spacing: -0.03em;
}

.site-title a,
.custom-logo-link {
	color: var(--white);
	text-decoration: none;
}

.custom-logo {
	max-height: 40px;
	width: auto;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.header-cta {
	display: none;
	align-items: center;
	justify-content: center;
	padding: 0.45rem 0.85rem;
	border-radius: var(--radius);
	background: var(--buoy);
	color: var(--white);
	font-size: 0.82rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.header-cta:hover {
	background: var(--buoy-deep);
	color: var(--white);
}

.nav-toggle {
	width: 42px;
	height: 42px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: var(--radius);
	background: transparent;
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	cursor: pointer;
}

.nav-toggle span {
	display: block;
	width: 18px;
	height: 2px;
	background: var(--white);
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.is-active span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active span:nth-child(2) {
	opacity: 0;
}

.nav-toggle.is-active span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

.main-navigation {
	display: none;
	grid-column: 1 / -1;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	padding: 0.75rem 0 1rem;
}

.main-navigation.is-open {
	display: block;
}

.primary-menu {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.primary-menu a {
	display: block;
	padding: 0.55rem 0.25rem;
	color: rgba(255, 255, 255, 0.92);
	text-decoration: none;
	font-weight: 500;
	font-size: 0.95rem;
}

.primary-menu a:hover {
	color: #f4c7a8;
}

body.nav-open {
	overflow: hidden;
}

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	padding: 0.75rem 1.2rem;
	border-radius: var(--radius);
	border: none;
	font-family: var(--font-sans);
	font-size: 0.92rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.2s ease, background 0.2s ease;
}

.btn:hover {
	transform: translateY(-1px);
}

.btn-primary {
	background: var(--buoy);
	color: var(--white);
}

.btn-primary:hover {
	background: var(--buoy-deep);
	color: var(--white);
}

.btn-block {
	width: 100%;
}

/* Lead / hero — full bleed */
.lead-section {
	position: relative;
}

.lead-story {
	position: relative;
	min-height: min(88vh, 720px);
	display: flex;
	align-items: flex-end;
	overflow: hidden;
}

.lead-media {
	position: absolute;
	inset: 0;
	margin: 0;
}

.lead-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	animation: lead-zoom 12s ease-out forwards;
}

.lead-shade {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(16, 42, 54, 0.25) 0%, rgba(16, 42, 54, 0.55) 45%, rgba(16, 42, 54, 0.88) 100%);
}

.lead-copy {
	position: relative;
	z-index: 1;
	padding: 2.5rem 0 2.2rem;
	color: var(--white);
	max-width: 42rem;
}

.brand-mark {
	font-family: var(--font-serif);
	font-size: clamp(2rem, 8vw, 3.4rem);
	font-weight: 700;
	letter-spacing: -0.04em;
	margin: 0 0 0.75rem;
	color: var(--white);
	text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.hero-kicker {
	margin: 0.35rem 0 0.65rem;
	font-size: 0.85rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.82);
}

.lead-title {
	font-size: clamp(1.55rem, 5.5vw, 2.45rem);
	color: var(--white);
	margin-bottom: 0.75rem;
}

.lead-excerpt {
	color: rgba(255, 255, 255, 0.9);
	font-size: 1.02rem;
	max-width: 36rem;
}

.meta-tag {
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #f4c7a8;
	margin-bottom: 0.35rem;
}

.story-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.84rem;
	color: var(--muted);
	margin: 0;
}

.lead-copy .story-meta {
	color: rgba(255, 255, 255, 0.82);
}

.story-meta .author {
	font-weight: 600;
	color: inherit;
}

.story-meta .dot {
	opacity: 0.55;
}

.story-meta .notes {
	font-variant-numeric: tabular-nums;
}

/* Secondary features */
.secondary-section {
	padding: 1.25rem 0 0.5rem;
}

.secondary-grid {
	display: grid;
	gap: 1rem;
}

.secondary-item {
	background: var(--white);
	border: 1px solid var(--line);
	overflow: hidden;
}

.secondary-item figure {
	margin: 0;
	aspect-ratio: 16 / 10;
	overflow: hidden;
}

.secondary-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.secondary-item:hover img {
	transform: scale(1.04);
}

.secondary-body {
	padding: 1rem 1.05rem 1.15rem;
}

.secondary-body h3 {
	font-size: 1.15rem;
}

/* Sections */
.section {
	padding: 2.5rem 0;
}

.section-kicker {
	margin: 0 0 0.35rem;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--sea);
}

.section-title {
	font-size: clamp(1.55rem, 4vw, 2.1rem);
}

.section-lead {
	color: var(--muted);
	max-width: 36rem;
}

.section-head {
	margin-bottom: 1.4rem;
}

.row-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 0.75rem;
}

.view-all {
	font-weight: 600;
	text-decoration: none;
	color: var(--sea-deep);
}

/* Desk layout */
.desk-layout {
	display: grid;
	gap: 1.75rem;
}

.desk-feed {
	display: grid;
	gap: 1rem;
}

.feed-item {
	display: grid;
	grid-template-columns: 96px 1fr;
	gap: 0.85rem;
	padding: 0.85rem 0;
	border-bottom: 1px solid var(--line);
	align-items: start;
}

.feed-item:first-child {
	padding-top: 0;
}

.feed-thumb {
	margin: 0;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 2px;
}

.feed-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.feed-body h3 {
	font-size: 1.05rem;
	margin-bottom: 0.35rem;
}

.feed-body p {
	font-size: 0.92rem;
	color: var(--ink-soft);
	margin-bottom: 0.45rem;
}

.side-panel {
	background: var(--white);
	border: 1px solid var(--line);
	padding: 1.15rem 1.1rem 1.25rem;
	margin-bottom: 1rem;
}

.side-title {
	font-size: 1.15rem;
	margin-bottom: 1rem;
	padding-bottom: 0.55rem;
	border-bottom: 2px solid var(--sea);
}

.hot-list li {
	display: grid;
	grid-template-columns: 1.6rem 1fr;
	gap: 0.65rem;
	padding: 0.7rem 0;
	border-bottom: 1px solid var(--line);
}

.hot-list li:last-child {
	border-bottom: 0;
}

.hot-rank {
	font-family: var(--font-serif);
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--buoy);
	line-height: 1.2;
}

.hot-list h3 {
	font-size: 0.98rem;
	margin-bottom: 0.2rem;
}

.route-list li {
	padding: 0.7rem 0;
	border-bottom: 1px solid var(--line);
}

.route-list li:last-child {
	border-bottom: 0;
}

.route-list strong {
	display: block;
	font-size: 0.92rem;
	margin-bottom: 0.2rem;
}

.route-list span {
	font-size: 0.85rem;
	color: var(--muted);
}

/* Dock Log series */
.docklog-section {
	background: linear-gradient(180deg, rgba(11, 110, 122, 0.06), transparent 70%);
}

.docklog-grid {
	display: grid;
	gap: 1rem;
}

.docklog-item {
	background: var(--white);
	border: 1px solid var(--line);
	overflow: hidden;
}

.docklog-item figure {
	margin: 0;
	aspect-ratio: 16 / 10;
	overflow: hidden;
}

.docklog-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.docklog-body {
	padding: 1rem 1.05rem 1.2rem;
}

.docklog-body p {
	color: var(--ink-soft);
	font-size: 0.92rem;
}

/* Pier highlights */
.pier-grid {
	display: grid;
	gap: 1rem;
}

.pier-item {
	overflow: hidden;
}

.pier-item figure {
	margin: 0 0 0.75rem;
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.pier-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.45s ease;
}

.pier-item:hover img {
	transform: scale(1.03);
}

.pier-body h3 {
	font-size: 1.15rem;
}

.pier-body p {
	color: var(--muted);
	font-size: 0.92rem;
	margin-bottom: 0;
}

/* Articles */
.articles-grid {
	display: grid;
	gap: 1.15rem;
}

.article-card {
	background: var(--white);
	border: 1px solid var(--line);
	overflow: hidden;
}

.article-card-image {
	display: block;
	aspect-ratio: 3 / 2;
	overflow: hidden;
}

.article-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.article-card-body {
	padding: 1rem 1.05rem 1.2rem;
}

.article-card-body h2,
.article-card-body h3 {
	font-size: 1.12rem;
}

.article-card-body a {
	text-decoration: none;
	color: inherit;
}

.article-card-body a:hover {
	color: var(--sea);
}

.article-excerpt {
	color: var(--muted);
	font-size: 0.9rem;
}

.read-more {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--sea);
}

.demo-note {
	margin-top: 1rem;
	font-size: 0.85rem;
	color: var(--muted);
}

/* CTA */
.cta-banner {
	position: relative;
	padding: 3.5rem 0;
	background-size: cover;
	background-position: center;
	color: var(--white);
}

.cta-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(120deg, rgba(8, 79, 88, 0.88), rgba(16, 42, 54, 0.75));
}

.cta-inner {
	position: relative;
	z-index: 1;
	max-width: 36rem;
}

.cta-inner h2 {
	color: var(--white);
	font-size: clamp(1.6rem, 4vw, 2.2rem);
}

.cta-inner p {
	color: rgba(255, 255, 255, 0.9);
}

/* Contact */
.contact-section {
	background: var(--white);
	border-top: 1px solid var(--line);
}

.contact-grid {
	display: grid;
	gap: 1.5rem;
}

.contact-details {
	display: grid;
	gap: 0.35rem;
	color: var(--ink-soft);
	font-weight: 500;
}

.contact-form {
	display: grid;
	gap: 0.75rem;
}

.contact-form input,
.contact-form textarea {
	width: 100%;
	padding: 0.85rem 0.95rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	font: inherit;
	background: var(--surface);
	color: var(--ink);
}

.contact-form input:focus,
.contact-form textarea:focus {
	outline: 2px solid rgba(11, 110, 122, 0.35);
	border-color: var(--sea);
}

.form-feedback {
	min-height: 1.25rem;
	font-size: 0.9rem;
	margin: 0;
}

.form-feedback.is-success {
	color: var(--sea-deep);
}

.form-feedback.is-error {
	color: #b42318;
}

/* Footer */
.site-footer {
	background: var(--ink);
	color: rgba(255, 255, 255, 0.82);
	margin-top: 1rem;
}

.footer-top {
	padding: 2.25rem 0 1.5rem;
}

.footer-grid {
	display: grid;
	gap: 1.5rem;
}

.footer-brand .site-title a {
	color: var(--white);
}

.footer-brand p {
	color: rgba(255, 255, 255, 0.7);
	font-size: 0.92rem;
	max-width: 28rem;
}

.footer-menu {
	display: grid;
	gap: 0.4rem;
}

.footer-menu a,
.footer-col a {
	color: rgba(255, 255, 255, 0.85);
	text-decoration: none;
}

.footer-menu a:hover,
.footer-col a:hover {
	color: #f4c7a8;
}

.footer-links-bar {
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
	padding: 0.9rem 0;
}

.footer-links-row {
	display: flex;
	flex-wrap: nowrap;
	gap: 0.85rem 1.25rem;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	padding-bottom: 0.15rem;
}

.footer-links-row a {
	white-space: nowrap;
	color: rgba(255, 255, 255, 0.78);
	text-decoration: none;
	font-size: 0.86rem;
	font-weight: 500;
}

.footer-links-row a:hover {
	color: #f4c7a8;
}

.footer-bottom {
	padding: 1rem 0 1.35rem;
	font-size: 0.84rem;
	color: rgba(255, 255, 255, 0.55);
}

.footer-bottom p {
	margin: 0;
}

/* Inner pages */
.page-header {
	margin-bottom: 1.5rem;
}

.page-title {
	font-size: clamp(1.7rem, 4vw, 2.3rem);
}

.content-wrap.narrow {
	max-width: 760px;
}

.entry-media {
	margin: 0 0 1.25rem;
	overflow: hidden;
}

.entry-media img {
	width: 100%;
	height: auto;
}

.entry-content > *:last-child {
	margin-bottom: 0;
}

.single-article .entry-title {
	font-size: clamp(1.7rem, 4vw, 2.4rem);
}

.search-form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 1rem 0;
}

.search-field {
	flex: 1 1 180px;
	padding: 0.75rem 0.9rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	font: inherit;
}

.comments-area {
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--line);
}

.comment-list {
	margin: 1rem 0 1.5rem;
	padding-left: 1.1rem;
	list-style: decimal;
}

.pagination,
.nav-links {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	margin-top: 1.5rem;
}

/* Motion */
.reveal {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity 0.55s ease var(--reveal-delay, 0ms), transform 0.55s ease var(--reveal-delay, 0ms);
}

.reveal.is-visible {
	opacity: 1;
	transform: none;
}

@keyframes lead-zoom {
	from { transform: scale(1.06); }
	to { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.reveal,
	.lead-media img,
	.btn {
		transition: none !important;
		animation: none !important;
		transform: none !important;
		opacity: 1 !important;
	}
}

/* Tablet+ */
@media (min-width: 640px) {
	.feed-item {
		grid-template-columns: 140px 1fr;
		gap: 1.1rem;
	}

	.secondary-grid {
		grid-template-columns: 1fr 1fr;
	}

	.docklog-grid {
		grid-template-columns: 1fr 1fr;
	}

	.pier-grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.articles-grid {
		grid-template-columns: 1fr 1fr;
	}

	.footer-grid {
		grid-template-columns: 1.4fr 1fr 1fr;
	}
}

/* Desktop */
@media (min-width: 900px) {
	:root {
		--container: min(1120px, calc(100% - 2.5rem));
		--header-h: 70px;
	}

	.header-bar {
		grid-template-columns: auto 1fr auto;
	}

	.nav-toggle {
		display: none;
	}

	.main-navigation {
		display: block;
		grid-column: auto;
		border: 0;
		padding: 0;
		justify-self: center;
	}

	.primary-menu {
		flex-direction: row;
		align-items: center;
		gap: 1.15rem;
	}

	.primary-menu a {
		padding: 0.25rem 0;
		font-size: 0.9rem;
	}

	.header-cta {
		display: inline-flex;
	}

	.lead-story {
		min-height: min(78vh, 680px);
	}

	.lead-copy {
		padding: 3.5rem 0 3rem;
	}

	.desk-layout {
		grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.85fr);
		gap: 2rem;
		align-items: start;
	}

	.desk-side {
		position: sticky;
		top: calc(var(--header-h) + 1rem);
	}

	.contact-grid {
		grid-template-columns: 0.9fr 1.1fr;
		gap: 2.5rem;
		align-items: start;
	}

	.articles-grid {
		grid-template-columns: repeat(4, 1fr);
	}

	.docklog-grid {
		grid-template-columns: repeat(4, 1fr);
	}

	.footer-links-row {
		flex-wrap: wrap;
		overflow: visible;
		justify-content: flex-start;
	}
}

@media (min-width: 1100px) {
	.feed-item {
		grid-template-columns: 168px 1fr;
	}
}
