/* ==========================================================================
   Elephant Hide of Knysna: suite page template (suites/<slug>.html)
   1 Cover  2 Story  3 In the suite  4 Photographs  5 Guest book  6 Close
   Shared with every suite page; only the content changes per suite.
   FLOW (phones, portrait) is the base; DECK layouts are at the end, in cqw
   on the 16:9 canvas (100cqw x 56.25cqw).
   ========================================================================== */

/* Two-tone headings: second line gold */
.cv-title span, .sy-title span, .ft-title span { display: block; color: var(--gold); }
.gl-title span { color: var(--gold); }

/* ==========================================================================
   FLOW
   ========================================================================== */

/* 1. Cover */
.sp-cover { padding-top: calc(var(--hh) + 1rem); }
.cv-photo { aspect-ratio: 4 / 3; margin: 0 -1.25rem; border-radius: 0; }
.cv-plate { margin-top: 1.6rem; }
.cv-crumbs { display: flex; flex-wrap: wrap; gap: .5rem; color: var(--grey-light); }
.cv-crumbs a { color: var(--grey-light); text-decoration: none; transition: color .3s; }
.cv-crumbs a:hover { color: var(--gold-deep); }
.cv-crumbs [aria-current] { color: var(--gold-deep); }
.cv-title { margin-top: .9rem; font-size: clamp(2.8rem, 13vw, 4rem); line-height: .98; }
.cv-tagline { margin-top: 1rem; font-family: var(--font-display); font-size: 1.35rem; color: var(--grey-text); }
.cv-side { margin-top: 1.4rem; }
.cv-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 1.4rem;
  border-top: 1px solid var(--line);
}
.cv-facts > div { padding: .9rem 0; border-bottom: 1px solid var(--line); }
.cv-facts > div:nth-child(even) { padding-left: 1rem; border-left: 1px solid var(--line); }
.cv-facts dt, .ft-ledger, .sy-caption, .gb-by, .cl-meta {
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.cv-facts dt { display: flex; align-items: center; gap: .45rem; color: var(--grey-light); }
.cv-facts dt .i { width: 1.15rem; height: 1.15rem; color: var(--gold); }
.cv-facts dd { margin-top: .3rem; font-family: var(--font-display); font-size: 1.2rem; color: var(--grey-dark); }
.cv-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 1.8rem; margin-top: 1.6rem; }

/* 2. Story */
.sy-tall { display: none; }
.sy-copy { order: 1; }
.sy-wide { order: 2; margin-top: 2rem; aspect-ratio: 3 / 2; }
.sy-caption { order: 3; margin-top: .8rem; color: var(--grey-light); }
.sy-title { font-size: clamp(2rem, 8vw, 2.7rem); line-height: 1.08; }
.sy-rule { margin: 1.5rem 0 1.3rem; }
.sy-lead { font-family: var(--font-display); font-size: 1.3rem; line-height: 1.45; color: var(--grey-dark); }
.sy-body { margin-top: 1rem; }
.sy-body::first-letter {
  float: left;
  margin: .3rem .5rem 0 0;
  font-family: var(--font-display);
  font-size: 3.4rem;
  line-height: .8;
  color: var(--gold);
}

/* 3. In the suite */
.ft-wash, .ft-bath { display: none; }
.ft-shower { aspect-ratio: 4 / 3; }
.ft-title { margin-top: 2rem; font-size: clamp(2rem, 8vw, 2.7rem); line-height: 1.08; }
.ft-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem 1.2rem; margin-top: 1.6rem; }
.ft-group:last-child { grid-column: 1 / -1; }
.ft-group:last-child ul { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1.2rem; }
.ft-group h3 { padding-bottom: .6rem; margin-bottom: .5rem; border-bottom: 1px solid var(--line); }
.ft-group li { display: flex; align-items: center; gap: .65rem; padding: .35rem 0; font-size: .9rem; line-height: 1.3; color: var(--grey-dark); }
.ft-group .i { width: 1.6rem; height: 1.6rem; color: var(--gold); }
.ft-ledger {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.4rem;
  margin-top: 1.8rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--gold-deep);
}
.ft-ledger li { display: flex; align-items: center; gap: .5rem; }
.ft-ledger .i { width: 1.2rem; height: 1.2rem; color: var(--gold); }
.ft-pillows { display: flex; align-items: flex-start; gap: .8rem; margin-top: 1.4rem; }
.ft-pillows .i { width: 1.8rem; height: 1.8rem; margin-top: .1rem; color: var(--gold); }
.ft-pillows p { font-size: .9rem; line-height: 1.65; }
.ft-pillows strong { font-family: var(--font-display); font-size: 1.1rem; font-weight: 400; line-height: 1; color: var(--grey-dark); }

