/* Mallmore Country House: warm cream, deep green and brick red (the colours of the house's own rooms).
   System fonts only, so nothing loads from other hosts. */
:root {
  --cream: #faf6ee;
  --paper: #fffdf8;
  --ink: #2a2622;
  --muted: #5f574e;
  --green: #2f4a3a;
  --green-dark: #1f3328;
  --brick: #8c2f2f;
  --brick-dark: #6f2323;
  --gold: #a9803a;
  --line: #e0d5c1;
  --field: #8a7f70;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 1.0625rem/1.65 var(--sans);
  overflow-wrap: anywhere;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--brick); text-underline-offset: 0.18em; }
a:hover { color: var(--brick-dark); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; color: var(--green); margin: 0 0 0.6em; }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.1em; }
ul { margin: 0 0 1.1em; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--green); color: #fff; padding: 0.6rem 1rem; z-index: 10; }
.skip:focus { left: 0; }
.kicker { font: 600 0.8rem/1.2 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--brick); margin: 0 0 0.9rem; }
.lede { font-family: var(--serif); font-size: clamp(1.2rem, 2.4vw, 1.5rem); line-height: 1.45; color: var(--ink); }
.rule { border: 0; border-top: 2px solid var(--gold); width: 4rem; margin: 1.4rem 0; }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 2rem; padding-block: 0.9rem; }
.brand { text-decoration: none; color: var(--green); display: block; }
.brand:hover { color: var(--green); }
.brand-name { display: block; font: 400 1.6rem/1.1 var(--serif); }
.brand-sub { display: block; font: 0.78rem/1.4 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-top: 0.15rem; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.1rem 0.4rem; }
.nav a { display: block; padding: 0.45rem 0.6rem; text-decoration: none; color: var(--ink); font-size: 0.95rem; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--brick); border-bottom-color: var(--line); }
.nav a[aria-current="page"] { color: var(--brick); border-bottom-color: var(--brick); }

