/*
Theme Name: Saltmarsh
Theme URI: http://107.150.41.186:8131/
Author: Saltmarsh
Description: The website of Saltmarsh — a dining room and four rooms in a converted 1908 herring warehouse on Wickmere harbour. Built for this hotel: room types with real tariffs, a month-by-month availability calendar, the day's menu, and directions that assume you are arriving by car in the dark.
Version: 1.1.0
Requires at least: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: saltmarsh
Tags: hotel, restaurant, one-column, custom-menu, featured-images
*/

/* =====================================================================
   SALTMARSH
   ---------------------------------------------------------------------
   The palette is limewash, wet sand, sea-pine and brass, and it is not
   configurable. This is one hotel's website; a guest should never meet a
   control that changes it.

   The room the building is actually in decides most of this: north-facing
   harbour light, painted brick, brass window catches that have gone dark
   at the edges. Everything below is trying to be that room.
   ===================================================================== */

:root {
	/* Surfaces */
	--paper:  #f7f4ed;   /* limewashed plaster */
	--paper-2:#efe9dd;   /* the same wall in shadow */
	--sand:   #e4dccb;
	--shell:  #fbfaf6;

	/* Ink */
	--ink:    #1d2622;   /* near-black, green-shifted */
	--ink-2:  rgba(29, 38, 34, 0.72);
	--ink-3:  rgba(29, 38, 34, 0.52);
	--rule:   rgba(29, 38, 34, 0.14);
	--rule-2: rgba(29, 38, 34, 0.07);

	/* Accents */
	--pine:   #2c4a41;
	--pine-2: #3d6154;
	--brass:  #9d7736;
	--brass-2:#c39b55;
	--on-dark: #f2eee4;

	/* Type */
	--ff-disp: "Young Serif", "Iowan Old Style", Georgia, serif;
	--ff-body: "Karla", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

	--t-xl: clamp(2.9rem, 1.4rem + 6.2vw, 7rem);
	--t-lg: clamp(2.1rem, 1.3rem + 3.4vw, 4.1rem);
	--t-md: clamp(1.45rem, 1.1rem + 1.5vw, 2.3rem);
	--t-sm: clamp(1.08rem, 1rem + 0.4vw, 1.3rem);
	--t-b:  clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
	--t-s:  0.9rem;
	--t-xs: 0.76rem;

	/* Measure */
	--edge: clamp(20px, 5vw, 64px);
	--max:  1320px;
	--read: 62ch;
	--band: clamp(72px, 9vw, 148px);

	--ease: cubic-bezier(0.22, 0.68, 0.24, 1);
	--slow: cubic-bezier(0.16, 0.84, 0.26, 1);

	--shadow: 0 1px 2px rgba(29, 38, 34, 0.05),
	          0 24px 44px -28px rgba(29, 38, 34, 0.34);
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 1ms !important;
		animation-iteration-count: 1 !important;
		transition: none !important;
		scroll-behavior: auto !important;
	}
}

/* ---------------------------------------------------------------------
   Base
   ------------------------------------------------------------------ */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 96px;
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--ff-body);
	font-size: var(--t-b);
	line-height: 1.68;
	font-variant-numeric: tabular-nums;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

h1, h2, h3 {
	font-family: var(--ff-disp);
	font-weight: 400;
	line-height: 1.04;
	letter-spacing: -0.012em;
	margin: 0;
	text-wrap: balance;
}
h1 { font-size: var(--t-lg); }
h2 { font-size: var(--t-md); }
h3 { font-size: var(--t-sm); line-height: 1.24; }

p { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
a { color: inherit; text-decoration: none; }
img, svg, canvas, video { display: block; max-width: 100%; height: auto; }

:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
::selection { background: var(--pine); color: var(--on-dark); }

.wrap { width: min(100% - var(--edge) * 2, var(--max)); margin-inline: auto; }
.wrap--n { --max: 900px; }
.wrap--w { --max: 1600px; }

.sr {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden; clip-path: inset(50%);
	white-space: nowrap;
}
.skip {
	position: absolute; top: -60px; left: var(--edge); z-index: 300;
	background: var(--ink); color: var(--paper);
	padding: 10px 16px;
	transition: top 180ms var(--ease);
}
.skip:focus { top: 10px; }

/* ---------------------------------------------------------------------
   Small shared devices
   ------------------------------------------------------------------ */

/* A hotel says things in small caps on brass plates. */
.eyebrow {
	font-size: var(--t-xs);
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--ink-3);
	font-weight: 600;
	margin: 0 0 1.3em;
	display: block;
}
.eyebrow--brass { color: var(--brass); }

