/* =========================================================================
   SECTION — AMENITIES
   Icon-led, no photography, no cards. Five columns sitting directly on the
   forest ground, separated by hairlines rather than boxed. Every icon is
   drawn for this site: one family, one stroke weight, one rust detail each.

   The four rows inside a column (icon / title / rule / copy) are aligned
   ACROSS all five columns with subgrid, so a two-line title in one column
   does not push its rule and copy out of step with its neighbours. The
   @supports fallback holds the same alignment with reserved heights.
   ========================================================================= */
.amenities{
  --amen-ground:#12281c;          /* the same forest ground as Things To Do */
  --amen-cream:#f2ede2;
  --amen-copy:rgba(238,232,220,.72);
  --amen-rust:#cd7a46;            /* lifted off the body rust: this one has to
                                     carry 11px uppercase on forest ground, and
                                     var(--rust) lands at 3.0 there, #c9733f at 4.47.
                                     This clears 4.5. */
  --amen-line:rgba(226,232,214,.16);
  position:relative;
  isolation:isolate;
  background:var(--amen-ground);
  color:var(--amen-cream);
  overflow:hidden;
  /* the foot held room for a canopy to clear the disclaimer. With the trees
     gone there is nothing to clear, so it comes back down rather than sitting
     as empty green. */
  padding-block:clamp(66px,7.6vw,116px) clamp(50px,5.3vw,78px);
}