/* 4. Photographs */
.gl-head { display: flex; flex-direction: column; gap: .5rem; }
.gl-title { font-size: clamp(2rem, 8vw, 2.7rem); line-height: 1.08; }
.gl-count { color: var(--grey-light); }
.gl-tabs { display: flex; gap: 1.1rem; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.gl-tabs::-webkit-scrollbar { display: none; }
.gl-tabs button {
  position: relative;
  padding: .6rem 0 .8rem;
  border: 0;
  background: none;
  font-family: var(--font-display);
  font-size: .92rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  flex: none;
  color: var(--grey-light);
  cursor: pointer;
  transition: color .3s;
}
.gl-tabs button:hover, .gl-tabs button[aria-selected="true"] { color: var(--grey-dark); }
.gl-tabs button::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease-out);
}
.gl-tabs button[aria-selected="true"]::after { transform: scaleX(1); }
.gl-set[hidden] { display: none; }
/* A newly chosen suite's photographs arrive quickly, one after another */
.anim-ready .sp-gallery.is-visible .gl-set.is-switched [data-a] { animation-duration: .8s; animation-delay: calc(var(--i, 0) * .05s); }
.gl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: 1.4rem; }
.gl-grid li { min-width: 0; min-height: 0; aspect-ratio: 1; }
.gl-grid li:first-child { grid-column: 1 / -1; aspect-ratio: 3 / 2; }
.gl-grid .gl-extra { display: none; }
.gl-grid--4 li:last-child { grid-column: 1 / -1; aspect-ratio: 3 / 2; }
.gl-item {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--gold-wash);
  cursor: zoom-in;
}
.gl-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease-soft), filter .6s; }
.gl-item:hover img, .gl-item:focus-visible img { transform: scale(1.05); }
.gl-more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgb(37 37 37 / 42%);
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--white);
  transition: background-color .4s;
}
.gl-item:hover .gl-more { background: rgb(37 37 37 / 55%); }

/* 5. Guest book */
.gb-photo { aspect-ratio: 4 / 3; }
.canvas .gb-quote { margin-top: 2rem; overflow: visible; border-radius: 0; background: none; }
.gb-quote blockquote { position: relative; padding-top: 2.6rem; }
.gb-quote blockquote::before {
  content: "\201C";
  position: absolute;
  left: -.2rem;
  top: -1rem;
  font-family: var(--font-display);
  font-size: 6rem;
  line-height: 1;
  color: #e2d7c6;
}
.gb-quote p { font-family: var(--font-display); font-size: 1.7rem; line-height: 1.25; color: var(--grey-dark); }
.gb-by { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-top: 1.3rem; color: var(--gold-deep); }
.gb-name { color: var(--grey-dark); }
.gb-link { align-self: flex-start; margin-top: 1.8rem; }

