/* The KOHO Air Hotel — home page motion (assets/home-motion.css)
   Loaded on index.html only, after site.css and motion.css. Pairs with
   assets/home-motion.js. Ideas from the motion study (_motion-lab/home.html,
   approved 2026-10-11):
     A1 cinematic hero that settles into a window
     A2 "When are you coming?" pill that becomes the booking window
     A3 right now on Gili Air (local time, real sunrise / sunset)
     A6 rooms rail with live prices and depth
     A7 Soma Vita: warm to cold to calm
     A8 swipeable stack of guest reviews
     A9 book-direct privileges that tick in
   Rule: every scroll-driven effect sits inside @supports + no-preference,
   so the resting state (no support, reduced motion) is complete and still. */

/* ================================================================ A1 · hero */
.hm-hero{isolation:isolate;background:#0F2124}
.hm-frame{position:absolute;inset:0;z-index:-2;overflow:hidden;overflow:clip}
.hm-media{position:absolute;inset:0}
/* Island dusk mode: after sunset on Gili Air the hero takes a warm evening grade (home-motion.js, A3) */
.hm-frame::after{content:'';position:absolute;inset:0;pointer-events:none;opacity:0;transition:opacity 2.4s var(--m-settle);
  background:radial-gradient(70% 40% at 72% 22%,rgba(240,150,80,.42),transparent 70%),linear-gradient(180deg,rgba(14,20,44,.72),rgba(40,22,44,.45) 55%,rgba(8,14,20,.8))}
.hm-dusk .hm-frame::after{opacity:1}
.hm-hero h1{text-wrap:balance}
.hm-ln{display:block;overflow:hidden;overflow:clip;padding:0 .14em .12em;margin:0 -.14em -.12em}
.hm-ln > span{display:block}
.hm-foot{display:block}
.hm-acts{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:14px 16px}
.hm-hero :focus-visible{outline:2px solid var(--bone);outline-offset:3px}

/* load: lines rise through a mask, the rest settles in, the film breathes */
@media (prefers-reduced-motion: no-preference){
  .hm-ln > span{animation:hm-rise 1.25s var(--m-settle) both}
  .hm-ln:nth-child(1) > span{animation-delay:.12s}
  .hm-ln:nth-child(2) > span{animation-delay:.26s}
  .hm-foot > *{animation:hm-fade 1s var(--m-settle) .5s both}
  .hm-foot > * + *{animation-delay:.64s}
  .hm-media{animation:hm-breathe 18s var(--m-move) infinite alternate}
}
@keyframes hm-rise{from{transform:translateY(106%)}}
@keyframes hm-fade{from{opacity:0;transform:translateY(12px)}}
@keyframes hm-breathe{from{transform:scale(1)}to{transform:scale(1.05)}}

/* scroll: the film settles into a window, the words lift away (the hero keeps its height,
   so the desktop booking bar underneath is exactly where it was) */
@supports (animation-timeline: view()){
  @media (prefers-reduced-motion: no-preference){
    .hm-hero{view-timeline:--hm-hero block}
    .hm-frame{animation:hm-window linear both;animation-timeline:--hm-hero;animation-range:exit 0% exit 80%}
    .hm-hero::after{animation:hm-veil linear both;animation-timeline:--hm-hero;animation-range:exit 0% exit 60%}
    .hm-frame > .hm-media{animation:hm-breathe 18s var(--m-move) infinite alternate,hm-par linear both;animation-timeline:auto,--hm-hero;animation-range:normal,exit 0% exit 100%}
    .hm-ln:nth-child(1){animation:hm-lift linear both;animation-timeline:--hm-hero;animation-range:exit 2% exit 24%}
    .hm-ln:nth-child(2){animation:hm-lift linear both;animation-timeline:--hm-hero;animation-range:exit 6% exit 30%}
    .hm-foot{animation:hm-lift linear both;animation-timeline:--hm-hero;animation-range:exit 0% exit 22%}
    .hm-cue{animation:hm-lift linear both;animation-timeline:--hm-hero;animation-range:exit 0% exit 10%}
  }
}
@keyframes hm-window{
  from{clip-path:inset(0px 0px 0px 0px round 0px)}
  to{clip-path:inset(0px max(16px,5vw) 14vh max(16px,5vw) round 18px)}
}
@keyframes hm-veil{to{opacity:.45}}
@keyframes hm-par{to{translate:0 14%}}
@keyframes hm-lift{to{opacity:0;translate:0 -56px;visibility:hidden}}

/* ================================================================ A2 · the dates pill */
.hm-pill{display:inline-flex;align-items:center;gap:14px;min-height:56px;max-width:100%;padding:7px 22px 7px 7px;border-radius:999px;
  border:1px solid rgba(250,247,241,.5);background:rgba(15,33,36,.32);-webkit-backdrop-filter:blur(16px) saturate(140%);backdrop-filter:blur(16px) saturate(140%);
  color:var(--bone);cursor:pointer;text-align:left;font:inherit;text-shadow:none;
  transition:background .5s var(--m-settle),border-color .5s var(--m-settle),transform .3s var(--m-settle)}
.hm-pill:hover{background:rgba(15,33,36,.5);border-color:var(--bone)}
.hm-pill:active{transform:scale(.97)}
.hm-pill-ic{flex:none;width:42px;height:42px;border-radius:50%;background:var(--bone);color:var(--ink);display:grid;place-items:center}
.hm-pill-ic svg{width:18px;height:18px}
.hm-pill-tx{display:grid;gap:3px;min-width:0}
.hm-pill-t1{font:400 1.25rem/1.15 'Cormorant Garamond',Georgia,serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:flex;align-items:baseline;gap:.3em}
.hm-pill-t2{font:400 .62rem/1.3 'Jost',sans-serif;letter-spacing:.18em;text-transform:uppercase;color:rgba(250,247,241,.86);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hm-pill .num,.hm-rc-pr .num,.hm-dl-stay .num{font-variant-numeric:tabular-nums lining-nums}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){.hm-pill{background:rgba(15,33,36,.72)}}
/* the shape that grows from the pill toward the booking window (home-motion.js, ≤ 450 ms) */
.hm-ghost{position:fixed;inset:0;z-index:2147482990;pointer-events:none;background:rgba(28,54,59,.92);will-change:clip-path,opacity}

/* ================================================================ A3 · right now on Gili Air */
.hm-now{background:var(--ink);color:var(--bone);padding:18px 0 20px;border-top:1px solid rgba(250,247,241,.08)}
.hm-now-in{display:flex;align-items:center;gap:14px 22px}
.hm-arc{flex:none;width:84px;height:46px;overflow:visible}
.hm-arc .hz{stroke:rgba(250,247,241,.3);stroke-width:1}
.hm-arc .base{fill:none;stroke:rgba(250,247,241,.32);stroke-width:1;stroke-dasharray:1.5 3.5}
.hm-arc .prog{fill:none;stroke:#F2D49B;stroke-width:1.3;transition:stroke-dashoffset 1.2s var(--m-settle)}
.hm-arc .sun{fill:#F2D49B;transition:transform 1.2s var(--m-settle)}
.hm-arc .glow{fill:rgba(242,212,155,.2)}
.hm-now.night .hm-arc .sun{fill:rgba(250,247,241,.6)}
.hm-now.night .hm-arc .glow{fill:none}
.hm-now-txt{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 0;margin:0;min-width:0}
.hm-now-eb{width:100%;font-size:.62rem;letter-spacing:.28em;text-transform:uppercase;color:rgba(250,247,241,.75);margin-bottom:2px}
.hm-now-it{font-size:.9rem;line-height:1.4;color:rgba(250,247,241,.85);padding-right:16px;margin-right:16px;border-right:1px solid rgba(250,247,241,.22)}
.hm-now-it:last-child{border-right:0;margin-right:0;padding-right:0}
.hm-now-it b{font:400 1.45rem/1 'Cormorant Garamond',Georgia,serif;color:var(--bone);font-variant-numeric:tabular-nums lining-nums;margin-right:6px}
.hm-now-it small{font-size:.62rem;letter-spacing:.16em;text-transform:uppercase;color:rgba(250,247,241,.72)}
@media (prefers-reduced-motion: reduce){.hm-arc .prog,.hm-arc .sun{transition:none}}

/* ================================================================ A6 · rooms rail */
.hm-rooms{overflow:hidden;overflow:clip}
.hm-rail-head{display:flex;align-items:center;gap:24px}
.hm-rail-tools{display:none;gap:8px}
.hm-rail-btn{width:48px;height:48px;border:1px solid var(--line);background:transparent;cursor:pointer;display:grid;place-items:center;color:var(--ink);border-radius:50%;
  transition:border-color .3s,opacity .3s}
.hm-rail-btn:hover{border-color:var(--ink)}
.hm-rail-btn:disabled{opacity:.3;cursor:default}
.hm-rail-btn:focus-visible{outline:2px solid var(--sea);outline-offset:3px}
.hm-rail-btn svg{width:18px;height:18px}
.hm-rail{--cw:min(78vw,340px);--gap:14px;list-style:none;margin:0;display:flex;gap:var(--gap);overflow-x:auto;overscroll-behavior-x:contain;
  scroll-snap-type:x mandatory;padding:12px calc((100% - var(--cw)) / 2) 26px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.hm-rail::-webkit-scrollbar{display:none}
.hm-rc{flex:0 0 var(--cw);scroll-snap-align:center;transform-origin:50% 40%}
.hm-rc-a{display:block;color:inherit;text-decoration:none}
.hm-rc-a:focus-visible{outline:2px solid var(--sea);outline-offset:6px}
.hm-rc-ph{display:block;position:relative;aspect-ratio:1/1;overflow:hidden;overflow:clip;background:var(--sand)}
.hm-rc-ph img{position:absolute;top:0;left:-8%;width:116%;max-width:none;height:100%;object-fit:cover;transition:transform 1.1s var(--ease)}
.hm-rc-a:hover .hm-rc-ph img{transform:scale(1.03)}
.hm-rc-body{display:block;padding:18px 2px 0}
.hm-rc .spec{display:block;font-size:.63rem;letter-spacing:.17em;text-transform:uppercase;color:var(--clay-ink)}
.hm-rc h3{font-size:1.75rem;margin-top:8px}
.hm-rc-blurb{display:block;font-size:.86rem;line-height:1.6;color:var(--soft);margin-top:8px}
/* the price under each card: assets/room-price.js (+ room-price.css); the written range is the fallback */
.hm-rc-pr{display:block;margin:14px 2px 0;padding-top:12px;border-top:1px solid var(--line)}
.hm-rail-prog{position:relative;height:1px;background:var(--line);margin:4px auto 0;width:min(240px,50vw)}
.hm-rail-prog i{position:absolute;inset:0;background:var(--ink);transform-origin:0 50%;transform:scaleX(.1667);transition:transform .25s linear}
@media (min-width:760px){.hm-rail-tools{display:flex}}
/* Phones (UAT 2026-10-14): the rail is full-bleed and starts its first card at (100% - --cw)/2, so give the
   heading the same inset — both percentages resolve against the section — instead of the .wrap gutter.
   Keep in step with .hm-rail's phone --cw above. Tablet/desktop keep the standard gutter. */
@media (max-width:520px){
  .hm-rooms>.wrap{padding-left:max(22px,calc((100% - min(78vw,340px)) / 2));padding-right:max(22px,calc((100% - min(78vw,340px)) / 2))}
}
@media (min-width:900px){
  .hm-rail{--cw:560px;--gap:30px}
  .hm-rc-ph{aspect-ratio:4/3}
}
/* the room in focus is full size, its neighbours step back; the photo drifts inside its frame */
@supports (animation-timeline: view()){
  @media (prefers-reduced-motion: no-preference){
    .hm-rc{view-timeline:--hm-rc inline;animation:hm-focus linear both;animation-timeline:--hm-rc;animation-range:cover 0% cover 100%}
    .hm-rc-ph{animation:hm-dim linear both;animation-timeline:--hm-rc;animation-range:cover 0% cover 100%}
    .hm-rc-ph img{animation:hm-drift linear both;animation-timeline:--hm-rc;animation-range:cover 0% cover 100%}
  }
}
@keyframes hm-focus{0%,100%{scale:.9}44%,56%{scale:1}}
@keyframes hm-dim{0%,100%{opacity:.55}44%,56%{opacity:1}}
@keyframes hm-drift{from{translate:6% 0}to{translate:-6% 0}}

/* ================================================================ A7 · Soma Vita: warm → cold → calm */
@property --hm-temp{syntax:'<number>';inherits:true;initial-value:0}
.hm-soma{isolation:isolate}
.hm-soma .eyebrow{color:#C9B2D1} /* lighter Soma Vita plum: 6:1+ on every tint below (the plum itself was 2.6:1 on ink) */
@supports (animation-timeline: view()){
  @media (prefers-reduced-motion: no-preference){
    .hm-soma{background:#4A3120;animation:hm-temp linear both;animation-timeline:view();animation-range:cover 8% cover 92%}
    .hm-soma::before,.hm-soma::after{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none}
    .hm-soma::before{background:#15324A;opacity:clamp(0,var(--hm-temp),1)}
    .hm-soma::after{background:#3A2A45;opacity:clamp(0,calc(var(--hm-temp) - 1),1)}
  }
}
@keyframes hm-temp{0%,18%{--hm-temp:0}50%{--hm-temp:1}82%,100%{--hm-temp:2}}

/* ================================================================ A8 · reviews stack */
.hm-rv{display:grid;gap:21px;padding-top:30px} /* the whole block 25% smaller (owner, 2026-10-12) */
.hm-rv-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px 24px}
.hm-rv-title{font-size:clamp(1.4rem,2.6vw,1.8rem);color:var(--ink)}
.hm-rv-ctl{display:flex;align-items:center;gap:12px}
.hm-rv-btn{width:38px;height:38px;border:1px solid rgba(21,42,46,.2);background:transparent;cursor:pointer;display:grid;place-items:center;color:var(--ink);border-radius:50%;transition:border-color .3s,background .3s}
.hm-rv-btn:hover{border-color:var(--ink)}
.hm-rv-btn:focus-visible{outline:2px solid var(--sea);outline-offset:3px}
.hm-rv-btn svg{width:15px;height:15px}
.hm-rv-count{font-size:.62rem;letter-spacing:.2em;color:var(--soft);min-width:64px;text-align:center;font-variant-numeric:tabular-nums}
.hm-stack{display:grid;gap:12px;max-width:480px;width:100%}
.hm-rcard{margin:0;background:#fff;border:1px solid rgba(21,42,46,.08);padding:clamp(20px,3.8vw,32px) clamp(18px,3.4vw,28px) 20px;display:flex;flex-direction:column;justify-content:space-between;gap:16px;
  box-shadow:0 1px 0 rgba(21,42,46,.04),0 18px 40px -26px rgba(21,42,46,.28)}
.hm-rcard-stars{color:var(--sea);font-size:.68rem;letter-spacing:.32em}
.hm-rcard blockquote{margin:0}
.hm-rcard blockquote p{margin:0;font:300 clamp(1.15rem,3.4vw,1.42rem)/1.34 'Cormorant Garamond',Georgia,serif;color:var(--ink);text-wrap:pretty}
.hm-rcard figcaption{display:flex;align-items:baseline;justify-content:space-between;gap:12px;border-top:1px solid var(--line);padding-top:12px}
.hm-rcard-who{font-size:.7rem;letter-spacing:.18em;text-transform:uppercase;color:var(--ink)}
.hm-rcard-plat{font-size:.66rem;letter-spacing:.18em;text-transform:uppercase;color:var(--soft)}
/* with the script: one deck, the top card on top */
.hm-stack.is-deck{gap:0;padding-bottom:22px;touch-action:pan-y}
.hm-stack.is-deck .hm-rcard{grid-area:1/1;min-height:225px;transform-origin:50% 100%;will-change:transform;user-select:none;-webkit-user-select:none;
  transition:transform .7s var(--m-settle),opacity .6s var(--m-settle)}
.hm-stack.is-deck .hm-rcard.top{cursor:grab}
.hm-stack.is-deck .hm-rcard.drag{cursor:grabbing;transition:none}
.hm-rv:not(.has-deck) .hm-rv-ctl{display:none}
@media (min-width:900px){
  .hm-rv{grid-template-columns:5fr 7fr;align-items:center;gap:54px}
  .hm-rv-head{flex-direction:column;align-items:flex-start;justify-content:flex-start}
}
@media (prefers-reduced-motion: reduce){.hm-stack.is-deck .hm-rcard{transition:none}}

/* ================================================================ A9 · book-direct ledger */
.hm-ledger{list-style:none;margin:44px auto 34px;padding:0;max-width:720px;text-align:left;border-top:1px solid var(--ink)}
.hm-lg{display:grid;grid-template-columns:30px 1fr;gap:4px 18px;padding:20px 0;border-bottom:1px solid var(--line);align-items:start}
.hm-tick{width:28px;height:28px;margin-top:1px;grid-row:span 2}
.hm-tick path{fill:none;stroke:var(--sea);stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;stroke-dashoffset:0}
.hm-lg h3{font-size:clamp(1.3rem,2.4vw,1.6rem)}
.hm-lg p{font-size:.9rem;color:var(--soft);margin:0}
.hm-dl-stay{margin:0 auto 28px;max-width:34ch;font:300 clamp(1.35rem,3vw,1.7rem)/1.35 'Cormorant Garamond',Georgia,serif;color:var(--ink)}
.hm-dl-stay small{display:block;font:400 .66rem/1.5 'Jost',sans-serif;letter-spacing:.16em;text-transform:uppercase;color:var(--soft);margin-top:6px}
.hm-dl-btn{min-height:48px}
.hm-dl-cover{display:none;position:absolute;inset:0;z-index:2;align-items:center;justify-content:center;border-radius:inherit;background:var(--bone);color:var(--sea);border:1px solid var(--sea);pointer-events:none}
@supports (animation-timeline: view()){
  @media (prefers-reduced-motion: no-preference){
    .hm-lg{view-timeline:--hm-lg block}
    .hm-tick path{animation:hm-draw linear both;animation-timeline:--hm-lg;animation-range:entry 70% cover 45%}
    .hm-dl-btn{view-timeline:--hm-btn block}
    .hm-dl-cover{display:flex;animation:hm-fill linear both;animation-timeline:--hm-btn;animation-range:entry 100% cover 42%}
  }
}
@keyframes hm-draw{from{stroke-dashoffset:1}to{stroke-dashoffset:0}}
@keyframes hm-fill{from{clip-path:inset(0 0 0 0)}to{clip-path:inset(0 0 0 100%)}}
/* browsers without scroll timelines: the same, played once on entry (home-motion.js adds .hm-io) */
.hm-io .hm-tick path{stroke-dashoffset:1;transition:stroke-dashoffset 1.1s var(--m-settle)}
.hm-io .hm-lg.in .hm-tick path{stroke-dashoffset:0}
.hm-io .hm-dl-cover{display:flex;clip-path:inset(0 0 0 0);transition:clip-path 1s var(--m-move) .45s}
.hm-io .hm-dl-btn.in .hm-dl-cover{clip-path:inset(0 0 0 100%)}

/* ================================================================ phones */
@media (max-width:680px){
  .hm-pill{min-height:54px;gap:12px;padding-right:18px}
  .hm-pill-t1{font-size:1.15rem}
  .hm-acts{flex-direction:column;gap:12px}
  .hm-now-in{gap:12px 16px}
  .hm-arc{width:68px;height:38px}
  .hm-now-it{padding-right:12px;margin-right:12px}
  .hm-now-it b{font-size:1.3rem}
}

/* ---------- Reviews inside the sections (website-30 idea 25, v3): one real review, from
   reviews.html, placed where its section raises the doubt it answers. */
.hm-inq{margin:6px 0 30px;padding:16px 20px;border-left:1px solid var(--brass);max-width:46ch}
.hm-inq .stars{font-size:.72rem;letter-spacing:3px;color:var(--brass)}
.hm-inq blockquote{margin:6px 0 10px;font:italic 400 1.3rem/1.35 'Cormorant Garamond',serif}
.hm-inq figcaption{font-size:.62rem;letter-spacing:.22em;text-transform:uppercase;color:var(--clay-ink)}
.dark .hm-inq{background:rgba(250,247,241,.05)}
.dark .hm-inq figcaption{color:var(--clay)}
.hm-inq--wrap{margin:44px 0 0}

/* ---------- The garden, 40 seconds (website-30 idea 5, v3); hidden until a recording exists */
.hm-listen{margin-top:30px;display:grid;grid-template-columns:76px 1fr;gap:16px;align-items:center;padding:14px;background:var(--sand);max-width:420px}
.hm-listen[hidden]{display:none}
.hm-listen-ph{width:76px;height:76px}
.hm-listen b{display:block;font:italic 400 1.25rem 'Cormorant Garamond',serif}
.hm-listen-ctl{display:flex;align-items:center;gap:10px;font-size:.75rem;color:var(--soft)}
.hm-listen-btn{flex:0 0 auto;width:44px;height:44px;border-radius:50%;border:0;background:var(--ink);color:var(--bone);display:grid;place-items:center;cursor:pointer}
.hm-listen-btn .pa,.hm-listen-btn[aria-pressed="true"] .pl{display:none}
.hm-listen-btn[aria-pressed="true"] .pa{display:inline}
.hm-listen-bar{height:2px;background:rgba(21,42,46,.15);margin-top:10px;overflow:hidden}
.hm-listen-bar i{display:block;height:100%;background:var(--sea);transform:scaleX(0);transform-origin:left}

/* ---------- Right now on Gili Air as a glass bar on the hero (website-30 idea 2, v3). Replaces the
   ink strip that sat under the hero; .hm-now stays the hook for home-motion.js (A3). */
.hm-now.hm-bar{position:absolute;z-index:3;left:50%;bottom:28px;transform:translateX(-50%);width:max-content;max-width:94%;display:flex;align-items:center;padding:9px 6px;
  border:1px solid rgba(250,247,241,.2);border-radius:999px;background:rgba(21,42,46,.55);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);
  color:var(--bone);box-shadow:0 20px 40px -24px rgba(0,0,0,.6)}
/* One slim line (owner, 2026-10-15, mockup A): emoji, number and a tiny label side by side. */
.hm-bar-c{flex:none;display:inline-flex;align-items:baseline;gap:7px;padding:0 20px;white-space:nowrap;border-left:1px solid rgba(250,247,241,.18)}
.hm-bar-c:first-child{border-left:0}
.hm-bar-c[hidden]{display:none}
.hm-bar-c .e{font-size:.8rem;line-height:1;align-self:center}
.hm-bar-c b{font:400 1.06rem/1 'Cormorant Garamond',Georgia,serif;font-variant-numeric:tabular-nums lining-nums;white-space:nowrap}
.hm-bar-c small{font-size:.5rem;letter-spacing:.16em;text-transform:uppercase;color:rgba(250,247,241,.78);white-space:nowrap}
.hm-hero .hm-foot{padding-bottom:84px}
@media (max-width:700px){.hm-hero .hm-foot{padding-bottom:200px}}
@media (max-width:700px){
  /* Phones: numbers only, one line, sitting above the WhatsApp button; wraps if the boats cell is on. */
  .hm-now.hm-bar{bottom:146px;padding:8px 4px;border-radius:18px;flex-wrap:wrap;justify-content:center;row-gap:4px}
  .hm-bar-c{padding:0 10px;gap:5px}
  .hm-bar-c .e{font-size:.72rem}
  .hm-bar-c b{font-size:.95rem}
  .hm-bar-c small{display:none}
  .hm-hero .hm-cue{display:none}
}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){.hm-now.hm-bar{background:rgba(21,42,46,.86)}}
