/*
Theme Name: Saltline
Theme URI: https://example.com/saltline
Author: Saltline
Description: A block theme for fishing charter and boat tour businesses. The home page reads like a trip offshore: every section sits a little deeper, with depth marks on the way down. Built to pair with the Cast & Catch Booking plugin, whose animated booking form sits in the hero. Includes one-click demo content.
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: saltline
Tags: block-patterns, full-site-editing, custom-colors, editor-style, one-column, wide-blocks, style-variations, travel
*/

/* ------------------------------------------------------------------
   Base
   ------------------------------------------------------------------ */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:where(h1, h2, h3) { text-wrap: balance; }
:where(p) { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--wp--preset--color--buoy); outline-offset: 2px; }
::selection { background: var(--wp--preset--color--buoy); color: var(--wp--preset--color--harbor); }
.wp-site-blocks { overflow-x: clip; }
.wp-site-blocks > * { margin-block-start: 0 !important; }

.skip-link.screen-reader-text:focus { background: var(--wp--preset--color--buoy); color: var(--wp--preset--color--harbor); }

/* Buttons */
.wp-element-button, .wp-block-button__link { transition: transform .15s ease, box-shadow .15s ease, background-color .2s; }
.wp-element-button:active, .wp-block-button__link:active { transform: translate(4px, 4px); box-shadow: none !important; }
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent; color: currentColor; border-color: currentColor; box-shadow: none;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: rgba(255, 255, 255, .08); }

/* ------------------------------------------------------------------
   Header
   ------------------------------------------------------------------ */
