/* Cielo Samui Boutique Hotel & Spa: "The Arched Window" demo (ScaleSiam)
   Mobile first. Breakpoints 768 / 1024. Smallest text anywhere: 13px.
   Every hidden reveal state is gated by html.js and cleared by html.no-fx. */

:root {
  --paper: #F5F1E9;        /* warm white concrete */
  --stone: #ECE5D8;        /* pale stone */
  --stone-2: #E4DACA;
  --sand: #DACBA7;         /* brand sand */
  --ink: #222323;          /* brand charcoal */
  --text: #4A463F;
  --muted: #615A4E;
  --gold: #A18955;         /* brand gold: logo, hairlines, large type */
  --gold-ink: #6E5B33;     /* gold for small text (5.2:1 on stone) */
  --hair: rgba(161, 137, 85, .5);
  --hair-ink: rgba(34, 35, 35, .16);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --curtain: cubic-bezier(.77, 0, .18, 1);
  --sweep: cubic-bezier(.7, 0, .2, 1);
  --serif: "Ibarra Real Nova", "Baskerville", "Iowan Old Style", Georgia, serif;
  --sans: "Jost", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --gut: clamp(22px, 5vw, 72px);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .36 0 0 0 0 .26 0 0 0 1.5 -.9'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 84px; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-stopped { overflow: clip; }
.lenis.lenis-smooth iframe { pointer-events: none; }
body {
  margin: 0;
  background: var(--paper) var(--grain);
  color: var(--text);
  font: 400 17px/1.75 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
@supports (overflow: clip) { body { overflow-x: clip; } }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
em { font-style: italic; }
address { font-style: normal; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 16px; top: 12px; z-index: 100; padding: 12px 18px;
  background: var(--ink); color: #fff; font-size: 15px; text-decoration: none;
  transform: translateY(-160%); transition: transform .3s var(--ease);
}
.skip:focus { transform: none; }
:focus-visible { outline: 2px solid var(--gold-ink); outline-offset: 3px; }
.hero :focus-visible, .stage :focus-visible { outline-color: #fff; }
.stage .room-card :focus-visible { outline-color: var(--gold-ink); }

.wrap { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 var(--gut); }

/* ---------- type ---------- */
.h2 {
  font-family: var(--serif);
  font-size: clamp(34px, 4.3vw, 62px);
  line-height: 1.06;
  letter-spacing: -.012em;
  color: var(--ink);
}
.h2 em { display: block; color: #806A3D; }
.lead { font-size: clamp(19px, 1.5vw, 21px); line-height: 1.65; color: var(--ink); font-weight: 300; }

/* ---------- buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 30px;
  background: var(--gold); color: var(--ink);
  border: 0; border-radius: 0; cursor: pointer;
  font: 500 14px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
  transition: background-color .5s var(--ease), color .5s var(--ease), transform .6s var(--ease);
}
.btn:hover { background: var(--ink); color: #fff; }
.btn-sm { min-height: 44px; padding: 0 20px; font-size: 13px; }
.link-arrow {
  display: inline-flex; align-items: center; gap: 12px; min-height: 44px;
  font: 500 14px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; position: relative;
}
.link-arrow .arr { position: relative; flex: none; width: 52px; height: 9px; }
.link-arrow .arr::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 34px; height: 1px; background: currentColor;
  transform-origin: 0 50%; transition: transform .6s var(--ease);
}
.link-arrow .arr::after {
  content: ""; position: absolute; left: 25px; top: 0; width: 9px; height: 9px;
  border-top: 1px solid currentColor; border-right: 1px solid currentColor;
  transform: translateX(0) rotate(45deg); transition: transform .6s var(--ease);
}
.link-arrow:hover .arr::before { transform: scaleX(1.53); }
.link-arrow:hover .arr::after { transform: translateX(18px) rotate(45deg); }

/* ---------- header ---------- */
.site-head {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; padding: 0 var(--gut);
  color: var(--ink);
  background: rgba(245, 241, 233, .985);
  transform: translateY(-105%);
  transition: transform .7s var(--ease), background-color .5s, color .5s;
}
.site-head::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--hair) 20%, var(--hair) 80%, transparent);
}
.site-head.is-solid { transform: none; }
.nav { display: flex; align-items: center; gap: 30px; }
.site-head .nav-l, .site-head .nav-r > a:not(.btn) {
  /* phones: section links leave the layout (JS also marks them inert) */
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.nav a:not(.btn) {
  font: 500 13px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase;
  text-decoration: none; padding: 16px 0; position: relative;
}
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 9px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .6s var(--sweep);
}
.nav a:not(.btn):hover::after { transform: scaleX(1); transform-origin: left; }
.head-mark { display: flex; align-items: center; color: var(--gold); padding: 6px 0; }
.head-mark svg { height: 46px; width: auto; }

@media (min-width: 1024px) {
  .site-head {
    display: grid; grid-template-columns: 1fr auto 1fr; height: 88px;
    color: #fff; background: transparent; transform: none;
  }
  .site-head::after { opacity: 0; transition: opacity .5s; }
  .site-head .nav-l, .site-head .nav-r > a:not(.btn) { position: relative; width: auto; height: auto; overflow: visible; clip: auto; }
  .nav-l { display: flex; }
  .nav-r { justify-content: flex-end; }
  .nav-r > a:not(.btn) { display: inline-block; }
  .head-mark { color: #fff; opacity: 0; transition: opacity .6s var(--ease), color .5s; }
  .head-mark svg { height: 54px; }
  .site-head.is-solid { background: rgba(245, 241, 233, .985); color: var(--ink); }
  .site-head.is-solid::after { opacity: 1; }
  .site-head.is-solid .head-mark { opacity: 1; color: var(--gold); }
  /* the hero has the one "Book your stay"; the header's appears once the header turns solid */
  .site-head .btn-sm { transition: opacity .6s var(--ease), visibility 0s linear .6s, background-color .5s var(--ease), color .5s var(--ease); }
  .site-head:not(.is-solid) .btn-sm { opacity: 0; visibility: hidden; pointer-events: none; }
  .site-head.is-solid .btn-sm { transition-delay: 0s; }
  .site-head:not(.is-solid) .nav a { text-shadow: 0 0 2px rgba(20, 16, 10, .45), 0 1px 3px rgba(20, 16, 10, .45), 0 0 18px rgba(20, 16, 10, .5); }
  /* without JS the header never turns solid: keep its white links over the hero only */
  html:not(.js) .site-head { position: absolute; }
  html.intro .site-head { opacity: 0; }
  html.intro.intro-live .site-head { opacity: 1; }
  .site-head { transition: opacity .9s var(--ease), background-color .5s, color .5s; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; height: 100vh; height: 100svh; min-height: 600px;
  overflow: hidden; background: var(--paper); color: #fff;
}
.hero-media, .hf { position: absolute; inset: 0; }
.hf { opacity: 0; transition: opacity 1.8s ease; background-size: cover; background-position: center; }
.hf.is-on { opacity: 1; }
.hf picture, .hf img { width: 100%; height: 100%; }
.hf img { object-fit: cover; transform: scale(1.1); transition: transform 0s linear 2s; }
.hero.kb-go .hf.is-on img { transform: scale(1); transition: transform 7.5s cubic-bezier(.22, .6, .2, 1); }
html:not(.js) .hf img, html.no-fx .hf img { transform: none; }
.hero-scrim {
  position: absolute; inset: 0; pointer-events: none;
  /* one soft local scrim behind the logo and line, a little light at the top for the header */
  background:
    radial-gradient(ellipse 26% 34% at 50% 36%, rgba(24, 18, 10, .46), rgba(24, 18, 10, .30) 45%, rgba(24, 18, 10, 0) 100%),
    radial-gradient(ellipse 30% 14% at 50% 62%, rgba(24, 18, 10, .30), rgba(24, 18, 10, 0) 100%),
    radial-gradient(ellipse 30% 9% at 17% 4%, rgba(20, 16, 10, .30), rgba(20, 16, 10, 0) 100%),
    linear-gradient(180deg, rgba(20, 16, 10, .60), rgba(20, 16, 10, .42) 7%, rgba(20, 16, 10, .14) 15%, rgba(20, 16, 10, 0) 26%),
    linear-gradient(0deg, rgba(20, 16, 10, .24), rgba(20, 16, 10, 0) 24%),
    rgba(24, 18, 10, .12);
}
.hero-scrim::after {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity 1.8s ease;
  background:
    radial-gradient(ellipse 30% 30% at 50% 34%, rgba(24, 18, 10, .34), rgba(24, 18, 10, 0) 100%),
    radial-gradient(ellipse 26% 12% at 50% 65.5%, rgba(24, 18, 10, .42), rgba(24, 18, 10, .30) 50%, rgba(24, 18, 10, 0) 100%);
}
.hero[data-tone="bright"] .hero-scrim::after { opacity: 1; }
@media (max-width: 767px) {
  /* phones: the logo is a third of the width, so the scrim is wider; a local band sits behind the line and location */
  .hero-scrim {
    background:
      radial-gradient(ellipse 50% 28% at 50% 35%, rgba(24, 18, 10, .46), rgba(24, 18, 10, .30) 45%, rgba(24, 18, 10, 0) 100%),
      radial-gradient(ellipse 58% 12% at 50% 59%, rgba(24, 18, 10, .34), rgba(24, 18, 10, 0) 100%),
      linear-gradient(0deg, rgba(20, 16, 10, .24), rgba(20, 16, 10, 0) 24%),
      rgba(24, 18, 10, .12);
  }
  .hero-scrim::after {
    background:
      radial-gradient(ellipse 54% 30% at 50% 40%, rgba(24, 18, 10, .30), rgba(24, 18, 10, 0) 100%),
      radial-gradient(ellipse 56% 8% at 50% 61.5%, rgba(24, 18, 10, .36), rgba(24, 18, 10, 0) 100%);
  }
}
.veil { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.hero-inner {
  position: relative; z-index: 3; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 40px var(--gut) 72px;
}
.hero-logo { position: relative; width: clamp(176px, 46vw, 210px); aspect-ratio: 8 / 9; color: #fff; }
.hero-logo .logo-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hero-line {
  margin-top: 30px; font-family: var(--serif); font-size: clamp(27px, 2.8vw, 40px); line-height: 1.18;
  text-shadow: 0 1px 2px rgba(20, 16, 10, .35), 0 0 28px rgba(20, 16, 10, .45);
}
.hero-where {
  margin-top: 14px; font: 500 14px/1.4 var(--sans); letter-spacing: .26em; text-transform: uppercase;
  text-shadow: 0 0 2px rgba(20, 16, 10, .5), 0 1px 3px rgba(20, 16, 10, .45), 0 0 18px rgba(20, 16, 10, .55);
}
.hero-logo .logo-svg { filter: drop-shadow(0 0 1px rgba(20, 16, 10, .35)) drop-shadow(0 0 14px rgba(20, 16, 10, .3)); }
.hero-logo .logo-intro { filter: none; }
.hero-cta { margin-top: 30px; }
.hero-ctrl {
  position: absolute; z-index: 3; left: 50%; bottom: 14px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 4px;
  filter: drop-shadow(0 0 3px rgba(20, 16, 10, .45));
}
.dashes { display: flex; }
.dash { width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; }
.dash::before, .dash i {
  content: ""; position: absolute; left: 9px; right: 9px; top: 21px; height: 2px; background: rgba(255,255,255,.45);
}
.dash i { background: #fff; transform: scaleX(0); transform-origin: left; }
.dash.is-on i { animation: dashfill var(--dur, 6500ms) linear forwards; }
.dash.was i { transform: scaleX(1); }
.paused .dash.is-on i { animation-play-state: paused; }
@keyframes dashfill { to { transform: scaleX(1); } }
.pause { width: 44px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; padding: 0; }
.pause span, .pause span::after {
  position: absolute; top: 15px; width: 2px; height: 14px; background: #fff; content: "";
}
.pause span { left: 18px; }
.pause span::after { left: 6px; top: 0; }
.pause[aria-pressed="true"] span { left: 17px; width: 0; height: 0; top: 15px; background: none;
  border-left: 11px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.pause[aria-pressed="true"] span::after { display: none; }
html:not(.js) .hero-ctrl { display: none; }

@media (min-width: 768px) {
  .hero-logo { width: clamp(200px, 17vw, 250px); }
  .hero-ctrl { left: auto; right: var(--gut); transform: none; bottom: 22px; }
}

/* hero intro states (only with JS) */
html.intro .hero-media, html.intro .hero-scrim { opacity: 0; }
html.intro .hero-logo > .logo-svg:not(.logo-intro) { visibility: hidden; }
.logo-intro { z-index: 1; }
html.js:not(.no-fx) .hx { opacity: 0; transform: translateY(16px); }
html.js:not(.no-fx) .hero-ctrl.hx { transform: translateX(-50%) translateY(16px); }
.hero.is-live .hx, html.js .hero.is-live .hx {
  opacity: 1; transform: none;
  transition: opacity 1s var(--ease), transform 1.2s var(--ease);
  transition-delay: var(--d, 0ms);
}
html.js:not(.no-fx) .hero.is-live .hero-ctrl.hx { opacity: 1; transform: translateX(-50%); }
@media (min-width: 768px) {
  html.js:not(.no-fx) .hero-ctrl.hx { transform: translateY(16px); }
  html.js:not(.no-fx) .hero.is-live .hero-ctrl.hx { opacity: 1; transform: none; }
}
/* slow network: app.js has not started after 1 s, so the head script shows the hero text without it */
html.js.hx-now .hx:not(.hero-ctrl) { opacity: 1; transform: none; transition: opacity 1s var(--ease), transform 1.2s var(--ease); transition-delay: var(--d, 0ms); }

.hero-where { --d: 120ms; }
.hero-cta { --d: 220ms; }
.hero-ctrl { --d: 420ms; }
html.no-fx .veil, html.no-fx .logo-intro { display: none; }
html.no-fx .hero-media, html.no-fx .hero-scrim { opacity: 1 !important; }
html.no-fx .hero-logo > .logo-svg { visibility: visible !important; }

/* ---------- reveals ---------- */
html.js:not(.no-fx) [data-reveal] { opacity: 0; transform: translateY(26px); }
html.js:not(.no-fx) [data-reveal].is-in {
  opacity: 1; transform: none;
  transition: opacity 1.1s var(--ease), transform 1.2s var(--ease);
  transition-delay: var(--d, 0ms);
}
.w { display: inline-block; vertical-align: top; }
html.js:not(.no-fx) [data-words] .w { opacity: 0; transform: translateY(.45em); filter: blur(6px); }
html.js:not(.no-fx) [data-words].is-in .w {
  opacity: 1; transform: none; filter: none;
  transition: opacity .9s var(--ease), transform 1.1s var(--ease), filter .9s var(--ease);
  transition-delay: calc(var(--i, 0) * 65ms);
}

/* the arched window: arch-topped frames that grow, or open into full rectangles */
.arch-frame, .card-media.arch { border-radius: 999px 999px 0 0; overflow: hidden; }
.arch-frame { position: relative; background-size: cover; background-position: center; }
.arch-frame img, .kohco-photo img, .book-photo img, .visit-photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
html.js:not(.no-fx) [data-window="arch"] { clip-path: inset(18% 18% 0 18% round 999px 999px 0 0); }
html.js:not(.no-fx) [data-window="open"] { clip-path: inset(14% 26% 0 26% round 999px 999px 0 0); }
html.js:not(.no-fx) [data-window="arch"].is-in { animation: win-arch 1.6s var(--ease) both; }
html.js:not(.no-fx) [data-window].win-done { clip-path: none; }
html.js:not(.no-fx) [data-window] img:not(.par):not(.kb):not(.ri) { transform: scale(1.22); }
html.js:not(.no-fx) [data-window].is-in img:not(.par):not(.kb):not(.ri) { transform: scale(1); transition: transform 2s var(--ease); }
@keyframes win-arch {
  from { clip-path: inset(18% 18% 0 18% round 999px 999px 0 0); }
  to { clip-path: inset(0 0 0 0 round 999px 999px 0 0); }
}
.par { will-change: transform; }

/* ---------- about ---------- */
.about { padding: 104px 0 96px; }
.about-grid { display: grid; gap: 56px; }
@media (max-width: 767px) {
  .about { padding: 72px 0 56px; }
  .about-grid { gap: 40px; }
}
.about-text .h2 { margin-bottom: 30px; }
.about-text p + p { margin-top: 18px; }
.about-text .lead { max-width: 30em; }
.about-text p:not(.lead) { max-width: 31em; }
.sign { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--gold-ink); }
.about-art { display: grid; grid-template-columns: 1fr 1.9fr; gap: 16px; align-items: end; }
.arch-frame.big { aspect-ratio: 3 / 4.15; grid-column: 2; grid-row: 1; }
.arch-frame.small { aspect-ratio: 3 / 4.3; margin-bottom: 14%; grid-column: 1; grid-row: 1; }
@media (min-width: 1024px) {
  .about { padding: 168px 0 72px; }
  .about-grid { grid-template-columns: 5fr 6fr; gap: 6vw; align-items: center; }
  .about-art { grid-template-columns: 1fr 2fr; gap: 24px; padding-right: 2vw; }
  .about-text { padding-bottom: 40px; }
}

/* ---------- rooms ---------- */
.rooms { position: relative; }
.rooms-head { padding-top: 96px; padding-bottom: 28px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
@media (max-width: 767px) { .rooms-head { padding-top: 64px; padding-bottom: 22px; } }
.rooms-head > *, .exp-head > *, .about-grid > *, .visit-grid > * { min-width: 0; }
.rooms-title p { margin-top: 18px; max-width: 30em; }
.picker { margin-top: 4px; min-width: 0; }
html:not(.js) .picker { display: none; }
/* two plain rows at every width: the group label in column 1, its rooms wrapping in column 2 */
.pick-rows { display: grid; grid-template-columns: auto minmax(0, 1fr); row-gap: 6px; align-items: start; }
.pick-group { display: contents; }
.pick-btns { grid-column: 2; display: flex; flex-wrap: wrap; margin-left: -10px; }
.pick-label {
  grid-column: 1; font: 500 13px/44px var(--sans); letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold-ink); padding-right: 14px;
}
.pick {
  flex: none; position: relative;
  min-height: 44px; padding: 0 10px; border: 0; background: none; cursor: pointer;
  font: 400 16px/1 var(--sans); color: var(--muted); white-space: nowrap;
  transition: color .4s;
}
.pick::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 6px; height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: left; transition: transform .7s var(--sweep), opacity .4s;
}
.pick:hover { color: var(--ink); }
.pick:hover::after { transform: scaleX(1); opacity: .35; }
.pick[aria-pressed="true"]::after { opacity: 1; }
.pick[aria-pressed="true"] { color: var(--ink); }
.pick[aria-pressed="true"]::after { transform: scaleX(1); }

.stage { position: relative; }
.room-list { list-style: none; margin: 0; padding: 0; }
/* without JS: every room in the open, as a simple list */
html:not(.js) .room-list, html.no-js-rooms .room-list { display: grid; gap: 56px; padding: 24px var(--gut) 40px; }
html:not(.js) .rf:not(:first-child), html:not(.js) .rf img:not([src]) { display: none; }
html:not(.js) .room-frames { aspect-ratio: 3 / 2; position: relative; overflow: hidden; }
html:not(.js) .rf img { width: 100%; height: 100%; object-fit: cover; }
html:not(.js) .room-info { padding-top: 20px; }
@media (min-width: 768px) { html:not(.js) .room-list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1200px) { html:not(.js) .room-list { grid-template-columns: 1fr 1fr 1fr; } }

/* with JS: a full-bleed crossfade stage */
html.js .room-list { position: relative; height: 44vh; height: 44svh; min-height: 300px; overflow: hidden; background: var(--stone); }
html.js .room { position: absolute; inset: 0; visibility: hidden; }
html.js .room.is-on, html.js .room.was-on { visibility: visible; }
html.js .room-frames, html.js .rf { position: absolute; inset: 0; }
html.js .rf { opacity: 0; transition: opacity 1.2s ease; background-size: cover; background-position: center; }
html.js .rf.is-on { opacity: 1; }
html.js .room.was-on { z-index: 0; }
html.js .room.is-on { z-index: 1; }
html.js .rf img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 0s linear 1.3s; }
html.js .room.is-on .rf.is-on img { transform: scale(1.015); transition: transform 7s cubic-bezier(.22, .6, .2, 1); }
/* the first photo waits at 1.08 until the window opens, so its settle is seen */
html.js:not(.no-fx) .stage:not(.win-in) .room.is-on .rf.is-on img { transform: scale(1.08); transition: none; }

.room-card {
  position: relative; z-index: 3; margin: -64px 14px 0; padding: 26px 24px 10px;
  background: var(--paper); box-shadow: 0 24px 50px -30px rgba(60, 44, 18, .35);
}
.room-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--gold);
}
.room-slot { transition: opacity .35s var(--ease), transform .5s var(--ease); }
.room-slot.out { opacity: 0; transform: translateY(8px); transition-duration: .22s; }
.room-sub { font: 500 13px/1.3 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-ink); margin-bottom: 8px; }
.room-name { font-family: var(--serif); font-size: clamp(27px, 2.4vw, 34px); line-height: 1.12; color: var(--ink); text-wrap: balance; }
.room-line { margin-top: 10px; font-size: 16px; line-height: 1.6; }
.room-facts {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--hair-ink);
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px;
  font: 400 15px/1.5 var(--sans); color: var(--muted);
}
.room-facts .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--gold); }
.room-price { margin-top: 6px; font-family: var(--serif); font-size: 26px; line-height: 1.3; color: var(--ink); }
.room-book { margin-top: 8px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.card-foot .room-book { margin-top: 0; }
/* prev / next step through the nine rooms; the counter shows the room, the dashes show its photos */
.room-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px; border-top: 1px solid var(--hair-ink);
}
.rnav {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 2px;
  border: 0; background: none; cursor: pointer; color: var(--muted);
  font: 500 13px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; transition: color .4s;
}
.rnav:hover { color: var(--ink); }
.rnav i { width: 7px; height: 7px; border-top: 1px solid currentColor; border-left: 1px solid currentColor; transform: rotate(-45deg); transition: transform .5s var(--ease); }
.rnav.next i { transform: rotate(135deg); }
.rnav.prev:hover i { transform: translateX(-3px) rotate(-45deg); }
.rnav.next:hover i { transform: translateX(3px) rotate(135deg); }
.rcount { font: 400 15px/1 var(--sans); letter-spacing: .12em; color: var(--muted); font-variant-numeric: tabular-nums; }
.rcount b { font-weight: 500; color: var(--ink); }
/* the card and controls sit outside the clipped window and land as it flattens */
html.js:not(.no-fx) .stage .room-card { opacity: 0; transform: translateY(26px); }
html.js:not(.no-fx) .stage.win-in .room-card { opacity: 1; transform: none; transition: opacity 1.1s var(--ease) .65s, transform 1.2s var(--ease) .65s; }
html.js:not(.no-fx) .stage .stage-ctrl { opacity: 0; }
html.js:not(.no-fx) .stage.win-in .stage-ctrl { opacity: 1; transition: opacity .4s ease 1.5s; }
.stage-ctrl {
  position: absolute; z-index: 4; right: 10px; top: max(300px, 44svh); transform: translateY(calc(-100% - 70px));
  display: flex; align-items: center; padding: 0 6px;
  filter: drop-shadow(0 0 3px rgba(20, 16, 10, .55)) drop-shadow(0 0 10px rgba(20, 16, 10, .25));
}
.rdots { display: flex; align-items: center; }
.rdot { width: 44px; height: 44px; border: 0; padding: 0; background: none; cursor: pointer; position: relative; }
.rdot::before { content: ""; position: absolute; left: 12px; right: 12px; top: 21px; height: 2px; background: rgba(255, 255, 255, .5); transition: background .4s; }
.rdot.is-on::before { background: #fff; }
.rpause { width: 44px; height: 44px; border: 0; padding: 0; background: none; cursor: pointer; position: relative; }
.rpause span, .rpause span::after { content: ""; position: absolute; top: 16px; width: 2px; height: 12px; background: #fff; }
.rpause span { left: 17px; }
.rpause span::after { left: 6px; top: 0; }
.rpause[aria-pressed="true"] span { width: 0; height: 0; background: none; left: 16px; top: 16px;
  border-left: 10px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.rpause[aria-pressed="true"] span::after { display: none; }

@media (min-width: 768px) {
  .room-card { position: absolute; left: var(--gut); bottom: 40px; width: 420px; margin: 0; padding: 32px 34px 12px; }
  html.js .room-list { height: 72vh; min-height: 520px; max-height: 800px; }
  .stage-ctrl { top: auto; bottom: 26px; right: calc(var(--gut) - 10px); transform: none; }
}
@media (min-width: 1024px) {
  .rooms-head { padding-top: 112px; padding-bottom: 32px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; column-gap: 6vw; }
  .rooms-title { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; column-gap: 6vw; align-items: end; }
  .rooms-title p { margin: 0 0 8px; }
  .picker { grid-column: 1 / -1; margin: 14px 0 0; }
  /* two plain rows: the group label in column 1, its rooms in column 2, so no row ever orphans */
  .pick-rows { row-gap: 4px; }
  .pick-label { padding-right: 30px; line-height: 46px; }
  .pick-btns { margin-left: -12px; }
  .pick { padding: 0 12px; min-height: 46px; }
  .pick::after { left: 12px; right: 12px; }
}

/* ---------- KohCo Beach ---------- */
.kohco { background: var(--stone); display: grid; }
.kohco-photo { position: relative; height: 62vh; height: 62svh; min-height: 360px; overflow: hidden; background-size: cover; }
.kohco-photo .kb { transform-origin: 60% 55%; }
.kohco.is-vis .kohco-photo .kb { animation: kb 22s ease-in-out infinite alternate; }
@keyframes kb { from { transform: scale(1); } to { transform: scale(1.08) translate(-1.5%, -1%); } }
.kohco-panel { padding: 64px var(--gut) 64px; }
.kohco-logo {
  width: 190px; aspect-ratio: 948 / 765; margin-bottom: 36px; background: var(--gold);
  -webkit-mask: url(../../assets/brand/kohco-full.svg) center / contain no-repeat;
  mask: url(../../assets/brand/kohco-full.svg) center / contain no-repeat;
}
.kohco-body { display: grid; gap: 40px; margin-top: 30px; }
.kohco-body p + p { margin-top: 16px; }
.kohco-body .link-arrow { margin-top: 4px; }
.arch-frame.portrait { aspect-ratio: 3 / 4.3; width: 64%; max-width: 300px; justify-self: end; }
@media (min-width: 1024px) {
  .kohco { grid-template-columns: 1fr 1fr; min-height: 100vh; }
  .kohco-photo { height: auto; min-height: 100%; }
  .kohco-panel { padding: 136px 6vw 120px 5.5vw; align-self: center; }
  .kohco-logo { width: 220px; }
  .kohco-body { grid-template-columns: 1fr 34%; gap: 40px; align-items: end; }
  .arch-frame.portrait { width: 100%; justify-self: stretch; margin-bottom: 6px; }
}

/* ---------- experiences rail ---------- */
.exp { padding: 104px 0 96px; overflow: hidden; }
@media (max-width: 767px) { .exp { padding: 72px 0 64px; } }
.exp-head { display: grid; gap: 22px; margin-bottom: 44px; }
.exp-intro p { max-width: 32em; }
.rail-btns { display: none; gap: 12px; margin-top: 28px; }
.rbtn {
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--hair); background: transparent;
  cursor: pointer; position: relative; transition: background-color .5s var(--ease), border-color .5s;
}
.rbtn span { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -3px;
  border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); transform: rotate(-45deg); }
.rbtn.next span { margin-left: -7px; transform: rotate(135deg); }
.rbtn:hover { background: var(--stone); border-color: var(--gold); }
.rbtn:disabled { opacity: .35; cursor: default; }
.rail {
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory; scroll-padding-left: var(--gut); outline: none;
  padding: 6px 0 12px;
}
.rail::-webkit-scrollbar { display: none; }
.rail:focus-visible { outline: 2px solid var(--gold-ink); outline-offset: -2px; }
.rail.is-drag { scroll-snap-type: none; cursor: grabbing; }
.rail.is-drag * { pointer-events: none; }
.rail-track { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0 var(--gut); width: max-content; }
.card { position: relative; flex: none; width: 76vw; max-width: 330px; scroll-snap-align: start; }
.card-media { position: relative; aspect-ratio: 4 / 5; background-size: cover; background-position: center; }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.14); }
/* WebKit can drop a rounded overflow clip on composited children: clip-path holds the arch */
.card-media.arch { -webkit-clip-path: inset(0 round 999px 999px 0 0); clip-path: inset(0 round 999px 999px 0 0); }
.card-cap { padding: 22px 4px 0 0; }
.card-title { position: relative; display: inline-block; font-family: var(--serif); font-size: 25px; line-height: 1.2; color: var(--ink); margin-bottom: 8px; }
.card-title::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .7s var(--sweep);
}
.card:hover .card-title::after { transform: scaleX(1); }
.card-cap p { font-size: 16px; line-height: 1.65; color: var(--text); max-width: 30em; }
/* the places without photos: names and one line each, in the open */
.also { list-style: none; margin: 56px 0 0; padding: 0; display: grid; }
.also li { padding: 22px 0 26px; border-top: 1px solid var(--hair); }
.also-name { font-family: var(--serif); font-style: italic; font-size: 28px; line-height: 1.2; color: var(--ink); }
.also p { margin-top: 8px; font-size: 16px; line-height: 1.65; max-width: 32em; }
@media (min-width: 1024px) {
  .exp { padding: 168px 0 120px; }
  .exp-head { grid-template-columns: 1fr 1fr; column-gap: 6vw; align-items: end; margin-bottom: 64px; }
  .rail-btns { display: flex; }
  .rail { cursor: grab; }
  .rail-track { gap: clamp(24px, 2.4vw, 36px); }
  .card { width: clamp(300px, 29vw, 420px); max-width: none; }
  .also { grid-template-columns: 1fr 1fr; column-gap: 6vw; margin-top: 88px; }
  .also-name { font-size: 30px; }
}

