/*
 * Boynton Inlet Webcam — style.v3.0.css
 * WCAG 2.1 AA remediation + blue colour scheme (replaces green style.v2.0.css)
 * Erdman Video Systems, Inc. — October 2026
 *
 * Contrast notes (all against the background they sit on):
 *   #ffffff on --navy-800 #0b3d6b ............ 11.0 : 1
 *   #ffffff on --blue-700 #1559a8 ............  6.9 : 1
 *   --link #0b57a3 on #ffffff ................  7.0 : 1
 *   --text #1b2733 on #ffffff ................ 15.0 : 1
 *   --muted #44546a on #ffffff ...............  7.6 : 1
 *   --link-on-dark #cfe4ff on #0b3d6b ........  9.4 : 1
 */

:root {
	--navy-900: #071d33;
	--navy-800: #0b3d6b;
	--blue-700: #1559a8;
	--blue-600: #1a6cc4;
	--sky-200:  #cfe4ff;
	--sky-100:  #e8f1fb;
	--sky-50:   #f4f8fd;
	--text:     #1b2733;
	--muted:    #44546a;
	--link:     #0b57a3;
	--link-hover: #073e75;
	--link-on-dark: #cfe4ff;
	--focus-light: #0b57a3;
	--focus-dark:  #ffd54f;
	--border:   #c5d5e8;
	--radius:   10px;
	--shadow:   0 2px 8px rgba(7, 29, 51, 0.18);
	--maxw:     1050px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}

body {
	margin: 0;
	background: var(--navy-900);
	font-family: Tahoma, Verdana, "Segoe UI", Arial, sans-serif;
	font-size: 100%;           /* respect user font size (WCAG 1.4.4) */
	line-height: 1.5;
	color: var(--text);
}

img, video { max-width: 100%; height: auto; }
img { border: 0; }

/* ---------- Links & focus ---------- */
a { color: var(--link); font-weight: bold; text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }

a:focus-visible, button:focus-visible, video:focus-visible, [tabindex]:focus-visible {
	outline: 3px solid var(--focus-light);
	outline-offset: 2px;
}
.on-dark a:focus-visible, .on-dark button:focus-visible {
	outline-color: var(--focus-dark);
}

.sr-only {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}

.skip-link {
	position: absolute;
	left: 8px; top: -60px;
	z-index: 1000;
	padding: 10px 16px;
	background: #ffffff;
	color: var(--navy-800);
	border: 3px solid var(--focus-dark);
	border-radius: 6px;
}
.skip-link:focus { top: 8px; }

/* ---------- Page frame ---------- */
.page {
	max-width: var(--maxw);
	margin: 0 auto;
	background: #ffffff;
	border-radius: var(--radius) var(--radius) var(--radius) var(--radius);
	overflow: hidden;
}

/* ---------- Header ---------- */
#header {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 14px 20px;
	background: linear-gradient(135deg, var(--navy-800) 0%, var(--blue-700) 100%);
	color: #ffffff;
	border-bottom: 4px solid var(--sky-200);
}
#header .logo img { display: block; width: 64px; height: 64px; }
#header .header-titles { flex: 1; text-align: center; padding-right: 64px; }
#header h1 {
	margin: 0;
	font-size: 2rem;
	line-height: 1.2;
	color: #ffffff;
	text-shadow: 1px 1px 3px rgba(0,0,0,0.45);
}
#header .tagline { margin: 4px 0 0; font-size: 1.1rem; color: #ffffff; }
#header a { color: var(--link-on-dark); }
#header a:hover { color: #ffffff; }

/* ---------- Marquee notice (WCAG 2.2.2 pause control) ---------- */
.marquee-wrap {
	position: relative;
	height: 40px;
	overflow: hidden;
	display: flex;
	align-items: center;
	background: linear-gradient(90deg, var(--navy-800), var(--blue-700));
	color: #ffffff;
}
.marquee-text {
	position: absolute;
	left: 0; right: 0;
	margin: 0;
	padding: 0 80px 0 0;
	line-height: 40px;
	font-size: 0.85rem;
	white-space: nowrap;
	text-align: center;
	transform: translateX(100%);
	animation: scroll-left 60s linear infinite;
}
.marquee-text.paused { animation-play-state: paused; }
.marquee-pause {
	position: absolute;
	right: 0; top: 0;
	height: 100%;
	z-index: 2;
	padding: 0 14px;
	border: 0;
	border-left: 1px solid rgba(255,255,255,0.35);
	background: var(--navy-800);
	color: #ffffff;
	font: inherit;
	font-size: 0.8rem;
	cursor: pointer;
}
.marquee-pause:focus-visible { outline: 3px solid var(--focus-dark); outline-offset: -3px; }
@keyframes scroll-left {
	0%   { transform: translateX(100%); }
	100% { transform: translateX(-100%); }
}
/* Reduced motion: show the notice statically */
@media (prefers-reduced-motion: reduce) {
	.marquee-text { animation: none; transform: none; white-space: normal; line-height: 1.3; padding: 4px 90px 4px 12px; }
	.marquee-wrap { height: auto; min-height: 40px; }
}