/* Buttons */
.btn { display: inline-block; padding: 0.8rem 1.4rem; background: var(--brick); color: #fff; text-decoration: none; font: 600 1rem/1.2 var(--sans); border: 2px solid var(--brick); border-radius: 3px; cursor: pointer; }
.btn:hover { background: var(--brick-dark); border-color: var(--brick-dark); color: #fff; }
.btn.ghost { background: transparent; color: var(--brick); }
.btn.ghost:hover { background: var(--brick); color: #fff; }
.btns { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.4rem; }

/* Home hero: text beside a large photo */
.hero { display: grid; grid-template-columns: minmax(0, 1fr); background: var(--paper); border-bottom: 1px solid var(--line); }
.hero-text { padding: clamp(2rem, 6vw, 4.5rem) var(--gutter); align-self: center; }
.hero-text > * { max-width: 34rem; }
.hero-media { order: -1; aspect-ratio: 4 / 3; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 56rem) {
  /* The left offset is a percentage of the page width, not 100vw: 100vw includes the scrollbar and pushed the text about 8px out of line. */
  .hero { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); min-height: 34rem; padding-left: max(var(--gutter), calc((100% - var(--wrap)) / 2)); }
  .hero-text { padding-left: 0; }
  .hero-media { order: 0; aspect-ratio: auto; }
}

/* Facts strip */
.facts-bar { background: var(--green); color: var(--cream); }
.facts { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
.facts li { padding: 1.1rem 1.2rem 1.1rem 1.2rem; border-left: 1px solid rgba(255, 255, 255, 0.18); }
.facts li:first-child { border-left: 0; padding-left: 0; }
.facts b { display: block; font: 400 1.3rem/1.2 var(--serif); }
.facts span { font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.9; }

/* Sections */
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section.alt { background: var(--paper); border-block: 1px solid var(--line); }
.prose { max-width: 42rem; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (min-width: 52rem) { .cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .cols.wide-text { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.figure { margin: 0; }
.figure img { width: 100%; border: 1px solid var(--line); }
.figure figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.5rem; }
.pull { font: italic 1.45rem/1.4 var(--serif); color: var(--green); border-left: 3px solid var(--gold); padding: 0.2rem 0 0.2rem 1.2rem; margin: 1.6rem 0; }
.ticks { list-style: none; padding: 0; }
.ticks li { padding-left: 1.6rem; position: relative; margin-bottom: 0.45rem; }
.ticks li::before { content: ""; position: absolute; left: 0.2rem; top: 0.7em; width: 0.5rem; height: 0.5rem; background: var(--gold); transform: rotate(45deg); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1.4rem; }
.card { background: var(--paper); border: 1px solid var(--line); display: flex; flex-direction: column; }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card div { padding: 1.1rem 1.2rem 1.3rem; }
.card h3 { margin-bottom: 0.4em; }
.card p { margin-bottom: 0.6em; }

/* Guest quotes */
.quotes { background: var(--green); color: var(--cream); }
.quotes h2 { color: var(--cream); }
.quote-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 2rem; margin: 1.6rem 0; }
.quote-grid blockquote { margin: 0; font: italic 1.25rem/1.45 var(--serif); padding-top: 0.8rem; border-top: 2px solid var(--gold); }
.quotes a { color: #fff; }
.guest-quotes { list-style: none; padding: 0; margin: 2rem 0; display: grid; gap: 1.4rem; max-width: 46rem; }
.guest-quotes blockquote { margin: 0; font: italic 1.3rem/1.5 var(--serif); color: var(--green); padding-left: 1.2rem; border-left: 3px solid var(--gold); }

/* Photo galleries */
.gallery { list-style: none; margin: 1.4rem 0 2.4rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 0.8rem; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--line); }
.gallery img.top { object-position: center 25%; }
.gallery img.natural { aspect-ratio: auto; }  /* a portrait keeps its own shape instead of being cropped to 4:3 */

/* Page heading */
.page-head { padding-top: clamp(2rem, 5vw, 3.5rem); }
.page-head p.lede { max-width: 42rem; }
.banner { width: 100%; aspect-ratio: 21 / 8; object-fit: cover; }
@media (max-width: 40rem) { .banner { aspect-ratio: 16 / 9; } }

/* Details (address, contact) */
.details { background: var(--paper); border: 1px solid var(--line); padding: 1.3rem 1.5rem; }
.details p { margin: 0 0 0.6em; }
.details p:last-child { margin-bottom: 0; }
.note { background: #f3ead8; border-left: 4px solid var(--gold); padding: 0.8rem 1rem; }

/* Enquiry form */
.enquiry { max-width: 40rem; }
.enquiry fieldset { border: 1px solid var(--line); background: var(--paper); margin: 0 0 1.4rem; padding: 1rem 1.2rem 0.4rem; min-width: 0; }
.enquiry legend { font: 400 1.2rem/1.2 var(--serif); color: var(--green); padding: 0 0.4rem; }
.field { margin: 0 0 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.field .hint { font-weight: 400; color: var(--muted); font-size: 0.9rem; }
.enquiry input, .enquiry select, .enquiry textarea { width: 100%; font: inherit; font-size: 1rem; padding: 0.65rem 0.75rem; border: 1px solid var(--field); border-radius: 3px; background: #fff; color: var(--ink); }
.enquiry textarea { min-height: 8rem; resize: vertical; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: 0 1rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Footer */
.site-footer { background: var(--green-dark); color: #efe9dc; margin-top: 0; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #f1d9a4; }
.guides { background: var(--paper); border-top: 1px solid var(--line); padding-block: 1.4rem; }
.guides .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.4rem; }
.guides p { margin: 0; font: 600 0.8rem/1.2 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.guides ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.4rem; }
.guides img { max-height: 3.4rem; width: auto; }
.footer-main { padding-block: 2.4rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1.8rem 2.4rem; }
.site-footer h2 { font-size: 1.15rem; color: #fff; margin-bottom: 0.5em; }
.site-footer address { font-style: normal; }
.site-footer ul.links { list-style: none; margin: 0; padding: 0; }
.site-footer ul.links a { text-decoration: none; display: inline-block; padding: 0.15rem 0; }
.site-footer ul.links a:hover { text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.16); padding-block: 1.1rem; font-size: 0.9rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.25rem; }
.footer-bottom p { margin: 0; }

/* "Created by NETLINK" badge (see docs/netlink-badge.md); dark footer variant */
.site-footer .netlink-badge {
  --badge-fg: #fff;
  --badge-bg: rgba(255, 255, 255, 0.08);
  --badge-bg-hover: rgba(255, 255, 255, 0.14);
  --badge-border: rgba(255, 255, 255, 0.18);
  --badge-border-hover: #f1d9a4;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--badge-border);
  border-radius: 6px;
  background: var(--badge-bg);
  color: var(--badge-fg);
  font-family: Georgia, serif;
  font-size: 1rem;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.01em;
  opacity: 0.75;
  transition: opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.site-footer .netlink-badge,
.site-footer .netlink-badge:hover,
.site-footer .netlink-badge:focus-visible { text-decoration: none; }
.site-footer .netlink-badge:hover,
.site-footer .netlink-badge:focus-visible { opacity: 1; color: var(--badge-fg); background: var(--badge-bg-hover); border-color: var(--badge-border-hover); }
.site-footer .netlink-badge img { width: 20px; height: 20px; flex-shrink: 0; }

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

/* Tighten the gap between a page title and the content that follows it */
.page-head + .section, .page-head + .wrap + .section { padding-top: clamp(1.25rem, 3vw, 2.25rem); }
.details + p { margin-top: 1.1rem; }

/* Two photos per row on phones, so galleries do not become one very long column */
@media (max-width: 34rem) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; } }