/* 6. Close */
.sp-close { padding: 0; background: var(--grey-dark); color: rgb(255 255 255 / 78%); }
.sp-close .stage { padding: 4.5rem 1.25rem 3rem; }
.cl-kicker, .cl-others-title { color: var(--gold-soft); }
.cl-title { margin-top: .5rem; font-size: clamp(2.2rem, 9vw, 3rem); line-height: 1.04; color: var(--white); }
.cl-title span { display: block; color: var(--gold-soft); }
.cl-body { margin-top: 1.2rem; }
.cl-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.cl-details { display: grid; gap: .7rem; margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid rgb(255 255 255 / 16%); }
.cl-details li { display: flex; align-items: center; gap: .6rem; color: var(--white); }
.cl-details .i { width: 1.2rem; height: 1.2rem; color: var(--gold-soft); }
.cl-details a { text-decoration: none; transition: color .3s; }
.cl-details a:hover { color: var(--gold-soft); }
.cl-others { margin-top: 3rem; }
.cl-others ul { margin-top: .9rem; }
.cl-others a {
  display: grid;
  grid-template-columns: 5.5rem 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 1rem;
  align-items: center;
  padding: .8rem 0;
  border-top: 1px solid rgb(255 255 255 / 14%);
  text-decoration: none;
}
.cl-others li:last-child a { border-bottom: 1px solid rgb(255 255 255 / 14%); }
.cl-others img { grid-row: 1 / 3; width: 5.5rem; height: 3.7rem; object-fit: cover; border-radius: 6px; }
.cl-name { align-self: end; font-family: var(--font-display); font-size: 1.25rem; color: var(--white); transition: color .3s; }
.cl-meta { grid-column: 2; align-self: start; color: rgb(255 255 255 / 60%); }
.cl-others .i { grid-column: 3; grid-row: 1 / 3; width: 1.3rem; height: 1.3rem; color: var(--gold-soft); transition: transform .45s var(--ease-out); }
.cl-others a:hover .cl-name { color: var(--gold-soft); }
.cl-others a:hover .i { transform: translateX(.3rem); }

/* ==========================================================================
   Lightbox
   ========================================================================== */

html.lb-open { overflow: hidden; }

.lb {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgb(253 252 250 / 97%);
  color: var(--grey-dark);
  overflow: hidden;
}
.lb::backdrop { background: rgb(253 252 250 / 60%); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lb[open] { display: grid; place-items: center; animation: lb-in .55s var(--ease-soft); }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }

.lb-figure { display: flex; flex-direction: column; align-items: center; gap: 1rem; margin: 0; }
.lb-stage {
  position: relative;
  width: calc(100vw - 2rem);
  height: calc(100dvh - 11rem);
  touch-action: pan-y;
}
.lb-img {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2rem 4rem -2rem rgb(37 37 37 / 35%);
  opacity: 0;
  transition: opacity .65s var(--ease-soft), transform .8s var(--ease-soft);
  pointer-events: none;
}
.lb-img:not([src]) { display: none; }
.lb-img.is-current { opacity: 1; transform: none; pointer-events: auto; }
/* start positions (no transition), then .is-current glides to centre */
.lb-img.from-next { transform: translateX(5%) scale(.985); transition: none; }
.lb-img.from-prev { transform: translateX(-5%) scale(.985); transition: none; }
.lb-img.from-open { transform: scale(.96); transition: none; }
.lb-img.to-prev { opacity: 0; transform: translateX(-5%) scale(.985); }
.lb-img.to-next { opacity: 0; transform: translateX(5%) scale(.985); }
.lb-caption { transition: opacity .4s; }
.lb-caption.is-changing { opacity: 0; }
.lb-caption { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 1.2rem; max-width: 90vw; padding: 0 1rem; text-align: center; font-size: .9rem; color: var(--grey-text); }
.lb-count { font-family: var(--font-display); font-size: 1rem; letter-spacing: .12em; color: var(--gold-deep); }

.lb-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: var(--white);
  color: var(--gold-deep);
  cursor: pointer;
  transition: background-color .3s, color .3s, border-color .3s;
}
.lb-btn:hover { background: var(--gold-btn); border-color: var(--gold-btn); color: var(--white); }
.lb-btn .i { width: 1.2rem; height: 1.2rem; }
.lb-prev { left: calc(50% - 4rem); bottom: 1.2rem; }
.lb-next { right: calc(50% - 4rem); bottom: 1.2rem; }
.lb-close { top: 1rem; right: 1rem; }

/* ==========================================================================
   DECK
   ========================================================================== */