/* ---------- booking ---------- */
.book { position: relative; padding-bottom: 64px; }
.book-photo { position: relative; height: 56vh; height: 56svh; min-height: 340px; overflow: hidden; background-size: cover; background-position: center; }
.book-panel {
  position: relative; z-index: 2; margin-top: -72px; background: var(--paper);
  padding: 40px 24px 30px; box-shadow: 0 30px 70px -40px rgba(60, 44, 18, .4);
}
.book-panel::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--gold); }
.book-panel .h2 { font-size: clamp(32px, 3.6vw, 52px); }
.book-form { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 18px; margin-top: 34px; align-items: end; }
.field label, .field .lbl {
  display: block; margin-bottom: 6px; font: 500 13px/1.3 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
}
.field input[type="date"] {
  display: block; width: 100%; min-width: 0; height: 50px; padding: 0; margin: 0;
  -webkit-appearance: none; appearance: none; background: transparent; border: 0; border-bottom: 1px solid rgba(34, 35, 35, .35);
  border-radius: 0; font: 400 18px/50px var(--sans); color: var(--ink);
  transition: border-color .4s;
}
.field input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.field input[type="date"]::-webkit-calendar-picker-indicator { opacity: .5; cursor: pointer; }
.field input[type="date"]:focus { outline: none; border-bottom-color: var(--gold); box-shadow: 0 1px 0 var(--gold); }
.field input[type="date"]:focus-visible { outline: 2px solid var(--gold-ink); outline-offset: 4px; }
.stepper { display: flex; align-items: center; height: 50px; border-bottom: 1px solid rgba(34, 35, 35, .35); }
.st-btn {
  flex: none; width: 44px; height: 44px; border: 1px solid var(--hair); border-radius: 50%; background: transparent;
  font: 300 22px/1 var(--sans); color: var(--ink); cursor: pointer; transition: background-color .4s, border-color .4s;
}
.st-btn:hover { background: var(--stone); border-color: var(--gold); }
.st-btn:disabled { opacity: .35; cursor: default; }
.stepper input {
  flex: 1; min-width: 0; width: 3ch; height: 44px; border: 0; background: transparent; text-align: center;
  font: 400 20px/44px var(--sans); color: var(--ink); -moz-appearance: textfield; appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.book-go { grid-column: 1 / -1; width: 100%; }
.book-note { margin-top: 24px; font-size: 15px; line-height: 1.7; color: var(--muted); max-width: 46em; }
.book-note a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--hair); }
.book-note a:hover { text-decoration-color: var(--ink); }
@media (min-width: 768px) {
  .book-panel { padding: 52px 48px 40px; margin-top: -120px; }
}
@media (min-width: 1024px) {
  .book { padding-bottom: 110px; }
  .book-photo { height: 74vh; min-height: 520px; }
  .book-panel { max-width: 1180px; margin: -190px auto 0; padding: 60px 64px 46px; }
  .book-form { grid-template-columns: 1.15fr 1.15fr 1fr 1fr auto; gap: 30px; }
  .book-go { grid-column: auto; width: auto; }
}

