/* Ballinacourty House demo: the walking-sheet world.
   Map paper, contour brown, forest tint, water blue, and one route red.
   Condensed sans letters built things; italic serif letters places. */

@font-face {
  font-family: "Sofia Sans Condensed";
  src: url("../fonts/sofia-sans-condensed-latin.woff2") format("woff2");
  font-weight: 400 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Sofia Sans";
  src: url("../fonts/sofia-sans-latin.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Alegreya";
  src: url("../fonts/alegreya-italic-latin.woff2") format("woff2");
  font-weight: 400 700; font-style: italic; font-display: swap;
}

:root {
  --paper: #FAFAF6;
  --paper-2: #EFF1EA;
  --ink: #1D2420;
  --ink-2: #4B544E;
  --rule: #D2D4CB;
  --field-line: #7B827C;
  --contour: #A0714A;
  --contour-ink: #7A5234;
  --forest: #DDE8D0;
  --water: #3F82B5;
  --water-ink: #255F8F;
  --lake: #BCD6EA;
  --camp: #1F5F99;
  --grat: #B3CADC;
  --grat-ink: #4E7391;
  --route: #C22F27;
  --gutter: clamp(1rem, 4vw, 3.25rem);
  --col-gap: clamp(1rem, 2.4vw, 2.25rem);
  --label: "Sofia Sans Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --text: "Sofia Sans", "Segoe UI", system-ui, sans-serif;
  --place: "Alegreya", "Iowan Old Style", Palatino, Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 6rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--text);
  font-variant-numeric: tabular-nums;
  text-rendering: optimizeLegibility;
}
/* paper grain */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }

::selection { background: var(--route); color: #fff; }
:focus-visible { outline: 2px solid var(--route); outline-offset: 3px; }
input, select, textarea { caret-color: var(--route); accent-color: var(--route); }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  text-decoration-color: var(--contour);
}
a:hover { text-decoration-color: var(--route); text-decoration-thickness: 2px; }

img { max-width: 100%; height: auto; display: block; filter: saturate(.9) contrast(1.05) sepia(.06); }

h1, h2, h3 {
  font-family: var(--label);
  font-weight: 750;
  line-height: 1.02;
  letter-spacing: -.005em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 4.4vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; max-width: 68ch; }

.place { font-family: var(--place); font-style: italic; font-weight: 500; letter-spacing: 0; }
.dateline { font: italic 400 1.08rem/1.4 var(--place); color: var(--contour-ink); }
.small { font-size: .9rem; color: var(--ink-2); }
.lede { font-size: 1.14rem; }

.go {
  font: 700 1.2rem/1.3 var(--label);
  color: var(--route);
  text-decoration-color: currentColor;
  text-decoration-thickness: 2px;
  text-underline-offset: .24em;
}
.go:hover { text-decoration-thickness: 3px; }

.skip {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 50;
  background: var(--ink); color: #fff; padding: .5rem .8rem;
  font: 700 1rem/1 var(--label); text-decoration: none;
}
.skip:focus { top: .5rem; }

/* ---------- frame ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  padding-inline: var(--gutter);
}

.demo-ribbon {
  margin: 0; max-width: none;
  padding: .4rem var(--gutter);
  font: 600 .85rem/1.35 var(--label);
  letter-spacing: .02em;
  color: var(--route);
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(250, 250, 246, .96);
  border-bottom: 3px double var(--ink);
}
.site-header__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .4rem 2rem;
  padding: .75rem var(--gutter) .6rem;
}
.wordmark {
  display: flex; flex-direction: column; line-height: 1.05;
  text-decoration: none;
  transform-origin: left center;
  transition: transform .25s ease;
}
.wordmark strong { font: 800 1.4rem/1 var(--label); text-transform: uppercase; letter-spacing: .02em; }
.wordmark span { font: italic 400 1rem/1.25 var(--place); color: var(--contour-ink); margin-top: .15rem; transition: opacity .2s ease; }
.site-header.is-scrolled .wordmark { transform: scale(.9); }
.site-header.is-scrolled .wordmark span { opacity: 0; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1.35rem; }
.site-nav a {
  display: inline-block; padding: .4rem 0 .3rem;
  font: 650 1.08rem/1.2 var(--label);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--contour); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--route); }
.site-nav .nav-book { color: var(--route); }

/* a new section starts on a pale tint rather than a drawn divider; it reads as
   --paper-2 over the paper and stays translucent so the grain shows through */