/* ---------- Quick links bar ---------- */
.quick-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	justify-content: space-between;
	align-items: flex-start;
	padding: 12px 20px;
	background: var(--sky-100);
	border-bottom: 1px solid var(--border);
	font-size: 0.9rem;
}
.quick-links h2 {
	margin: 0 0 4px;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--navy-800);
}
.quick-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.quick-links li { margin: 0; }
.quick-links .share-links a { display: inline-flex; align-items: center; gap: 6px; }
.quick-links .share-links img { width: 24px; height: 24px; }
/* X link: Unicode U+1D54F glyph in a 24px black circle, sized to match the brand PNGs */
.quick-links .glyph-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px; height: 24px;
	border-radius: 50%;
	background: #000000;
	color: #ffffff;
	font-family: "Segoe UI Symbol", "Cambria Math", "STIX Two Math", "Noto Sans Math", serif;
	font-size: 15px;
	font-weight: normal;
	line-height: 1;
}

/* ---------- Main content ---------- */
main { display: block; padding: 8px 20px 24px; }

.section-heading {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
	margin: 24px 0 8px;
	padding-bottom: 6px;
	border-bottom: 3px solid var(--blue-700);
}
.section-heading h2 { margin: 0; font-size: 1.5rem; color: var(--navy-800); }
.section-intro { margin: 0 0 12px; color: var(--muted); font-size: 0.95rem; }

.cam-section {
	margin: 0 0 28px;
	padding: 14px;
	background: var(--sky-50);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}
.cam-section h3 {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: center;
	gap: 4px 12px;
	margin: 0 0 10px;
	font-size: 1.25rem;
	color: var(--navy-800);
	text-align: center;
}
.cam-time {
	font-size: 0.9rem;
	font-weight: normal;
	color: var(--muted);
}

/* Still images */
.still-link { display: block; text-align: center; }
.still-link img {
	display: block;
	width: 100%;
	max-width: 1000px;
	margin: 0 auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	background: #dfe8f3;
	padding: 4px;
	border: 1px solid var(--border);
	border-radius: 6px;
	box-shadow: var(--shadow);
}
.still-link:hover img { box-shadow: 0 3px 12px rgba(7, 29, 51, 0.35); }

/* Video player */
.video-frame {
	position: relative;
	max-width: 1000px;
	margin: 0 auto;
	aspect-ratio: 16 / 9;
	background: #000000;
	border-radius: 6px;
	overflow: hidden;
	box-shadow: var(--shadow);
}
/* Native player controls live in the browser's shadow DOM; guarantee a visible
   focus ring around the player whenever any of them has keyboard focus (WCAG 2.4.7) */