/* ---- background: contours above, nothing at the foot ---- */
.amenities-contours{
  position:absolute;inset:0 0 auto;height:62%;z-index:0;
  pointer-events:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='330' viewBox='0 0 420 330'%3E%3Cg fill='none' stroke='%23e8e2d4' stroke-opacity='.055' stroke-width='1'%3E%3Cpath d='M-20 60c70-42 150-30 210 10s130 60 230 18'/%3E%3Cpath d='M-20 92c74-44 156-30 216 12s126 56 224 14'/%3E%3Cpath d='M-20 124c78-46 162-30 222 14s122 52 218 10'/%3E%3Cpath d='M-20 190c66-38 142-26 198 12s118 52 242 12'/%3E%3Cpath d='M-20 222c70-40 148-26 204 14s114 48 236 8'/%3E%3C/g%3E%3C/svg%3E");
  background-size:420px auto;
  -webkit-mask-image:linear-gradient(180deg,#000 0%,rgba(0,0,0,.5) 55%,transparent 100%);
          mask-image:linear-gradient(180deg,#000 0%,rgba(0,0,0,.5) 55%,transparent 100%);
}
.amenities > .wrap{position:relative;z-index:2}

/* ---- heading block ---- */
.amenities-head{text-align:center;max-width:880px;margin-inline:auto}
.amenities-kicker{
  display:flex;align-items:center;justify-content:center;gap:18px;
  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(--amen-rust);
}
.amenities-kicker::before,.amenities-kicker::after{
  content:"";width:54px;height:1px;background:rgba(205,122,70,.5);
}
.amenities-head h2{
  margin:0;
  font-family:var(--font-display);
  /* deliberately under the Things To Do display scale: this section is the
     quiet one between two loud ones */
  font-size:clamp(31px,3.42vw,51px);
  line-height:1.1;letter-spacing:-.016em;font-weight:500;
  color:var(--amen-cream);
  text-wrap:balance;
}
.amenities-sub{
  margin:clamp(16px,1.5vw,22px) auto 0;max-width:820px;
  font-family:var(--font-body);
  font-size:clamp(16px,1.18vw,18px);font-weight:400;line-height:1.62;
  color:rgba(240,235,224,.82);
}

/* ---- the five ---- */
.amenities-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  grid-template-rows:auto auto auto auto;
  margin-top:clamp(46px,5.2vw,78px);
}
.amenities-grid:focus-visible{outline:2px solid var(--amen-rust);outline-offset:8px}
.amenity-item{
  display:grid;
  grid-row:span 4;
  grid-template-rows:subgrid;
  justify-items:center;text-align:center;
  padding-inline:clamp(12px,1.7vw,28px);
}
/* hairlines between, never around */
.amenity-item + .amenity-item{border-left:1px solid var(--amen-line)}

/* The mockup artwork itself, auto-traced from the supplied PNGs rather than
   redrawn by hand - a redraw lost too much of the character. Each PNG was
   upsampled, split into its cream and rust layers by saturation and
   brightness, split again into connected pieces, and every piece traced
   separately. That is what makes the animation possible: steam can rise while
   the tub holds still, the flame can move while the logs do not.

   The moving pieces are .ai-s1/2/3 steam, .ai-h1/2/3 heat, .ai-screen,
   .ai-stick, .ai-btn, .ai-flame-out and .ai-flame-in, .ai-heart. Everything
   that must not move is welded into .ai-still.

   These are FILLED outlines, not strokes - a traced stroke is a thin closed
   shape - so stroke properties do nothing here and colour is set with fill. */
.amenity-icon{
  display:block;
  width:clamp(58px,5.2vw,72px);height:auto;
  margin-bottom:clamp(18px,1.9vw,26px);
  fill:var(--amen-cream);
  stroke:none;
}
.amenity-icon .ai-steam,
.amenity-icon .ai-heat,
.amenity-icon .ai-screen,
.amenity-icon .ai-stick,
.amenity-icon .ai-flame-out,
.amenity-icon .ai-heart{fill:var(--amen-rust);transition:fill .4s ease}
/* last, so the inner flame and the arcade button stay cream */
.amenity-icon .cream{fill:var(--amen-cream)}

.amenity-title{
  margin:0;
  font-family:var(--font-display);
  font-size:clamp(22px,2.06vw,30px);
  line-height:1.16;letter-spacing:-.01em;font-weight:500;
  color:var(--amen-cream);
  text-wrap:balance;
}
.amenity-line{
  display:block;width:40px;height:1px;
  margin-block:clamp(13px,1.3vw,18px);
  background:var(--amen-rust);
}
.amenity-copy{
  margin:0;max-width:21ch;
  font-family:var(--font-body);
  font-size:clamp(14.5px,1.03vw,16px);font-weight:400;line-height:1.55;
  color:var(--amen-copy);
}

/* Without subgrid the four rows cannot line up across columns, so the two
   that vary are given room instead: titles reserve two lines, icons a flat
   box. Same alignment, cruder means. */
@supports not (grid-template-rows:subgrid){
  .amenities-grid{grid-template-rows:none}
  .amenity-item{grid-row:auto;grid-template-rows:none;display:flex;flex-direction:column;align-items:center}
  .amenity-icon{height:auto}
  .amenity-title{min-height:2.32em;display:flex;align-items:center}
}

/* =========================================================================
   AMENITIES - MOTION
   Three layers, all gated on html.has-anim, which the page only sets when
   IntersectionObserver exists AND the visitor has not asked for reduced
   motion. Without that class nothing below applies: the section renders
   fully visible and perfectly still, which is also the no-JS state.

   1. ENTRANCE  kicker, heading, paragraph, the five in turn, disclaimer.
   2. AMBIENT   one small loop per icon, amenity-specific. Deliberately at
                the edge of noticeable - if a visitor thinks "the icons are
                animated", it is too much.
   3. HOVER     pointer devices only.
   ========================================================================= */

/* ---- 1. entrance ---- */
/* The hidden state carries NO transition and the revealed state carries it.
   That ordering matters: .has-anim is added by script after first paint, so a
   transition on the hidden rule makes the section visibly fade OUT on load
   before it can fade in. The page's own motion layer is built the same way. */
html.has-anim .amenities [data-am]{opacity:0;transform:translateY(20px)}
html.has-anim .amenities.is-in [data-am]{
  opacity:1;
  transform:none;
  transition:opacity .78s var(--ease-out),
             transform .78s var(--ease-out);
}
/* the order the eye should travel: head first, then left to right, then the note */
html.has-anim .amenities.is-in .amenities-kicker{transition-delay:0s}
html.has-anim .amenities.is-in .amenities-head h2{transition-delay:.11s}
html.has-anim .amenities.is-in .amenities-sub{transition-delay:.22s}
html.has-anim .amenities.is-in .amenity-item:nth-child(1){transition-delay:.38s}
html.has-anim .amenities.is-in .amenity-item:nth-child(2){transition-delay:.49s}
html.has-anim .amenities.is-in .amenity-item:nth-child(3){transition-delay:.60s}
html.has-anim .amenities.is-in .amenity-item:nth-child(4){transition-delay:.71s}
html.has-anim .amenities.is-in .amenity-item:nth-child(5){transition-delay:.82s}
html.has-anim .amenities.is-in .amenities-note{transition-delay:.97s}

/* ---- 2. ambient loops ----
   Transforms inside an SVG are in user units, so 1 unit here is 1.1 screen px
   at the 72px display size. fill-box origins mean each part turns or scales
   about itself - the flame about its base, the joystick about its mount. */
@keyframes amSteam{
  0%  {opacity:0;   transform:translateY(2px)}
  16% {opacity:.25}
  52% {opacity:1;   transform:translateY(-2.4px)}
  100%{opacity:0;   transform:translateY(-6.6px)}
}
@keyframes amHeat{
  0%,100%{opacity:.42; transform:translateY(1.8px)}
  50%    {opacity:1;   transform:translateY(-2.4px)}
}
@keyframes amFlame{
  0%,100%{transform:translateY(0) scale(1,1)}
  34%    {transform:translateY(-1.3px) scale(.988,1.03)}
  68%    {transform:translateY(-.4px) scale(1.012,.964)}
}
@keyframes amStick{
  0%  {transform:rotate(0)}
  28% {transform:rotate(-7deg)}
  60% {transform:rotate(2.4deg)}
  100%{transform:rotate(0)}
}
@keyframes amBlink{0%,100%{opacity:1} 44%{opacity:.4}}
@keyframes amGlow {0%,100%{opacity:.84} 50%{opacity:1}}
@keyframes amPop  {0%,100%{transform:scale(1)} 50%{transform:scale(1.22)}}
@keyframes amHeart{0%,100%{transform:scale(1)} 50%{transform:scale(1.08)}}

html.has-anim .amenity-icon .ai-steam,
html.has-anim .amenity-icon .ai-heat,
html.has-anim .amenity-icon .ai-flame-out,
html.has-anim .amenity-icon .ai-flame-in,
html.has-anim .amenity-icon .ai-stick,
html.has-anim .amenity-icon .ai-screen,
html.has-anim .amenity-icon .ai-btn,
html.has-anim .amenity-icon .ai-heart{transform-box:fill-box}

/* the loops only start once the item they belong to has landed */
html.has-anim .amenities.is-in .ai-s1{animation:amSteam 3.0s ease-in-out 1.25s infinite}
html.has-anim .amenities.is-in .ai-s2{animation:amSteam 3.3s ease-in-out 1.55s infinite}
html.has-anim .amenities.is-in .ai-s3{animation:amSteam 2.9s ease-in-out 1.85s infinite}
html.has-anim .amenity-icon .ai-steam{transform-origin:50% 100%}

html.has-anim .amenities.is-in .ai-h1{animation:amHeat 3.0s ease-in-out 1.45s infinite}
html.has-anim .amenities.is-in .ai-h2{animation:amHeat 3.0s ease-in-out 1.60s infinite}
html.has-anim .amenities.is-in .ai-h3{animation:amHeat 3.0s ease-in-out 1.75s infinite}
html.has-anim .amenity-icon .ai-heat{transform-origin:50% 100%}

/* the arcade gets its one playful beat on reveal, then only a soft screen
   breath. No repeating blink: flashing lights read cheap. */
html.has-anim .amenity-icon .ai-stick{transform-origin:50% 100%}
html.has-anim .amenities.is-in .ai-stick{animation:amStick .95s var(--ease-out) 1.5s both}
html.has-anim .amenities.is-in .ai-screen{
  animation:amBlink .62s ease 1.45s 1, amGlow 3.6s ease-in-out 2.3s infinite;
}
html.has-anim .amenity-icon .ai-btn{transform-origin:50% 50%}
html.has-anim .amenities.is-in .ai-btn{animation:amPop .7s var(--ease-out) 1.75s 1}

/* outer and inner flame at different speeds, so the fire never repeats itself */
html.has-anim .amenity-icon .ai-flame-out,
html.has-anim .amenity-icon .ai-flame-in{transform-origin:50% 100%}
html.has-anim .amenities.is-in .ai-flame-out{animation:amFlame 2.1s ease-in-out 1.6s infinite}
html.has-anim .amenities.is-in .ai-flame-in {animation:amFlame 1.8s ease-in-out 1.75s infinite}

html.has-anim .amenity-icon .ai-heart{transform-origin:50% 50%}
html.has-anim .amenities.is-in .ai-heart{animation:amHeart 2.6s ease-in-out 1.7s infinite}

/* ---- 3. hover: pointer devices only ---- */
@media (hover:hover) and (pointer:fine){
  .amenity-icon{transition:transform .4s var(--ease-out)}
  .amenity-item:hover .amenity-icon{transform:translateY(-4px)}
  .amenity-line{transition:width .4s var(--ease-out)}
  .amenity-item:hover .amenity-line{width:58px}
  .amenity-title{transition:color .4s ease}
  .amenity-item:hover .amenity-title{color:#fdfbf5}
  .amenity-copy{transition:color .4s ease}
  .amenity-item:hover .amenity-copy{color:rgba(243,238,228,.92)}
  /* the rust warms rather than glows */
  .amenity-item:hover .ai-steam,
  .amenity-item:hover .ai-heat,
  .amenity-item:hover .ai-screen,
  .amenity-item:hover .ai-stick,
  .amenity-item:hover .ai-flame-out,
  .amenity-item:hover .ai-heart{fill:#dd8b55}
  /* warmth from inside the sauna */
  .amenity-icon .ai-heat{transition:opacity .4s ease}
  .amenity-item:hover .ai-heat{opacity:1}
  /* the joystick answers a second time, and the screen lifts */
  html.has-anim .amenity-item:hover .ai-stick{animation:amStick .95s var(--ease-out)}
  html.has-anim .amenity-item:hover .ai-screen{animation:amGlow 3.6s ease-in-out infinite;opacity:1}
}

/* ---- reduced motion: nothing moves, nothing is hidden ---- */
@media (prefers-reduced-motion:reduce){
  .amenities [data-am]{opacity:1!important;transform:none!important;transition:none!important}
  .amenities *,.amenities *::before,.amenities *::after{animation:none!important}
  .amenity-item:hover .amenity-icon{transform:none}
  .amenity-line,.amenity-icon{transition:none}
}

/* ---- the disclaimer ---- */
.amenities-note{
  margin:clamp(32px,3.5vw,50px) auto 0;max-width:60ch;
  text-align:center;
  font-family:var(--font-display);font-style:italic;font-weight:400;
  font-size:clamp(14.5px,1.08vw,17px);line-height:1.5;
  color:rgba(234,228,215,.62);
}

/* ---- responsive ----
   Six tracks rather than three, so the last two centre under the first row
   instead of hanging left. */
@media (max-width:1080px){
  .amenities-grid{
    grid-template-columns:repeat(6,minmax(0,1fr));
    grid-template-rows:auto auto auto auto auto auto auto auto;
    /* NOT row-gap: a subgrid item inherits the parent's row gap into every one
       of its own four rows, which prised icon, title, rule and copy apart. The
       space between the two blocks is put on the second block's icon instead,
       so it grows one track and leaves the alignment alone. */
    row-gap:0;
  }
  .amenity-item:nth-child(n+4) .amenity-icon{margin-top:clamp(36px,4.6vw,56px)}
  .amenity-item{grid-column:span 2}
  .amenity-item:nth-child(4){grid-column:2 / span 2}
  .amenity-item:nth-child(5){grid-column:4 / span 2}
  .amenity-item:nth-child(n+4){grid-row:span 4}
  /* the row-4 divider would otherwise sit at the very left edge */
  .amenity-item:nth-child(4){border-left:0}
  .amenities-note{margin-top:clamp(34px,4vw,50px)}
}

/* Mobile: a swipe rail, one and a bit at a time. No library, no autoplay -
   scroll-snap and overflow do all of it. */
@media (max-width:720px){
  .amenities{padding-block:clamp(56px,13vw,74px) clamp(44px,10vw,60px)}
  .amenities-grid{
    display:flex;
    grid-template-columns:none;grid-template-rows:none;
    gap:0;
    margin-inline:calc(var(--gutter) * -1);
    padding-inline:var(--gutter);
    overflow-x:auto;
    scroll-snap-type:x mandatory;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }
  .amenities-grid::-webkit-scrollbar{display:none}
  .amenity-item{
    grid-row:auto;grid-template-rows:none;
    display:flex;flex-direction:column;align-items:center;
    flex:0 0 84%;
    scroll-snap-align:center;
    padding-inline:clamp(14px,4vw,22px);
  }
  /* vertical rules go; a hairline between slides reads as the separator */
  .amenity-item + .amenity-item{border-left:1px solid var(--amen-line)}
  .amenity-icon{width:66px;height:auto;margin-bottom:20px}
  .amenity-title{font-size:25px;min-height:0}
  .amenity-copy{font-size:15.5px;max-width:24ch}
}