.band { background: rgb(228 232 222 / .5); }
.band + .contact { border-top: 0; }

figcaption { font: italic 400 .98rem/1.45 var(--place); color: var(--ink-2); margin-top: .55rem; max-width: 62ch; }

/* ---------- index: the sheet ---------- */

/* two tracks: the map takes the width the window height allows (main.js sets
   --vb-aspect per crop) and the title, legend and walk key take the rest */
.sheet {
  --map-max: 68%;
  --map-w: min(var(--map-max), calc(max(36rem, 100vh - 13rem) * var(--vb-aspect, 1.119)));
  grid-template-columns: minmax(0, 1fr) var(--map-w);
  grid-template-rows: auto 1fr auto;
  row-gap: 1.25rem;
  padding-block: clamp(1.25rem, 3vw, 2.25rem) clamp(2.5rem, 5vw, 4rem);
}
@supports (height: 100svh) {
  .sheet { --map-w: min(var(--map-max), calc(max(36rem, 100svh - 13rem) * var(--vb-aspect, 1.119))); }
}
.sheet-title { grid-column: 1; grid-row: 1; padding-top: clamp(.25rem, 1.5vw, 1.5rem); }
.sheet-title h1 { font-size: clamp(2.2rem, 3.4vw, 3.2rem); margin-bottom: .4em; }
.sheet-actions { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1rem; margin-top: 1.2rem; }
.sheet-key { grid-column: 1; grid-row: 3; align-self: end; }
.sheet-map { grid-column: 2; grid-row: 1 / -1; align-self: start; margin: 0; }

/* map symbols between the title and the walk key; main.js drops rows from
   the end until the column is no taller than the map */