@media (min-width: 1200px) and (min-aspect-ratio: 1001/1000) and (min-height: 640px) {

  .sp-cover { padding-top: 0; }

  .cv-facts dt, .ft-ledger, .sy-caption, .gb-by, .cl-meta { font-size: max(11px, .72cqw); }

  /* 1. Cover ------------------------------------------------------------- */
  .cv-photo {
    left: calc(-1 * var(--gx)); top: -1cqw;
    width: calc(100cqw + 2 * var(--gx)); height: 33cqw;
    margin: 0; aspect-ratio: auto; border-radius: 0;
  }
  .cv-photo img { object-position: 50% 58%; }
  .cv-plate {
    left: 6cqw; top: 20.5cqw; width: 46cqw;
    margin: 0; padding: 2.6cqw 3.4cqw 2.8cqw;
    background: var(--white);
    border-radius: .6cqw .6cqw 0 0;
  }
  .cv-crumbs { gap: .8cqw; }
  .cv-title { margin-top: 1.3cqw; font-size: 6.6cqw; }
  .cv-tagline { margin-top: 1.5cqw; font-size: 1.7cqw; }
  .cv-side { left: 58cqw; top: 35.6cqw; width: 36cqw; margin: 0; }
  .cv-intro { font-size: 1.08cqw; line-height: 1.7; }
  .cv-facts {
    grid-template-columns: repeat(4, auto);
    justify-content: space-between;
    margin-top: 1.8cqw;
    border-bottom: 1px solid var(--line);
  }
  .cv-facts > div { padding: 1cqw 0 1.1cqw; border-bottom: 0; }
  .cv-facts > div + div { padding-left: 1.3cqw; border-left: 1px solid var(--line); }
  .cv-facts > div:nth-child(even) { padding-left: 1.3cqw; }
  .cv-facts dt { gap: .45cqw; }
  .cv-facts dt .i { width: 1.3cqw; height: 1.3cqw; }
  .cv-facts dd { margin-top: .35cqw; font-size: 1.35cqw; white-space: nowrap; }
  .cv-actions { gap: 2.2cqw; margin-top: 2cqw; }

  /* 2. Story ------------------------------------------------------------- */
  .sy-tall { display: block; left: 6cqw; top: 3cqw; width: 24cqw; height: 50cqw; }
  .sy-tall img { object-position: 38% 50%; }
  .sy-copy { left: 35.5cqw; top: 7.5cqw; width: 26.5cqw; }
  .sy-title { font-size: 3.5cqw; line-height: 1.06; }
  .sy-rule { width: 4.5cqw; margin: 2cqw 0 1.8cqw; }
  .sy-lead { font-size: 1.55cqw; line-height: 1.42; }
  .sy-body { margin-top: 1.4cqw; font-size: 1.04cqw; line-height: 1.78; }
  .sy-body::first-letter { margin: .35cqw .55cqw 0 0; font-size: 3.7cqw; }
  .sy-wide {
    left: 67cqw; top: 9cqw;
    width: calc(33cqw + var(--gx)); height: 25cqw;
    margin: 0; aspect-ratio: auto; border-radius: .6cqw 0 0 .6cqw;
  }
  .sy-caption { left: 67cqw; top: 35.6cqw; width: 27cqw; margin: 0; padding-top: 1cqw; border-top: 1px solid var(--line); }

  /* 3. In the suite ------------------------------------------------------ */
  .ft-wash { display: block; left: calc(-1 * var(--gx)); top: -1cqw; width: calc(42cqw + var(--gx)); height: 58.25cqw; background: var(--gold-wash); }
  .ft-shower { left: 6cqw; top: 5cqw; width: 24cqw; height: 44cqw; aspect-ratio: auto; }
  .ft-shower img { object-position: 30% 50%; }
  .ft-bath { display: block; left: 21cqw; top: 33.5cqw; width: 22cqw; height: 14.7cqw; }
  .ft-title { left: 49cqw; top: 5cqw; width: 45cqw; margin: 0; font-size: 3.3cqw; }
  .ft-groups { left: 49cqw; top: 16cqw; width: 46cqw; grid-template-columns: repeat(3, 1fr); gap: 2.4cqw; margin: 0; }
  .ft-group:last-child { grid-column: auto; }
  .ft-group:last-child ul { display: block; }
  .ft-group h3 { padding-bottom: .8cqw; margin-bottom: .7cqw; }
  .ft-group li { gap: .8cqw; padding: .42cqw 0; font-size: .98cqw; }
  .ft-group .i { width: 1.85cqw; height: 1.85cqw; }
  .ft-foot { left: 49cqw; top: 39.6cqw; width: 46cqw; }
  .ft-ledger { gap: .5cqw 2.4cqw; margin: 0; padding: 1.1cqw 0; }
  .ft-pillows { gap: 1.1cqw; margin-top: 1.8cqw; }
  .ft-pillows .i { width: 2cqw; height: 2cqw; margin-top: .2cqw; }
  .ft-pillows p { font-size: max(11px, .95cqw); line-height: 1.7; }
  .ft-pillows strong { font-size: 1.2cqw; }
  .ft-ledger li { gap: .6cqw; }
  .ft-ledger .i { width: 1.45cqw; height: 1.45cqw; }

  /* 4. Photographs ------------------------------------------------------- */
  .gl-head { left: 4cqw; top: 1.6cqw; width: 92cqw; flex-direction: row; align-items: flex-end; gap: 3cqw; }
  .gl-title { font-size: 2.6cqw; line-height: 1.1; }
  .gl-tabs { gap: 2cqw; margin-left: auto; overflow: visible; border-bottom: 0; }
  .gl-tabs button { padding: .4cqw 0 .7cqw; font-size: 1.05cqw; }
  .gl-count { padding-bottom: .8cqw; }
  .gl-title + .gl-count { margin-left: auto; }
  .gl-grid {
    left: 4cqw; top: 8cqw; width: 92cqw; height: 46.3cqw;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: .8cqw; margin: 0;
  }
  .gl-grid li, .gl-grid li:first-child { aspect-ratio: auto; grid-column: auto; }
  .gl-grid li:nth-child(1)  { grid-area: 1 / 1 / 3 / 6; }
  .gl-grid li:nth-child(2)  { grid-area: 1 / 6 / 2 / 9; }
  .gl-grid li:nth-child(3)  { grid-area: 1 / 9 / 3 / 11; }
  .gl-grid li:nth-child(4)  { grid-area: 1 / 11 / 2 / 13; }
  .gl-grid li:nth-child(5)  { grid-area: 2 / 6 / 3 / 9; }
  .gl-grid li:nth-child(6)  { grid-area: 2 / 11 / 3 / 13; }
  .gl-grid li:nth-child(7)  { grid-area: 3 / 1 / 5 / 4; }
  .gl-grid li:nth-child(8)  { grid-area: 3 / 4 / 4 / 7; }
  .gl-grid li:nth-child(9)  { grid-area: 3 / 7 / 5 / 10; }
  .gl-grid li:nth-child(10) { grid-area: 3 / 10 / 4 / 13; }
  .gl-grid li:nth-child(11) { grid-area: 4 / 4 / 5 / 7; }
  .gl-grid li:nth-child(12) { grid-area: 4 / 10 / 5 / 13; }
  /* Eleven photographs: the tenth tile takes the empty corner */
  .gl-grid--11 li:nth-child(10) { grid-area: 3 / 10 / 5 / 13; }
  /* Four photographs: one large, one tall, two stacked */
  .gl-grid--4 li:nth-child(1) { grid-area: 1 / 1 / 5 / 7; }
  .gl-grid--4 li:nth-child(2) { grid-area: 1 / 7 / 5 / 10; }
  .gl-grid--4 li:nth-child(3) { grid-area: 1 / 10 / 3 / 13; }
  .gl-grid--4 li:nth-child(4) { grid-area: 3 / 10 / 5 / 13; }
  .gl-item { border-radius: .5cqw; }
  .gl-more { font-size: 2.6cqw; }

  /* 5. Guest book -------------------------------------------------------- */
  .gb-photo { left: 9cqw; top: 9cqw; width: 22cqw; height: 33cqw; aspect-ratio: auto; }
  .gb-photo img { object-position: 55% 60%; }
  .canvas .gb-quote { left: 39cqw; top: 15cqw; width: 48cqw; margin: 0; }
  .gb-quote blockquote { padding-top: 0; }
  .gb-quote blockquote::before { left: -6.4cqw; top: -3.4cqw; font-size: 12cqw; }
  .gb-quote p { font-size: 3.1cqw; line-height: 1.22; }
  .gb-by { gap: .4cqw 1.6cqw; margin-top: 2.4cqw; }
  .gb-by span + span::before { content: ""; display: inline-block; width: .3cqw; height: .3cqw; margin-right: 1.6cqw; border-radius: 50%; background: var(--gold); vertical-align: middle; }
  .gb-link { left: 39cqw; top: 36cqw; margin: 0; }

  /* 6. Close ------------------------------------------------------------- */
  .sp-close .stage { position: absolute; inset: var(--hh) 0 64px; padding: 0; }
  .sp-close .canvas { width: min(100%, calc((100svh - var(--hh) - 64px) * 16 / 9)); }
  .cl-copy { left: 6cqw; top: 6.5cqw; width: 38cqw; }
  .cl-title { margin-top: .9cqw; font-size: 4.6cqw; line-height: 1.02; }
  .cl-body { margin-top: 1.8cqw; max-width: 34cqw; font-size: 1.08cqw; line-height: 1.75; }
  .cl-actions { gap: 1.2cqw; margin-top: 2.4cqw; }
  .cl-details { gap: 1cqw; margin-top: 3.2cqw; padding-top: 2.2cqw; }
  .cl-details li { gap: .8cqw; font-size: max(12px, 1cqw); }
  .cl-details .i { width: 1.4cqw; height: 1.4cqw; }
  .cl-others { left: 53cqw; top: 5cqw; width: 41cqw; margin: 0; }
  .cl-others ul { margin-top: 1.2cqw; }
  .cl-others a { grid-template-columns: 8.4cqw 1fr auto; column-gap: 1.6cqw; padding: .95cqw 0; }
  .cl-others img { width: 8.4cqw; height: 5.6cqw; border-radius: .4cqw; }
  .cl-name { font-size: 1.6cqw; }
  .cl-others .i { width: 1.6cqw; height: 1.6cqw; }
  .sp-close .site-footer { position: absolute; left: 0; right: 0; bottom: 0; }

  /* Lightbox: arrows either side of the photograph */
  .lb-stage { width: calc(100vw - 12rem); height: calc(100dvh - 8rem); }
  .lb-prev { left: 2rem; right: auto; top: 50%; bottom: auto; transform: translateY(-50%); }
  .lb-next { right: 2rem; left: auto; top: 50%; bottom: auto; transform: translateY(-50%); }
  .lb-close { top: 1.5rem; right: 2rem; }
}

