/* Fellgarth Cottage — one stylesheet. Mobile-first. Theme tokens first. */

:root {
  --paper: #faf8f4;
  --paper-2: #f2eee7;
  --ink: #1f2421;
  --ink-2: #5a6360;
  --line: #ded7cb;
  --accent: #2e5c4f;
  --accent-ink: #24493e;
  /* Form-field error border. NOT the calendar — see the calendar tokens below. */
  --booked: #ad5540;

  /* Availability calendar. Available is the emphasised state; booked and past
     recede. Every day number meets 4.5:1 against its own fill. */
  --cal-free-bg: #d8e8df;
  --cal-free-bg-hover: #c2dcd0;
  --cal-free-line: #9cc4b1;
  --cal-booked-bg: #e4e1db;
  --cal-booked-ink: #595f5c;
  --cal-past-bg: #f5f2ed;
  --cal-past-ink: #656b68;
  --wrap: 68rem;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --r: 10px;
  --shadow: 0 1px 2px rgba(31, 36, 33, .05), 0 8px 24px -12px rgba(31, 36, 33, .18);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 clamp(1rem, .96rem + .2vw, 1.075rem)/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 0; }
h1 { font-size: clamp(2.4rem, 1.7rem + 3.4vw, 4.1rem); }
h2 { font-size: clamp(1.65rem, 1.3rem + 1.6vw, 2.3rem); margin-bottom: .8rem; }
h3 { font-size: 1.12rem; margin: 2rem 0 .6rem; }
p { margin: 0 0 1rem; }
img, svg { max-width: 100%; }
a { color: var(--accent-ink); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.sprite { display: none; }
.ic { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.skip {
  position: absolute; left: -999px; top: .5rem; z-index: 60;
  background: var(--accent); color: #fff; padding: .6rem 1rem; border-radius: var(--r);
}
.skip:focus { left: .5rem; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.section { padding: clamp(3rem, 8vw, 5.5rem) 0; border-top: 1px solid var(--line); }

.kicker {
  font: 600 .74rem/1 var(--sans); letter-spacing: .13em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .7rem;
}
.lede { color: var(--ink-2); max-width: 46ch; margin-bottom: 2rem; }
.hint { font-size: .84rem; color: var(--ink-2); margin: .4rem 0 0; }
.prose { max-width: 58ch; }
.prose p + p { margin-top: 1rem; }

/* ── Header ── */
.site {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem clamp(1.25rem, 4vw, 2rem);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.brand { font: 600 1.05rem var(--serif); color: var(--ink); text-decoration: none; white-space: nowrap; }
.site nav { display: flex; gap: 1.15rem; align-items: center; overflow-x: auto; scrollbar-width: none; }
.site nav::-webkit-scrollbar { display: none; }
.site nav a { font-size: .88rem; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.site nav a:hover { color: var(--accent); }
.nav-cta { color: var(--accent) !important; font-weight: 600; }
@media (max-width: 40rem) {
  .site nav a:not(.nav-cta) { display: none; }
  /* Sole nav action on mobile — give it a real touch target. */
  .nav-cta {
    color: #fff !important; background: var(--accent);
    padding: .62rem 1.05rem; border-radius: var(--r);
  }
}

/* ── Buttons ── */
.btn {
  display: inline-block; background: var(--accent); color: #fff;
  padding: .78rem 1.5rem; border: 0; border-radius: var(--r);
  font: 600 .95rem var(--sans); text-decoration: none; cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: var(--accent-ink); }
.btn:active { transform: translateY(1px); }
.btn--lg { padding: .95rem 1.9rem; font-size: 1.02rem; }

/* ── 1. Hero ── */
.hero { position: relative; isolation: isolate; }
.hero__img { display: block; width: 100%; height: clamp(27rem, 80vh, 40rem); object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(20,32,28,.12) 30%, rgba(20,32,28,.74) 100%);
}
.hero__panel {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; color: #fff;
  width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; padding-bottom: 2.8rem;
}
.hero__eyebrow {
  font: 600 .76rem/1 var(--sans); letter-spacing: .13em; text-transform: uppercase;
  opacity: .9; margin-bottom: .7rem;
}
.hero h1 { text-shadow: 0 2px 24px rgba(0,0,0,.3); }
.hero__line { max-width: 34ch; margin: .8rem 0 1.6rem; font-size: 1.08rem; opacity: .95; }
.hero__meta { margin: 1.1rem 0 0; font-size: .9rem; opacity: .88; }

/* ── 2. Facts ── */
.facts {
  list-style: none; margin: 2.4rem 0 0; padding: 0;
  display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
}
.facts li {
  display: grid; grid-template-columns: auto 1fr; column-gap: .7rem; align-items: center;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r);
  padding: .85rem 1rem;
}
.facts .ic { grid-row: span 2; }
.facts b { font-size: .95rem; }
.facts span { font-size: .82rem; color: var(--ink-2); }

.rates-line {
  margin-top: 2rem; padding: 1rem 1.2rem; border-left: 3px solid var(--accent);
  background: var(--paper-2); border-radius: 0 var(--r) var(--r) 0;
  font-size: .95rem; color: var(--ink-2);
}
.rates-line strong { color: var(--ink); }

/* ── 3. Gallery ── */
.grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.grid li { display: block; }
.grid a {
  display: block; aspect-ratio: 3 / 2; overflow: hidden;
  border-radius: var(--r); background: var(--paper-2);
}
.grid img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s ease, filter .3s ease;
}
.grid a:hover img { transform: scale(1.03); filter: brightness(1.04); }

@media (min-width: 60rem) {
  .facts, .grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── 4. Area ── */
.walks { list-style: none; margin: 0 0 2.5rem; padding: 0; display: grid; gap: 0; }
.walks li { padding: .95rem 0; border-bottom: 1px solid var(--line); display: grid; gap: .15rem .9rem; grid-template-columns: 1fr auto; }
.walks li:first-child { border-top: 1px solid var(--line); }
.walks b { font-size: .98rem; }
.walks .when { font-size: .8rem; color: var(--accent); font-weight: 600; white-space: nowrap; align-self: center; }
.walks p { grid-column: 1 / -1; margin: 0; font-size: .89rem; color: var(--ink-2); max-width: 54ch; }

.split { display: grid; gap: 2rem; }
@media (min-width: 46rem) { .split { grid-template-columns: 1fr 1fr; gap: 3rem; } }
.split h3:first-child { margin-top: 0; }

.dist { margin: 0; font-size: .92rem; }
.dist div { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px dotted var(--line); }
.dist dt { color: var(--ink-2); }
.dist dd { margin: 0; font-weight: 600; white-space: nowrap; }

/* ── 5. Availability ── */
.notice {
  background: #fdf6ec; border: 1px solid #e8d9bf; border-radius: var(--r);
  padding: .9rem 1.1rem; font-size: .9rem; color: #6b5636; max-width: 60ch;
}
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 1.1rem; margin: 1.5rem 0; padding: 0; font-size: .84rem; color: var(--ink-2); }
.legend li { display: flex; align-items: center; gap: .45rem; }
.sw { width: 15px; height: 15px; border-radius: 4px; border: 1px solid var(--line); }
.sw--free { background: var(--cal-free-bg); border-color: var(--cal-free-line); }
.sw--booked { background: var(--cal-booked-bg); border-color: #cfcbc3; }
.sw--past { background: var(--cal-past-bg); }

.cal { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.mo { border: 1px solid var(--line); border-radius: var(--r); padding: .9rem; background: #fff; }
.mo__name { font: 600 .95rem var(--serif); margin: 0 0 .6rem; text-align: center; }
.mo table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.mo th { font: 600 .68rem var(--sans); color: var(--ink-2); padding-bottom: .35rem; letter-spacing: .02em; }
.mo td { text-align: center; padding: 1px; }
.d { display: grid; place-items: center; aspect-ratio: 1; font-size: .8rem; border-radius: 5px; font-variant-numeric: tabular-nums; border: 1px solid transparent; }

/* Available — the emphasised, clickable-looking state. */
.d--free {
  background: var(--cal-free-bg);
  border-color: var(--cal-free-line);
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  transition: background-color .12s ease, border-color .12s ease;
}
.d--free:hover { background: var(--cal-free-bg-hover); border-color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .d--free { transition: none; } }

/* Booked and past — recessive, and must not look clickable. */
.d--booked { background: var(--cal-booked-bg); color: var(--cal-booked-ink); cursor: default; }
.d--past { background: var(--cal-past-bg); color: var(--cal-past-ink); cursor: default; }

/* ── 6. Enquiry ── */
.split--form { align-items: start; }
@media (min-width: 46rem) { .split--form { grid-template-columns: 1.35fr 1fr; } }
.field { margin-bottom: 1.05rem; }
.field--narrow { max-width: 12rem; }
.row { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
label { display: block; font-size: .87rem; font-weight: 600; margin-bottom: .35rem; }
.opt { font-weight: 400; color: var(--ink-2); }
input, select, textarea {
  width: 100%; font: inherit; font-size: .95rem; color: var(--ink);
  padding: .62rem .75rem; background: #fff;
  border: 1px solid var(--line); border-radius: var(--r);
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input[aria-invalid="true"] { border-color: var(--booked); }
.err { margin: .35rem 0 0; font-size: .82rem; color: #a8452e; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: .9rem 0 0; font-size: .9rem; }
.form-status.ok { color: var(--accent-ink); font-weight: 600; }
.form-status.bad { color: #a8452e; font-weight: 600; }

.contact { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r); padding: 1.3rem 1.4rem; }
.contact p { font-size: .93rem; margin-bottom: .5rem; }

/* ── Footer ── */
.site-foot { border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; background: var(--paper-2); }
.foot-brand { font: 600 .95rem var(--serif); margin-bottom: .5rem; }
.site-foot .hint { max-width: 62ch; }

/* ── Lightbox ── */
.lb {
  position: fixed; inset: 0; z-index: 80; background: rgba(16, 20, 18, .94);
  display: grid; grid-template-rows: auto 1fr auto; align-items: center;
  grid-template-columns: auto 1fr auto; gap: .5rem; padding: .8rem;
}
.lb[hidden] { display: none; }
.lb__bar { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
.lb__count { color: rgba(255,255,255,.7); font-size: .84rem; margin: 0; padding-left: .4rem; }
.lb__btn, .lb__nav {
  background: rgba(255,255,255,.12); color: #fff; border: 0; cursor: pointer;
  border-radius: 50%; width: 2.6rem; height: 2.6rem; font-size: 1.2rem; line-height: 1;
}
.lb__nav { font-size: 1.7rem; }
.lb__btn:hover, .lb__nav:hover { background: rgba(255,255,255,.24); }
.lb__img { grid-row: 2; grid-column: 2; justify-self: center; max-width: 100%; max-height: 78vh; border-radius: var(--r); }
.lb__cap { grid-column: 1 / -1; color: rgba(255,255,255,.86); font-size: .88rem; text-align: center; margin: 0; max-width: 60ch; justify-self: center; }
@media (max-width: 34rem) { .lb__nav { width: 2.2rem; height: 2.2rem; font-size: 1.35rem; } }

@media print { .site, .lb, .btn, .skip { display: none; } }
