/* ==========================================================================
   The Moon Homestay - base
   Tokens, reset, typography, buttons, icons and form controls.

   Palette drawn from Malpe and St Mary's Island: warm sand and ivory,
   steel-teal water, dark volcanic rock and the colour of the evening sky.
   ========================================================================== */

:root {
	/* Colour */
	--ink:           #1b201e;
	--ink-2:         #3e4744;
	--muted:         #636c68;
	--ground:        #f6f3ee;
	--surface:       #ffffff;
	--surface-2:     #eee9e1;
	--line:          #e4ddd2;
	--line-strong:   #d2c8b8;
	--sand:          #d8c7a8;
	--sand-soft:     #f2eadd;
	--sea:           #1d5f5c;
	--sea-deep:      #134442;
	--sea-soft:      #e0ecea;
	--sea-tint:      #f0f6f5;
	--sun:           #b9612f;
	--sun-soft:      #f8e8dc;
	--gold:          #e6c796;
	--basalt:        #17201e;
	--on-dark:       #e9ede9;
	--on-dark-muted: #a3aea9;
	--whatsapp:      #1f8f4e;
	--whatsapp-deep: #18733e;
	--danger:        #a23b2c;

	/* Type */
	--f-display: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
	--f-body:    "Karla", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

	--t-xs:   .76rem;
	--t-sm:   .9rem;
	--t-base: clamp(1rem, .96rem + .18vw, 1.09rem);
	--t-md:   clamp(1.16rem, 1.08rem + .38vw, 1.42rem);
	--t-lg:   clamp(1.48rem, 1.3rem + .86vw, 2.05rem);
	--t-xl:   clamp(2rem, 1.62rem + 1.85vw, 3.25rem);
	--t-2xl:  clamp(2.6rem, 1.75rem + 4vw, 5.5rem);

	/* Space and shape */
	--gutter:  clamp(1.25rem, .7rem + 2.4vw, 3.5rem);
	--max:     1240px;
	--section: clamp(4.5rem, 3rem + 6vw, 8.5rem);
	--r-xs:    6px;
	--r-sm:    10px;
	--r-md:    16px;
	--r-lg:    24px;
	--r-pill:  999px;

	--shadow-sm: 0 1px 2px rgba(27, 32, 30, .05), 0 4px 14px -6px rgba(27, 32, 30, .12);
	--shadow-md: 0 1px 3px rgba(27, 32, 30, .05), 0 16px 36px -18px rgba(27, 32, 30, .28);
	--shadow-lg: 0 2px 6px rgba(27, 32, 30, .05), 0 32px 64px -28px rgba(27, 32, 30, .36);
	--ease:      cubic-bezier(.22, .61, .36, 1);

	/* Field icons, drawn in the muted text colour. */
	--i-calendar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23636c68' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='2.5'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E");
	--i-user: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23636c68' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='3.8'/%3E%3Cpath d='M4.5 20.5c.7-4 3.7-6.2 7.5-6.2s6.8 2.2 7.5 6.2'/%3E%3C/svg%3E");
	--i-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23636c68' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E");
}

/* ---------- Reset ---------- */

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

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

body {
	margin: 0;
	background: var(--ground);
	color: var(--ink);
	font-family: var(--f-body);
	font-size: var(--t-base);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img,
svg,
video {
	display: block;
	max-width: 100%;
	height: auto;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0;
	font-family: var(--f-display);
	font-weight: 400;
	line-height: 1.08;
	letter-spacing: -.015em;
	text-wrap: balance;
}

p {
	margin: 0;
	text-wrap: pretty;
}

a {
	color: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: .22em;
}

:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 2px solid var(--sea);
	outline-offset: 3px;
	border-radius: 2px;
}

::selection {
	background: var(--sea);
	color: #fff;
}

/* ---------- WordPress accessibility helpers ---------- */

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed;
	top: .75rem;
	left: .75rem;
	z-index: 1000;
	width: auto;
	height: auto;
	clip: auto;
	padding: .8rem 1.2rem;
	background: var(--surface);
	color: var(--ink);
	border-radius: var(--r-sm);
	box-shadow: var(--shadow-lg);
}

/* ---------- Layout primitives ---------- */

.wrap {
	width: min(var(--max), 100% - var(--gutter) * 2);
	margin-inline: auto;
}

.wrap--narrow {
	width: min(780px, 100% - var(--gutter) * 2);
	margin-inline: auto;
}

/* ---------- Icons ----------
   Inline SVG line icons printed by moon_icon(). They take the text colour. */

.icon {
	display: inline-block;
	flex: none;
	width: 1.25em;
	height: 1.25em;
	vertical-align: -.25em;
}

/* ---------- Eyebrow ----------
   The mark before each eyebrow is three bottom-aligned columns of different
   heights: a small nod to the rock columns of St Mary's Island. */

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: .75rem;
	margin: 0;
	font-family: var(--f-body);
	font-size: var(--t-xs);
	font-weight: 700;
	letter-spacing: .16em;
	line-height: 1.3;
	text-transform: uppercase;
	color: var(--muted);
}