/* Closing slide: a soft black-and-white elephant behind the copy and the footer.
   Each page sets its own picture with style="--close-bg:url(...)" (applied by _tools/suite-pages/update_nav.py).
   Wide pictures fill the slide; tall ones stand whole on the right, fading at the edges. */
.sp-close { isolation: isolate; }
.sp-close::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--close-bg, none) var(--close-pos, 50% 35%) / var(--close-size, cover) no-repeat;
  -webkit-mask-image: var(--close-mask, none);
  mask-image: var(--close-mask, none);
  opacity: .22;
  pointer-events: none;
}
.sp-close .site-footer { background: transparent; }

/* Button to the guest reviews page, under the contact details on the closing slide */
.cl-reviews { display: inline-flex; margin-top: 1.8rem; }
@media (min-width: 1200px) and (min-aspect-ratio: 1001/1000) and (min-height: 640px) {
  .cl-reviews { margin-top: 2.4cqw; }
}

/* Short laptop screens (720px tall): the cover's facts and buttons need a little more room */
@media (min-width: 1200px) and (min-aspect-ratio: 1001/1000) and (min-height: 640px) and (max-height: 760px) {
  .cv-side { top: 33.2cqw; }
  .cv-facts { margin-top: 1.2cqw; }
  .cv-actions { margin-top: 1.4cqw; }
}