.sheet-legend { grid-column: 1; grid-row: 2; align-self: center; margin-top: clamp(.5rem, 2vh, 2rem); }
.sheet-legend .key-h { font-size: 1.1rem; margin-bottom: .4rem; }
.legend {
  display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 1.5rem;
  list-style: none; margin: 0; padding: .35rem 0 0; border-top: 1px solid var(--ink);
}
.legend li {
  display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); column-gap: .75rem; align-items: center;
  padding: .1rem 0; font-size: .93rem; line-height: 1.45; color: var(--ink-2);
}
.legend.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.legend li[hidden] { display: none; }
.legend svg { display: block; width: 2.6rem; height: 1.1rem; overflow: visible; }
.legend .l-route { fill: none; stroke: var(--route); stroke-width: 3; stroke-dasharray: 7 5; stroke-linecap: round; }
.legend .l-camp { fill: var(--camp); }
.legend .l-tent { fill: #fff; }
.legend .l-casing { fill: none; stroke: #5E5A52; stroke-width: 6.5; stroke-linecap: round; }
.legend .l-road { fill: none; stroke: #fff; stroke-width: 3.8; stroke-linecap: round; }
.legend .l-minor { fill: none; stroke: #8E887C; stroke-width: 1.5; stroke-linecap: round; }
.legend .l-river { fill: none; stroke: var(--water); stroke-width: 3.2; stroke-linecap: round; }
.legend .l-lake { fill: var(--lake); stroke: var(--water); stroke-width: 1.5; }
.legend .l-forest { fill: var(--forest); }
.legend .l-contour { fill: none; stroke: var(--contour); stroke-width: .9; }
.legend .l-index { stroke-width: 1.8; }
.legend .l-spot { fill: var(--ink); }

.key-h { font-size: 1.35rem; margin-bottom: .55rem; }
.key { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.key li {
  display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); column-gap: .5rem;
  padding: .55rem .5rem .6rem 0;
  border-bottom: 1px solid var(--rule);
  transition: background-color .2s ease;
}
.key li:hover, .key li:focus-within { background: var(--paper-2); }
.key a { font: 700 1.2rem/1.2 var(--label); text-decoration: none; align-self: end; }
.key a:hover { text-decoration: underline; text-decoration-color: var(--route); }
.key-meta { grid-column: 2; font-size: .93rem; color: var(--ink-2); }
.key-no {
  grid-row: span 2;
  width: 1.95rem; height: 1.95rem; margin-top: .15rem;
  display: grid; place-items: center;
  border: 2px solid var(--route); border-radius: 50%;
  font: 800 1rem/1 var(--label); color: var(--route);
  background: var(--paper);
}

.sheet-svg { display: block; width: 100%; height: auto; border: 1px solid var(--ink); background: var(--paper); }
.sheet-svg .crop { display: none; }
.sheet-svg[data-crop="wide"] .crop-wide,
.sheet-svg[data-crop="xwide"] .crop-xwide,
.sheet-svg[data-crop="narrow"] .crop-narrow { display: inline; }
.sheet-svg text { paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; }
.sheet-svg .grat { stroke: var(--grat); stroke-width: .8; }
.sheet-svg .tick { font: 500 13px var(--label); fill: var(--grat-ink); }
.sheet-svg .forest { fill: var(--forest); }
.sheet-svg .river { fill: none; stroke: var(--water); stroke-width: 3.2; stroke-linecap: round; }
.sheet-svg .lake { fill: var(--lake); stroke: var(--water); stroke-width: 1.5; }
.sheet-svg .stream { fill: none; stroke: var(--water); stroke-width: 1; stroke-linecap: round; opacity: .7; }
.sheet-svg .road-minor { fill: none; stroke: #8E887C; stroke-width: 1.5; stroke-linecap: round; }
.sheet-svg .road-casing { fill: none; stroke: #5E5A52; stroke-width: 6.5; stroke-linecap: round; }
.sheet-svg .road { fill: none; stroke: #fff; stroke-width: 3.8; stroke-linecap: round; }
.sheet-svg .route path { fill: none; stroke: var(--route); stroke-width: 3; stroke-dasharray: 9 6; stroke-linecap: round; }
.sheet-svg .route-no { fill: var(--paper); stroke: var(--route); stroke-width: 2.5; }
.sheet-svg .route-no-t { font: 800 15px var(--label); fill: var(--route); text-anchor: middle; stroke: none; }
.sheet-svg .camp rect { fill: var(--camp); }
.sheet-svg .camp path { fill: #fff; }
.sheet-svg .spot { fill: var(--ink); }
.sheet-svg .lbl-valley { font: italic 500 34px var(--place); letter-spacing: .12em; fill: var(--ink); }
.sheet-svg .lbl-range { font: 700 20px var(--label); letter-spacing: .38em; text-transform: uppercase; fill: var(--contour-ink); }
.sheet-svg .lbl-hill { font: italic 400 22px var(--place); letter-spacing: .06em; fill: var(--contour-ink); }
.sheet-svg .lbl-water { font: italic 500 17px var(--place); fill: var(--water-ink); }
.sheet-svg .lbl-peak { font: italic 600 19px var(--place); fill: var(--ink); }
.sheet-svg .lbl-height { font: 600 13px var(--label); fill: var(--contour-ink); }
.sheet-svg .lbl-built { font: 700 13px var(--label); letter-spacing: .08em; text-transform: uppercase; fill: var(--ink); }
.sheet-svg .lbl-park { font: 800 17px var(--label); letter-spacing: .04em; text-transform: uppercase; fill: var(--camp); }
.sheet-svg .lbl-park-sub { font: italic 400 14px var(--place); fill: var(--camp); }
.sheet-svg .lbl-road { font: 700 13px var(--label); fill: var(--ink); }
.sheet-svg .lbl-exit { font: 600 14px var(--label); fill: var(--ink-2); }
.sheet-svg .scale rect { fill: var(--ink); }
.sheet-svg .scale .alt { fill: var(--paper); stroke: var(--ink); stroke-width: 1; }
.sheet-svg .scale text { font: 600 12px var(--label); fill: var(--ink); }

/* the key lights one walk on the sheet */
.sheet-svg .route > * { transition: opacity .25s ease; }
.sheet-svg[data-lit] .route > * { opacity: .16; }
.sheet-svg[data-lit="forest"] [data-route="forest"] > *,
.sheet-svg[data-lit="ctk"] [data-route="ctk"] > *,
.sheet-svg[data-lit="muskry"] [data-route="muskry"] > *,
.sheet-svg[data-lit="galtymore"] [data-route="galtymore"] > * { opacity: 1; }

/* the one authored motion: walks go out from the gate, one after another */
@media (prefers-reduced-motion: no-preference) {
  .sheet-svg .route { animation: route-out .7s cubic-bezier(.2, .7, .2, 1) both; }
  .sheet-svg [data-route="forest"] { animation-delay: .35s; }
  .sheet-svg [data-route="ctk"] { animation-delay: .6s; }
  .sheet-svg [data-route="muskry"] { animation-delay: .85s; }
  .sheet-svg [data-route="galtymore"] { animation-delay: 1.1s; }
}
@keyframes route-out { from { opacity: 0; } to { opacity: 1; } }

.estate { align-items: center; padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 6vw, 5rem); }
.estate-fig { grid-column: 1 / span 5; margin: 0 0 0 calc(-1 * var(--gutter)); }
.estate-fig img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; max-height: max(24rem, min(calc(100vh - 7rem), 44rem)); }
.estate-fig figcaption { padding-left: var(--gutter); }
.estate-text { grid-column: 7 / span 5; }
.estate-text .dateline { margin-top: -.2rem; }

.facts {
  display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .45rem 1.25rem;
  margin: 1.75rem 0 1.25rem; padding-top: 1rem; border-top: 1px solid var(--ink);
}
.facts dt { font: 700 .92rem/1.6 var(--label); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.facts dd { margin: 0; }

.approach { padding-block: clamp(2rem, 4vw, 3rem) clamp(3rem, 6vw, 5rem); align-items: start; }
.approach-h { grid-column: 1 / span 3; font-size: clamp(1.5rem, 2.4vw, 2rem); }
.approach-roads { grid-column: 4 / span 7; list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.approach-roads li { display: flex; gap: 1rem; align-items: baseline; padding: .75rem 0; border-bottom: 1px solid var(--rule); }
.approach-end { grid-column: 4 / span 8; margin-top: 1.25rem; }

.road-no {
  flex: none; display: inline-block; min-width: 3.3rem;
  padding: .32rem .45rem .28rem;
  font: 800 .95rem/1 var(--label); letter-spacing: .03em; text-align: center;
  color: var(--ink); background: #fff;
  border: 1.5px solid var(--ink); border-radius: 3px;
}
.road-no--n { color: #fff; background: #1D6B47; border-color: #1D6B47; }
.road-no--m { color: #fff; background: #1F4E9A; border-color: #1F4E9A; }

/* ---------- park ---------- */

.park-head { align-items: start; padding-block: clamp(2rem, 5vw, 4.5rem) clamp(2rem, 4vw, 3.5rem); }
.park-intro { grid-column: 1 / span 4; }
.park-intro .dateline { margin-top: -.3rem; }
.board-wrap { grid-column: 6 / -1; overflow-x: auto; }
.board { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--ink); }
.board caption { caption-side: top; text-align: left; padding: 0 0 .7rem; font: 800 1.45rem/1.2 var(--label); }
.board caption span { display: block; margin-top: .2rem; font: italic 400 1rem/1.4 var(--place); color: var(--ink-2); }
.board th, .board td { padding: .85rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.board thead th { font: 700 .85rem/1.2 var(--label); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); background: var(--paper-2); border-bottom-color: var(--ink); }
.board tbody th { font: 700 1.18rem/1.25 var(--label); }
.board tbody th span { display: block; margin-top: .15rem; font: 400 .93rem/1.4 var(--text); color: var(--ink-2); }
.board td.num, .board th.num { text-align: right; white-space: nowrap; }
.board tbody td.num { font: 800 1.55rem/1.05 var(--label); }
.board tr.split > * { border-top: 1px solid var(--ink); }
.board tr.extra th { font-size: 1.02rem; font-weight: 650; }
.board tr.extra td.num { font-size: 1.15rem; }

.onsite { padding-block: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.onsite-h { grid-column: 1 / span 3; }
.onsite-list { grid-column: 4 / -1; columns: 3 13rem; column-gap: var(--col-gap); list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.onsite-list li { break-inside: avoid; padding: .6rem 0; border-bottom: 1px solid var(--rule); }

.rules { padding-block: clamp(3rem, 7vw, 6rem) clamp(3rem, 6vw, 5rem); align-items: start; }
.rules-date { grid-column: 1 / span 3; padding-top: .5rem; }
.rules-text { grid-column: 4 / span 8; font: 700 clamp(1.5rem, 2.8vw, 2.2rem)/1.15 var(--label); max-width: 32ch; }
.rules-after { grid-column: 4 / span 8; margin-top: .5rem; }

/* ---------- walks ---------- */

.walks-head { align-items: end; padding-block: clamp(2rem, 5vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem); }
.walks-h1 { grid-column: 1 / span 7; margin: 0; }
.walks-lede { grid-column: 8 / -1; margin: 0; }

.walk-list { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; border-top: 3px double var(--ink); }
.walk {
  display: grid; grid-template-columns: 4rem minmax(0, 4fr) minmax(0, 7fr); column-gap: var(--col-gap);
  padding: 1.6rem .75rem 1.4rem 0;
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 6rem;
}
.walk:target { background: var(--paper-2); }
.walk .key-no { width: 2.7rem; height: 2.7rem; font-size: 1.35rem; margin-top: 0; }
.walk h2 { grid-column: 2; margin: 0 0 .35rem; font-size: clamp(1.5rem, 2.4vw, 2.05rem); }
.walk-meta { grid-column: 2; margin: 0; font: 600 1.02rem/1.4 var(--label); color: var(--ink-2); }
.walk-notes { grid-column: 3; grid-row: 1 / span 2; margin: 0; }
.walks-note { grid-column: 1 / -1; margin-top: .9rem; }

.drives { align-items: start; padding-block: clamp(2rem, 4vw, 3rem) clamp(2.5rem, 5vw, 4rem); }
.drives-intro { grid-column: 1 / span 4; }
.drive-chart-wrap { grid-column: 5 / -1; }
.drive-chart { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.drive-chart li, .drive-axis {
  display: grid; grid-template-columns: minmax(9rem, 19rem) minmax(0, 1fr); column-gap: 1.25rem; align-items: center;
}
.drive-chart li { padding: .8rem 0; border-bottom: 1px solid var(--rule); }
.drive-name { font: 700 1.18rem/1.2 var(--label); }
.drive-name span { display: block; margin-top: .15rem; font: 400 .92rem/1.35 var(--text); color: var(--ink-2); }
.drive-track { position: relative; height: 1.6rem; }
.drive-track::before {
  content: ""; position: absolute; left: 0; top: calc(50% - 1.5px);
  width: calc(var(--min) / 60 * 100%); height: 3px; background: var(--ink);
}
.drive-track b {
  position: absolute; top: 50%; left: calc(var(--min) / 60 * 100%);
  transform: translate(.55rem, -50%);
  font: 800 1.02rem/1 var(--label); white-space: nowrap;
}
.drive-axis { list-style: none; margin: 0; padding: .5rem 0 0; }
.drive-axis .drive-track::before { display: none; }
.drive-axis .drive-track span {
  position: absolute; top: 0; left: calc(var(--min) / 60 * 100%);
  padding-left: .3rem; border-left: 1px solid var(--field-line);
  font: 600 .85rem/1.6 var(--label); color: var(--ink-2);
}

/* The park's own local picks, a second row in the drives band */
.picks-intro { grid-column: 1 / span 4; grid-row: 2; margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.picks-intro h3 { margin: 0 0 .5rem; }
.picks {
  grid-column: 5 / -1; grid-row: 2; margin: clamp(2.5rem, 5vw, 3.5rem) 0 0; padding: 0; list-style: none;
  columns: 2 18rem; column-gap: var(--col-gap); border-top: 1px solid var(--ink);
}
.picks li { break-inside: avoid; padding: .75rem 0; border-bottom: 1px solid var(--rule); }
.pick-name { display: block; font: 700 1.18rem/1.2 var(--label); }
.pick-note { display: block; margin-top: .2rem; font-size: .95rem; line-height: 1.45; color: var(--ink-2); }

.garden { align-items: end; padding-block: clamp(2rem, 5vw, 4rem) clamp(3rem, 6vw, 5rem); }
.garden-text { grid-column: 2 / span 4; grid-row: 1; }
.garden-fig { grid-column: 7 / -1; grid-row: 1; margin: 0 calc(-1 * var(--gutter)) 0 0; }
.garden-fig img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

/* ---------- photos ---------- */

.gallery-head { align-items: end; padding-block: clamp(2rem, 5vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem); }
.gallery-h1 { grid-column: 1 / span 6; margin: 0; }
.gallery-note { grid-column: 8 / -1; margin: 0; }
.gallery-wrap { padding-bottom: clamp(2rem, 5vw, 4rem); }
.gallery-grid {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: clamp(8rem, 14vw, 14rem); grid-auto-flow: dense;
  gap: 2rem var(--col-gap);
}
.g-item { margin: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.g-item button { display: block; width: 100%; height: 100%; min-height: 0; padding: 0; border: 0; background: none; cursor: zoom-in; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s ease; }
.g-item button:hover img { opacity: .88; }
.g-8 { grid-column: span 8; grid-row: span 2; }
.g-5 { grid-column: span 5; grid-row: span 2; }
.g-4 { grid-column: span 4; grid-row: span 2; }
.g-3 { grid-column: span 3; grid-row: span 2; }
.g-tall { grid-column: span 4; grid-row: span 3; }

.lightbox {
  position: fixed;
  max-width: min(92vw, 1400px); max-height: 94vh;
  padding: 0; border: 0; background: transparent; overflow: visible;
}
.lightbox::backdrop { background: rgba(20, 26, 23, .88); }
.lightbox figure { margin: 0; }
.lightbox img { max-height: 82vh; width: auto; margin: 0 auto; filter: none; }
.lightbox figcaption { color: #E9EAE4; }
.lightbox__close {
  position: absolute; top: -2.7rem; right: 0;
  padding: .4rem .85rem;
  font: 700 1rem/1 var(--label); color: #fff;
  background: none; border: 1px solid rgba(255, 255, 255, .65); border-radius: 2px; cursor: pointer;
}
.lightbox__close:hover { background: rgba(255, 255, 255, .12); }

/* ---------- book ---------- */

.book-head { align-items: end; padding-block: clamp(2rem, 5vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem); }
.book-h1 { grid-column: 1 / span 5; margin: 0; }
.book-online { grid-column: 7 / -1; }
.book-online p:last-child { margin-bottom: 0; }
.book-first { font-size: 1.2rem; }

.book-body { align-items: start; row-gap: 3rem; padding-block: 2.5rem clamp(3rem, 6vw, 5rem); border-top: 3px double var(--ink); }
.enquiry { grid-column: 1 / span 7; }
.enquiry fieldset { margin: 0 0 1.75rem; padding: 0; border: 0; min-width: 0; }
.enquiry legend { padding: 0; margin-bottom: .8rem; font: 800 1.4rem/1.2 var(--label); }
.field { display: grid; gap: .3rem; margin-bottom: 1rem; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.field label { font: 700 1rem/1.3 var(--label); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 2.9rem; padding: .6rem .75rem;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff; border: 1px solid var(--field-line); border-radius: 2px;
}
.field textarea { min-height: 7rem; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--route); outline-offset: 1px; border-color: var(--ink); }
.field [aria-invalid="true"] { border-color: var(--route); box-shadow: inset 0 0 0 1px var(--route); }
.form-error { margin: 0 0 1rem; font-weight: 600; color: var(--route); }
.submit {
  padding: 1rem 1.6rem;
  font: 800 1.15rem/1 var(--label); letter-spacing: .02em; color: #fff;
  background: var(--ink); border: 0; border-radius: 2px; cursor: pointer;
  transition: background-color .2s ease;
}
.submit:hover { background: var(--route); }
.submit:active { transform: translateY(1px); }
.enquiry .small { margin-top: 1rem; }
.form-success {
  grid-column: 1 / span 7;
  margin: 0; padding: 1.25rem 0;
  font: 700 1.3rem/1.35 var(--label);
  border-block: 1px solid var(--ink);
}

.book-notes { grid-column: 9 / -1; }
.book-notes h2 { font-size: 1.55rem; }
details { border-bottom: 1px solid var(--rule); }
details:first-of-type { border-top: 1px solid var(--ink); }
summary {
  position: relative; cursor: pointer; list-style: none;
  padding: .8rem 1.8rem .8rem 0;
  font: 700 1.1rem/1.35 var(--label);
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: .25rem; top: .75rem; font: 700 1.25rem/1 var(--label); color: var(--route); }
details[open] summary::after { content: "\2212"; }
details p { margin: 0 0 .9rem; }

/* ---------- find us ---------- */

.find-head { align-items: start; padding-block: clamp(2rem, 5vw, 4.5rem) clamp(2rem, 4vw, 3rem); }
.find-intro { grid-column: 1 / span 4; }
.find-map { grid-column: 6 / -1; margin: 0 calc(-1 * var(--gutter)) 0 0; }
.find-map figcaption { padding-right: var(--gutter); }
.map-embed { display: block; width: 100%; aspect-ratio: 4 / 3; max-height: max(22rem, calc(100vh - 8rem)); border: 0; border-block: 1px solid var(--ink); background: var(--paper-2); }
.eircode { margin: 2rem 0 0; padding-top: 1rem; border-top: 1px solid var(--ink); }
.eircode span { display: block; }
.eircode strong { font: 800 clamp(2.4rem, 4.4vw, 3.6rem)/1.05 var(--label); letter-spacing: .04em; }

.roads { align-items: start; row-gap: 2.5rem; padding-block: clamp(2rem, 4vw, 3.5rem); }
.road-note { grid-column: 1 / span 5; }
.road-note--2 { grid-column: 7 / span 5; margin-top: clamp(0rem, 6vw, 4.5rem); }
.road-note h2 { font-size: clamp(1.45rem, 2.2vw, 1.85rem); }
.road-seq { position: relative; list-style: none; margin: 0 0 .8rem; padding: 0 0 0 1.7rem; }
.road-seq::before {
  content: ""; position: absolute; left: .5rem; top: .9rem; bottom: .9rem; width: 2px;
  background: repeating-linear-gradient(var(--route) 0 7px, transparent 7px 12px);
}
.road-seq li { padding: .45rem 0; }
.road-time { font: 700 1.1rem/1.3 var(--label); }
.road-source { grid-column: 1 / -1; margin: 0; }

.contact { align-items: baseline; padding-block: clamp(2.5rem, 5vw, 4rem) clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--rule); }
.contact-h { grid-column: 1 / span 3; }
.contact-lines { grid-column: 4 / -1; }
.contact-phone { display: inline-block; font: 800 clamp(1.9rem, 3.4vw, 2.5rem)/1.1 var(--label); text-decoration: none; }
.contact-phone:hover { color: var(--route); }

/* ---------- footer: the sheet margin ---------- */

.site-footer { border-top: 3px double var(--ink); padding-block: 2rem 2.5rem; }
.site-footer .grid { row-gap: 1rem; }
.site-footer p { margin-bottom: .6rem; }
.f-title { font: 800 1.15rem/1.2 var(--label); letter-spacing: .03em; text-transform: uppercase; }
.f-name { grid-column: 1 / span 3; }
.f-contact { grid-column: 4 / span 3; }
.f-season { grid-column: 7 / span 3; }
.f-small { grid-column: 10 / span 3; }

/* ---------- narrower screens ---------- */

@media (max-width: 1100px) {
  .sheet-svg .lbl-valley { font-size: 38px; }
  .sheet-svg .lbl-range { font-size: 23px; }
  .sheet-svg .lbl-hill { font-size: 26px; }
  .sheet-svg .lbl-park { font-size: 20px; }
  .sheet-svg .lbl-park-sub { font-size: 16px; }
  .sheet-svg .lbl-peak { font-size: 22px; }
  .sheet-svg .lbl-water { font-size: 19px; }
  .sheet-svg .lbl-built, .sheet-svg .lbl-road, .sheet-svg .lbl-height, .sheet-svg .tick { font-size: 15px; }
  .sheet-svg .lbl-exit { font-size: 16px; }
  .sheet-svg .scale text { font-size: 15px; }
  .sheet { --map-max: 58%; }
  .f-name, .f-season { grid-column: 1 / span 6; }
  .f-contact, .f-small { grid-column: 7 / span 6; }
  .board-wrap { grid-column: 5 / -1; }
  .enquiry { grid-column: 1 / span 7; }
  .book-notes { grid-column: 8 / -1; }
}

@media (max-width: 800px) {
  .grid > * { grid-column: 1 / -1; grid-row: auto; }
  .sheet { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .sheet-key { margin-top: 1rem; }
  .sheet-legend { display: none; }
  .estate-fig, .garden-fig, .find-map { margin-inline: calc(-1 * var(--gutter)); }
  .estate-fig figcaption, .garden-fig figcaption, .find-map figcaption { padding-inline: var(--gutter); }
  .estate-text, .garden-text, .park-intro, .walks-lede, .gallery-note, .book-online, .drives-intro, .onsite-h, .contact-h { margin-top: 1.5rem; }
  .road-note--2 { margin-top: 0; }
  .walk { grid-template-columns: 3.4rem minmax(0, 1fr); }
  .walk-notes { grid-column: 2; grid-row: auto; margin-top: .7rem; }
  .gallery-grid { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
  .gallery-grid .g-item { grid-column: auto; grid-row: auto; }
  .g-item img { height: auto; aspect-ratio: 4 / 3; }
  .g-item.g-tall img { aspect-ratio: 3 / 4; }
  .drive-chart li, .drive-axis { grid-template-columns: minmax(0, 1fr); row-gap: .4rem; }
  .drive-axis { display: none; }
  .picks-intro { margin-top: 2.5rem; }
  .picks { margin-top: 1rem; }
  .approach-roads li { flex-direction: column; gap: .45rem; }
}

@media (max-width: 640px) {
  .sheet-svg .lbl-park { font-size: 21px; }
  .sheet-svg .lbl-park-sub, .sheet-svg .tick, .sheet-svg .lbl-exit,
  .sheet-svg .lbl-valley, .sheet-svg .lbl-range, .sheet-svg .lbl-river { display: none; }
  .sheet-svg .lbl-peak { font-size: 24px; }
  .sheet-svg .lbl-water { font-size: 21px; }
  .sheet-svg .lbl-built, .sheet-svg .lbl-road { font-size: 17px; }
  .sheet-svg .lbl-height { font-size: 16px; }
  .sheet-svg .scale text { font-size: 17px; }
  .sheet-svg .route-no { r: 17px; }
  .sheet-svg .route-no-t { font-size: 19px; }
  .field-row--stack { grid-template-columns: minmax(0, 1fr); }
  .board th, .board td { padding: .7rem .6rem; }
  .board thead th:nth-child(2), .board tbody td:nth-child(2) { display: none; }
}

@media (max-width: 400px) {
  .sheet-svg .lbl-park { font-size: 24px; }
  .sheet-svg .lbl-water, .sheet-svg .lbl-hill { font-size: 24px; }
  .sheet-svg .lbl-built, .sheet-svg .lbl-road, .sheet-svg .scale text { font-size: 20px; }
  .sheet-svg .lbl-height { font-size: 19px; }
}
