/* Saltmarsh Keep
   Sea-glass page, slate type, rust accent.
   Gelasio for headings and numbers, Work Sans for text.
   Layout: numbered trail — vertical rail with markers, entries to the right. */

:root {
    --glass: #e6eeec;
    --glass-2: #dbe6e3;
    --card: #f5f8f7;
    --slate: #1f2f3a;
    --slate-2: #3a4a55;
    --text: #40505a;
    --mute: #7a8a93;
    --rule: #c5d3d0;
    --rust: #b8552f;
    --rust-2: #973f1e;
    --sand: #e9d9b8;
    --serif: 'Gelasio', Georgia, 'Times New Roman', serif;
    --sans: 'Work Sans', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body { background: var(--glass); color: var(--text); font-family: var(--sans); font-size: 16.5px; line-height: 1.65; }
img { display: block; max-width: 100%; }
main { min-height: 60vh; }
a { color: var(--rust); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--rust-2); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--rust); outline-offset: 2px; }

.marsh { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; color: var(--slate); line-height: 1.12; }
h1 { font-size: 3.4rem; }
h2 { font-size: 2.1rem; }
h3 { font-size: 1.2rem; }
p { margin-bottom: 1em; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--slate); color: var(--glass); padding: 8px 14px; z-index: 2000; }
.skip:focus { left: 8px; }

.btn { display: inline-block; background: var(--slate); color: #fff; font-family: var(--sans); font-weight: 700; font-size: 0.93rem; padding: 12px 22px; border-radius: 4px; border: 2px solid var(--slate); text-decoration: none; cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s; }
.btn:hover { background: var(--rust); border-color: var(--rust); color: #fff; }
.btn-line { background: transparent; color: var(--slate); }
.btn-line:hover { background: var(--slate); color: #fff; border-color: var(--slate); }

/* Wall (header) */
.wall { position: sticky; top: 0; z-index: 60; background: rgba(230, 238, 236, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.wall-row { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 24px; }
.keep { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--slate); font-family: var(--serif); font-weight: 700; font-size: 1.3rem; }
.keep:hover { color: var(--slate); }
.nav { display: flex; gap: 24px; }
.nav a { font-size: 0.93rem; font-weight: 500; color: var(--slate-2); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a.on { color: var(--slate); border-color: var(--rust); }
.navbtn { display: none; font-family: var(--sans); font-weight: 700; background: transparent; border: 1px solid var(--slate); color: var(--slate); padding: 6px 14px; border-radius: 4px; cursor: pointer; }

/* Landing (hero) */
.landing { position: relative; background: var(--glass) url('/assets/img/hero.webp') right center / cover no-repeat; padding: 80px 0 56px; border-bottom: 1px solid var(--rule); }
.landing-inner { max-width: 1120px; }
.landing-kicker { font-size: 0.9rem; color: var(--rust); font-weight: 700; margin-bottom: 12px; }
.landing h1 { max-width: 14ch; margin-bottom: 18px; }
.landing-lead { font-size: 1.1rem; max-width: 560px; margin-bottom: 36px; }
.pins { list-style: none; display: flex; gap: 14px; flex-wrap: wrap; }
.pins a { display: flex; align-items: center; gap: 12px; background: rgba(245, 248, 247, 0.92); border: 1px solid var(--rule); border-radius: 999px; padding: 6px 16px 6px 6px; text-decoration: none; color: var(--slate); transition: border-color 0.15s, background 0.15s; }
.pins a:hover, .pins a.now { border-color: var(--rust); background: #fff; }
.pins img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.pins span { font-weight: 500; font-size: 0.95rem; }
.pins b { font-family: var(--serif); font-size: 1.05rem; color: var(--rust); }
.landing-credit { position: absolute; right: 24px; bottom: 8px; margin: 0; font-size: 0.75rem; color: rgba(31, 47, 58, 0.6); }

/* Trail */
.trail { padding: 60px 0 30px; }
.path { list-style: none; position: relative; padding-left: 96px; }
.path::before { content: ""; position: absolute; left: 31px; top: 20px; bottom: 20px; width: 2px; background: repeating-linear-gradient(180deg, var(--slate) 0 8px, transparent 8px 16px); opacity: 0.45; }
.stop { position: relative; padding: 0 0 64px; scroll-margin-top: 90px; }
.stop:last-child { padding-bottom: 20px; }
.marker { position: absolute; left: -96px; top: 6px; width: 64px; height: 64px; border-radius: 50%; background: var(--slate); color: var(--glass); display: flex; align-items: center; justify-content: center; border: 4px solid var(--glass); box-shadow: 0 0 0 2px var(--slate); }
.marker b { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; }
.stop:first-child .marker { background: var(--rust); box-shadow: 0 0 0 2px var(--rust); }
.entry { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 30px 34px 28px; }
.entry-kind { font-size: 0.88rem; color: var(--mute); margin-bottom: 6px; }
.entry h2 { font-size: 2.2rem; margin-bottom: 10px; }
.entry-verdict { font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--slate); margin-bottom: 20px; }
.entry figure { margin: 0 0 22px; }
.entry figure img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; }
.entry figcaption { font-size: 0.76rem; color: var(--mute); margin-top: 6px; }
.entry p { font-size: 0.98rem; }
.entry-foot { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; justify-content: space-between; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--rule); }
.marks { display: flex; }
.marks div { text-align: center; padding: 0 14px; border-right: 1px solid var(--rule); }
.marks div:first-child { padding-left: 0; }
.marks div:last-child { border-right: 0; }
.marks dt { font-size: 0.7rem; color: var(--mute); margin-bottom: 2px; }
.marks dd { font-family: var(--serif); font-weight: 700; font-size: 1.25rem; color: var(--slate); line-height: 1; }
.marks .tot dd { color: var(--rust); font-size: 1.6rem; }

/* Tide table */
.tide { padding: 50px 0 80px; background: var(--glass-2); border-top: 1px solid var(--rule); }
.tide-head { display: flex; justify-content: space-between; align-items: baseline; gap: 30px; flex-wrap: wrap; margin-bottom: 22px; }
.tide-head p { margin: 0; color: var(--mute); max-width: 560px; }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--rule); border-radius: 8px; margin-bottom: 40px; }
table { width: 100%; border-collapse: collapse; min-width: 700px; font-size: 0.97rem; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--rule); }
th { font-family: var(--serif); font-weight: 700; color: var(--slate); background: var(--sand); }
th.n, td.n { text-align: right; font-variant-numeric: tabular-nums; }
td a { color: var(--slate); font-weight: 600; text-decoration: none; }
td a:hover { color: var(--rust); }
td.v { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; color: var(--rust); }
tbody tr:last-child td { border-bottom: 0; }
.tide-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.tide-notes h3 { margin-bottom: 8px; }
.tide-notes p { margin: 0; font-size: 0.97rem; }