.eyebrow::before {
	content: "";
	flex: none;
	width: 14px;
	height: 14px;
	color: var(--sea);
	background:
		linear-gradient(currentColor, currentColor) 0 100% / 3px 58% no-repeat,
		linear-gradient(currentColor, currentColor) 5.5px 100% / 3px 100% no-repeat,
		linear-gradient(currentColor, currentColor) 11px 100% / 3px 78% no-repeat;
}

.eyebrow--light {
	color: rgba(255, 255, 255, .94);
}

.eyebrow--light::before {
	color: var(--gold);
}

/* ---------- Buttons ---------- */

.btn,
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .6rem;
	padding: .9rem 1.6rem;
	border: 1px solid transparent;
	border-radius: var(--r-pill);
	font-family: var(--f-body);
	font-size: .95rem;
	font-weight: 700;
	letter-spacing: .01em;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}

.btn:hover {
	transform: translateY(-1px);
}

.btn:active {
	transform: none;
}

.btn .icon {
	width: 1.15em;
	height: 1.15em;
}

.btn__arrow {
	display: inline-block;
	transition: transform .25s var(--ease);
}

.btn:hover .btn__arrow {
	transform: translateX(4px);
}

.btn--primary,
.wp-block-button__link {
	background: var(--sea);
	color: #fff;
	box-shadow: 0 10px 22px -12px rgba(19, 68, 66, .7);
}

.btn--primary:hover,
.wp-block-button__link:hover {
	background: var(--sea-deep);
	color: #fff;
	box-shadow: 0 14px 26px -12px rgba(19, 68, 66, .75);
}

.btn--ghost {
	background: transparent;
	border-color: var(--line-strong);
	color: var(--ink);
}

.btn--ghost:hover {
	border-color: var(--sea);
	color: var(--sea);
}

.btn--light {
	background: #fff;
	color: var(--ink);
	box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .5);
}

.btn--light:hover {
	background: var(--sand-soft);
}

.btn--outline-light {
	background: rgba(255, 255, 255, .06);
	border-color: rgba(255, 255, 255, .5);
	color: #fff;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.btn--outline-light:hover {
	border-color: #fff;
	background: rgba(255, 255, 255, .14);
}

.btn--whatsapp {
	background: var(--whatsapp);
	color: #fff;
	box-shadow: 0 10px 22px -12px rgba(24, 115, 62, .7);
}

.btn--whatsapp:hover {
	background: var(--whatsapp-deep);
	color: #fff;
}

.btn--sm {
	padding: .62rem 1.1rem;
	font-size: .86rem;
}

.btn--lg {
	padding: 1.05rem 1.9rem;
	font-size: 1rem;
}

.btn--block {
	width: 100%;
}

/* ---------- Text link with a moving arrow ---------- */

.link-arrow {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	font-weight: 700;
	font-size: .94rem;
	color: var(--sea);
	text-decoration: none;
}

.link-arrow::after {
	content: "\2192";
	transition: transform .25s var(--ease);
}

.link-arrow:hover::after {
	transform: translateX(4px);
}

/* ---------- Form controls ----------
   Written against plain element selectors so the booking plugin and
   Contact Form 7 inherit the same look without extra markup. */

label {
	display: block;
	margin-bottom: .4rem;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="number"],
input[type="password"],
input[type="search"],
select,
textarea {
	width: 100%;
	min-height: 3.1rem;
	padding: .8rem 1rem;
	background-color: var(--surface);
	border: 1px solid var(--line-strong);
	border-radius: var(--r-sm);
	font-family: var(--f-body);
	font-size: 1rem;
	line-height: 1.4;
	color: var(--ink);
	transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
}

input:hover,
select:hover,
textarea:hover {
	border-color: #bfb3a0;
}

input:focus,
select:focus,
textarea:focus {
	outline: none;
	border-color: var(--sea);
	box-shadow: 0 0 0 4px rgba(29, 95, 92, .14);
}

textarea {
	min-height: 8rem;
	resize: vertical;
}

select {
	appearance: none;
	padding-right: 2.6rem;
	background-image: var(--i-chevron);
	background-position: right .9rem center;
	background-size: 1rem;
	background-repeat: no-repeat;
	cursor: pointer;
}

::placeholder {
	color: var(--muted);
	opacity: .8;
}

button,
input[type="submit"] {
	font: inherit;
}

input[type="submit"] {
	padding: .9rem 1.6rem;
	background: var(--sea);
	color: #fff;
	border: 0;
	border-radius: var(--r-pill);
	font-weight: 700;
	letter-spacing: .01em;
	cursor: pointer;
	box-shadow: 0 10px 22px -12px rgba(19, 68, 66, .7);
	transition: background-color .2s var(--ease), transform .25s var(--ease);
}

input[type="submit"]:hover {
	background: var(--sea-deep);
	transform: translateY(-1px);
}

input[type="checkbox"],
input[type="radio"] {
	accent-color: var(--sea);
}

/* ---------- Motion preference ---------- */

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .001ms !important;
	}
}