.lede {
	font-family: var(--ff-disp);
	font-size: var(--t-md);
	line-height: 1.3;
	letter-spacing: -0.01em;
	max-width: 24ch;
}

.prose { max-width: var(--read); color: var(--ink-2); }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-size: var(--t-md); color: var(--ink); margin-top: 1.7em; }
.prose h3 { font-size: var(--t-sm); color: var(--ink); margin-top: 1.5em; }
.prose a { color: var(--pine); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose blockquote {
	margin: 1.6em 0;
	padding-left: 1.4em;
	border-left: 2px solid var(--brass);
	font-family: var(--ff-disp);
	font-size: var(--t-sm);
	line-height: 1.42;
	color: var(--ink);
}
.prose ul, .prose ol { padding-left: 1.15em; }
.prose li + li { margin-top: 0.35em; }
.prose img { margin-block: 1.6em; }
.prose figcaption { font-size: var(--t-s); color: var(--ink-3); margin-top: 0.6em; }

/* Buttons: a brass plate and an engraved line. */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.7em;
	padding: 0.92em 1.5em;
	background: var(--pine);
	color: var(--on-dark);
	border: 1px solid var(--pine);
	font-family: var(--ff-body);
	font-size: var(--t-s);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
	position: relative;
	overflow: hidden;
	isolation: isolate;
	transition: color 300ms var(--ease), border-color 300ms var(--ease);
}
.btn::after {
	content: "";
	position: absolute; inset: 0; z-index: -1;
	background: var(--brass);
	transform: translateY(100%);
	transition: transform 420ms var(--slow);
}
.btn:hover { border-color: var(--brass); }
.btn:hover::after { transform: translateY(0); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn--ghost:hover { color: var(--on-dark); }
.btn--light { background: transparent; color: var(--on-dark); border-color: rgba(242, 238, 228, 0.4); }

/* An underline that draws itself */
.tl {
	display: inline-flex;
	align-items: baseline;
	gap: 0.5em;
	font-size: var(--t-s);
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	padding-bottom: 3px;
	background-image: linear-gradient(currentColor, currentColor);
	background-size: 100% 1px;
	background-repeat: no-repeat;
	background-position: 0 100%;
	transition: background-size 420ms var(--slow);
}
.tl:hover { background-size: 0% 1px; background-position: 100% 100%; }
.tl i { font-style: normal; transition: transform 320ms var(--ease); }
.tl:hover i { transform: translateX(4px); }

/* Reveals — one-way, latched by script; scoped to .js so the page is
   readable with JavaScript off. */
.rv { opacity: 1; }
.js .rv { opacity: 0; transform: translateY(16px); transition: opacity 900ms var(--slow), transform 900ms var(--slow); }
.js .rv.in { opacity: 1; transform: none; }
.js .rv.d1 { transition-delay: 90ms; }
.js .rv.d2 { transition-delay: 180ms; }
.js .rv.d3 { transition-delay: 270ms; }

/* Photographs arrive by uncovering, not by fading. */
.js .rvi { clip-path: inset(0 0 100% 0); transition: clip-path 1100ms var(--slow); }
.js .rvi.in { clip-path: inset(0 0 0 0); }

/* ---------------------------------------------------------------------
   Bands
   ------------------------------------------------------------------ */

.band { padding-block: var(--band); position: relative; }
.band--paper2 { background: var(--paper-2); }
.band--sand { background: var(--sand); }
.band--dark { background: var(--ink); color: var(--on-dark); }
.band--dark .eyebrow { color: rgba(242, 238, 228, 0.55); }
.band--dark .prose { color: rgba(242, 238, 228, 0.76); }
.band--tight { padding-block: calc(var(--band) * 0.6); }

.head { display: grid; gap: 1.1rem; margin-bottom: clamp(36px, 4.5vw, 72px); }
.head p { color: var(--ink-2); max-width: 52ch; margin: 0; }
.head--split { grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: 3rem; }
.head--split > .eyebrow { grid-column: 1 / -1; margin-bottom: 0; }
@media (max-width: 760px) { .head--split { grid-template-columns: minmax(0, 1fr); } }