/* 404 page: the closing slide is the first slide there, so it needs room under the fixed header in the flowing layout */
main > .sp-close:first-child .cl-copy { padding-top: 2.2rem; }
@media (min-width: 1200px) and (min-aspect-ratio: 1001/1000) and (min-height: 640px) {
  main > .sp-close:first-child .cl-copy { padding-top: 0; }
}

/* "Download our Welcome Guide" button under the note at the foot of a features spread (contact, Knysna) */
.guide-btn { display: inline-flex; align-items: center; gap: .7rem; margin: 1.2rem 0 0 2.6rem; }
.guide-btn .i { flex: none; width: 1.1rem; height: 1.1rem; }
@media (max-width: 599px) { .guide-btn { width: 100%; justify-content: center; margin-left: 0; letter-spacing: .16em; } }
@media (min-width: 1200px) and (min-aspect-ratio: 1001/1000) and (min-height: 640px) {
  .guide-btn { gap: .8cqw; margin: 1.3cqw 0 0 3.1cqw; }
  .guide-btn .i { width: 1.2cqw; height: 1.2cqw; }
}

/* Features spreads with stacked groups (contact, restaurant "From the bar", facilities "The lodge"; Janine, 2026-10-14):
   the groups sit one under another, items fill down two columns, every line stays on one row */