/* Inner pages */
.band { background: var(--glass) url('/assets/img/band.webp') right center / cover no-repeat; padding: 56px 0 40px; border-bottom: 1px solid var(--rule); }
.band h1 { font-size: 2.8rem; margin-bottom: 8px; }
.band p { margin: 0; font-size: 0.9rem; color: var(--mute); }
.page { padding: 44px 0 80px; }
.page h2 { font-size: 1.6rem; margin: 36px 0 10px; }
.page h2:first-child { margin-top: 0; }
.page ul, .page ol { padding-left: 22px; margin-bottom: 1.1em; }
.page li { margin-bottom: 6px; }
.page strong { color: var(--slate); }
.callout { background: var(--card); border-left: 3px solid var(--rust); padding: 16px 20px; border-radius: 0 6px 6px 0; margin: 24px 0; }
.callout p:last-child { margin: 0; }
.mail { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; }

.weights { width: 100%; border-collapse: collapse; margin: 14px 0 24px; font-size: 0.95rem; background: var(--card); border: 1px solid var(--rule); }
.weights th, .weights td { text-align: left; padding: 12px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.weights th { font-size: 0.85rem; }
.weights td:first-child { font-weight: 700; color: var(--slate); white-space: nowrap; }
.weights td:nth-child(2) { font-family: var(--serif); font-weight: 700; color: var(--rust); font-size: 1.15rem; }

.faq-item { border-bottom: 1px solid var(--rule); padding: 18px 0; }
.faq-item h2 { font-size: 1.3rem; margin: 0 0 6px; }
.faq-item p:last-child { margin: 0; }

.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: start; }
.form { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 26px; }
.form-row { margin-bottom: 14px; }
.form label { display: block; font-weight: 700; font-size: 0.85rem; color: var(--slate); margin-bottom: 5px; }
.form input, .form textarea { width: 100%; background: #fff; border: 1px solid var(--rule); border-radius: 4px; color: var(--slate); font-family: var(--sans); font-size: 1rem; padding: 10px 12px; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--slate); }
.form textarea { min-height: 140px; resize: vertical; }
.form-msg { display: none; margin-top: 14px; padding: 12px 14px; border-radius: 4px; font-size: 0.93rem; color: var(--slate); }
.form-msg.ok { display: block; background: var(--sand); }
.form-msg.err { display: block; border: 1px solid var(--rust); background: #f6e7e0; }

.help { list-style: none; padding: 0 !important; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0 30px; }
.help li { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 18px 20px; }
.help b { display: block; font-family: var(--serif); font-size: 1.1rem; color: var(--slate); margin-bottom: 4px; }
.help p { margin: 0 0 8px; font-size: 0.95rem; }

/* Footer */
.foot { background: var(--slate); color: #b9c6cc; padding: 52px 0 26px; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; padding-bottom: 30px; }
.keep-foot { color: #fff; margin-bottom: 12px; }
.keep-foot:hover { color: #fff; }
.foot-grid p { font-size: 0.95rem; max-width: 360px; margin: 0; }
.foot-h { font-family: var(--serif); font-weight: 700; color: #fff; margin-bottom: 8px !important; }
.foot-grid a:not(.keep) { display: block; color: #b9c6cc; text-decoration: none; font-size: 0.95rem; margin-bottom: 7px; }
.foot-grid a:not(.keep):hover { color: #e08a5f; }
.foot-fine { border-top: 1px solid rgba(255, 255, 255, 0.15); padding-top: 20px; }
.foot-fine p { font-size: 0.8rem; color: #8d9ca4; line-height: 1.6; margin-bottom: 8px; }
.foot-fine a { color: #d8e1e5; }

/* Responsive */
@media (max-width: 1000px) {
    h1 { font-size: 2.8rem; }
    .path { padding-left: 64px; }
    .path::before { left: 19px; }
    .marker { left: -64px; width: 40px; height: 40px; border-width: 3px; }
    .marker b { font-size: 1.1rem; }
    .entry { padding: 22px 22px 20px; }
    .tide-notes { grid-template-columns: 1fr; gap: 24px; }
    .foot-grid { grid-template-columns: 1fr 1fr; }
    .contact-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 720px) {
    .nav { display: none; position: absolute; left: 0; right: 0; top: 66px; flex-direction: column; gap: 0; background: var(--glass); border-bottom: 1px solid var(--rule); padding: 6px 24px 14px; }
    .nav.open { display: flex; }
    .nav a { padding: 12px 0; border-bottom: 1px solid var(--rule); }
    .navbtn { display: inline-block; }
    h1, .band h1 { font-size: 2.2rem; }
    h2, .entry h2 { font-size: 1.7rem; }
    .landing { padding: 52px 0 40px; background-position: 70% center; }
    .landing::before { content: ""; position: absolute; inset: 0; background: rgba(230, 238, 236, 0.55); }
    .landing-inner { position: relative; }
    .landing-credit { position: relative; text-align: right; padding: 12px 24px 0; }
    .pins { flex-direction: column; }
    .pins a { justify-content: space-between; }
    .path { padding-left: 0; }
    .path::before { display: none; }
    .marker { position: static; width: 36px; height: 36px; margin-bottom: 10px; border-width: 0; box-shadow: none; }
    .stop { padding-bottom: 40px; }
    .marks div { padding: 0 9px; }
    .marks dd { font-size: 1.05rem; }
    .marks .tot dd { font-size: 1.3rem; }
    .help { grid-template-columns: 1fr; }
    .foot-grid { grid-template-columns: 1fr; gap: 24px; }
}
