/* OpenSails — styles theme.json can't express: the logbook ledger, OpenSails Core blocks, small details. */

/* Header: quiet, stays out of the way of the photos. */
.os-header { border-bottom: 1px solid var(--wp--preset--color--mist); }

/* Hero: the homepage photo carries the page, flush under the header. */
main:has(> .os-hero:first-child) { margin-block-start: 0; }
main > .os-hero:first-child { margin-block-start: 0; }
.os-hero .wp-block-cover__inner-container { width: 100%; max-width: var(--wp--style--global--wide-size); margin-inline: auto; }
.os-hero .wp-block-cover__inner-container { padding-bottom: var(--wp--preset--spacing--50); }
.os-hero__title { font-size: clamp(2.75rem, 9vw, 6.5rem); line-height: 0.95; max-width: 12ch; letter-spacing: -0.025em; }
.os-hero__lead { max-width: 34ch; opacity: 0.92; }
.os-hero__lead .wp-block-post-excerpt__more-text { display: none; }

/* Logbook ledger: one ruled line per story, like a ship's log. */
.os-logbook .wp-block-post-template { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--wp--preset--color--deep-water); }
.os-logbook .wp-block-post { margin: 0; border-bottom: 1px solid var(--wp--preset--color--mist); }
.os-entry {
	display: grid;
	grid-template-columns: 7.5rem 1fr auto;
	gap: 0 1.5rem;
	align-items: start;
	padding: 1.25rem 0;
}
.os-entry > * { margin: 0 !important; }
.os-entry__date {
	font-variant-numeric: tabular-nums;
	color: var(--wp--preset--color--shallows);
	padding-top: 0.3rem;
}
.os-entry__body > * { margin-block: 0 0.25rem; }
.os-entry__body .wp-block-post-title { margin-bottom: 0.35rem; }
.os-entry__place, .os-entry__type { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--shallows); }
.os-entry__place a, .os-entry__type a { color: inherit; text-decoration: none; }
.os-entry__place a:hover, .os-entry__type a:hover { color: var(--wp--preset--color--rind); text-decoration: underline; }
.os-entry__place::before { content: ""; display: inline-block; width: 0.5em; height: 0.5em; margin-right: 0.4em; border-radius: 50%; background: var(--wp--preset--color--flesh); vertical-align: 0.1em; }
.os-entry__thumb { width: 9rem; }
.os-entry__thumb img { border-radius: 3px; }
.os-entry .wp-block-post-title a:hover { color: var(--wp--preset--color--rind); }

@media (max-width: 640px) {
	.os-entry { grid-template-columns: 1fr 5.5rem; gap: 0.25rem 1rem; }
	.os-entry__date { grid-column: 1 / -1; padding-top: 0; }
	.os-entry__thumb { width: 5.5rem; grid-column: 2; grid-row: 2; }
	.os-entry__body { grid-column: 1; grid-row: 2; }
}

/* Story-type filters above the logbook. */
.os-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 1.5rem 0 2rem; }
.os-filters li { margin: 0; }
.os-filters a {
	display: inline-block; padding: 0.35rem 0.9rem; border-radius: 999px;
	background: var(--wp--preset--color--mist); color: var(--wp--preset--color--deep-water);
	font-size: var(--wp--preset--font-size--small); text-decoration: none;
}
.os-filters a:hover, .os-filters .current-cat a { background: var(--wp--preset--color--deep-water); color: var(--wp--preset--color--salt); }

/* Story strips (homepage "This season", Section pages). Hidden when there are no stories. */
.os-strip:not(:has(.wp-block-post)) { display: none; }
.os-strip .wp-block-post-template { gap: 2rem 1.5rem; }
.os-strip .wp-block-post > * { margin-block: 0 0.4rem; }
.os-strip .wp-block-post-featured-image { margin-bottom: 0.8rem; }

/* Story page. */
.os-kicker { font-size: var(--wp--preset--font-size--small); font-weight: 600; }
.os-kicker a { color: var(--wp--preset--color--flesh); text-decoration: none; }
.os-details {
	display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1.25rem;
	margin-block: 2rem; padding: 1rem 1.25rem;
	background: var(--wp--preset--color--mist); border-radius: 4px;
	font-size: var(--wp--preset--font-size--small);
}
.os-details dt { font-weight: 600; }
.os-details dd { margin: 0; }
.os-prevnext { font-size: var(--wp--preset--font-size--small); }