.ft-stack .ft-groups { grid-template-columns: 1fr; }
.ft-stack .ft-group:last-child { grid-column: auto; }
.ft-stack .ft-group ul, .ft-stack .ft-group:last-child ul { display: block; }
.ft-stack .ft-group li { white-space: nowrap; break-inside: avoid; }
@media (min-width: 600px) {
  .ft-stack .ft-group ul, .ft-stack .ft-group:last-child ul { columns: 2; column-gap: 1.6rem; }
}
@media (min-width: 1200px) and (min-aspect-ratio: 1001/1000) and (min-height: 640px) {
  .ft-stack .ft-title { top: 3.8cqw; }
  .ft-stack .ft-groups { top: 13.2cqw; display: flex; flex-direction: column; gap: 1.4cqw; }
  .ft-stack .ft-group ul, .ft-stack .ft-group:last-child ul { column-gap: 2.4cqw; }
  .ft-stack .ft-group li { padding: .2cqw 0; }
  .ft-stack .ft-group .i { width: 1.6cqw; height: 1.6cqw; }
}

/* Suite pages, "In the suite" (Janine, 2026-10-14): every feature stays on one line.
   Deck: Sleep and Bathe side by side, Stay across the full width in two columns. Phones: one column. */
#features .ft-group li { white-space: nowrap; break-inside: avoid; }
@media (max-width: 599px) {
  #features .ft-groups { grid-template-columns: 1fr; }
  #features .ft-group:last-child ul { display: block; }
}
@media (min-width: 1200px) and (min-aspect-ratio: 1001/1000) and (min-height: 640px) {
  #features .ft-title { top: 3.8cqw; }
  #features .ft-groups { top: 12.8cqw; grid-template-columns: repeat(2, 1fr); gap: 1.4cqw 2.4cqw; }
  #features .ft-group:last-child { grid-column: 1 / -1; }
  #features .ft-group:last-child ul { display: grid; grid-template-rows: repeat(3, auto); grid-auto-flow: column; grid-auto-columns: max-content; column-gap: 2.6cqw; }
  #features .ft-group li { padding: .2cqw 0; }
  #features .ft-group .i { width: 1.6cqw; height: 1.6cqw; }
  #features .ft-foot { top: 41.8cqw; }
}

/* Cover facts in pairs (pages whose labels are long: contact, Knysna, FAQ): a 2 x 2 ledger, labels on one line */
.cv-facts--pairs dt { white-space: nowrap; }
@media (min-width: 1200px) and (min-aspect-ratio: 1001/1000) and (min-height: 640px) {
  .cv-facts--pairs { grid-template-columns: 1fr 1fr; justify-content: stretch; }
  .cv-facts--pairs { margin-top: 1.2cqw; }
  .cv-facts--pairs > div { padding: .5cqw 0 .6cqw; }
  .sp-cover .cv-side:has(.cv-facts--pairs) { top: 33.2cqw; }
  .cv-facts--pairs > div + div { padding-left: 0; border-left: 0; }
  .cv-facts--pairs > div:nth-child(even) { padding-left: 1.3cqw; border-left: 1px solid var(--line); }
  .cv-facts--pairs > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

@media (min-width: 1200px) and (max-width: 1439px) and (min-aspect-ratio: 1001/1000) and (min-height: 640px) {
  /* smaller deck screens: the stay ledger (breakfast, check-in, check-out) keeps to one row */
  #features .ft-ledger { column-gap: 1.6cqw; letter-spacing: .12em; }
}
