/* =========================================================================
   SECTION — OUR CABINS
   One large frame, all five cabins as a strip beneath it. The frame
   cross-fades; the copy for every cabin is in the HTML (only the active one
   is shown) so crawlers and no-JS visitors still get all five.
   Nothing here assumes five — the strip is a grid of however many exist.
   ========================================================================= */
.cbn{
  --cbn-cream:#f6f3ec;
  --cbn-ink:#12271e;
  --cbn-rust:#a24c2c;
  --cbn-rust-deep:#853a24;
  --cbn-muted:#5b665e;
  --cbn-line:#d8d1c2;
  position:relative;
  background:var(--cbn-cream);
  color:var(--cbn-ink);
  padding-block:clamp(46px,4.6vw,74px);
}

/* ---- heading ---- */
.cbn-head{text-align:center;margin-bottom:clamp(20px,2.4vw,34px)}
.cbn-kicker{
  display:flex;align-items:center;justify-content:center;gap:var(--space-md);
  margin:0 0 16px;
  font-family:var(--font-body);
  font-size:11px;font-weight:700;letter-spacing:.28em;line-height:1.4;
  text-transform:uppercase;color:var(--cbn-rust-deep);
}
.cbn-kicker::before,.cbn-kicker::after{content:"";width:50px;height:1px;background:#c2b8a4}
.cbn h2{
  margin:0;
  font-family:var(--font-display);
  font-size:clamp(29px,3.4vw,48px);line-height:1.08;letter-spacing:-.018em;
  font-weight:500;color:var(--forest);
  text-wrap:balance;
}
.cbn-sub{
  margin:13px auto 0;max-width:72ch;
  font-family:var(--font-body);
  font-size:clamp(16px,1.25vw,19px);line-height:1.45;color:var(--cbn-muted);
}

/* ---- the frame ---- */
.cbn-stage{
  position:relative;
  /* width must stay definite: with aspect-ratio alone, a clamped max-height
     makes the browser derive the width from the height and the frame shrinks
     sideways as well as down */
  width:100%;
  /* height is driven off the width, not the viewport: a ratio-based frame
     turns into a letterbox slot on a short laptop */
  height:clamp(340px,36vw,560px);
  overflow:hidden;
  background:#d9d3c7;
  touch-action:pan-y;
}
/* Each cabin owns a group of photographs. The group fades as a whole when the
   cabin changes; inside it the individual shots cross-fade on their own timer,
   so two separate things are never animating the same property. */
/* CROSSFADE, NOT A DISSOLVE.
   Fading one photograph out while the next fades in leaves both half-visible
   through the middle of the transition - two interiors superimposed, which
   read as a rendering fault rather than a transition. Instead the outgoing
   shot stays fully opaque UNDERNEATH while the incoming one fades in on top
   of it. At every frame the stage shows one solid photograph. */
.cbn-slides{
  position:absolute;inset:0;z-index:1;
  opacity:0;visibility:hidden;
  transition:opacity .8s ease,visibility 0s linear .8s;
}
.cbn-slides.is-prev{opacity:1;visibility:visible;z-index:1;transition:none}
.cbn-slides.is-on{opacity:1;visibility:visible;z-index:2;transition:opacity .8s ease,visibility 0s}
.cbn-stage img{
  position:absolute;inset:0;width:100%;height:100%;z-index:1;
  object-fit:cover;object-position:50% 52%;
  opacity:0;transform:scale(1.035);
  /* The zoom has to outlast the hold (4.5s) plus the fade, or it finishes
     early and the photo sits still before it changes. */
  transition:opacity .8s ease,transform 7s cubic-bezier(.22,.61,.36,1);
}
.cbn-stage img.is-prev{opacity:1;z-index:1;transition:transform 7s cubic-bezier(.22,.61,.36,1)}
.cbn-stage img.is-cur{opacity:1;z-index:2;transform:scale(1)}

/* progress ticks: which photograph of this cabin is showing */
.cbn-dots{
  position:absolute;z-index:3;left:50%;transform:translateX(-50%);
  bottom:clamp(12px,1.4vw,18px);
  display:flex;gap:7px;pointer-events:none;
}
.cbn-dots i{
  display:block;width:16px;height:2px;border-radius:2px;
  background:rgba(255,255,255,.38);transition:background .35s ease;
}
.cbn-dots i.is-cur{background:rgba(255,255,255,.95)}
/* a whisper of shade behind the arrows so they read on a bright sky */
.cbn-stage::before,.cbn-stage::after{
  content:"";position:absolute;top:0;bottom:0;width:clamp(70px,9vw,140px);z-index:1;
  pointer-events:none;opacity:0;transition:opacity .4s ease;
}
.cbn-stage::before{left:0;background:linear-gradient(90deg,rgba(10,22,16,.34),transparent)}
.cbn-stage::after{right:0;background:linear-gradient(270deg,rgba(10,22,16,.34),transparent)}
.cbn-stage:hover::before,.cbn-stage:hover::after,
.cbn-stage:focus-within::before,.cbn-stage:focus-within::after{opacity:1}

.cbn-nav{
  position:absolute;z-index:3;top:50%;transform:translateY(-50%);
  width:clamp(44px,3.4vw,54px);aspect-ratio:1;border-radius:var(--r-round);
  display:flex;align-items:center;justify-content:center;padding:0;cursor:pointer;
  border:1px solid rgba(255,255,255,.6);
  background:rgba(12,26,19,.34);
  -webkit-backdrop-filter:blur(7px);backdrop-filter:blur(7px);
  transition:background .28s ease,border-color .28s ease;
}
.cbn-nav svg{width:34%;height:34%;stroke:#fff;stroke-width:1.9;fill:none;stroke-linecap:round;stroke-linejoin:round}
.cbn-nav:hover{background:rgba(12,26,19,.66);border-color:#fff}
.cbn-nav:focus-visible{outline:2px solid #fff;outline-offset:3px}
.cbn-prev{left:clamp(12px,1.7vw,26px)}
.cbn-next{right:clamp(12px,1.7vw,26px)}

/* ---- the bar under the photo ---- */
.cbn-bar{
  display:flex;align-items:flex-end;justify-content:space-between;
  gap:clamp(18px,2.4vw,34px);flex-wrap:wrap;
  padding:clamp(16px,2vw,24px) 0 clamp(14px,1.8vw,20px);
  border-bottom:1px solid var(--cbn-line);
}
.cbn-infos{flex:1 1 340px;min-width:0}
.cbn-info{display:none}
.cbn-info.is-on{display:block}
.cbn-info h3{
  margin:0;
  font-family:var(--font-display);
  font-size:clamp(26px,2.85vw,40px);line-height:1.1;letter-spacing:-.014em;font-weight:500;
  color:var(--forest);
}
.cbn-line{
  margin:9px 0 0;max-width:46ch;
  font-family:var(--font-body);
  font-size:clamp(17px,1.35vw,20px);line-height:1.4;color:var(--cbn-muted);
}
/* the copy settles a beat after the photo has changed */
.cbn-info.is-on h3,.cbn-info.is-on .cbn-line{animation:cbnIn .5s cubic-bezier(.22,.61,.36,1) both}
.cbn-info.is-on .cbn-line{animation-delay:.07s}
@keyframes cbnIn{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:none}}

.cbn-right{display:flex;align-items:center;gap:clamp(18px,2.2vw,30px);flex-wrap:wrap}
.cbn-specs{
  display:none;flex-wrap:wrap;align-items:center;
  list-style:none;margin:0;padding:0;
}
.cbn-specs.is-on{display:flex}
.cbn-specs li{
  font-family:var(--font-body);
  font-size:10.5px;font-weight:600;letter-spacing:.13em;text-transform:uppercase;
  color:#4a564e;
  padding-right:var(--space-sm);margin-right:var(--space-sm);
  border-right:1px solid rgba(23,61,47,.26);
}
.cbn-specs li:last-child{border-right:0;padding-right:0;margin-right:0}
.cbn-specs li.cbn-pet{display:inline-flex;align-items:center;gap:6px;color:var(--forest);}
.cbn-specs li.cbn-pet svg{width:14px;height:14px;flex:0 0 14px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
.cbn-cta{
  display:none;align-items:center;gap:15px;
  min-height:56px;padding:0 30px;
  border-radius:var(--r-ctl);
  background:var(--cbn-rust);color:#fff;
  font-family:var(--font-body);
  font-size:11px;font-weight:700;letter-spacing:.2em;text-transform:uppercase;
  transition:background .3s ease;
}
.cbn-cta.is-on{display:inline-flex}
.cbn-cta:hover{background:var(--cbn-rust-deep)}
.cbn-cta svg{width:22px;height:9px;stroke:currentColor;stroke-width:1.7;fill:none;stroke-linecap:round;stroke-linejoin:round;transition:transform .34s ease}
.cbn-cta:hover svg{transform:translateX(5px)}

/* ---- the strip ---- */
.cbn-strip{
  display:grid;
  grid-template-columns:repeat(var(--cbn-count,5),minmax(0,1fr));
  gap:clamp(10px,1.5vw,22px);
  margin-top:clamp(14px,1.8vw,22px);
}
.cbn-pick{
  display:block;padding:0;border:0;background:none;cursor:pointer;text-align:left;
  min-width:0;
}
.cbn-pick-img{
  display:block;position:relative;overflow:hidden;
  aspect-ratio:16/9;background:#d9d3c7;
}
.cbn-pick-img img{
  display:block;width:100%;height:100%;object-fit:cover;
  filter:grayscale(.4);opacity:.55;
  transition:opacity .35s ease,filter .35s ease,transform .8s cubic-bezier(.22,.61,.36,1);
}
.cbn-pick:hover .cbn-pick-img img{opacity:.88;filter:grayscale(0);transform:scale(1.05)}
.cbn-pick[aria-selected="true"] .cbn-pick-img img{opacity:1;filter:none}
.cbn-pick-name{
  display:block;margin-top:10px;padding-bottom:var(--space-xs);
  font-family:var(--font-body);
  font-size:11.5px;font-weight:700;letter-spacing:.13em;text-transform:uppercase;
  color:#6f6959;
  border-bottom:2px solid transparent;
  transition:color .3s ease,border-color .3s ease;
}
.cbn-pick:hover .cbn-pick-name{color:#3f4a41}
.cbn-pick[aria-selected="true"] .cbn-pick-name{color:var(--forest);border-bottom-color:var(--cbn-rust)}
.cbn-pick:focus-visible{outline:2px solid var(--cbn-rust-deep);outline-offset:4px}

/* ---- closing ---- */
.cbn-foot{
  display:flex;flex-direction:column;align-items:center;gap:14px;
  margin-top:clamp(24px,2.6vw,36px);
}
.cbn-closing{
  display:flex;align-items:center;justify-content:center;gap:20px;
  margin:0;width:100%;max-width:760px;
  font-family:var(--font-body);
  font-size:11px;font-weight:600;letter-spacing:.2em;text-transform:uppercase;
  color:#6f6959;text-align:center;
}
.cbn-closing::before,.cbn-closing::after{content:"";flex:1;max-width:120px;height:1px;background:#c9c0ac}
.cbn-all{
  display:inline-flex;align-items:center;gap:var(--space-sm);
  font-family:var(--font-body);
  font-size:11px;font-weight:700;letter-spacing:.18em;text-transform:uppercase;
  color:var(--cbn-rust-deep);
  border-bottom:1px solid rgba(133,58,36,.4);padding-bottom:5px;
}
.cbn-all svg{width:20px;height:8px;stroke:currentColor;stroke-width:1.7;fill:none;stroke-linecap:round;stroke-linejoin:round;transition:transform .34s ease}
.cbn-all:hover svg{transform:translateX(5px)}

/* ---- responsive ---- */
@media (max-width:1080px){
  .cbn-stage{height:auto;aspect-ratio:16/9}
  .cbn-strip{gap:10px}
  .cbn-pick-name{font-size:10px;letter-spacing:.08em}
}
@media (max-width:760px){
  .cbn-stage{height:auto;aspect-ratio:4/3}
  .cbn-bar{padding-top:18px}
  .cbn-right{width:100%;justify-content:space-between}
  .cbn-cta.is-on{width:100%;justify-content:center}
  /* the strip becomes a swipeable row so the names stay readable */
  .cbn-strip{
    display:flex;gap:var(--space-sm);
    overflow-x:auto;scroll-snap-type:x mandatory;
    padding-bottom:var(--space-2xs);
    scrollbar-width:none;
  }
  .cbn-strip::-webkit-scrollbar{display:none}
  .cbn-pick{flex:0 0 42%;scroll-snap-align:start}
  .cbn-pick-name{font-size:10.5px;letter-spacing:.1em}
}
/* Laptop screens: the photo, the cabin's details and the strip of five all
   have to land on one screen, so on anything short the frame gives up height
   before the content does. */
@media (max-height:640px) and (min-width:761px){
  .cbn{padding-block:clamp(28px,2.8vw,44px)}
  .cbn-stage{height:clamp(280px,30vw,400px)}
  .cbn h2{font-size:clamp(28px,2.9vw,40px)}
  .cbn-sub{font-size:15.5px;margin-top:9px;max-width:84ch}
  .cbn-head{margin-bottom:var(--space-md)}
  .cbn-info h3{font-size:clamp(25px,2.3vw,32px)}
  .cbn-line{font-size:17px;margin-top:7px}
  .cbn-bar{padding:16px 0 14px}
  .cbn-strip{margin-top:14px}
  .cbn-pick-name{margin-top:var(--space-xs);font-size:10.5px;padding-bottom:7px}
  .cbn-foot{margin-top:22px;gap:var(--space-sm)}
}

@media (prefers-reduced-motion:reduce){
  .cbn-stage img,.cbn-slides{transition-duration:.01ms !important}
  .cbn-info.is-on h3,.cbn-info.is-on .cbn-line{animation:none}
  .cbn-pick-img img{transition-duration:.01ms !important}
  .cbn-strip{scroll-behavior:auto}
}