/* ---------- visit ---------- */
.visit { background: var(--stone); padding: 96px 0; }
@media (max-width: 767px) { .visit { padding: 72px 0; } }
.visit-grid { display: grid; gap: 48px; }
.visit-photo { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background-size: cover; background-position: center; }
.visit-text address { margin-top: 28px; font-size: 19px; line-height: 1.6; color: var(--ink); }
.contact { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--hair-ink); }
.contact li { border-bottom: 1px solid var(--hair-ink); }
.contact a {
  display: flex; align-items: center; justify-content: space-between; min-height: 54px;
  font-size: 17px; text-decoration: none; color: var(--ink); transition: color .4s;
}
.contact a span { display: inline-block; transition: transform .6s var(--ease); }
.contact a:hover span { transform: translateX(6px); }
.contact a::after {
  content: ""; width: 8px; height: 8px; border-top: 1px solid var(--gold); border-right: 1px solid var(--gold);
  transform: rotate(45deg); margin-right: 6px; transition: transform .6s var(--ease);
}
.contact a:hover { color: var(--gold-ink); }
.sister { margin-top: 30px; font-size: 16px; line-height: 1.7; color: var(--muted); max-width: 30em; }
.sister a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--hair); }
@media (min-width: 1024px) {
  .visit { padding: 140px 0 128px; }
  .visit-grid { grid-template-columns: 1.1fr 1fr; gap: 6vw; align-items: center; }
  .visit-photo { aspect-ratio: 5 / 4; }
}