/* Crew. */
.os-portrait { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
.os-portrait--empty {
	display: grid; place-items: center;
	background: var(--wp--preset--color--mist); color: var(--wp--preset--color--shallows);
	font-family: var(--wp--preset--font-family--heading); font-size: 2.5rem;
}
.os-crew-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 2rem 1.5rem; list-style: none; padding: 0; }
.os-crew-list__item { margin: 0; text-align: center; }
.os-crew-list__item a { color: inherit; text-decoration: none; }
.os-crew-list__item .os-portrait { margin-bottom: 0.75rem; }
.os-crew-list__name { display: block; font-family: var(--wp--preset--font-family--heading); font-size: var(--wp--preset--font-size--large); font-weight: 600; }
.os-crew-list__item a:hover .os-crew-list__name { color: var(--wp--preset--color--rind); }
.os-crew-list__role { display: block; font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--shallows); }
.os-crew-profile { display: flex; gap: 1.5rem; align-items: center; margin-top: var(--wp--preset--spacing--40); }
.os-crew-profile .os-portrait { width: 8rem; flex: none; }
.os-crew-profile p { margin: 0; }
.os-crew-profile__role { font-weight: 600; }
.os-crew-profile__since { color: var(--wp--preset--color--shallows); font-size: var(--wp--preset--font-size--small); }

/* Editor-only hint when a block has nothing to show yet. */
.os-block-note { padding: 1rem; border: 1px dashed var(--wp--preset--color--shallows); font-size: 0.875rem; }

.os-page { padding-top: var(--wp--preset--spacing--50); padding-bottom: var(--wp--preset--spacing--60); }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* Homepage doors to the fixed sections. */
.os-doors { gap: 1.5rem; margin-block: var(--wp--preset--spacing--50); }
.os-doors > .wp-block-column { border-top: 2px solid var(--wp--preset--color--deep-water); padding-top: 1rem; }
.os-doors h3 { margin: 0 0 0.4rem; }
.os-doors h3 a { color: var(--wp--preset--color--deep-water); text-decoration: none; }
.os-doors h3 a:hover { color: var(--wp--preset--color--rind); }
.os-doors p { margin: 0; color: var(--wp--preset--color--shallows); font-size: var(--wp--preset--font-size--small); }

/* 360° views. */
.os-360 { aspect-ratio: 16 / 9; width: 100%; border-radius: 4px; overflow: hidden; background: var(--wp--preset--color--mist); }
.os-360 iframe { display: block; width: 100%; height: 100%; border: 0; }
@media (max-width: 640px) { .os-360 { aspect-ratio: 4 / 3; } }

/* Spec table. */
.os-spec table { border-collapse: collapse; font-size: var(--wp--preset--font-size--small); }
.os-spec td { border: 0; border-bottom: 1px solid var(--wp--preset--color--mist); padding: 0.5rem 0; }
.os-spec td:first-child { color: var(--wp--preset--color--shallows); width: 45%; }

/* Empty photo slots stay invisible on the site until photos are added. */
.os-photo-slot:not(:has(img)) { display: none; }

.wp-block-details summary { cursor: pointer; font-weight: 600; font-size: var(--wp--preset--font-size--small); }

/* Hero text keeps the page gutter on every screen. */
.os-hero .wp-block-cover__inner-container { padding-inline: var(--wp--preset--spacing--40); box-sizing: border-box; }

/* Homepage next steps: one solid, one outlined. */
.os-actions { margin-block: 1.75rem 0; }
.os-actions .wp-block-button + .wp-block-button .wp-block-button__link {
	background: transparent; color: var(--wp--preset--color--deep-water);
	box-shadow: inset 0 0 0 1.5px var(--wp--preset--color--deep-water);
}
.os-actions .wp-block-button + .wp-block-button .wp-block-button__link:hover { background: var(--wp--preset--color--deep-water); color: var(--wp--preset--color--salt); }

/* Water Mellon logo inside a page. */
.wp-block-image.os-logo img { width: min(18rem, 70%); height: auto; }
.wp-block-image.os-logo { margin-block: 2rem; }

/* Header mark. */
.os-header .wp-block-site-logo img { height: 40px; width: auto; }
