/*
Theme Name: Ships Log
Theme URI: https://shipslog.stedman.us
Description: A photography-first travel journal child theme for Twenty Twenty-Five. Deep navy, sea-glass and sand palette, serif headlines, wide uncropped photos, and tidy galleries for logging voyages aboard the Bayliner 4788.
Author: Steve Stedman
Template: twentytwentyfive
Version: 1.1.0
Requires at least: 6.7
Requires PHP: 7.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ships-log
*/

/* Most design lives in theme.json. This file holds the few things theme.json cannot express. */

/* Header */
.sl-header {
	position: sticky;
	top: 0;
	z-index: 20;
	backdrop-filter: saturate(1.4) blur(8px);
}
.admin-bar .sl-header { top: var(--wp-admin--admin-bar--height, 32px); }
.sl-header .wp-block-site-title a { text-decoration: none; }
.sl-tagline { letter-spacing: 0.02em; }

/* Footer links must stay readable on the navy background */
footer.wp-block-group a { color: var(--wp--preset--color--base); }
footer.wp-block-group a:hover { color: var(--wp--preset--color--accent-2); }
.sl-footer-contact p { margin-block: 0 var(--wp--preset--spacing--20); }

/* Post cards */
.sl-card { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.sl-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(11, 42, 60, 0.16); }
.sl-card .wp-block-post-featured-image { margin: 0; overflow: hidden; }
.sl-card .wp-block-post-featured-image img { transition: transform 0.5s ease; }
.sl-card:hover .wp-block-post-featured-image img { transform: scale(1.04); }
.sl-card .wp-block-post-title a { text-decoration: none; }
.sl-card .wp-block-post-title a:hover { text-decoration: underline; }
.sl-chips a {
	display: inline-block;
	margin: 0 0.35rem 0.35rem 0;
	padding: 0.1rem 0.65rem;
	border-radius: 999px;
	background: var(--wp--preset--color--accent-5);
	border: 1px solid var(--wp--preset--color--accent-6);
	text-decoration: none;
}

/* Photos inside posts */
.entry-content figure,
.wp-block-post-content figure { margin-block: var(--wp--preset--spacing--40); }
.wp-block-post-content .wp-block-image img,
.wp-block-post-content .wp-block-gallery img { height: auto; }
.wp-block-gallery .wp-block-image img { object-fit: cover; }
.wp-block-post-content figcaption,
.wp-block-gallery figcaption {
	font-style: italic;
	text-align: center;
	color: var(--wp--preset--color--accent-4);
}

/* Photo Journal: masonry columns, jump links land below the sticky header */
html { scroll-behavior: smooth; }
.sl-region { scroll-margin-top: 110px; }
ul.sl-masonry {
	display: block;
	column-count: 3;
	column-gap: 16px;
	padding: 0;
	margin: 0;
	list-style: none;
}
ul.sl-masonry > li {
	break-inside: avoid;
	margin: 0 0 16px;
}
.sl-photo { margin: 0; }
.sl-photo .wp-block-post-featured-image { margin: 0; overflow: hidden; border-radius: 8px; }
.sl-photo .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	height: auto;
	transition: transform 0.4s ease, filter 0.4s ease;
}
.sl-photo:hover .wp-block-post-featured-image img { transform: scale(1.03); filter: brightness(1.05); }
.sl-photo .wp-block-post-title { margin: 6px 2px 0; line-height: 1.3; }
.sl-photo .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--accent-4); }
.sl-photo .wp-block-post-title a:hover { text-decoration: underline; color: var(--wp--preset--color--contrast); }
@media (max-width: 1000px) { ul.sl-masonry { column-count: 2; } }
@media (max-width: 560px) { ul.sl-masonry { column-count: 1; } }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.sl-photo .wp-block-post-featured-image img { transition: none; }
	.sl-photo:hover .wp-block-post-featured-image img { transform: none; filter: none; }
}

/* Hero */
.sl-hero .wp-block-cover__inner-container { max-width: 900px; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
	.sl-card, .sl-card .wp-block-post-featured-image img { transition: none; }
	.sl-card:hover, .sl-card:hover .wp-block-post-featured-image img { transform: none; }
}