.video-frame:focus-within { outline: 3px solid var(--focus-light); outline-offset: 3px; }
.video-frame video:focus-visible { outline: none; }
.video-frame video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #000000;
}
.video-status {
	position: absolute;
	left: 50%; top: 50%;
	transform: translate(-50%, -50%);
	min-width: 220px;
	padding: 10px 16px;
	background: rgba(7, 29, 51, 0.88);
	color: #ffffff;
	border-radius: 8px;
	text-align: center;
	font-size: 0.95rem;
}
.video-status[hidden] { display: none; }
.video-progress {
	display: block;
	width: 100%;
	height: 8px;
	margin-top: 8px;
	accent-color: var(--sky-200);
}
.video-desc { max-width: 1000px; margin: 8px auto 0; font-size: 0.9rem; color: var(--muted); text-align: center; }

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 36px;
	padding: 6px 14px;
	border: 2px solid var(--blue-700);
	border-radius: 6px;
	background: var(--blue-700);
	color: #ffffff;
	font: inherit;
	font-size: 0.9rem;
	font-weight: bold;
	cursor: pointer;
	text-decoration: none;
}
.btn:hover { background: var(--navy-800); border-color: var(--navy-800); color: #ffffff; }
.btn.secondary { background: #ffffff; color: var(--blue-700); }
.btn.secondary:hover { background: var(--sky-100); color: var(--navy-800); }
.btn[aria-pressed="true"] { background: var(--navy-800); border-color: var(--navy-800); }

/* Per-section menu (archive links, show/hide recent) */
.cam-menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px 14px;
	margin: 10px auto 0;
	font-size: 0.9rem;
}
.cam-menu .label { font-weight: bold; color: var(--text); }

/* ---------- Filmstrip ---------- */
.filmstrip-wrap { margin-top: 10px; }
.filmstrip-wrap[hidden] { display: none; }
.filmstrip-heading { margin: 0 0 6px; font-size: 0.85rem; text-align: center; color: var(--muted); font-weight: bold; }
.filmstrip {
	list-style: none;
	margin: 0 auto;
	padding: 0;
	max-width: 1000px;
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 8px;
}
.filmstrip li { margin: 0; }
.film-btn {
	display: block;
	width: 100%;
	padding: 3px;
	border: 2px solid var(--border);
	border-radius: 6px;
	background: #ffffff;
	color: var(--text);
	font: inherit;
	font-size: 0.78rem;
	cursor: pointer;
	text-align: center;
}
.film-btn img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 3px; background: #dfe8f3; }
.film-btn span { display: block; padding: 3px 0 1px; }
.film-btn:hover { border-color: var(--blue-600); }
.film-btn[aria-current="true"] { border-color: var(--blue-700); background: var(--sky-100); box-shadow: 0 0 0 2px var(--blue-700); font-weight: bold; }

/* ---------- Tide chart / weather / disclaimer ---------- */
.info-section { margin: 0 0 28px; }
.info-section .figure { text-align: center; }
.info-section .figure img { width: 100%; max-width: 960px; padding: 4px; border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow); background: #ffffff; }
.legend-box {
	max-width: 560px;
	margin: 10px auto 0;
	padding: 8px 14px;
	border: 1px solid var(--border);
	border-radius: 6px;
	background: var(--sky-50);
	font-size: 0.9rem;
	text-align: center;
}
.legend-box p { margin: 4px 0; }

/* Tide, sun and moon times — text version of the tide chart (WCAG 1.1.1) */
.tide-times { max-width: 560px; margin: 18px auto 0; }
.tide-times h3 { margin: 0; font-size: 1.15rem; color: var(--navy-800); text-align: center; }
.tide-tz { margin: 2px 0 8px; font-size: 0.85rem; color: var(--muted); text-align: center; }
.tide-next { margin: 0 0 10px; font-weight: bold; text-align: center; }
.tide-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; background: #ffffff; border: 1px solid var(--border); }
.tide-table th, .tide-table td { padding: 6px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.tide-table thead th { background: var(--navy-800); color: #ffffff; font-size: 0.85rem; }
.tide-table th[scope="rowgroup"] { background: var(--sky-100); color: var(--navy-800); }
.tide-table td.num { text-align: right; white-space: nowrap; }
.tide-table td.time { white-space: nowrap; }
.tide-table .tide-ev { font-weight: bold; }
.tide-table tr.past td { color: var(--muted); }
.wx-widget { max-width: 1048px; width: 100%; color: #333f42; border: 1px solid var(--blue-700); background: radial-gradient(circle, #ffffff, #f5faff, #e5efff); }
/* Third-party weatherwx widget fixes (WCAG 1.4.3): its daily highs use pure red
   (#ff0000 = 3.99:1 on white). #b30000 gives 7.0:1 and still reads as "high". */
.wx-widget span[style*="color: red"], .wx-widget span[style*="color:red"] { color: #b30000 !important; }
/* Sideways-scrolling forecast strip is made focusable by boynton.v1.0.js (WCAG 2.1.1) */
.wx-widget [data-wx-scroll]:focus-visible { outline: 3px solid var(--focus-light); outline-offset: 2px; }
.disclaimer-text { max-width: 900px; margin: 0 auto; font-size: 0.9rem; color: var(--text); text-align: center; }

/* ---------- Footer ---------- */
#footer {
	padding: 16px 20px 20px;
	background: var(--navy-800);
	color: #ffffff;
	font-size: 0.85rem;
	text-align: center;
	border-top: 4px solid var(--sky-200);
}
#footer p { margin: 2px 0; }
#footer a { color: var(--link-on-dark); }
#footer a:hover { color: #ffffff; }

/* ---------- Responsive ---------- */
@media (max-width: 1079px) {
	.page { border-radius: 0; }
	.filmstrip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.filmstrip li:nth-child(n+4) { display: none; }
}
@media (max-width: 640px) {
	#header { padding: 10px 12px; gap: 10px; }
	#header .logo img { width: 48px; height: 48px; }
	#header .header-titles { padding-right: 0; }
	#header h1 { font-size: 1.4rem; }
	#header .tagline { font-size: 0.95rem; }
	main { padding: 4px 10px 16px; }
	.quick-links { padding: 10px 12px; }
	.cam-section { padding: 8px; }
	.section-heading h2 { font-size: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
}