/* ---------- footer ---------- */
.site-foot { background: var(--sand) var(--grain); color: var(--ink); padding: 72px 0 26px; overflow: hidden; }
.foot-name { display: block; width: min(100%, 1100px); margin: 0 auto; color: var(--gold); }
.foot-name svg { display: block; width: 100%; height: auto; will-change: transform; }
.foot-row {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 28px;
  margin-top: 56px; padding-top: 18px; border-top: 1px solid rgba(34, 35, 35, .18); font-size: 15px;
}
.foot-row a { display: inline-flex; min-height: 44px; align-items: center; text-underline-offset: 3px; }
.foot-row .demo { font-size: 13px; letter-spacing: .06em; color: #5E5232; }
@media (min-width: 1024px) { .site-foot { padding: 110px 0 30px; } }

/* ---------- reduced motion: no movement, crossfades only ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hf img, html.js .rf img, .card-media img, .par, .kb { transform: none !important; transition: none !important; animation: none !important; }
  html.js:not(.no-fx) [data-reveal], html.js:not(.no-fx) [data-words] .w, html.js:not(.no-fx) .hx { transform: none !important; filter: none !important; }
  html.js:not(.no-fx) .hero-ctrl.hx { transform: translateX(-50%) !important; }
  html.js:not(.no-fx) [data-window] { clip-path: none !important; animation: none !important; opacity: 0; }
  html.js:not(.no-fx) [data-window].is-in { opacity: 1; transition: opacity 1.2s ease; }
  html.js:not(.no-fx) [data-window] img { transform: none !important; transition: none !important; }
  html.js:not(.no-fx) .stage .room-card { transform: none !important; }
  .link-arrow .arr::before, .link-arrow .arr::after, .contact a span, .rnav i, .card-title::after { transition: none !important; }
  .kohco.is-vis .kohco-photo .kb { animation: none; }
}
@media (prefers-reduced-motion: reduce) and (min-width: 768px) {
  html.js:not(.no-fx) .hero-ctrl.hx { transform: none !important; }
}