.saltline-header { position: relative; z-index: 20; }
.saltline-header .wp-block-site-title a { display: inline-flex; align-items: center; gap: .55rem; }
.saltline-header .wp-block-site-title a::before {
	content: ""; width: 28px; height: 28px; flex: none;
	background: var(--wp--preset--color--buoy);
	-webkit-mask: url("assets/images/anchor.svg") center / contain no-repeat;
	mask: url("assets/images/anchor.svg") center / contain no-repeat;
}
.saltline-header .wp-block-navigation a:where(:not(.wp-element-button)) { color: var(--wp--preset--color--paper); }
.saltline-header .wp-block-navigation .current-menu-item > a { text-decoration: underline; text-decoration-color: var(--wp--preset--color--buoy); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.saltline-header .wp-block-button__link { padding: .6rem 1.2rem; box-shadow: 3px 3px 0 var(--wp--preset--color--abyss); border-color: var(--wp--preset--color--abyss); }
.saltline-header .wp-block-navigation__responsive-container.is-menu-open { padding: 2rem 1.5rem; }
.saltline-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { font-family: var(--wp--preset--font-family--display); font-size: 2.2rem; font-weight: 800; }

/* Tide strip: filled in by assets/js/saltline.js */
.saltline-tides {
	display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1.4rem;
	min-height: 2.6rem; padding: .55rem 0 .65rem;
	border-top: 1px solid rgba(234, 245, 243, .14);
	font-size: .875rem; color: var(--wp--preset--color--mist);
}
.saltline-tides strong { color: var(--wp--preset--color--paper); font-weight: 600; }
.saltline-tides .tide-place { color: var(--wp--preset--color--paper); font-weight: 700; }
.saltline-tides .tide-item { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }
.saltline-tides svg { width: 16px; height: 16px; flex: none; }
.saltline-tides .tide-bite svg { width: 14px; height: 11px; }
.saltline-tides .tide-bite .on { fill: var(--wp--preset--color--brass); }
.saltline-tides .tide-bite .off { fill: rgba(234, 245, 243, .2); }
.saltline-tides .tide-note { margin-left: auto; opacity: .75; font-size: .8rem; }
@media (max-width: 700px) {
	.saltline-tides { gap: .25rem 1rem; font-size: .8rem; }
	.saltline-tides .tide-note, .saltline-tides .tide-moon { display: none; }
}

/* ------------------------------------------------------------------
   Depth marks and the gauge
   ------------------------------------------------------------------ */
.depth-mark {
	display: flex; align-items: center; gap: .75rem;
	margin: 0 0 .75rem !important;
	font-size: .875rem; font-weight: 700; letter-spacing: .02em;
	color: var(--wp--preset--color--brass);
	font-variant-numeric: tabular-nums;
}
.depth-mark::before { content: ""; width: 2.25rem; height: 2px; background: currentColor; flex: none; }
.depth-mark .depth-label { color: inherit; opacity: .85; font-weight: 600; }

.saltline-gauge {
	position: fixed; right: 18px; top: 50%; z-index: 15;
	display: flex; flex-direction: column; align-items: center; gap: 6px;
	transform: translateY(-50%);
	padding: 10px 6px; border-radius: 999px;
	background: rgba(6, 32, 47, .78); color: var(--wp--preset--color--paper);
	backdrop-filter: blur(6px);
	font-size: .75rem; font-weight: 700; font-variant-numeric: tabular-nums;
	opacity: 0; pointer-events: none; transition: opacity .4s;
}
.saltline-gauge.is-on { opacity: 1; }
.saltline-gauge-track { position: relative; width: 4px; height: 150px; border-radius: 4px; background: rgba(234, 245, 243, .2); }
.saltline-gauge-fill { position: absolute; left: 0; top: 0; width: 4px; border-radius: 4px; background: var(--wp--preset--color--buoy); height: 0; transition: height .25s linear; }
.saltline-gauge-val { min-width: 3.4em; text-align: center; }
@media (max-width: 1100px) { .saltline-gauge { display: none; } }

/* ------------------------------------------------------------------
   Hero with the booking form
   ------------------------------------------------------------------ */
.saltline-hero { background: var(--wp--preset--color--harbor); overflow: clip; }
/* Chart-paper water fills in behind the lower part of the booking form, so the form straddles the two. */
.saltline-booking { position: relative; isolation: isolate; }
.saltline-booking::before {
	content: ""; position: absolute; z-index: -1; left: -50vw; right: -50vw; top: 150px;
	bottom: calc(-1 * var(--wp--preset--spacing--50) - 2px);
	background: var(--wp--preset--color--paper);
}
.saltline-hero .hero-title { color: var(--wp--preset--color--paper); max-width: 13ch; }
.saltline-hero .hero-title em { font-style: normal; color: var(--wp--preset--color--buoy); }
.saltline-hero .hero-lede { color: var(--wp--preset--color--mist); max-width: 46ch; }
.saltline-hero .hero-facts { gap: 0 !important; border-top: 1px solid rgba(234, 245, 243, .2); }
.saltline-hero .hero-facts > * { flex: 1 1 0; min-width: 0; padding: .9rem 1rem .2rem 0; margin: 0 !important; }
.saltline-hero .hero-facts > * + * { padding-left: 1rem; border-left: 1px solid rgba(234, 245, 243, .2); }
.saltline-hero .hero-facts strong {
	display: block; font-family: var(--wp--preset--font-family--display); font-weight: 800;
	font-size: 2.4rem; line-height: 1; color: var(--wp--preset--color--paper);
}
.saltline-hero .hero-facts span { font-size: .85rem; color: var(--wp--preset--color--mist); }
.saltline-hero .depth-mark { color: var(--wp--preset--color--brass); }
.saltline-booking { scroll-margin-top: 1rem; }
.saltline-booking .ccb { max-width: none; }
.saltline-booking .ccb { box-shadow: 0 0 0 1px rgba(11, 57, 84, .3), 0 40px 80px -40px rgba(6, 32, 47, .8); }
@media (max-width: 781px) {
	.saltline-hero .hero-facts strong { font-size: 1.9rem; }
}
.saltline-plugin-missing {
	padding: 2rem; border: 2px dashed var(--wp--preset--color--buoy); border-radius: 18px;
	background: var(--wp--preset--color--white); color: var(--wp--preset--color--ink);
}

/* ------------------------------------------------------------------
   A day on the water (timeline)
   ------------------------------------------------------------------ */
.saltline-timeline { list-style: none; padding: 0 !important; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; counter-reset: none; }
.saltline-timeline li { position: relative; padding: 2.4rem 1.1rem 0 0; margin: 0; }
.saltline-timeline li::before {
	content: ""; position: absolute; left: 0; right: 0; top: .55rem; height: 2px;
	background: repeating-linear-gradient(90deg, var(--wp--preset--color--harbor) 0 6px, transparent 6px 12px);
}
.saltline-timeline li::after {
	content: ""; position: absolute; left: 0; top: 0; width: 1.15rem; height: 1.15rem; border-radius: 50%;
	background: var(--wp--preset--color--buoy); border: 2px solid var(--wp--preset--color--harbor);
}
.saltline-timeline time {
	display: block; font-family: var(--wp--preset--font-family--display); font-weight: 800;
	font-size: 2rem; line-height: 1; color: var(--wp--preset--color--harbor);
	font-variant-numeric: tabular-nums;
}
.saltline-timeline strong { display: block; margin: .35rem 0 .2rem; color: var(--wp--preset--color--harbor); }
.saltline-timeline span { display: block; font-size: .95rem; color: #4a6577; }
@media (max-width: 900px) {
	.saltline-timeline { grid-template-columns: minmax(0, 1fr); }
	.saltline-timeline li { padding: 0 0 1.6rem 2.2rem; }
	.saltline-timeline li::before { left: .5rem; right: auto; top: 1.2rem; bottom: 0; width: 2px; height: auto; background: repeating-linear-gradient(180deg, var(--wp--preset--color--harbor) 0 6px, transparent 6px 12px); }
	.saltline-timeline li:last-child::before { display: none; }
}

/* ------------------------------------------------------------------
   Fleet
   ------------------------------------------------------------------ */
.saltline-fleet .boat { background: var(--wp--preset--color--paper); border-radius: 22px; padding: 1.4rem 1.4rem 1.2rem; box-shadow: 0 0 0 2px var(--wp--preset--color--harbor), 6px 6px 0 var(--wp--preset--color--harbor); }
.saltline-fleet .boat figure { margin: -.4rem -.4rem .4rem; }
.saltline-fleet .boat img { width: 100%; height: auto; border-radius: 0; }
.saltline-fleet .boat h3 { margin: 0; }
.saltline-fleet .boat-kind { margin: .1rem 0 .8rem !important; font-size: .9rem; font-weight: 600; color: var(--wp--preset--color--reef); }
.saltline-specs { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-top: 1px dashed rgba(11, 57, 84, .25); }
.saltline-specs div { padding: .6rem 0; border-bottom: 1px dashed rgba(11, 57, 84, .25); }
.saltline-specs div:nth-child(odd) { padding-right: .8rem; }
.saltline-specs div:nth-child(even) { padding-left: .8rem; border-left: 1px dashed rgba(11, 57, 84, .25); }
.saltline-specs dt { font-size: .8rem; color: #4a6577; }
.saltline-specs dd { margin: 0; font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: 1.35rem; line-height: 1.05; color: var(--wp--preset--color--harbor); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------
   Catch log (query loop as a logbook)
   ------------------------------------------------------------------ */
.saltline-log .wp-block-post-template { border-top: 2px solid currentColor; }
.saltline-log .wp-block-post-template > li { margin: 0; border-bottom: 1px solid rgba(234, 245, 243, .28); }
.saltline-log .wp-block-post-template > li > .wp-block-group { padding-block: 1.1rem; }
.saltline-log .wp-block-post-date { color: var(--wp--preset--color--sand); font-variant-numeric: tabular-nums; }
.saltline-log .wp-block-post-title a:hover { text-decoration: underline; text-decoration-color: var(--wp--preset--color--buoy); }
.saltline-log:not(.is-light) .wp-block-post-template > li > .wp-block-group { grid-template-columns: 10rem minmax(0, 1fr) minmax(0, 1.2fr) !important; align-items: baseline; }
@media (max-width: 781px) { .saltline-log:not(.is-light) .wp-block-post-template > li > .wp-block-group { grid-template-columns: minmax(0, 1fr) !important; gap: .4rem !important; } }
.saltline-log .wp-block-post-featured-image img { aspect-ratio: 16 / 10; object-fit: cover; }
.saltline-log .wp-block-post-excerpt__excerpt { margin: 0; }
.saltline-log.is-light .wp-block-post-template > li { border-bottom-color: rgba(11, 57, 84, .18); }
.saltline-log.is-light .wp-block-post-date { color: var(--wp--preset--color--reef); }
.wp-block-post-terms a { text-decoration: none; }

/* ------------------------------------------------------------------
   Crew
   ------------------------------------------------------------------ */
.saltline-crew .crew-card { border-top: 2px solid var(--wp--preset--color--paper); padding-top: 1.1rem; }
.saltline-crew .crew-badge {
	display: grid; place-items: center; width: 4.25rem; height: 4.25rem; border-radius: 50%; margin: 0 0 .9rem !important;
	background: var(--wp--preset--color--buoy); color: var(--wp--preset--color--harbor);
	font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: 1.7rem; line-height: 1;
	box-shadow: 4px 4px 0 var(--wp--preset--color--abyss);
}
.saltline-crew .crew-card:nth-child(2) .crew-badge { background: var(--wp--preset--color--sand); }
.saltline-crew .crew-card:nth-child(3) .crew-badge { background: var(--wp--preset--color--shallows); }
.saltline-crew .crew-role { margin: .2rem 0 .7rem !important; font-weight: 600; color: var(--wp--preset--color--sand); font-size: .95rem; }
.saltline-crew .crew-sig { font-size: .9rem; color: var(--wp--preset--color--mist); }
.saltline-crew .crew-sig strong { color: var(--wp--preset--color--paper); }

/* ------------------------------------------------------------------
   Bring list + FAQ
   ------------------------------------------------------------------ */
.saltline-checklist { list-style: none; padding: 0 !important; margin: 0; }
.saltline-checklist li { position: relative; padding: .55rem 0 .55rem 2.1rem; border-bottom: 1px solid rgba(234, 245, 243, .16); }
.saltline-checklist li::before {
	content: ""; position: absolute; left: 0; top: .78rem; width: 1.15rem; height: 1.15rem; border-radius: 4px;
	border: 2px solid var(--wp--preset--color--brass);
}
.saltline-checklist li::after {
	content: ""; position: absolute; left: .4rem; top: .9rem; width: .35rem; height: .65rem;
	border: solid var(--wp--preset--color--brass); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.saltline-faq .wp-block-details summary {
	font-weight: 700; font-size: 1.05rem; cursor: pointer; list-style: none; position: relative; padding-right: 2rem;
}
.saltline-faq .wp-block-details summary::-webkit-details-marker { display: none; }
.saltline-faq .wp-block-details summary::after {
	content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
	font-family: var(--wp--preset--font-family--display); font-size: 1.8rem; font-weight: 800; color: var(--wp--preset--color--buoy);
	transition: transform .25s;
}
.saltline-faq .wp-block-details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.saltline-faq .wp-block-details > :not(summary) { color: var(--wp--preset--color--mist); margin-top: .6rem; }
.saltline-faq .wp-block-details:first-of-type { border-top: 1px solid rgba(234, 245, 243, .25); }

/* ------------------------------------------------------------------
   Visit + footer
   ------------------------------------------------------------------ */
.saltline-visit .visit-map img { border-radius: 18px; width: 100%; height: auto; }
.saltline-visit dl { margin: var(--wp--preset--spacing--30) 0 0; display: grid; gap: 1rem; }
.saltline-visit dt { font-size: .85rem; color: var(--wp--preset--color--mist); }
.saltline-visit dd { margin: .1rem 0 0; font-size: 1.15rem; font-weight: 600; color: var(--wp--preset--color--paper); }
.saltline-visit dd a { color: var(--wp--preset--color--paper); }

.saltline-footer a { color: var(--wp--preset--color--paper); }
.saltline-footer .wp-block-navigation a:hover { color: var(--wp--preset--color--buoy); }
.saltline-footer .footer-heading { font-size: .85rem; font-weight: 700; color: var(--wp--preset--color--brass); margin-bottom: .6rem !important; }
.saltline-seabed { height: 38px; width: 100vw; max-width: 100vw !important; margin: 0 0 0 calc(50% - 50vw) !important; background: url("assets/images/seabed.svg") center bottom / auto 38px repeat-x; }

/* ------------------------------------------------------------------
   Trips page cards
   ------------------------------------------------------------------ */
.saltline-trips .trip { background: var(--wp--preset--color--white); border-radius: 18px; padding: 1.3rem 1.4rem; box-shadow: 0 0 0 2px var(--wp--preset--color--harbor); height: 100%; }
.saltline-trips .trip-zone { margin: 0 !important; font-size: .85rem; font-weight: 700; color: var(--wp--preset--color--reef); }
.saltline-trips .trip-price { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: 1.9rem; line-height: 1; color: var(--wp--preset--color--harbor); margin: .8rem 0 0 !important; }
.saltline-trips .trip-price span { font-family: var(--wp--preset--font-family--body); font-weight: 600; font-size: .85rem; color: #4a6577; }
.saltline-trips .trip-meta { font-size: .9rem; color: #4a6577; margin-top: .2rem !important; }

/* ------------------------------------------------------------------
   Posts
   ------------------------------------------------------------------ */
.saltline-post-header .wp-block-post-terms a { color: var(--wp--preset--color--reef); font-weight: 700; font-size: .9rem; }

.single .single .wp-block-post-content > p:first-child::first-letter { color: var(--wp--preset--color--buoy); }
.page .single .wp-block-post-content > p:first-child::first-letter { all: unset; }
.wp-block-post-navigation-link a { text-decoration: none; font-weight: 600; }
.wp-block-query-pagination a { text-decoration: none; font-weight: 700; }
.wp-block-search__input { border-radius: 999px; border: 2px solid var(--wp--preset--color--harbor); padding: .7rem 1rem; }
.wp-block-search__button { margin-left: .5rem; }
